aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-01-19 13:53:30 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-01-19 16:49:35 -0500
commit27e310c91c3433ab9997b925b3fd65e660634c76 (patch)
treedffe44a679ad5fc809b0cbc7c9a86cedc46a7ace /net/wireless/nl80211.c
parent1625c148cde23a8b4180e171ed4a17e17521b995 (diff)
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: Jouni Malinen <j@w1.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 4af7991a9ec..5b79ecf17be 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3571,6 +3571,7 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info)
3571{ 3571{
3572 struct cfg80211_registered_device *rdev; 3572 struct cfg80211_registered_device *rdev;
3573 struct net_device *dev; 3573 struct net_device *dev;
3574 struct wireless_dev *wdev;
3574 struct cfg80211_crypto_settings crypto; 3575 struct cfg80211_crypto_settings crypto;
3575 struct ieee80211_channel *chan, *fixedchan; 3576 struct ieee80211_channel *chan, *fixedchan;
3576 const u8 *bssid, *ssid, *ie = NULL, *prev_bssid = NULL; 3577 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 } 3617 }
3617 3618
3618 mutex_lock(&rdev->devlist_mtx); 3619 mutex_lock(&rdev->devlist_mtx);
3619 fixedchan = rdev_fixed_channel(rdev, NULL); 3620 wdev = dev->ieee80211_ptr;
3621 fixedchan = rdev_fixed_channel(rdev, wdev);
3620 if (fixedchan && chan != fixedchan) { 3622 if (fixedchan && chan != fixedchan) {
3621 err = -EBUSY; 3623 err = -EBUSY;
3622 mutex_unlock(&rdev->devlist_mtx); 3624 mutex_unlock(&rdev->devlist_mtx);