aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/core.c
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2009-07-01 15:26:54 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 15:01:51 -0400
commitb23aa676ab9d54469cda9f7151f51a2851c6f36e (patch)
treedd4af5fa38dbfec362ded1d655ed584bbcf60a53 /net/wireless/core.c
parent6a669e65c5ec393a650362874e13f7d3365a7827 (diff)
cfg80211: connect/disconnect API
This patch introduces the cfg80211 connect/disconnect API. The goal here is to run the AUTH and ASSOC steps in one call. This is needed for some fullmac cards that run both steps directly from the target, after the host driver sends a connect command. Additionally, all the new crypto parameters for connect() are now also valid for associate() -- although associate requires the IEs to be used, the information can be useful for drivers and should be given. 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.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index d41b7412b212..314e00f70e3b 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -546,6 +546,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb,
546 "symlink to netdev!\n"); 546 "symlink to netdev!\n");
547 } 547 }
548 wdev->netdev = dev; 548 wdev->netdev = dev;
549 wdev->sme_state = CFG80211_SME_IDLE;
549#ifdef CONFIG_WIRELESS_EXT 550#ifdef CONFIG_WIRELESS_EXT
550 wdev->wext.default_key = -1; 551 wdev->wext.default_key = -1;
551 wdev->wext.default_mgmt_key = -1; 552 wdev->wext.default_mgmt_key = -1;
@@ -553,11 +554,20 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb,
553 mutex_unlock(&rdev->devlist_mtx); 554 mutex_unlock(&rdev->devlist_mtx);
554 break; 555 break;
555 case NETDEV_GOING_DOWN: 556 case NETDEV_GOING_DOWN:
556 if (wdev->iftype != NL80211_IFTYPE_ADHOC)
557 break;
558 if (!wdev->ssid_len) 557 if (!wdev->ssid_len)
559 break; 558 break;
560 cfg80211_leave_ibss(rdev, dev, true); 559
560 switch (wdev->iftype) {
561 case NL80211_IFTYPE_ADHOC:
562 cfg80211_leave_ibss(rdev, dev, true);
563 break;
564 case NL80211_IFTYPE_STATION:
565 cfg80211_disconnect(rdev, dev,
566 WLAN_REASON_DEAUTH_LEAVING);
567 break;
568 default:
569 break;
570 }
561 break; 571 break;
562 case NETDEV_UP: 572 case NETDEV_UP:
563#ifdef CONFIG_WIRELESS_EXT 573#ifdef CONFIG_WIRELESS_EXT