Staging: rtl8192e: Fix Sparse Warning of restricted __le16 degrades to integer in...
authorRashika Kheria <rashika.kheria@gmail.com>
Sat, 2 Nov 2013 18:10:15 +0000 (23:40 +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_tx.c-
warning: restricted __le16 degrades to integer

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_tx.c

index 8ff03f8675e8c8500235942e7a2b3e93a7de7703..77964885b3f22d2d51dae39b93da7e78088ee312 100644 (file)
@@ -815,7 +815,7 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
                                         cpu_to_le16(rtllib_query_seqnum(ieee, skb_frag,
                                                             header.addr1));
                                frag_hdr->seq_ctl =
-                                        cpu_to_le16(frag_hdr->seq_ctl<<4 | i);
+                                        cpu_to_le16(le16_to_cpu(frag_hdr->seq_ctl)<<4 | i);
                        } else {
                                frag_hdr->seq_ctl =
                                         cpu_to_le16(ieee->seq_ctrl[0]<<4 | i);