Commit 27e310c9 authored by Jouni Malinen's avatar Jouni Malinen Committed by John W. Linville

nl80211: Allow association to change channels during reassociation

nl80211_associate() was rejecting (re)association attempts with EBUSY
in some cases where we are currently associated with an AP that uses
different channel from the destination AP. Fix this by passing the
current wdev to rdev_fixed_channel() in the same way that was already
done for join-IBSS and connect commands. This allows the fixedchan
check to skipped for the current wdev and allows the reassociation to
proceed.
Signed-off-by: default avatarJouni Malinen <j@w1.fi>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 1625c148
...@@ -3571,6 +3571,7 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info) ...@@ -3571,6 +3571,7 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info)
{ {
struct cfg80211_registered_device *rdev; struct cfg80211_registered_device *rdev;
struct net_device *dev; struct net_device *dev;
struct wireless_dev *wdev;
struct cfg80211_crypto_settings crypto; struct cfg80211_crypto_settings crypto;
struct ieee80211_channel *chan, *fixedchan; struct ieee80211_channel *chan, *fixedchan;
const u8 *bssid, *ssid, *ie = NULL, *prev_bssid = NULL; const u8 *bssid, *ssid, *ie = NULL, *prev_bssid = NULL;
...@@ -3616,7 +3617,8 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info) ...@@ -3616,7 +3617,8 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info)
} }
mutex_lock(&rdev->devlist_mtx); mutex_lock(&rdev->devlist_mtx);
fixedchan = rdev_fixed_channel(rdev, NULL); wdev = dev->ieee80211_ptr;
fixedchan = rdev_fixed_channel(rdev, wdev);
if (fixedchan && chan != fixedchan) { if (fixedchan && chan != fixedchan) {
err = -EBUSY; err = -EBUSY;
mutex_unlock(&rdev->devlist_mtx); mutex_unlock(&rdev->devlist_mtx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment