aboutsummaryrefslogtreecommitdiffstats
path: root/net/ieee80211/softmac
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2006-12-05 09:37:56 -0500
committerDavid Howells <dhowells@warthog.cambridge.redhat.com>2006-12-05 09:37:56 -0500
commit4c1ac1b49122b805adfa4efc620592f68dccf5db (patch)
tree87557f4bc2fd4fe65b7570489c2f610c45c0adcd /net/ieee80211/softmac
parentc4028958b6ecad064b1a6303a6a5906d4fe48d73 (diff)
parentd916faace3efc0bf19fe9a615a1ab8fa1a24cd93 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: drivers/infiniband/core/iwcm.c drivers/net/chelsio/cxgb2.c drivers/net/wireless/bcm43xx/bcm43xx_main.c drivers/net/wireless/prism54/islpci_eth.c drivers/usb/core/hub.h drivers/usb/input/hid-core.c net/core/netpoll.c Fix up merge failures with Linus's head and fix new compilation failures. Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/ieee80211/softmac')
-rw-r--r--net/ieee80211/softmac/ieee80211softmac_auth.c24
-rw-r--r--net/ieee80211/softmac/ieee80211softmac_scan.c7
2 files changed, 17 insertions, 14 deletions
diff --git a/net/ieee80211/softmac/ieee80211softmac_auth.c b/net/ieee80211/softmac/ieee80211softmac_auth.c
index 2ae1833b657a..6012705aa4f8 100644
--- a/net/ieee80211/softmac/ieee80211softmac_auth.c
+++ b/net/ieee80211/softmac/ieee80211softmac_auth.c
@@ -161,7 +161,7 @@ ieee80211softmac_auth_resp(struct net_device *dev, struct ieee80211_auth *auth)
161 /* Make sure that we've got an auth queue item for this request */ 161 /* Make sure that we've got an auth queue item for this request */
162 if(aq == NULL) 162 if(aq == NULL)
163 { 163 {
164 printkl(KERN_DEBUG PFX "Authentication response received from "MAC_FMT" but no queue item exists.\n", MAC_ARG(auth->header.addr2)); 164 dprintkl(KERN_DEBUG PFX "Authentication response received from "MAC_FMT" but no queue item exists.\n", MAC_ARG(auth->header.addr2));
165 /* Error #? */ 165 /* Error #? */
166 return -1; 166 return -1;
167 } 167 }
@@ -169,7 +169,7 @@ ieee80211softmac_auth_resp(struct net_device *dev, struct ieee80211_auth *auth)
169 /* Check for out of order authentication */ 169 /* Check for out of order authentication */
170 if(!net->authenticating) 170 if(!net->authenticating)
171 { 171 {
172 printkl(KERN_DEBUG PFX "Authentication response received from "MAC_FMT" but did not request authentication.\n",MAC_ARG(auth->header.addr2)); 172 dprintkl(KERN_DEBUG PFX "Authentication response received from "MAC_FMT" but did not request authentication.\n",MAC_ARG(auth->header.addr2));
173 return -1; 173 return -1;
174 } 174 }
175 175
@@ -219,10 +219,16 @@ ieee80211softmac_auth_resp(struct net_device *dev, struct ieee80211_auth *auth)
219 net->challenge_len = *data++; 219 net->challenge_len = *data++;
220 if (net->challenge_len > WLAN_AUTH_CHALLENGE_LEN) 220 if (net->challenge_len > WLAN_AUTH_CHALLENGE_LEN)
221 net->challenge_len = WLAN_AUTH_CHALLENGE_LEN; 221 net->challenge_len = WLAN_AUTH_CHALLENGE_LEN;
222 if (net->challenge != NULL) 222 kfree(net->challenge);
223 kfree(net->challenge); 223 net->challenge = kmemdup(data, net->challenge_len,
224 net->challenge = kmalloc(net->challenge_len, GFP_ATOMIC); 224 GFP_ATOMIC);
225 memcpy(net->challenge, data, net->challenge_len); 225 if (net->challenge == NULL) {
226 printkl(KERN_NOTICE PFX "Shared Key "
227 "Authentication failed due to "
228 "memory shortage.\n");
229 spin_unlock_irqrestore(&mac->lock, flags);
230 break;
231 }
226 aq->state = IEEE80211SOFTMAC_AUTH_SHARED_RESPONSE; 232 aq->state = IEEE80211SOFTMAC_AUTH_SHARED_RESPONSE;
227 233
228 /* We reuse the work struct from the auth request here. 234 /* We reuse the work struct from the auth request here.
@@ -345,7 +351,7 @@ ieee80211softmac_deauth_req(struct ieee80211softmac_device *mac,
345 /* Make sure the network is authenticated */ 351 /* Make sure the network is authenticated */
346 if (!net->authenticated) 352 if (!net->authenticated)
347 { 353 {
348 printkl(KERN_DEBUG PFX "Can't send deauthentication packet, network is not authenticated.\n"); 354 dprintkl(KERN_DEBUG PFX "Can't send deauthentication packet, network is not authenticated.\n");
349 /* Error okay? */ 355 /* Error okay? */
350 return -EPERM; 356 return -EPERM;
351 } 357 }
@@ -379,7 +385,7 @@ ieee80211softmac_deauth_resp(struct net_device *dev, struct ieee80211_deauth *de
379 net = ieee80211softmac_get_network_by_bssid(mac, deauth->header.addr2); 385 net = ieee80211softmac_get_network_by_bssid(mac, deauth->header.addr2);
380 386
381 if (net == NULL) { 387 if (net == NULL) {
382 printkl(KERN_DEBUG PFX "Received deauthentication packet from "MAC_FMT", but that network is unknown.\n", 388 dprintkl(KERN_DEBUG PFX "Received deauthentication packet from "MAC_FMT", but that network is unknown.\n",
383 MAC_ARG(deauth->header.addr2)); 389 MAC_ARG(deauth->header.addr2));
384 return 0; 390 return 0;
385 } 391 }
@@ -387,7 +393,7 @@ ieee80211softmac_deauth_resp(struct net_device *dev, struct ieee80211_deauth *de
387 /* Make sure the network is authenticated */ 393 /* Make sure the network is authenticated */
388 if(!net->authenticated) 394 if(!net->authenticated)
389 { 395 {
390 printkl(KERN_DEBUG PFX "Can't perform deauthentication, network is not authenticated.\n"); 396 dprintkl(KERN_DEBUG PFX "Can't perform deauthentication, network is not authenticated.\n");
391 /* Error okay? */ 397 /* Error okay? */
392 return -EPERM; 398 return -EPERM;
393 } 399 }
diff --git a/net/ieee80211/softmac/ieee80211softmac_scan.c b/net/ieee80211/softmac/ieee80211softmac_scan.c
index a8326076581a..0c85d6c24cdb 100644
--- a/net/ieee80211/softmac/ieee80211softmac_scan.c
+++ b/net/ieee80211/softmac/ieee80211softmac_scan.c
@@ -47,7 +47,6 @@ ieee80211softmac_start_scan(struct ieee80211softmac_device *sm)
47 sm->scanning = 1; 47 sm->scanning = 1;
48 spin_unlock_irqrestore(&sm->lock, flags); 48 spin_unlock_irqrestore(&sm->lock, flags);
49 49
50 netif_tx_disable(sm->ieee->dev);
51 ret = sm->start_scan(sm->dev); 50 ret = sm->start_scan(sm->dev);
52 if (ret) { 51 if (ret) {
53 spin_lock_irqsave(&sm->lock, flags); 52 spin_lock_irqsave(&sm->lock, flags);
@@ -137,7 +136,8 @@ void ieee80211softmac_scan(struct work_struct *work)
137 si->started = 0; 136 si->started = 0;
138 spin_unlock_irqrestore(&sm->lock, flags); 137 spin_unlock_irqrestore(&sm->lock, flags);
139 138
140 dprintk(PFX "Scanning finished\n"); 139 dprintk(PFX "Scanning finished: scanned %d channels starting with channel %d\n",
140 sm->scaninfo->number_channels, sm->scaninfo->channels[0].channel);
141 ieee80211softmac_scan_finished(sm); 141 ieee80211softmac_scan_finished(sm);
142 complete_all(&sm->scaninfo->finished); 142 complete_all(&sm->scaninfo->finished);
143} 143}
@@ -186,8 +186,6 @@ int ieee80211softmac_start_scan_implementation(struct net_device *dev)
186 sm->scaninfo->channels = sm->ieee->geo.bg; 186 sm->scaninfo->channels = sm->ieee->geo.bg;
187 sm->scaninfo->number_channels = sm->ieee->geo.bg_channels; 187 sm->scaninfo->number_channels = sm->ieee->geo.bg_channels;
188 } 188 }
189 dprintk(PFX "Start scanning with channel: %d\n", sm->scaninfo->channels[0].channel);
190 dprintk(PFX "Scanning %d channels\n", sm->scaninfo->number_channels);
191 sm->scaninfo->current_channel_idx = 0; 189 sm->scaninfo->current_channel_idx = 0;
192 sm->scaninfo->started = 1; 190 sm->scaninfo->started = 1;
193 sm->scaninfo->stop = 0; 191 sm->scaninfo->stop = 0;
@@ -251,7 +249,6 @@ void ieee80211softmac_scan_finished(struct ieee80211softmac_device *sm)
251 if (net) 249 if (net)
252 sm->set_channel(sm->dev, net->channel); 250 sm->set_channel(sm->dev, net->channel);
253 } 251 }
254 netif_wake_queue(sm->ieee->dev);
255 ieee80211softmac_call_events(sm, IEEE80211SOFTMAC_EVENT_SCAN_FINISHED, NULL); 252 ieee80211softmac_call_events(sm, IEEE80211SOFTMAC_EVENT_SCAN_FINISHED, NULL);
256} 253}
257EXPORT_SYMBOL_GPL(ieee80211softmac_scan_finished); 254EXPORT_SYMBOL_GPL(ieee80211softmac_scan_finished);