summaryrefslogtreecommitdiffstats
path: root/net/mac80211/driver-ops.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-12-14 14:22:10 +0100
committerJohannes Berg <johannes.berg@intel.com>2013-01-03 13:01:36 +0100
commitb8dc1a35c88dddcf62ce7bc59a7ed4c38c2f7597 (patch)
tree557b5f33c852896f353349c2d25ddba146848066 /net/mac80211/driver-ops.h
parent8da349329ae52462253052f804ef30d086c9911a (diff)
mac80211: further simplify ieee80211_bss_info_change_notify
The special case in the function isn't really needed, instead make the suspend code a bit better and also easier to understand and move the warning into the driver op wrapper inline. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/driver-ops.h')
-rw-r--r--net/mac80211/driver-ops.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index 608ced41548..cccc486ae3d 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -207,6 +207,12 @@ static inline void drv_bss_info_changed(struct ieee80211_local *local,
{
might_sleep();
+ WARN_ON_ONCE(changed & (BSS_CHANGED_BEACON |
+ BSS_CHANGED_BEACON_ENABLED) &&
+ sdata->vif.type != NL80211_IFTYPE_AP &&
+ sdata->vif.type != NL80211_IFTYPE_ADHOC &&
+ sdata->vif.type != NL80211_IFTYPE_MESH_POINT);
+
check_sdata_in_driver(sdata);
trace_drv_bss_info_changed(local, sdata, info, changed);