summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8192e
diff options
context:
space:
mode:
authorRashika Kheria <rashika.kheria@gmail.com>2013-11-07 13:28:57 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-10 20:01:35 (GMT)
commit1830a6d840d7bcc9fa3e4ad07b405e3432cc5282 (patch)
tree97ccb1086451f522fd2b6a93bc09d142e0327d51 /drivers/staging/rtl8192e
parent7fe30a7d4af6a0cce07b6ca9dd2a624eead661d2 (diff)
downloadlinux-1830a6d840d7bcc9fa3e4ad07b405e3432cc5282.tar.xz
Staging: rtl8192e: Fix incorrect type in assignment in rtllib_softmac.c
This patch fixes the following Sparse warning in rtllib_softmac.c- drivers/staging/rtl8192e/rtllib_softmac.c:298:12: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192e/rtllib_softmac.c:298:12: expected unsigned short [unsigned] [usertype] fc drivers/staging/rtl8192e/rtllib_softmac.c:298:12: got restricted __le16 [usertype] frame_ctl drivers/staging/rtl8192e/rtllib_softmac.c:810:32: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192e/rtllib_softmac.c:810:32: expected restricted __le16 [usertype] frame_ctl drivers/staging/rtl8192e/rtllib_softmac.c:810:32: got int drivers/staging/rtl8192e/rtllib_softmac.c:814:34: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192e/rtllib_softmac.c:814:34: expected restricted __le16 [usertype] duration_id drivers/staging/rtl8192e/rtllib_softmac.c:814:34: got int drivers/staging/rtl8192e/rtllib_softmac.c:821:33: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192e/rtllib_softmac.c:821:33: expected restricted __le16 [usertype] algorithm drivers/staging/rtl8192e/rtllib_softmac.c:821:33: got int drivers/staging/rtl8192e/rtllib_softmac.c:955:24: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192e/rtllib_softmac.c:955:24: expected unsigned short [unsigned] [usertype] val16 drivers/staging/rtl8192e/rtllib_softmac.c:955:24: got restricted __le16 [usertype] <noident> drivers/staging/rtl8192e/rtllib_softmac.c:1263:33: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192e/rtllib_softmac.c:1263:33: expected restricted __le16 [usertype] duration_id drivers/staging/rtl8192e/rtllib_softmac.c:1263:33: got int drivers/staging/rtl8192e/rtllib_softmac.c:1282:30: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192e/rtllib_softmac.c:1282:30: expected restricted __le16 [usertype] listen_interval drivers/staging/rtl8192e/rtllib_softmac.c:1282:30: got unsigned short [unsigned] [usertype] listen_interval Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192e')
-rw-r--r--drivers/staging/rtl8192e/rtllib_softmac.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 721ee25..31cb858 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -295,7 +295,7 @@ inline void softmac_ps_mgmt_xmit(struct sk_buff *skb,
u16 fc, type, stype;
struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + 8);
- fc = header->frame_ctl;
+ fc = le16_to_cpu(header->frame_ctl);
type = WLAN_FC_GET_TYPE(fc);
stype = WLAN_FC_GET_STYPE(fc);
@@ -807,18 +807,18 @@ inline struct sk_buff *rtllib_authentication_req(struct rtllib_network *beacon,
auth = (struct rtllib_authentication *)
skb_put(skb, sizeof(struct rtllib_authentication));
- auth->header.frame_ctl = RTLLIB_STYPE_AUTH;
+ auth->header.frame_ctl = cpu_to_le16(RTLLIB_STYPE_AUTH);
if (challengelen)
auth->header.frame_ctl |= cpu_to_le16(RTLLIB_FCTL_WEP);
- auth->header.duration_id = 0x013a;
+ auth->header.duration_id = cpu_to_le16(0x013a);
memcpy(auth->header.addr1, beacon->bssid, ETH_ALEN);
memcpy(auth->header.addr2, ieee->dev->dev_addr, ETH_ALEN);
memcpy(auth->header.addr3, beacon->bssid, ETH_ALEN);
if (ieee->auth_mode == 0)
auth->algorithm = WLAN_AUTH_OPEN;
else if (ieee->auth_mode == 1)
- auth->algorithm = WLAN_AUTH_SHARED_KEY;
+ auth->algorithm = cpu_to_le16(WLAN_AUTH_SHARED_KEY);
else if (ieee->auth_mode == 2)
auth->algorithm = WLAN_AUTH_OPEN;
auth->transaction = cpu_to_le16(ieee->associate_seq);
@@ -952,7 +952,7 @@ static struct sk_buff *rtllib_probe_resp(struct rtllib_device *ieee, u8 *dest)
u16 val16;
*(tag++) = MFIE_TYPE_IBSS_SET;
*(tag++) = 2;
- val16 = cpu_to_le16(ieee->current_network.atim_window);
+ val16 = ieee->current_network.atim_window;
memcpy((u8 *)tag, (u8 *)&val16, 2);
tag += 2;
}
@@ -1260,7 +1260,7 @@ inline struct sk_buff *rtllib_association_req(struct rtllib_network *beacon,
hdr->header.frame_ctl = RTLLIB_STYPE_ASSOC_REQ;
- hdr->header.duration_id = 37;
+ hdr->header.duration_id = cpu_to_le16(37);
memcpy(hdr->header.addr1, beacon->bssid, ETH_ALEN);
memcpy(hdr->header.addr2, ieee->dev->dev_addr, ETH_ALEN);
memcpy(hdr->header.addr3, beacon->bssid, ETH_ALEN);
@@ -1279,7 +1279,7 @@ inline struct sk_buff *rtllib_association_req(struct rtllib_network *beacon,
hdr->capability |= cpu_to_le16(WLAN_CAPABILITY_SHORT_SLOT_TIME);
- hdr->listen_interval = beacon->listen_interval;
+ hdr->listen_interval = cpu_to_le16(beacon->listen_interval);
hdr->info_element[0].id = MFIE_TYPE_SSID;