diff options
author | Zong-Zhe Yang <kevin_yang@realtek.com> | 2021-08-30 10:20:12 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2021-09-21 17:51:56 +0300 |
commit | 8d4fb3998c05a1d79358e1069a3b5f128245b006 (patch) | |
tree | 423a40a3cc23eaa9572ac48a124b43b57edb7bb2 /drivers/net/wireless/realtek/rtw88/regd.h | |
parent | f8509c38ececde7fb0f0bc9959f79d2a34be577d (diff) | |
download | linux-8d4fb3998c05a1d79358e1069a3b5f128245b006.tar.xz |
rtw88: add regulatory strategy by chip type
Realtek chips can program a specific country domain on efuse to
indicate what is the expected rtw_regulatory. For chips with a
programmed country domain, we set REGULATORY_STRICT_REG to tell
stack to consider follow-up regulatory_hint() as the superset of
our regulatory rule. Besides, on driver side, only the request via
NL80211_REGDOM_SET_BY_DRIVER, which matches programmed country
domain, will be handled to keep rtw_regulatory unchanged.
For worldwide roaming chips, i.e. ones without a specific programmed
country domain, system of distro can set expected regulatory via
NL80211_REGDOM_SET_BY_USER. With setting from it, rtw_regulatory
will handle the requests only via NL80211_REGDOM_SET_BY_USER to
follow setting from system of distro. REGULATORY_COUNTRY_IE_IGNORE
will then be set to tell stack to ignore country IE for us. The
restrictions mentioned above will remain until 00, i.e. worldwide,
is set via NL80211_REGDOM_SET_BY_USER.
On the other hand, for worldwide roamin chips, if there is no
specific regulatory set via NL80211_REGDOM_SET_BY_USER, requests
from all regulatory notifications will be handled by rtw_regulatory.
And REGULATORY_COUNTRY_IE_IGNORE won't be set.
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210830072014.12250-3-pkshih@realtek.com
Diffstat (limited to 'drivers/net/wireless/realtek/rtw88/regd.h')
-rw-r--r-- | drivers/net/wireless/realtek/rtw88/regd.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/regd.h b/drivers/net/wireless/realtek/rtw88/regd.h index 18b54ac65a2d..34cb13d0cd9e 100644 --- a/drivers/net/wireless/realtek/rtw88/regd.h +++ b/drivers/net/wireless/realtek/rtw88/regd.h @@ -64,10 +64,8 @@ enum country_code_type { COUNTRY_CODE_MAX }; -int rtw_regd_init(struct rtw_dev *rtwdev, - void (*reg_notifier)(struct wiphy *wiphy, - struct regulatory_request *request)); -void rtw_regd_notifier(struct wiphy *wiphy, struct regulatory_request *request); +int rtw_regd_init(struct rtw_dev *rtwdev); +int rtw_regd_hint(struct rtw_dev *rtwdev); u8 rtw_regd_get(struct rtw_dev *rtwdev); bool rtw_regd_has_alt(u8 regd, u8 *regd_alt); #endif |