With any regulatory domain requests coming from either user space or
802.11 IE (Information Element), the country is coded in ISO3166
standard. It needs to be translated to firmware country code and
revision with the mapping info in settings->country_codes table.
Support populate country_codes table by parsing the mapping from DT.
Signed-off-by: Shawn Guo <shawn.guo@xxxxxxxxxx>
---
.../wireless/broadcom/brcm80211/brcmfmac/of.c | 53 +++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
index a7554265f95f..ea5c7f434c2c 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
@@ -47,6 +96,10 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
!of_device_is_compatible(np, "brcm,bcm4329-fmac"))
return;
+ ret = brcmf_of_get_country_codes(dev, settings);
+ if (ret)
+ dev_warn(dev, "failed to get OF country code map\n");