brcmfmac: support parse country code map from DT
authorShawn Guo <shawn.guo@linaro.org>
Sat, 17 Apr 2021 07:54:28 +0000 (15:54 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 24 Jun 2021 16:20:31 +0000 (19:20 +0300)
commit1a3ac5c651a0c859bdea64ed964fc93c2ba980d3
tree2c77867a78c701e3ab0044f911c0b5f823715d7d
parent559c664751e54f5ddebd91ef640f7d346132ee44
brcmfmac: support parse country code map from DT

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.

The BRCMF_BUSTYPE_SDIO bus_type check gets separated from general DT
validation, so that country code can be handled as general part rather
than SDIO bus specific one.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210417075428.2671-1-shawn.guo@linaro.org
drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c