ath11k: fix regdb upload

Make ath11k honour latest regdb.

Fixes: WIFI-3256
Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2021-10-22 10:27:47 +02:00
parent a290ad3764
commit 00197d703e

View File

@@ -0,0 +1,33 @@
Index: backports-20210222_001-4.4.60-b157d2276/drivers/net/wireless/ath/ath11k/reg.c
===================================================================
--- backports-20210222_001-4.4.60-b157d2276.orig/drivers/net/wireless/ath/ath11k/reg.c
+++ backports-20210222_001-4.4.60-b157d2276/drivers/net/wireless/ath/ath11k/reg.c
@@ -170,6 +170,9 @@ int ath11k_regd_update(struct ath11k *ar
}
} else {
regd = ab->new_regd[pdev_id];
+ /* force update custom regdm to cfg80211 */
+ ar->hw->wiphy->regulatory_flags |= REGULATORY_CUSTOM_REG;
+ wiphy_apply_custom_regulatory(ar->hw->wiphy, regd);
}
if (!regd) {
Index: backports-20210222_001-4.4.60-b157d2276/drivers/net/wireless/ath/ath11k/wmi.c
===================================================================
--- backports-20210222_001-4.4.60-b157d2276.orig/drivers/net/wireless/ath/ath11k/wmi.c
+++ backports-20210222_001-4.4.60-b157d2276/drivers/net/wireless/ath/ath11k/wmi.c
@@ -7212,12 +7212,12 @@ static int ath11k_reg_chan_list_event(st
* requested, i.e a default regd was already set during initialization
* and the regd coming from this event has a valid country info.
*/
- if (ab->default_regd[pdev_idx] &&
+/* if (ab->default_regd[pdev_idx] &&
!ath11k_reg_is_world_alpha((char *)
ab->default_regd[pdev_idx]->alpha2) &&
!ath11k_reg_is_world_alpha((char *)reg_info->alpha2))
intersect = true;
-
+*/
regd = ath11k_reg_build_regd(ab, reg_info, intersect);
if (!regd) {
ath11k_warn(ab, "failed to build regd from reg_info\n");