diff options
author | Hante Meuleman <meuleman@broadcom.com> | 2016-02-17 11:26:53 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-03-07 14:14:44 +0200 |
commit | 73345fd212980d2e28a5c6d83801c903bd773680 (patch) | |
tree | c63410e98129508ddc2105bb5e04de78e2325096 /drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h | |
parent | 6ea09153b6ccbee79869537ce61f5c16f736d72b (diff) | |
download | blackbird-op-linux-73345fd212980d2e28a5c6d83801c903bd773680.tar.gz blackbird-op-linux-73345fd212980d2e28a5c6d83801c903bd773680.zip |
brcmfmac: Configure country code using device specific settings
Country code configuration in a device is a device specific
operation. For this the country code as specified by reg notifier
(iso3166 alpha2) needs to be translated to a device specific
country locale and revision number. This patch adds this
translation and puts a placeholder in the device specific settings
where the translation table can be stored. Additional patches will
be needed to read these tables from for example device platform
data.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h')
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h index 3b0a63b98e99..b678b2d60749 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h @@ -15,6 +15,8 @@ #ifndef BRCMFMAC_COMMON_H #define BRCMFMAC_COMMON_H +#include "fwil_types.h" + extern const u8 ALLFFMAC[ETH_ALEN]; #define BRCMF_FW_ALTPATH_LEN 256 @@ -39,6 +41,33 @@ struct brcmf_mp_global_t { extern struct brcmf_mp_global_t brcmf_mp_global; /** + * struct cc_entry - Struct for translating user space country code (iso3166) to + * firmware country code and revision. + * + * @iso3166: iso3166 alpha 2 country code string. + * @cc: firmware country code string. + * @rev: firmware country code revision. + */ +struct cc_entry { + char iso3166[BRCMF_COUNTRY_BUF_SZ]; + char cc[BRCMF_COUNTRY_BUF_SZ]; + s32 rev; +}; + +/** + * struct cc_translate - Struct for translating country codes as set by user + * space to a country code and rev which can be used by + * firmware. + * + * @table_size: number of entries in table (> 0) + * @table: dynamic array of 1 or more elements with translation information. + */ +struct cc_translate { + int table_size; + struct cc_entry table[0]; +}; + +/** * struct brcmf_mp_device - Device module paramaters. * * @sdiod_txglomsz: SDIO txglom size. @@ -47,6 +76,7 @@ extern struct brcmf_mp_global_t brcmf_mp_global; * @feature_disable: Feature_disable bitmask. * @fcmode: FWS flow control. * @roamoff: Firmware roaming off? + * @country_codes: If available, pointer to struct for translating country codes */ struct brcmf_mp_device { int sdiod_txglomsz; @@ -56,6 +86,7 @@ struct brcmf_mp_device { int fcmode; bool roamoff; bool ignore_probe_fail; + struct cc_translate *country_codes; }; void brcmf_mp_attach(void); |