]>
Commit | Line | Data |
---|---|---|
d32e7543 GKH |
1 | From 2c474b8579e9b67ff72b2bcefce9f53c7f4469d4 Mon Sep 17 00:00:00 2001 |
2 | From: Igor Pylypiv <igor.pylypiv@gmail.com> | |
3 | Date: Mon, 30 Jan 2017 21:39:54 -0800 | |
4 | Subject: staging: wlan-ng: add missing byte order conversion | |
5 | ||
6 | From: Igor Pylypiv <igor.pylypiv@gmail.com> | |
7 | ||
8 | commit 2c474b8579e9b67ff72b2bcefce9f53c7f4469d4 upstream. | |
9 | ||
10 | Conversion macros le16_to_cpu was removed and that caused new sparse warning | |
11 | ||
12 | sparse output: | |
13 | drivers/staging/wlan-ng/p80211netdev.c:241:44: warning: incorrect type in argument 2 (different base types) | |
14 | drivers/staging/wlan-ng/p80211netdev.c:241:44: expected unsigned short [unsigned] [usertype] fc | |
15 | drivers/staging/wlan-ng/p80211netdev.c:241:44: got restricted __le16 [usertype] fc | |
16 | ||
17 | Fixes: 7ad82572348c ("staging:wlan-ng:Fix sparse warning") | |
18 | Signed-off-by: Igor Pylypiv <igor.pylypiv@gmail.com> | |
19 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
20 | ||
21 | --- | |
22 | drivers/staging/wlan-ng/p80211netdev.c | 2 +- | |
23 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
24 | ||
25 | --- a/drivers/staging/wlan-ng/p80211netdev.c | |
26 | +++ b/drivers/staging/wlan-ng/p80211netdev.c | |
27 | @@ -232,7 +232,7 @@ static int p80211_convert_to_ether(struc | |
28 | struct p80211_hdr_a3 *hdr; | |
29 | ||
30 | hdr = (struct p80211_hdr_a3 *)skb->data; | |
31 | - if (p80211_rx_typedrop(wlandev, hdr->fc)) | |
32 | + if (p80211_rx_typedrop(wlandev, le16_to_cpu(hdr->fc))) | |
33 | return CONV_TO_ETHER_SKIPPED; | |
34 | ||
35 | /* perform mcast filtering: allow my local address through but reject |