aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/chan.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-08-08 05:03:58 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-14 09:13:51 -0400
commit4b181144e6c1c25aaba9b9fc7cc70c95495ecb92 (patch)
tree93f85f1c99f097ec3c60f45b7b917c1b0dfbf7f9 /net/wireless/chan.c
parente312c24cf8229f9b6e76dbfd5d99eefe21f4ac0a (diff)
cfg80211: fix locking for SIWFREQ
"cfg80211: validate channel settings across interfaces" contained a locking bug -- in the managed-mode SIWFREQ call it would end up running into a lock recursion. This fixes it by not checking that particular interface for a channel that it needs to stay on, which is as it should be as that's the interface we're setting the channel for. Reported-by: Reinette Chatre <reinette.chatre@intel.com> Reported-by: Kalle Valo <kalle.valo@iki.fi> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Tested-by: Kalle Valo <kalle.valo@iki.fi> Tested-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/chan.c')
-rw-r--r--net/wireless/chan.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/wireless/chan.c b/net/wireless/chan.c
index bc00c9a06b3d..a46ac6c9b365 100644
--- a/net/wireless/chan.c
+++ b/net/wireless/chan.c
@@ -42,13 +42,14 @@ rdev_fixed_channel(struct cfg80211_registered_device *rdev,
42} 42}
43 43
44int rdev_set_freq(struct cfg80211_registered_device *rdev, 44int rdev_set_freq(struct cfg80211_registered_device *rdev,
45 struct wireless_dev *for_wdev,
45 int freq, enum nl80211_channel_type channel_type) 46 int freq, enum nl80211_channel_type channel_type)
46{ 47{
47 struct ieee80211_channel *chan; 48 struct ieee80211_channel *chan;
48 struct ieee80211_sta_ht_cap *ht_cap; 49 struct ieee80211_sta_ht_cap *ht_cap;
49 int result; 50 int result;
50 51
51 if (rdev_fixed_channel(rdev, NULL)) 52 if (rdev_fixed_channel(rdev, for_wdev))
52 return -EBUSY; 53 return -EBUSY;
53 54
54 if (!rdev->ops->set_channel) 55 if (!rdev->ops->set_channel)