Staging: rtl8192e: Fix incorrect casting in rtllib_rx.c
authorRashika Kheria <rashika.kheria@gmail.com>
Sat, 2 Nov 2013 18:07:04 +0000 (23:37 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 Nov 2013 19:58:25 +0000 (11:58 -0800)
This patch fixes the following sparse warning in rtllib_rx.c-

drivers/staging/rtl8192e/rtllib_rx.c:2267:34: warning: cast to restricted __le32
drivers/staging/rtl8192e/rtllib_rx.c:2268:34: warning: cast to restricted __le32
drivers/staging/rtl8192e/rtllib_rx.c:2269:36: warning: cast to restricted __le32
drivers/staging/rtl8192e/rtllib_rx.c:2269:36: warning: cast from restricted __le16

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtllib_rx.c

index 6b46af596b3593c36a6c29fea332b623b409e572..1fab69d313ba75dee3ec9c9728f1dd2837b8a0a9 100644 (file)
@@ -2260,9 +2260,9 @@ static inline int rtllib_network_init(
        memcpy(network->bssid, beacon->header.addr3, ETH_ALEN);
        network->capability = le16_to_cpu(beacon->capability);
        network->last_scanned = jiffies;
-       network->time_stamp[0] = le32_to_cpu(beacon->time_stamp[0]);
-       network->time_stamp[1] = le32_to_cpu(beacon->time_stamp[1]);
-       network->beacon_interval = le32_to_cpu(beacon->beacon_interval);
+       network->time_stamp[0] = beacon->time_stamp[0];
+       network->time_stamp[1] = beacon->time_stamp[1];
+       network->beacon_interval = le16_to_cpu(beacon->beacon_interval);
        /* Where to pull this? beacon->listen_interval;*/
        network->listen_interval = 0x0A;
        network->rates_len = network->rates_ex_len = 0;