mwifiex: fix sparse warning
authorAmitkumar Karwar <akarwar@marvell.com>
Tue, 25 Nov 2014 14:43:02 +0000 (06:43 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 25 Nov 2014 19:09:56 +0000 (14:09 -0500)
This patch fixes following sparse warnings:

drivers/net/wireless/mwifiex/util.c:152:19: warning: cast from restricted __le16
drivers/net/wireless/mwifiex/util.c:152:19: warning: restricted __le16 degrades to integer

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/util.c

index a113ef8f0b8b6837e05b3d0900239fed5a88028e..b1768fbf98f2235a9c762b8af4a2fcc2fdf245a9 100644 (file)
@@ -149,7 +149,7 @@ mwifiex_parse_mgmt_packet(struct mwifiex_private *priv, u8 *payload, u16 len,
        u8 category, action_code;
        struct ieee80211_hdr *ieee_hdr = (void *)payload;
 
-       stype =  (cpu_to_le16(ieee_hdr->frame_control) & IEEE80211_FCTL_STYPE);
+       stype = (le16_to_cpu(ieee_hdr->frame_control) & IEEE80211_FCTL_STYPE);
 
        switch (stype) {
        case IEEE80211_STYPE_ACTION: