aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/core.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-04-19 15:24:32 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-04-22 16:57:17 -0400
commit04a773ade0680d862b479d7219973df60f7a3834 (patch)
treefc759eb79099fefd7f1329bcb2b703008cb0adfe /net/wireless/core.c
parent691597cb26f236ac7471f1adf925a134c86799d6 (diff)
cfg80211/nl80211: add IBSS API
This adds IBSS API along with (preliminary) wext handlers. The wext handlers can only do IBSS so you need to call them from your own wext handlers if the mode is IBSS. The nl80211 API requires * an SSID * a channel (frequency) for the case that a new IBSS has to be created It optionally supports * a flag to fix the channel * a fixed BSSID The cfg80211 code also takes care to leave the IBSS before the netdev is set down. If wireless extensions are used, it also caches values when the interface is down and instructs the driver to join when the interface is set up. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r--net/wireless/core.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index d1f556535f6d..de1ac51ae4e5 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -450,6 +450,22 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb,
450 dev->ieee80211_ptr->netdev = dev; 450 dev->ieee80211_ptr->netdev = dev;
451 mutex_unlock(&rdev->devlist_mtx); 451 mutex_unlock(&rdev->devlist_mtx);
452 break; 452 break;
453 case NETDEV_GOING_DOWN:
454 if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_ADHOC)
455 break;
456 if (!dev->ieee80211_ptr->ssid_len)
457 break;
458 cfg80211_leave_ibss(rdev, dev);
459 break;
460 case NETDEV_UP:
461#ifdef CONFIG_WIRELESS_EXT
462 if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_ADHOC)
463 break;
464 if (!dev->ieee80211_ptr->wext.ssid_len)
465 break;
466 cfg80211_join_ibss(rdev, dev, &dev->ieee80211_ptr->wext);
467 break;
468#endif
453 case NETDEV_UNREGISTER: 469 case NETDEV_UNREGISTER:
454 mutex_lock(&rdev->devlist_mtx); 470 mutex_lock(&rdev->devlist_mtx);
455 if (!list_empty(&dev->ieee80211_ptr->list)) { 471 if (!list_empty(&dev->ieee80211_ptr->list)) {