diff options
author | Johannes Berg <johannes.berg@intel.com> | 2023-03-01 11:09:14 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-03-07 10:28:51 +0100 |
commit | 0fd3af61731567dc0ad798c88c20f6d63fe331ea (patch) | |
tree | b88732afacc14b5033cba04a3a42328449992593 /net/mac80211/scan.c | |
parent | wifi: nl80211: Update the documentation of NL80211_SCAN_FLAG_COLOCATED_6GHZ (diff) | |
download | linux-0fd3af61731567dc0ad798c88c20f6d63fe331ea.tar.xz linux-0fd3af61731567dc0ad798c88c20f6d63fe331ea.zip |
wifi: mac80211: adjust scan cancel comment/check
Instead of the comment about holding RTNL, which is now wrong,
add a proper lockdep assertion for the wiphy mutex.
Fixes: a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230301115906.84352e46f342.Id90fef8c581cebe19cb30274340cf43885d55c74@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/scan.c')
-rw-r--r-- | net/mac80211/scan.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index dc3cdee51e66..32fa8aca7005 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -9,7 +9,7 @@ * Copyright 2007, Michael Wu <flamingice@sourmilk.net> * Copyright 2013-2015 Intel Mobile Communications GmbH * Copyright 2016-2017 Intel Deutschland GmbH - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation */ #include <linux/if_arp.h> @@ -1246,11 +1246,11 @@ int ieee80211_request_ibss_scan(struct ieee80211_sub_if_data *sdata, return ret; } -/* - * Only call this function when a scan can't be queued -- under RTNL. - */ void ieee80211_scan_cancel(struct ieee80211_local *local) { + /* ensure a new scan cannot be queued */ + lockdep_assert_wiphy(local->hw.wiphy); + /* * We are canceling software scan, or deferred scan that was not * yet really started (see __ieee80211_start_scan ). |