aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorWen Gong <quic_wgong@quicinc.com>2023-02-01 01:53:13 -0500
committerJohannes Berg <johannes.berg@intel.com>2023-02-14 12:37:39 +0100
commitd99975c4953eb79e389d4630e848435c700e2dfc (patch)
treeb009e2cde1416e8ce58d7ab38d4318dc1fc1876b /net/wireless
parent935ef47b16cc5bc15fcd2b3dbc61abb0b7ea671a (diff)
downloadlinux-d99975c4953eb79e389d4630e848435c700e2dfc.tar.gz
wifi: cfg80211: 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 'net/wireless')
-rw-r--r--net/wireless/reg.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index af65196c916ef..0d40d6af7e10a 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -3160,6 +3160,9 @@ static void reg_process_self_managed_hint(struct wiphy *wiphy)
request.alpha2[1] = regd->alpha2[1];
request.initiator = NL80211_REGDOM_SET_BY_DRIVER;
+ if (wiphy->flags & WIPHY_FLAG_NOTIFY_REGDOM_BY_DRIVER)
+ reg_call_notifier(wiphy, &request);
+
nl80211_send_wiphy_reg_change_event(&request);
}