aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/core.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-07-01 15:26:56 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 15:01:51 -0400
commitf21293549f60f88c74fcb9944737f11048896dc4 (patch)
treed4a00663f87816c0c742e74d7b2c9bad31a18816 /net/wireless/core.c
parent6829c878ecd24ff0ae41b4668c7e9d0f11b66942 (diff)
cfg80211: managed mode wext compatibility
This adds code to make it possible to use the cfg80211 connect() API with wireless extensions, and because the previous patch added emulation of that API with auth() and assoc(), by extension also supports wext on that. At the same time, removes code from mac80211 for wext, but doesn't yet clean up mac80211's mlme code more. Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com> 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.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index a0a679704612..e2f80dd0e4a6 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -553,6 +553,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb,
553#ifdef CONFIG_WIRELESS_EXT 553#ifdef CONFIG_WIRELESS_EXT
554 wdev->wext.default_key = -1; 554 wdev->wext.default_key = -1;
555 wdev->wext.default_mgmt_key = -1; 555 wdev->wext.default_mgmt_key = -1;
556 wdev->wext.connect.auth_type = NL80211_AUTHTYPE_AUTOMATIC;
556#endif 557#endif
557 mutex_unlock(&rdev->devlist_mtx); 558 mutex_unlock(&rdev->devlist_mtx);
558 break; 559 break;
@@ -565,8 +566,13 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb,
565 cfg80211_leave_ibss(rdev, dev, true); 566 cfg80211_leave_ibss(rdev, dev, true);
566 break; 567 break;
567 case NL80211_IFTYPE_STATION: 568 case NL80211_IFTYPE_STATION:
569#ifdef CONFIG_WIRELESS_EXT
570 kfree(wdev->wext.ie);
571 wdev->wext.ie = NULL;
572 wdev->wext.ie_len = 0;
573#endif
568 cfg80211_disconnect(rdev, dev, 574 cfg80211_disconnect(rdev, dev,
569 WLAN_REASON_DEAUTH_LEAVING); 575 WLAN_REASON_DEAUTH_LEAVING, true);
570 break; 576 break;
571 default: 577 default:
572 break; 578 break;
@@ -578,11 +584,20 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb,
578 break; 584 break;
579 case NETDEV_UP: 585 case NETDEV_UP:
580#ifdef CONFIG_WIRELESS_EXT 586#ifdef CONFIG_WIRELESS_EXT
581 if (wdev->iftype != NL80211_IFTYPE_ADHOC) 587 switch (wdev->iftype) {
588 case NL80211_IFTYPE_ADHOC:
589 if (wdev->wext.ibss.ssid_len)
590 cfg80211_join_ibss(rdev, dev,
591 &wdev->wext.ibss);
582 break; 592 break;
583 if (!wdev->wext.ibss.ssid_len) 593 case NL80211_IFTYPE_STATION:
594 if (wdev->wext.connect.ssid_len)
595 cfg80211_connect(rdev, dev,
596 &wdev->wext.connect);
597 break;
598 default:
584 break; 599 break;
585 cfg80211_join_ibss(rdev, dev, &wdev->wext.ibss); 600 }
586#endif 601#endif
587 break; 602 break;
588 case NETDEV_UNREGISTER: 603 case NETDEV_UNREGISTER: