Skip to content

Commit b158774

Browse files
jannikbechergregkh
authored andcommitted
staging: rtl8712: fixed little endian problem
[ Upstream commit 502c80744fcac6b16f28699469c70db499fe2f69 ] Fixed a sparse warning. Using function le16_to_cpus() to avoid double assignment. Signed-off-by: Jannik Becher <becher.jannik@gmail.com> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ade7205 commit b158774

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/staging/rtl8712/rtl871x_ioctl_linux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ static inline char *translate_scan(struct _adapter *padapter,
199199
iwe.cmd = SIOCGIWMODE;
200200
memcpy((u8 *)&cap, r8712_get_capability_from_ie(pnetwork->network.IEs),
201201
2);
202-
cap = le16_to_cpu(cap);
202+
le16_to_cpus(&cap);
203203
if (cap & (WLAN_CAPABILITY_IBSS | WLAN_CAPABILITY_BSS)) {
204204
if (cap & WLAN_CAPABILITY_BSS)
205205
iwe.u.mode = (u32)IW_MODE_MASTER;

0 commit comments

Comments
 (0)