staging: wlan-ng: Fix incorrect type in assignments
authorEbru Akagunduz <ebru.akagunduz@gmail.com>
Sat, 25 Oct 2014 10:16:42 +0000 (13:16 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Oct 2014 07:41:43 +0000 (15:41 +0800)
fc variable type was u16 and it has an assignment
from cpu_to_le16() so its type changed as __le16.
This bug found by sparse.

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wlan-ng/p80211conv.c
drivers/staging/wlan-ng/p80211hdr.h

index 3b5468c64fde556de4cf92960a2b646d1dc52e7f..7eaaf9a63503a955f60ce4c4789c121f330eb664 100644 (file)
@@ -107,7 +107,7 @@ int skb_ether_to_p80211(wlandevice_t *wlandev, u32 ethconv,
                        struct p80211_metawep *p80211_wep)
 {
 
-       u16 fc;
+       __le16 fc;
        u16 proto;
        struct wlan_ethhdr e_hdr;
        struct wlan_llc *e_llc;
index 66b5e201d41861e8ba653417fe89dc1655a29763..79d9b20b364d8a4323d5faf76f596e1a6822ca0f 100644 (file)
 /* Generic 802.11 Header types */
 
 struct p80211_hdr_a3 {
-       u16 fc;
+       __le16 fc;
        u16 dur;
        u8 a1[ETH_ALEN];
        u8 a2[ETH_ALEN];