blob: 0af360d9e9a5dc0e5f5f90469a908f54ed217cf9 [file] [log] [blame]
Johannes Berg4855d252006-01-12 21:12:59 +01001/*
2 * This file contains the softmac's association logic.
3 *
Johannes Berg79859052006-01-31 19:31:41 +01004 * Copyright (c) 2005, 2006 Johannes Berg <johannes@sipsolutions.net>
5 * Joseph Jezak <josejx@gentoo.org>
6 * Larry Finger <Larry.Finger@lwfinger.net>
7 * Danny van Dyk <kugelfang@gentoo.org>
8 * Michael Buesch <mbuesch@freenet.de>
Johannes Berg4855d252006-01-12 21:12:59 +01009 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of version 2 of the GNU General Public License as
12 * published by the Free Software Foundation.
13 *
14 * This program is distributed in the hope that it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
17 * more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 *
23 * The full GNU General Public License is included in this distribution in the
24 * file called COPYING.
25 */
26
Johannes Berg370121e2006-01-04 16:32:16 +010027#include "ieee80211softmac_priv.h"
28
29/*
30 * Overview
31 *
32 * Before you can associate, you have to authenticate.
33 *
34 */
35
36/* Sends out an association request to the desired AP */
37static void
38ieee80211softmac_assoc(struct ieee80211softmac_device *mac, struct ieee80211softmac_network *net)
39{
40 unsigned long flags;
John W. Linville9a107aa2006-03-22 17:29:32 -050041
Johannes Berg370121e2006-01-04 16:32:16 +010042 /* Switch to correct channel for this network */
43 mac->set_channel(mac->dev, net->channel);
44
45 /* Send association request */
46 ieee80211softmac_send_mgt_frame(mac, net, IEEE80211_STYPE_ASSOC_REQ, 0);
47
48 dprintk(KERN_INFO PFX "sent association request!\n");
49
Johannes Berg370121e2006-01-04 16:32:16 +010050 spin_lock_irqsave(&mac->lock, flags);
Johannes Berg370121e2006-01-04 16:32:16 +010051 mac->associated = 0; /* just to make sure */
Johannes Berg370121e2006-01-04 16:32:16 +010052
53 /* Set a timer for timeout */
54 /* FIXME: make timeout configurable */
Daniel Draked57336e2006-04-30 22:09:07 +010055 if (likely(mac->running))
56 schedule_delayed_work(&mac->associnfo.timeout, 5 * HZ);
57 spin_unlock_irqrestore(&mac->lock, flags);
Johannes Berg370121e2006-01-04 16:32:16 +010058}
59
60void
61ieee80211softmac_assoc_timeout(void *d)
62{
63 struct ieee80211softmac_device *mac = (struct ieee80211softmac_device *)d;
64 unsigned long flags;
65
Johannes Berg370121e2006-01-04 16:32:16 +010066 spin_lock_irqsave(&mac->lock, flags);
67 /* we might race against ieee80211softmac_handle_assoc_response,
68 * so make sure only one of us does something */
69 if (!mac->associnfo.associating) {
70 spin_unlock_irqrestore(&mac->lock, flags);
71 return;
72 }
73 mac->associnfo.associating = 0;
74 mac->associnfo.bssvalid = 0;
75 mac->associated = 0;
76 spin_unlock_irqrestore(&mac->lock, flags);
77
78 dprintk(KERN_INFO PFX "assoc request timed out!\n");
79 /* FIXME: we need to know the network here. that requires a bit of restructuring */
80 ieee80211softmac_call_events(mac, IEEE80211SOFTMAC_EVENT_ASSOCIATE_TIMEOUT, NULL);
81}
82
Johannes Berg9a1771e2006-04-20 20:02:02 +020083void
Daniel Drake6d92f832006-05-01 22:23:27 +010084ieee80211softmac_disassoc(struct ieee80211softmac_device *mac)
Johannes Berg370121e2006-01-04 16:32:16 +010085{
86 unsigned long flags;
Daniel Drake6d92f832006-05-01 22:23:27 +010087
88 spin_lock_irqsave(&mac->lock, flags);
89 if (mac->associnfo.associating)
90 cancel_delayed_work(&mac->associnfo.timeout);
91
92 netif_carrier_off(mac->dev);
93
94 mac->associated = 0;
95 mac->associnfo.bssvalid = 0;
96 mac->associnfo.associating = 0;
Daniel Drake8462fe32006-05-01 22:45:50 +010097 ieee80211softmac_init_txrates(mac);
Daniel Drake6d92f832006-05-01 22:23:27 +010098 ieee80211softmac_call_events_locked(mac, IEEE80211SOFTMAC_EVENT_DISASSOCIATED, NULL);
99 spin_unlock_irqrestore(&mac->lock, flags);
100}
101
102/* Sends out a disassociation request to the desired AP */
103void
104ieee80211softmac_send_disassoc_req(struct ieee80211softmac_device *mac, u16 reason)
105{
Johannes Berg370121e2006-01-04 16:32:16 +0100106 struct ieee80211softmac_network *found;
Johannes Berg370121e2006-01-04 16:32:16 +0100107
108 if (mac->associnfo.bssvalid && mac->associated) {
109 found = ieee80211softmac_get_network_by_bssid(mac, mac->associnfo.bssid);
110 if (found)
111 ieee80211softmac_send_mgt_frame(mac, found, IEEE80211_STYPE_DISASSOC, reason);
Johannes Berg370121e2006-01-04 16:32:16 +0100112 }
113
Daniel Drake6d92f832006-05-01 22:23:27 +0100114 ieee80211softmac_disassoc(mac);
Johannes Berg370121e2006-01-04 16:32:16 +0100115}
116
117static inline int
118we_support_all_basic_rates(struct ieee80211softmac_device *mac, u8 *from, u8 from_len)
119{
Daniel Drake8462fe32006-05-01 22:45:50 +0100120 int idx;
121 u8 rate;
Johannes Berg370121e2006-01-04 16:32:16 +0100122
123 for (idx = 0; idx < (from_len); idx++) {
124 rate = (from)[idx];
125 if (!(rate & IEEE80211_BASIC_RATE_MASK))
126 continue;
Johannes Berg370121e2006-01-04 16:32:16 +0100127 rate &= ~IEEE80211_BASIC_RATE_MASK;
Daniel Drake8462fe32006-05-01 22:45:50 +0100128 if (!ieee80211softmac_ratesinfo_rate_supported(&mac->ratesinfo, rate))
Johannes Berg370121e2006-01-04 16:32:16 +0100129 return 0;
130 }
131 return 1;
132}
133
134static int
135network_matches_request(struct ieee80211softmac_device *mac, struct ieee80211_network *net)
136{
137 /* we cannot associate to networks whose name we don't know */
138 if (ieee80211_is_empty_essid(net->ssid, net->ssid_len))
139 return 0;
140 /* do not associate to a network whose BSSBasicRateSet we cannot support */
141 if (!we_support_all_basic_rates(mac, net->rates, net->rates_len))
142 return 0;
143 /* do we really need to check the ex rates? */
144 if (!we_support_all_basic_rates(mac, net->rates_ex, net->rates_ex_len))
145 return 0;
146
Johannes Berg818667f2006-04-20 20:02:03 +0200147 /* assume that users know what they're doing ...
148 * (note we don't let them select a net we're incompatible with) */
149 if (mac->associnfo.bssfixed) {
150 return !memcmp(mac->associnfo.bssid, net->bssid, ETH_ALEN);
151 }
152
Johannes Berg370121e2006-01-04 16:32:16 +0100153 /* if 'ANY' network requested, take any that doesn't have privacy enabled */
154 if (mac->associnfo.req_essid.len == 0
155 && !(net->capability & WLAN_CAPABILITY_PRIVACY))
156 return 1;
157 if (net->ssid_len != mac->associnfo.req_essid.len)
158 return 0;
159 if (!memcmp(net->ssid, mac->associnfo.req_essid.data, mac->associnfo.req_essid.len))
160 return 1;
161 return 0;
162}
163
164static void
Daniel Drake6ae15df2006-06-01 15:37:22 +0100165ieee80211softmac_assoc_notify_scan(struct net_device *dev, int event_type, void *context)
Johannes Berg370121e2006-01-04 16:32:16 +0100166{
167 struct ieee80211softmac_device *mac = ieee80211_priv(dev);
168 ieee80211softmac_assoc_work((void*)mac);
169}
170
Daniel Drake6ae15df2006-06-01 15:37:22 +0100171static void
172ieee80211softmac_assoc_notify_auth(struct net_device *dev, int event_type, void *context)
173{
174 struct ieee80211softmac_device *mac = ieee80211_priv(dev);
175
176 switch (event_type) {
177 case IEEE80211SOFTMAC_EVENT_AUTHENTICATED:
178 ieee80211softmac_assoc_work((void*)mac);
179 break;
180 case IEEE80211SOFTMAC_EVENT_AUTH_FAILED:
181 case IEEE80211SOFTMAC_EVENT_AUTH_TIMEOUT:
182 ieee80211softmac_disassoc(mac);
183 break;
184 }
185}
186
Johannes Berg370121e2006-01-04 16:32:16 +0100187/* This function is called to handle userspace requests (asynchronously) */
188void
189ieee80211softmac_assoc_work(void *d)
190{
191 struct ieee80211softmac_device *mac = (struct ieee80211softmac_device *)d;
192 struct ieee80211softmac_network *found = NULL;
193 struct ieee80211_network *net = NULL, *best = NULL;
Daniel Drake6d92f832006-05-01 22:23:27 +0100194 int bssvalid;
Johannes Berg370121e2006-01-04 16:32:16 +0100195 unsigned long flags;
Daniel Drake6d92f832006-05-01 22:23:27 +0100196
197 /* ieee80211_disassoc might clear this */
198 bssvalid = mac->associnfo.bssvalid;
199
Johannes Berg370121e2006-01-04 16:32:16 +0100200 /* meh */
201 if (mac->associated)
Daniel Drake6d92f832006-05-01 22:23:27 +0100202 ieee80211softmac_send_disassoc_req(mac, WLAN_REASON_DISASSOC_STA_HAS_LEFT);
Johannes Berg370121e2006-01-04 16:32:16 +0100203
Joseph Jezakcb74c432006-06-11 12:00:37 -0400204 spin_lock_irqsave(&mac->lock, flags);
205 mac->associnfo.associating = 1;
206 spin_unlock_irqrestore(&mac->lock, flags);
207
Johannes Berg370121e2006-01-04 16:32:16 +0100208 /* try to find the requested network in our list, if we found one already */
Daniel Drake6d92f832006-05-01 22:23:27 +0100209 if (bssvalid || mac->associnfo.bssfixed)
Johannes Berg370121e2006-01-04 16:32:16 +0100210 found = ieee80211softmac_get_network_by_bssid(mac, mac->associnfo.bssid);
211
Johannes Berg1dc09772006-01-11 10:46:16 +0100212 /* Search the ieee80211 networks for this network if we didn't find it by bssid,
213 * but only if we've scanned at least once (to get a better list of networks to
214 * select from). If we have not scanned before, the !found logic below will be
215 * invoked and will scan. */
216 if (!found && (mac->associnfo.scan_retry < IEEE80211SOFTMAC_ASSOC_SCAN_RETRY_LIMIT))
Johannes Berg370121e2006-01-04 16:32:16 +0100217 {
Johannes Berg78e4f362006-01-10 18:56:32 +0100218 s8 rssi = -128; /* if I don't initialise, gcc emits an invalid warning
219 because it cannot follow the best pointer logic. */
Johannes Berg370121e2006-01-04 16:32:16 +0100220 spin_lock_irqsave(&mac->ieee->lock, flags);
221 list_for_each_entry(net, &mac->ieee->network_list, list) {
222 /* we're supposed to find the network with
223 * the best signal here, as we're asked to join
224 * any network with a specific ESSID, and many
225 * different ones could have that.
226 *
Johannes Berg78e4f362006-01-10 18:56:32 +0100227 * I'll for now just go with the reported rssi.
Johannes Berg370121e2006-01-04 16:32:16 +0100228 *
229 * We also should take into account the rateset
230 * here to find the best BSSID to try.
231 */
232 if (network_matches_request(mac, net)) {
233 if (!best) {
234 best = net;
Johannes Berg78e4f362006-01-10 18:56:32 +0100235 rssi = best->stats.rssi;
Johannes Berg370121e2006-01-04 16:32:16 +0100236 continue;
237 }
238 /* we already had a matching network, so
239 * compare their properties to get the
240 * better of the two ... (see above)
241 */
Johannes Berg78e4f362006-01-10 18:56:32 +0100242 if (rssi < net->stats.rssi) {
243 best = net;
244 rssi = best->stats.rssi;
245 }
Johannes Berg370121e2006-01-04 16:32:16 +0100246 }
247 }
248 /* if we unlock here, we might get interrupted and the `best'
249 * pointer could go stale */
250 if (best) {
251 found = ieee80211softmac_create_network(mac, best);
252 /* if found is still NULL, then we got -ENOMEM somewhere */
253 if (found)
254 ieee80211softmac_add_network(mac, found);
255 }
256 spin_unlock_irqrestore(&mac->ieee->lock, flags);
257 }
258
259 if (!found) {
260 if (mac->associnfo.scan_retry > 0) {
261 spin_lock_irqsave(&mac->lock, flags);
262 mac->associnfo.scan_retry--;
263 spin_unlock_irqrestore(&mac->lock, flags);
264
265 /* We know of no such network. Let's scan.
266 * NB: this also happens if we had no memory to copy the network info...
267 * Maybe we can hope to have more memory after scanning finishes ;)
268 */
Johannes Berg1dc09772006-01-11 10:46:16 +0100269 dprintk(KERN_INFO PFX "Associate: Scanning for networks first.\n");
Daniel Drake6ae15df2006-06-01 15:37:22 +0100270 ieee80211softmac_notify(mac->dev, IEEE80211SOFTMAC_EVENT_SCAN_FINISHED, ieee80211softmac_assoc_notify_scan, NULL);
Johannes Berg370121e2006-01-04 16:32:16 +0100271 if (ieee80211softmac_start_scan(mac))
Johannes Berg1dc09772006-01-11 10:46:16 +0100272 dprintk(KERN_INFO PFX "Associate: failed to initiate scan. Is device up?\n");
Johannes Berg370121e2006-01-04 16:32:16 +0100273 return;
Johannes Berg818667f2006-04-20 20:02:03 +0200274 } else {
Johannes Berg370121e2006-01-04 16:32:16 +0100275 spin_lock_irqsave(&mac->lock, flags);
276 mac->associnfo.associating = 0;
277 mac->associated = 0;
278 spin_unlock_irqrestore(&mac->lock, flags);
279
Johannes Berg1dc09772006-01-11 10:46:16 +0100280 dprintk(KERN_INFO PFX "Unable to find matching network after scan!\n");
Johannes Berg818667f2006-04-20 20:02:03 +0200281 /* reset the retry counter for the next user request since we
282 * break out and don't reschedule ourselves after this point. */
283 mac->associnfo.scan_retry = IEEE80211SOFTMAC_ASSOC_SCAN_RETRY_LIMIT;
Johannes Berg370121e2006-01-04 16:32:16 +0100284 ieee80211softmac_call_events(mac, IEEE80211SOFTMAC_EVENT_ASSOCIATE_NET_NOT_FOUND, NULL);
285 return;
286 }
287 }
Johannes Berg818667f2006-04-20 20:02:03 +0200288
289 /* reset the retry counter for the next user request since we
290 * now found a net and will try to associate to it, but not
291 * schedule this function again. */
292 mac->associnfo.scan_retry = IEEE80211SOFTMAC_ASSOC_SCAN_RETRY_LIMIT;
Johannes Berg370121e2006-01-04 16:32:16 +0100293 mac->associnfo.bssvalid = 1;
294 memcpy(mac->associnfo.bssid, found->bssid, ETH_ALEN);
295 /* copy the ESSID for displaying it */
296 mac->associnfo.associate_essid.len = found->essid.len;
297 memcpy(mac->associnfo.associate_essid.data, found->essid.data, IW_ESSID_MAX_SIZE + 1);
298
299 /* we found a network! authenticate (if necessary) and associate to it. */
Joseph Jezakcb74c432006-06-11 12:00:37 -0400300 if (found->authenticating) {
301 dprintk(KERN_INFO PFX "Already requested authentication, waiting...\n");
302 if(!mac->associnfo.assoc_wait) {
303 mac->associnfo.assoc_wait = 1;
304 ieee80211softmac_notify_internal(mac, IEEE80211SOFTMAC_EVENT_ANY, found, ieee80211softmac_assoc_notify, NULL, GFP_KERNEL);
305 }
306 return;
307 }
308 if (!found->authenticated && !found->authenticating) {
Johannes Berg370121e2006-01-04 16:32:16 +0100309 /* This relies on the fact that _auth_req only queues the work,
310 * otherwise adding the notification would be racy. */
311 if (!ieee80211softmac_auth_req(mac, found)) {
Joseph Jezakcb74c432006-06-11 12:00:37 -0400312 if(!mac->associnfo.assoc_wait) {
313 dprintk(KERN_INFO PFX "Cannot associate without being authenticated, requested authentication\n");
314 mac->associnfo.assoc_wait = 1;
315 ieee80211softmac_notify_internal(mac, IEEE80211SOFTMAC_EVENT_ANY, found, ieee80211softmac_assoc_notify, NULL, GFP_KERNEL);
316 }
Johannes Berg370121e2006-01-04 16:32:16 +0100317 } else {
318 printkl(KERN_WARNING PFX "Not authenticated, but requesting authentication failed. Giving up to associate\n");
Joseph Jezakcb74c432006-06-11 12:00:37 -0400319 mac->associnfo.assoc_wait = 0;
Johannes Berg370121e2006-01-04 16:32:16 +0100320 ieee80211softmac_call_events(mac, IEEE80211SOFTMAC_EVENT_ASSOCIATE_FAILED, found);
321 }
322 return;
323 }
324 /* finally! now we can start associating */
Joseph Jezakcb74c432006-06-11 12:00:37 -0400325 mac->associnfo.assoc_wait = 0;
Johannes Berg370121e2006-01-04 16:32:16 +0100326 ieee80211softmac_assoc(mac, found);
327}
328
329/* call this to do whatever is necessary when we're associated */
330static void
331ieee80211softmac_associated(struct ieee80211softmac_device *mac,
332 struct ieee80211_assoc_response * resp,
333 struct ieee80211softmac_network *net)
334{
335 mac->associnfo.associating = 0;
Daniel Drake8462fe32006-05-01 22:45:50 +0100336 mac->associnfo.supported_rates = net->supported_rates;
337 ieee80211softmac_recalc_txrates(mac);
338
Johannes Berg370121e2006-01-04 16:32:16 +0100339 mac->associated = 1;
340 if (mac->set_bssid_filter)
341 mac->set_bssid_filter(mac->dev, net->bssid);
342 memcpy(mac->ieee->bssid, net->bssid, ETH_ALEN);
Johannes Berg2dd50802006-01-06 18:11:23 +0100343 netif_carrier_on(mac->dev);
Johannes Berg370121e2006-01-04 16:32:16 +0100344
345 mac->association_id = le16_to_cpup(&resp->aid);
346}
347
348/* received frame handling functions */
349int
350ieee80211softmac_handle_assoc_response(struct net_device * dev,
351 struct ieee80211_assoc_response * resp,
352 struct ieee80211_network * _ieee80211_network_do_not_use)
353{
354 /* NOTE: the network parameter has to be ignored by
355 * this code because it is the ieee80211's pointer
356 * to the struct, not ours (we made a copy)
357 */
358 struct ieee80211softmac_device *mac = ieee80211_priv(dev);
359 u16 status = le16_to_cpup(&resp->status);
360 struct ieee80211softmac_network *network = NULL;
361 unsigned long flags;
Daniel Draked57336e2006-04-30 22:09:07 +0100362
363 if (unlikely(!mac->running))
364 return -ENODEV;
Johannes Berg370121e2006-01-04 16:32:16 +0100365
366 spin_lock_irqsave(&mac->lock, flags);
367
368 if (!mac->associnfo.associating) {
369 /* we race against the timeout function, so make sure
370 * only one of us can do work */
371 spin_unlock_irqrestore(&mac->lock, flags);
372 return 0;
373 }
374 network = ieee80211softmac_get_network_by_bssid_locked(mac, resp->header.addr3);
375
376 /* someone sending us things without us knowing him? Ignore. */
377 if (!network) {
378 dprintk(KERN_INFO PFX "Received unrequested assocation response from " MAC_FMT "\n", MAC_ARG(resp->header.addr3));
379 spin_unlock_irqrestore(&mac->lock, flags);
380 return 0;
381 }
382
383 /* now that we know it was for us, we can cancel the timeout */
384 cancel_delayed_work(&mac->associnfo.timeout);
385
386 switch (status) {
387 case 0:
388 dprintk(KERN_INFO PFX "associated!\n");
389 ieee80211softmac_associated(mac, resp, network);
390 ieee80211softmac_call_events_locked(mac, IEEE80211SOFTMAC_EVENT_ASSOCIATED, network);
391 break;
392 case WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH:
393 if (!network->auth_desynced_once) {
394 /* there seem to be a few rare cases where our view of
395 * the world is obscured, or buggy APs that don't DEAUTH
396 * us properly. So we handle that, but allow it only once.
397 */
398 printkl(KERN_INFO PFX "We were not authenticated during association, retrying...\n");
399 network->authenticated = 0;
400 /* we don't want to do this more than once ... */
401 network->auth_desynced_once = 1;
Johannes Berg5c4df6d2006-01-06 01:43:45 +0100402 schedule_work(&mac->associnfo.work);
Johannes Berg370121e2006-01-04 16:32:16 +0100403 break;
404 }
405 default:
406 dprintk(KERN_INFO PFX "associating failed (reason: 0x%x)!\n", status);
407 mac->associnfo.associating = 0;
408 mac->associnfo.bssvalid = 0;
409 mac->associated = 0;
410 ieee80211softmac_call_events_locked(mac, IEEE80211SOFTMAC_EVENT_ASSOCIATE_FAILED, network);
411 }
412
413 spin_unlock_irqrestore(&mac->lock, flags);
414 return 0;
415}
416
417int
418ieee80211softmac_handle_disassoc(struct net_device * dev,
419 struct ieee80211_disassoc *disassoc)
420{
421 struct ieee80211softmac_device *mac = ieee80211_priv(dev);
Daniel Draked57336e2006-04-30 22:09:07 +0100422
423 if (unlikely(!mac->running))
424 return -ENODEV;
425
Johannes Berg48b2e4c2006-01-10 19:12:19 +0100426 if (memcmp(disassoc->header.addr2, mac->associnfo.bssid, ETH_ALEN))
427 return 0;
Daniel Draked57336e2006-04-30 22:09:07 +0100428
Johannes Berg48b2e4c2006-01-10 19:12:19 +0100429 if (memcmp(disassoc->header.addr1, mac->dev->dev_addr, ETH_ALEN))
430 return 0;
Daniel Draked57336e2006-04-30 22:09:07 +0100431
Johannes Berg370121e2006-01-04 16:32:16 +0100432 dprintk(KERN_INFO PFX "got disassoc frame\n");
Daniel Drake6d92f832006-05-01 22:23:27 +0100433 ieee80211softmac_disassoc(mac);
434
435 /* try to reassociate */
Johannes Bergd1469cf2006-01-10 15:47:06 +0100436 schedule_work(&mac->associnfo.work);
Daniel Drake6d92f832006-05-01 22:23:27 +0100437
Johannes Berg370121e2006-01-04 16:32:16 +0100438 return 0;
439}
Johannes Bergb6c76582006-01-31 19:49:42 +0100440
441int
442ieee80211softmac_handle_reassoc_req(struct net_device * dev,
443 struct ieee80211_reassoc_request * resp)
444{
445 struct ieee80211softmac_device *mac = ieee80211_priv(dev);
446 struct ieee80211softmac_network *network;
447
Daniel Draked57336e2006-04-30 22:09:07 +0100448 if (unlikely(!mac->running))
449 return -ENODEV;
450
Johannes Bergb6c76582006-01-31 19:49:42 +0100451 network = ieee80211softmac_get_network_by_bssid(mac, resp->header.addr3);
452 if (!network) {
453 dprintkl(KERN_INFO PFX "reassoc request from unknown network\n");
454 return 0;
455 }
Michael Buesch9b0b4d82006-04-07 01:42:55 +0200456 schedule_work(&mac->associnfo.work);
457
Johannes Bergb6c76582006-01-31 19:49:42 +0100458 return 0;
459}