Skip to content

Commit

Permalink
staging: wlan-ng: add missing byte order conversion
Browse files Browse the repository at this point in the history
Conversion macros le16_to_cpu was removed and that caused new sparse warning

sparse output:
drivers/staging/wlan-ng/p80211netdev.c:241:44: warning: incorrect type in argument 2 (different base types)
drivers/staging/wlan-ng/p80211netdev.c:241:44:    expected unsigned short [unsigned] [usertype] fc
drivers/staging/wlan-ng/p80211netdev.c:241:44:    got restricted __le16 [usertype] fc

Fixes: 7ad8257 ("staging:wlan-ng:Fix sparse warning")
Signed-off-by: Igor Pylypiv <igor.pylypiv@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Igor Pylypiv authored and Greg Kroah-Hartman committed Jan 31, 2017
1 parent d9c3b5a commit 2c474b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/wlan-ng/p80211netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ static int p80211_convert_to_ether(struct wlandevice *wlandev,
struct p80211_hdr_a3 *hdr;

hdr = (struct p80211_hdr_a3 *)skb->data;
if (p80211_rx_typedrop(wlandev, hdr->fc))
if (p80211_rx_typedrop(wlandev, le16_to_cpu(hdr->fc)))
return CONV_TO_ETHER_SKIPPED;

/* perform mcast filtering: allow my local address through but reject
Expand Down

0 comments on commit 2c474b8

Please sign in to comment.