Staging: rtl8192u: Annotate association types with proper endianness
authorVaishali Thakkar <vthakkar1994@gmail.com>
Mon, 27 Oct 2014 12:26:33 +0000 (17:56 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Oct 2014 07:53:26 +0000 (15:53 +0800)
This patch fixes following sparse warning at number of places in
file rtl819x_BAProc.c.

Warning: incorrect type in assignment (different base types)
         expected unsigned short [unsigned] [usertype] tmp
         got restricted __le16 [usertype] <noident>

Here, code before this change is correct. But this change silents
sparse warnings and will not harm code too.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c

index 51552d42d66c2c7dc5b5a9ec73396a4c2d8938b9..a95508d9820e0fefff332aeae40728ee34ddf70a 100644 (file)
@@ -110,7 +110,7 @@ static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, P
        struct sk_buff *skb = NULL;
         struct ieee80211_hdr_3addr *BAReq = NULL;
        u8 *tag = NULL;
-       u16 tmp = 0;
+       __le16 tmp = 0;
        u16 len = ieee->tx_headroom + 9;
        //category(1) + action field(1) + Dialog Token(1) + BA Parameter Set(2) +  BA Timeout Value(2) +  BA Start SeqCtrl(2)(or StatusCode(2))
        IEEE80211_DEBUG(IEEE80211_DL_TRACE | IEEE80211_DL_BA, "========>%s(), frame(%d) sentd to:%pM, ieee->dev:%p\n", __func__, type, Dst, ieee->dev);
@@ -196,7 +196,7 @@ static struct sk_buff *ieee80211_DELBA(
        struct sk_buff *skb = NULL;
         struct ieee80211_hdr_3addr *Delba = NULL;
        u8 *tag = NULL;
-       u16 tmp = 0;
+       __le16 tmp = 0;
        //len = head len + DELBA Parameter Set(2) + Reason Code(2)
        u16 len = 6 + ieee->tx_headroom;