diff options
Diffstat (limited to 'drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c')
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c index a85bb232be97..d1471877e19d 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c @@ -411,7 +411,7 @@ static void ieee80211_send_probe(struct ieee80211_device *ieee) } } -void ieee80211_send_probe_requests(struct ieee80211_device *ieee) +static void ieee80211_send_probe_requests(struct ieee80211_device *ieee) { if (ieee->active_scan && (ieee->softmac_features & IEEE_SOFTMAC_PROBERQ)){ ieee80211_send_probe(ieee); @@ -517,7 +517,7 @@ static void ieee80211_softmac_scan_wq(struct work_struct *work) goto out; ieee->set_chan(ieee->dev, ieee->current_network.channel); if(channel_map[ieee->current_network.channel] == 1) - ieee80211_send_probe_requests(ieee); + ieee80211_send_probe_requests(ieee); queue_delayed_work(ieee->wq, &ieee->softmac_scan_wq, IEEE80211_SOFTMAC_SCAN_TIME); @@ -804,12 +804,11 @@ static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee, u8 *d *(tag++) = ieee->current_network.channel; if(atim_len){ - u16 val16; *(tag++) = MFIE_TYPE_IBSS_SET; *(tag++) = 2; - //*((u16*)(tag)) = cpu_to_le16(ieee->current_network.atim_window); - val16 = cpu_to_le16(ieee->current_network.atim_window); - memcpy((u8 *)tag, (u8 *)&val16, 2); + + put_unaligned_le16(ieee->current_network.atim_window, + (u8 *)tag); tag+=2; } @@ -1043,10 +1042,9 @@ inline struct sk_buff *ieee80211_association_req(struct ieee80211_network *beaco { ccxrm_ie_len = 6+2; } - if( beacon->BssCcxVerNumber >= 2 ) - { + if (beacon->BssCcxVerNumber >= 2) cxvernum_ie_len = 5+2; - } + #ifdef THOMAS_TURBO len = sizeof(struct ieee80211_assoc_request_frame)+ 2 + beacon->ssid_len//essid tagged val @@ -1103,7 +1101,7 @@ inline struct sk_buff *ieee80211_association_req(struct ieee80211_network *beaco if(ieee->short_slot) hdr->capability |= cpu_to_le16(WLAN_CAPABILITY_SHORT_SLOT); if (wmm_info_len) //QOS - hdr->capability |= cpu_to_le16(WLAN_CAPABILITY_QOS); + hdr->capability |= cpu_to_le16(WLAN_CAPABILITY_QOS); hdr->listen_interval = 0xa; //FIXME @@ -1118,8 +1116,7 @@ inline struct sk_buff *ieee80211_association_req(struct ieee80211_network *beaco ieee80211_MFIE_Brate(ieee, &tag); ieee80211_MFIE_Grate(ieee, &tag); // For CCX 1 S13, CKIP. Added by Annie, 2006-08-14. - if( beacon->bCkipSupported ) - { + if (beacon->bCkipSupported) { static u8 AironetIeOui[] = {0x00, 0x01, 0x66}; // "4500-client" u8 CcxAironetBuf[30]; OCTET_STRING osCcxAironetIE; @@ -1158,8 +1155,7 @@ inline struct sk_buff *ieee80211_association_req(struct ieee80211_network *beaco tag += osCcxRmCap.Length; } - if( beacon->BssCcxVerNumber >= 2 ) - { + if (beacon->BssCcxVerNumber >= 2) { u8 CcxVerNumBuf[] = {0x00, 0x40, 0x96, 0x03, 0x00}; OCTET_STRING osCcxVerNum; CcxVerNumBuf[4] = beacon->BssCcxVerNumber; @@ -1533,7 +1529,7 @@ void ieee80211_softmac_check_all_nets(struct ieee80211_device *ieee) break; if (ieee->scan_age == 0 || time_after(target->last_scanned + ieee->scan_age, jiffies)) - ieee80211_softmac_new_net(ieee, target); + ieee80211_softmac_new_net(ieee, target); } spin_unlock_irqrestore(&ieee->lock, flags); |