summaryrefslogtreecommitdiffstats
path: root/net/wireless/chan.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-07-10 19:39:02 +0200
committerJohannes Berg <johannes.berg@intel.com>2012-07-12 12:10:49 +0200
commit8e95ea49c94908cb10e698c5637d57f0fbdc796d (patch)
tree597f5817baab936980b6d888bfe695e8a40dc747 /net/wireless/chan.c
parent2a9e6c58871df77b69afffad250062853570ee23 (diff)
downloadop-kernel-dev-8e95ea49c94908cb10e698c5637d57f0fbdc796d.zip
op-kernel-dev-8e95ea49c94908cb10e698c5637d57f0fbdc796d.tar.gz
cfg80211: fix locking and lockdep complaints
To call cfg80211_get_chan_state() we need to lock the wdev, so we need to lock the wdev_iter mutex in cfg80211_can_use_iftype_chan(). This needs to use nested locking for lockdep. Also, cfg80211_get_chan_state() doesn't actually use the rdev, so remove that completely including the lock assertion that isn't needed. Reported-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/chan.c')
-rw-r--r--net/wireless/chan.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/wireless/chan.c b/net/wireless/chan.c
index 434c56b..1cc4b7c 100644
--- a/net/wireless/chan.c
+++ b/net/wireless/chan.c
@@ -103,15 +103,13 @@ int cfg80211_set_monitor_channel(struct cfg80211_registered_device *rdev,
}
void
-cfg80211_get_chan_state(struct cfg80211_registered_device *rdev,
- struct wireless_dev *wdev,
+cfg80211_get_chan_state(struct wireless_dev *wdev,
struct ieee80211_channel **chan,
enum cfg80211_chan_mode *chanmode)
{
*chan = NULL;
*chanmode = CHAN_MODE_UNDEFINED;
- ASSERT_RDEV_LOCK(rdev);
ASSERT_WDEV_LOCK(wdev);
if (!netif_running(wdev->netdev))
OpenPOWER on IntegriCloud