cfg80211: emulate connect with auth/assoc
This adds code to cfg80211 so that drivers (mac80211 right now) that don't implement connect but rather auth/assoc can still be used with the nl80211 connect command. This will also be necessary for the wext compat code. 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
b23aa676ab
commit
6829c878ec
@@ -321,6 +321,7 @@ struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv)
|
||||
}
|
||||
|
||||
INIT_WORK(&drv->rfkill_sync, cfg80211_rfkill_sync_work);
|
||||
INIT_WORK(&drv->conn_work, cfg80211_conn_work);
|
||||
|
||||
/*
|
||||
* Initialize wiphy parameters to IEEE 802.11 MIB default values.
|
||||
@@ -481,6 +482,8 @@ void wiphy_unregister(struct wiphy *wiphy)
|
||||
/* unlock again before freeing */
|
||||
mutex_unlock(&drv->mtx);
|
||||
|
||||
cancel_work_sync(&drv->conn_work);
|
||||
|
||||
cfg80211_debugfs_drv_del(drv);
|
||||
|
||||
/* If this device got a regulatory hint tell core its
|
||||
@@ -569,6 +572,10 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb,
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case NETDEV_DOWN:
|
||||
kfree(wdev->conn);
|
||||
wdev->conn = NULL;
|
||||
break;
|
||||
case NETDEV_UP:
|
||||
#ifdef CONFIG_WIRELESS_EXT
|
||||
if (wdev->iftype != NL80211_IFTYPE_ADHOC)
|
||||
|
Reference in New Issue
Block a user