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>
This commit is contained in:
committed by
John W. Linville
parent
6a669e65c5
commit
b23aa676ab
@@ -546,6 +546,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb,
|
||||
"symlink to netdev!\n");
|
||||
}
|
||||
wdev->netdev = dev;
|
||||
wdev->sme_state = CFG80211_SME_IDLE;
|
||||
#ifdef CONFIG_WIRELESS_EXT
|
||||
wdev->wext.default_key = -1;
|
||||
wdev->wext.default_mgmt_key = -1;
|
||||
@@ -553,11 +554,20 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb,
|
||||
mutex_unlock(&rdev->devlist_mtx);
|
||||
break;
|
||||
case NETDEV_GOING_DOWN:
|
||||
if (wdev->iftype != NL80211_IFTYPE_ADHOC)
|
||||
break;
|
||||
if (!wdev->ssid_len)
|
||||
break;
|
||||
cfg80211_leave_ibss(rdev, dev, true);
|
||||
|
||||
switch (wdev->iftype) {
|
||||
case NL80211_IFTYPE_ADHOC:
|
||||
cfg80211_leave_ibss(rdev, dev, true);
|
||||
break;
|
||||
case NL80211_IFTYPE_STATION:
|
||||
cfg80211_disconnect(rdev, dev,
|
||||
WLAN_REASON_DEAUTH_LEAVING);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case NETDEV_UP:
|
||||
#ifdef CONFIG_WIRELESS_EXT
|
||||
|
||||
Reference in New Issue
Block a user