summaryrefslogtreecommitdiffstats
path: root/net/wireless/rdev-ops.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2020-04-17 12:43:01 +0200
committerJohannes Berg <johannes.berg@intel.com>2020-04-24 12:33:40 +0200
commit6cd536fe62ef58d7c4eac2da07ab0ed7fd19010d (patch)
tree829239e40d7873f075e6f66cff9f7f6a728b33f8 /net/wireless/rdev-ops.h
parent9eaf183af741e3d8393eb571ac8aec9ee7d6530e (diff)
downloadlinux-stable-6cd536fe62ef58d7c4eac2da07ab0ed7fd19010d.tar.gz
linux-stable-6cd536fe62ef58d7c4eac2da07ab0ed7fd19010d.tar.bz2
linux-stable-6cd536fe62ef58d7c4eac2da07ab0ed7fd19010d.zip
cfg80211: change internal management frame registration API
Almost all drivers below cfg80211 get the API wrong (except for cfg80211) and are unable to cope with multiple registrations for the same frame type, which is valid due to the match filter. This seems to indicate the API is wrong, and we should maintain the full information in cfg80211 instead of the drivers. Change the API to no longer inform the driver about individual registrations and unregistrations, but rather every time about the entire state of the entire wiphy and single wdev, whenever it may have changed. This also simplifies the code in cfg80211 as it no longer has to track exactly what was unregistered and can free things immediately. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> Reviewed-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> Link: https://lore.kernel.org/r/20200417124300.f47f3828afc8.I7f81ef59c2c5a340d7075fb3c6d0e08e8aeffe07@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/rdev-ops.h')
-rw-r--r--net/wireless/rdev-ops.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/net/wireless/rdev-ops.h b/net/wireless/rdev-ops.h
index 99462f0c4e08..df5142e86c4f 100644
--- a/net/wireless/rdev-ops.h
+++ b/net/wireless/rdev-ops.h
@@ -819,13 +819,16 @@ rdev_set_cqm_txe_config(struct cfg80211_registered_device *rdev,
}
static inline void
-rdev_mgmt_frame_register(struct cfg80211_registered_device *rdev,
- struct wireless_dev *wdev, u16 frame_type, bool reg)
+rdev_update_mgmt_frame_registrations(struct cfg80211_registered_device *rdev,
+ struct wireless_dev *wdev,
+ struct mgmt_frame_regs *upd)
{
might_sleep();
- trace_rdev_mgmt_frame_register(&rdev->wiphy, wdev , frame_type, reg);
- rdev->ops->mgmt_frame_register(&rdev->wiphy, wdev , frame_type, reg);
+ trace_rdev_update_mgmt_frame_registrations(&rdev->wiphy, wdev, upd);
+ if (rdev->ops->update_mgmt_frame_registrations)
+ rdev->ops->update_mgmt_frame_registrations(&rdev->wiphy, wdev,
+ upd);
trace_rdev_return_void(&rdev->wiphy);
}