Commit 198e0d17 authored by Rashika Kheria's avatar Rashika Kheria Committed by Greg Kroah-Hartman

Staging: rtl8192e: Fix incorrect type in assignment in rtllib_tx.c

This patch fixes the following sparse warning in rtllib_tx.c-

drivers/staging/rtl8192e/rtllib_tx.c:234:24: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_tx.c:234:24:    expected restricted __le16 [usertype] frag_size
drivers/staging/rtl8192e/rtllib_tx.c:234:24:    got int [signed] txb_size
drivers/staging/rtl8192e/rtllib_tx.c:613:43: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_tx.c:613:43:    expected restricted __le16 [usertype] payload_size
drivers/staging/rtl8192e/rtllib_tx.c:613:43:    got unsigned int [unsigned] len
drivers/staging/rtl8192e/rtllib_tx.c:767:35: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_tx.c:767:35:    expected restricted __le16 [usertype] payload_size
drivers/staging/rtl8192e/rtllib_tx.c:767:35:    got int [signed] [assigned] bytes
drivers/staging/rtl8192e/rtllib_tx.c:814:51: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_tx.c:814:51:    expected restricted __le16 [usertype] seq_ctl
drivers/staging/rtl8192e/rtllib_tx.c:814:51:    got unsigned short
drivers/staging/rtl8192e/rtllib_tx.c:174:36: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_tx.c:174:36:    expected unsigned short [unsigned] [short] [usertype] <noident>
drivers/staging/rtl8192e/rtllib_tx.c:174:36:    got restricted __be16 [usertype] <noident>
drivers/staging/rtl8192e/rtllib_tx.c:873:35: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_tx.c:873:35:    expected restricted __le16 [usertype] payload_size
drivers/staging/rtl8192e/rtllib_tx.c:873:35:    got unsigned int [unsigned] len
Signed-off-by: default avatarRashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cf8ab8cf
...@@ -171,7 +171,7 @@ inline int rtllib_put_snap(u8 *data, u16 h_proto) ...@@ -171,7 +171,7 @@ inline int rtllib_put_snap(u8 *data, u16 h_proto)
snap->oui[1] = oui[1]; snap->oui[1] = oui[1];
snap->oui[2] = oui[2]; snap->oui[2] = oui[2];
*(u16 *)(data + SNAP_SIZE) = htons(h_proto); *(u16 *)(data + SNAP_SIZE) = h_proto;
return SNAP_SIZE + sizeof(u16); return SNAP_SIZE + sizeof(u16);
} }
...@@ -231,7 +231,7 @@ static struct rtllib_txb *rtllib_alloc_txb(int nr_frags, int txb_size, ...@@ -231,7 +231,7 @@ static struct rtllib_txb *rtllib_alloc_txb(int nr_frags, int txb_size,
memset(txb, 0, sizeof(struct rtllib_txb)); memset(txb, 0, sizeof(struct rtllib_txb));
txb->nr_frags = nr_frags; txb->nr_frags = nr_frags;
txb->frag_size = txb_size; txb->frag_size = cpu_to_le16(txb_size);
for (i = 0; i < nr_frags; i++) { for (i = 0; i < nr_frags; i++) {
txb->fragments[i] = dev_alloc_skb(txb_size); txb->fragments[i] = dev_alloc_skb(txb_size);
...@@ -610,7 +610,7 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) ...@@ -610,7 +610,7 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
} }
txb->encrypted = 0; txb->encrypted = 0;
txb->payload_size = skb->len; txb->payload_size = cpu_to_le16(skb->len);
memcpy(skb_put(txb->fragments[0], skb->len), skb->data, memcpy(skb_put(txb->fragments[0], skb->len), skb->data,
skb->len); skb->len);
...@@ -764,7 +764,7 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) ...@@ -764,7 +764,7 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
goto failed; goto failed;
} }
txb->encrypted = encrypt; txb->encrypted = encrypt;
txb->payload_size = bytes; txb->payload_size = cpu_to_le16(bytes);
if (qos_actived) if (qos_actived)
txb->queue_index = UP2AC(skb->priority); txb->queue_index = UP2AC(skb->priority);
...@@ -812,8 +812,8 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) ...@@ -812,8 +812,8 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
} }
if ((qos_actived) && (!bIsMulticast)) { if ((qos_actived) && (!bIsMulticast)) {
frag_hdr->seq_ctl = frag_hdr->seq_ctl =
rtllib_query_seqnum(ieee, skb_frag, cpu_to_le16(rtllib_query_seqnum(ieee, skb_frag,
header.addr1); header.addr1));
frag_hdr->seq_ctl = frag_hdr->seq_ctl =
cpu_to_le16(frag_hdr->seq_ctl<<4 | i); cpu_to_le16(frag_hdr->seq_ctl<<4 | i);
} else { } else {
...@@ -870,7 +870,7 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) ...@@ -870,7 +870,7 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
} }
txb->encrypted = 0; txb->encrypted = 0;
txb->payload_size = skb->len; txb->payload_size = cpu_to_le16(skb->len);
memcpy(skb_put(txb->fragments[0], skb->len), skb->data, memcpy(skb_put(txb->fragments[0], skb->len), skb->data,
skb->len); skb->len);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment