From 83efd52983b75ba976888a777df129b631e6ace5 Mon Sep 17 00:00:00 2001 From: Monam Agarwal Date: Fri, 7 Mar 2014 02:39:44 +0530 Subject: [PATCH] Staging: rtl8192e: Fix Sparse Warning of invalid assignment in rtllib_tx.c This patch fixes following sparse warnings: drivers/staging/rtl8192e/rtllib_tx.c:942:45: warning: invalid assignment: += drivers/staging/rtl8192e/rtllib_tx.c:942:45: left side has type unsigned long drivers/staging/rtl8192e/rtllib_tx.c:942:45: right side has type restricted __le16 drivers/staging/rtl8192e/rtllib_tx.c:947:49: warning: invalid assignment: += drivers/staging/rtl8192e/rtllib_tx.c:947:49: left side has type unsigned long drivers/staging/rtl8192e/rtllib_tx.c:947:49: right side has type restricted __le16 Signed-off-by: Monam Agarwal Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192e/rtllib_tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c index 77964885b3f2..11d0a9d8ee59 100644 --- a/drivers/staging/rtl8192e/rtllib_tx.c +++ b/drivers/staging/rtl8192e/rtllib_tx.c @@ -939,12 +939,12 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) if (txb) { if (ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE) { dev->stats.tx_packets++; - dev->stats.tx_bytes += txb->payload_size; + dev->stats.tx_bytes += le16_to_cpu(txb->payload_size); rtllib_softmac_xmit(txb, ieee); } else { if ((*ieee->hard_start_xmit)(txb, dev) == 0) { stats->tx_packets++; - stats->tx_bytes += txb->payload_size; + stats->tx_bytes += le16_to_cpu(txb->payload_size); return 0; } rtllib_txb_free(txb); -- 2.20.1