summary refs log tree commit diff
path: root/include/net
diff options
context:
space:
mode:
authorWen Gong <quic_wgong@quicinc.com>2023-06-27 14:39:37 +0800
committerPierre-Loup A. Griffais <pgriffais@valvesoftware.com>2023-11-02 16:07:52 -0700
commit873a6d1b0394dfdb05e89127cb7c3d79d86a348e (patch)
tree1977920fc0c351e36023f688fe60ebf41463046b /include/net
parent75fce1f72845451b8cdacc86b0a8201c173556f5 (diff)
downloadlinux-873a6d1b0394dfdb05e89127cb7c3d79d86a348e.tar.gz
wifi: cfg80211: BACKPORT: call reg_notifier for self managed wiphy from driver hint
Currently the regulatory driver does not call the regulatory callback
reg_notifier for self managed wiphys. Sometimes driver needs cfg80211
to calculate the info of ieee80211_channel such as flags and power,
and driver needs to get the info of ieee80211_channel after hint of
driver, but driver does not know when calculation of the info of
ieee80211_channel become finished, so add notify to driver in
reg_process_self_managed_hint() from cfg80211 is a good way, then
driver could get the correct info in callback of reg_notifier.

Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Link: https://lore.kernel.org/r/20230201065313.27203-1-quic_wgong@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/cfg80211.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 5976545aa26b..46bd3f447b68 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -4691,6 +4691,8 @@ struct cfg80211_ops {
  *	in order to not have them reachable in normal drivers, until we have
  *	complete feature/interface combinations/etc. advertisement. No driver
  *	should set this flag for now.
+ * @WIPHY_FLAG_NOTIFY_REGDOM_BY_DRIVER: The device could handle reg notify for
+ *	NL80211_REGDOM_SET_BY_DRIVER.
  */
 enum wiphy_flags {
 	WIPHY_FLAG_SUPPORTS_EXT_KEK_KCK		= BIT(0),
@@ -4717,6 +4719,7 @@ enum wiphy_flags {
 	WIPHY_FLAG_SUPPORTS_5_10_MHZ		= BIT(22),
 	WIPHY_FLAG_HAS_CHANNEL_SWITCH		= BIT(23),
 	WIPHY_FLAG_HAS_STATIC_WEP		= BIT(24),
+	WIPHY_FLAG_NOTIFY_REGDOM_BY_DRIVER      = BIT(25),
 };
 
 /**