diff options
author | Wen Gong <quic_wgong@quicinc.com> | 2023-06-27 14:39:37 +0800 |
---|---|---|
committer | Pierre-Loup A. Griffais <pgriffais@valvesoftware.com> | 2023-11-02 16:07:52 -0700 |
commit | 873a6d1b0394dfdb05e89127cb7c3d79d86a348e (patch) | |
tree | 1977920fc0c351e36023f688fe60ebf41463046b /net | |
parent | 75fce1f72845451b8cdacc86b0a8201c173556f5 (diff) | |
download | linux-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 'net')
-rw-r--r-- | net/wireless/reg.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 5da1a641ef17..f764fdadc53f 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -3201,6 +3201,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); } |