diff options
Diffstat (limited to 'net/ieee80211/softmac/ieee80211softmac_assoc.c')
-rw-r--r-- | net/ieee80211/softmac/ieee80211softmac_assoc.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/net/ieee80211/softmac/ieee80211softmac_assoc.c b/net/ieee80211/softmac/ieee80211softmac_assoc.c index a824852909e4..cc8110bdd579 100644 --- a/net/ieee80211/softmac/ieee80211softmac_assoc.c +++ b/net/ieee80211/softmac/ieee80211softmac_assoc.c | |||
@@ -30,7 +30,7 @@ | |||
30 | * Overview | 30 | * Overview |
31 | * | 31 | * |
32 | * Before you can associate, you have to authenticate. | 32 | * Before you can associate, you have to authenticate. |
33 | * | 33 | * |
34 | */ | 34 | */ |
35 | 35 | ||
36 | /* Sends out an association request to the desired AP */ | 36 | /* Sends out an association request to the desired AP */ |
@@ -41,10 +41,10 @@ ieee80211softmac_assoc(struct ieee80211softmac_device *mac, struct ieee80211soft | |||
41 | 41 | ||
42 | /* Switch to correct channel for this network */ | 42 | /* Switch to correct channel for this network */ |
43 | mac->set_channel(mac->dev, net->channel); | 43 | mac->set_channel(mac->dev, net->channel); |
44 | 44 | ||
45 | /* Send association request */ | 45 | /* Send association request */ |
46 | ieee80211softmac_send_mgt_frame(mac, net, IEEE80211_STYPE_ASSOC_REQ, 0); | 46 | ieee80211softmac_send_mgt_frame(mac, net, IEEE80211_STYPE_ASSOC_REQ, 0); |
47 | 47 | ||
48 | dprintk(KERN_INFO PFX "sent association request!\n"); | 48 | dprintk(KERN_INFO PFX "sent association request!\n"); |
49 | 49 | ||
50 | spin_lock_irqsave(&mac->lock, flags); | 50 | spin_lock_irqsave(&mac->lock, flags); |
@@ -153,7 +153,7 @@ network_matches_request(struct ieee80211softmac_device *mac, struct ieee80211_ne | |||
153 | } | 153 | } |
154 | 154 | ||
155 | /* if 'ANY' network requested, take any that doesn't have privacy enabled */ | 155 | /* if 'ANY' network requested, take any that doesn't have privacy enabled */ |
156 | if (mac->associnfo.req_essid.len == 0 | 156 | if (mac->associnfo.req_essid.len == 0 |
157 | && !(net->capability & WLAN_CAPABILITY_PRIVACY)) | 157 | && !(net->capability & WLAN_CAPABILITY_PRIVACY)) |
158 | return 1; | 158 | return 1; |
159 | if (net->ssid_len != mac->associnfo.req_essid.len) | 159 | if (net->ssid_len != mac->associnfo.req_essid.len) |
@@ -212,8 +212,8 @@ ieee80211softmac_assoc_work(struct work_struct *work) | |||
212 | 212 | ||
213 | /* try to find the requested network in our list, if we found one already */ | 213 | /* try to find the requested network in our list, if we found one already */ |
214 | if (bssvalid || mac->associnfo.bssfixed) | 214 | if (bssvalid || mac->associnfo.bssfixed) |
215 | found = ieee80211softmac_get_network_by_bssid(mac, mac->associnfo.bssid); | 215 | found = ieee80211softmac_get_network_by_bssid(mac, mac->associnfo.bssid); |
216 | 216 | ||
217 | /* Search the ieee80211 networks for this network if we didn't find it by bssid, | 217 | /* Search the ieee80211 networks for this network if we didn't find it by bssid, |
218 | * but only if we've scanned at least once (to get a better list of networks to | 218 | * but only if we've scanned at least once (to get a better list of networks to |
219 | * select from). If we have not scanned before, the !found logic below will be | 219 | * select from). If we have not scanned before, the !found logic below will be |
@@ -265,7 +265,7 @@ ieee80211softmac_assoc_work(struct work_struct *work) | |||
265 | if (mac->associnfo.scan_retry > 0) { | 265 | if (mac->associnfo.scan_retry > 0) { |
266 | mac->associnfo.scan_retry--; | 266 | mac->associnfo.scan_retry--; |
267 | 267 | ||
268 | /* We know of no such network. Let's scan. | 268 | /* We know of no such network. Let's scan. |
269 | * NB: this also happens if we had no memory to copy the network info... | 269 | * NB: this also happens if we had no memory to copy the network info... |
270 | * Maybe we can hope to have more memory after scanning finishes ;) | 270 | * Maybe we can hope to have more memory after scanning finishes ;) |
271 | */ | 271 | */ |
@@ -353,7 +353,7 @@ ieee80211softmac_associated(struct ieee80211softmac_device *mac, | |||
353 | mac->set_bssid_filter(mac->dev, net->bssid); | 353 | mac->set_bssid_filter(mac->dev, net->bssid); |
354 | memcpy(mac->ieee->bssid, net->bssid, ETH_ALEN); | 354 | memcpy(mac->ieee->bssid, net->bssid, ETH_ALEN); |
355 | netif_carrier_on(mac->dev); | 355 | netif_carrier_on(mac->dev); |
356 | 356 | ||
357 | mac->association_id = le16_to_cpup(&resp->aid); | 357 | mac->association_id = le16_to_cpup(&resp->aid); |
358 | } | 358 | } |
359 | 359 | ||
@@ -374,7 +374,7 @@ ieee80211softmac_handle_assoc_response(struct net_device * dev, | |||
374 | 374 | ||
375 | if (unlikely(!mac->running)) | 375 | if (unlikely(!mac->running)) |
376 | return -ENODEV; | 376 | return -ENODEV; |
377 | 377 | ||
378 | spin_lock_irqsave(&mac->lock, flags); | 378 | spin_lock_irqsave(&mac->lock, flags); |
379 | 379 | ||
380 | if (!mac->associnfo.associating) { | 380 | if (!mac->associnfo.associating) { |
@@ -426,7 +426,7 @@ ieee80211softmac_handle_assoc_response(struct net_device * dev, | |||
426 | mac->associnfo.associated = 0; | 426 | mac->associnfo.associated = 0; |
427 | ieee80211softmac_call_events_locked(mac, IEEE80211SOFTMAC_EVENT_ASSOCIATE_FAILED, network); | 427 | ieee80211softmac_call_events_locked(mac, IEEE80211SOFTMAC_EVENT_ASSOCIATE_FAILED, network); |
428 | } | 428 | } |
429 | 429 | ||
430 | spin_unlock_irqrestore(&mac->lock, flags); | 430 | spin_unlock_irqrestore(&mac->lock, flags); |
431 | return 0; | 431 | return 0; |
432 | } | 432 | } |