]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: rtl8192u: ieee80211: Fix incorrect type in assignment
authorGaston Gonzalez <gascoar@gmail.com>
Sun, 14 Jun 2015 22:59:34 +0000 (19:59 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Jun 2015 04:33:26 +0000 (21:33 -0700)
Added le16_to_cpu() conversion fixing the following warning in assignment detected by sparse:

drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2157:30: warning: invalid assignment: +=
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2157:30:    left side has type unsigned long
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2157:30:    right side has type restricted __le16

Signed-off-by: Gaston Gonzalez <gascoar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c

index 5fbade4cf2c4f961038f23667832abe6304a6b9d..1b11acb9623327d7aae801bd34ce82882cfb9e51 100644 (file)
@@ -2154,7 +2154,7 @@ void ieee80211_softmac_xmit(struct ieee80211_txb *txb, struct ieee80211_device *
        ieee80211_sta_wakeup(ieee, 0);
 
        /* update the tx status */
-       ieee->stats.tx_bytes += txb->payload_size;
+       ieee->stats.tx_bytes += le16_to_cpu(txb->payload_size);
        ieee->stats.tx_packets++;
        tcb_desc = (cb_desc *)(txb->fragments[0]->cb + MAX_DEV_ADDR_SIZE);
        if (tcb_desc->bMulticast) {