From: Vaishali Thakkar Date: Mon, 27 Oct 2014 12:26:33 +0000 (+0530) Subject: Staging: rtl8192u: Annotate association types with proper endianness X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=baf9ef82fc96ef37cb1d85aaf225663ff0c15fa6;p=openwrt%2Fstaging%2Fblogic.git Staging: rtl8192u: Annotate association types with proper endianness 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] Here, code before this change is correct. But this change silents sparse warnings and will not harm code too. Signed-off-by: Vaishali Thakkar Reviewed-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c index 51552d42d66c..a95508d9820e 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c @@ -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;