OLD | NEW |
1 /* | 1 /* |
2 * IBSS mode implementation | 2 * IBSS mode implementation |
3 * Copyright 2003-2008, Jouni Malinen <j@w1.fi> | 3 * Copyright 2003-2008, Jouni Malinen <j@w1.fi> |
4 * Copyright 2004, Instant802 Networks, Inc. | 4 * Copyright 2004, Instant802 Networks, Inc. |
5 * Copyright 2005, Devicescape Software, Inc. | 5 * Copyright 2005, Devicescape Software, Inc. |
6 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> | 6 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> |
7 * Copyright 2007, Michael Wu <flamingice@sourmilk.net> | 7 * Copyright 2007, Michael Wu <flamingice@sourmilk.net> |
8 * Copyright 2009, Johannes Berg <johannes@sipsolutions.net> | 8 * Copyright 2009, Johannes Berg <johannes@sipsolutions.net> |
9 * | 9 * |
10 * This program is free software; you can redistribute it and/or modify | 10 * This program is free software; you can redistribute it and/or modify |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 | 428 |
429 #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 429 #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
430 printk(KERN_DEBUG "%s: Adding new IBSS station %pM (dev=%s)\n", | 430 printk(KERN_DEBUG "%s: Adding new IBSS station %pM (dev=%s)\n", |
431 wiphy_name(local->hw.wiphy), addr, sdata->name); | 431 wiphy_name(local->hw.wiphy), addr, sdata->name); |
432 #endif | 432 #endif |
433 | 433 |
434 sta = sta_info_alloc(sdata, addr, gfp); | 434 sta = sta_info_alloc(sdata, addr, gfp); |
435 if (!sta) | 435 if (!sta) |
436 return NULL; | 436 return NULL; |
437 | 437 |
| 438 sta->last_rx = jiffies; |
438 set_sta_flags(sta, WLAN_STA_AUTHORIZED); | 439 set_sta_flags(sta, WLAN_STA_AUTHORIZED); |
439 | 440 |
440 /* make sure mandatory rates are always added */ | 441 /* make sure mandatory rates are always added */ |
441 sta->sta.supp_rates[band] = supp_rates | | 442 sta->sta.supp_rates[band] = supp_rates | |
442 ieee80211_mandatory_rates(local, band); | 443 ieee80211_mandatory_rates(local, band); |
443 | 444 |
444 rate_control_rate_init(sta); | 445 rate_control_rate_init(sta); |
445 | 446 |
446 /* If it fails, maybe we raced another insertion? */ | 447 /* If it fails, maybe we raced another insertion? */ |
447 if (sta_info_insert(sta)) | 448 if (sta_info_insert(sta)) |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
977 sdata->u.ibss.ssid_len = 0; | 978 sdata->u.ibss.ssid_len = 0; |
978 | 979 |
979 del_timer_sync(&sdata->u.ibss.timer); | 980 del_timer_sync(&sdata->u.ibss.timer); |
980 | 981 |
981 mutex_unlock(&sdata->u.ibss.mtx); | 982 mutex_unlock(&sdata->u.ibss.mtx); |
982 | 983 |
983 ieee80211_recalc_idle(sdata->local); | 984 ieee80211_recalc_idle(sdata->local); |
984 | 985 |
985 return 0; | 986 return 0; |
986 } | 987 } |
OLD | NEW |