diff options
Diffstat (limited to 'drivers/net/wireless/bcm4329/dhd_custom_gpio.c')
-rw-r--r-- | drivers/net/wireless/bcm4329/dhd_custom_gpio.c | 49 |
1 files changed, 48 insertions, 1 deletions
diff --git a/drivers/net/wireless/bcm4329/dhd_custom_gpio.c b/drivers/net/wireless/bcm4329/dhd_custom_gpio.c index 8c6ec470b8bd..4739b97b48bc 100644 --- a/drivers/net/wireless/bcm4329/dhd_custom_gpio.c +++ b/drivers/net/wireless/bcm4329/dhd_custom_gpio.c @@ -20,7 +20,7 @@ * software in any way with any other Broadcom software provided under a license * other than the GPL, without Broadcom's express prior written consent. * -* $Id: dhd_custom_gpio.c,v 1.1.4.8.4.1 2010/09/02 23:13:16 Exp $ +* $Id: dhd_custom_gpio.c,v 1.1.4.8.4.4 2011/01/20 20:23:09 Exp $ */ @@ -177,3 +177,50 @@ dhd_custom_get_mac_address(unsigned char *buf) return ret; } #endif /* GET_CUSTOM_MAC_ENABLE */ + +#define EXAMPLE_TABLE +/* Customized Locale table : OPTIONAL feature */ +const struct cntry_locales_custom translate_custom_table[] = { +/* Table should be filled out based on custom platform regulatory requirement */ +#ifdef EXAMPLE_TABLE + {"US", "US", 69}, /* input ISO "US" to : US regrev 69 */ + {"CA", "US", 69}, /* input ISO "CA" to : US regrev 69 */ + {"EU", "EU", 05}, /* input ISO "EU" to : EU regrev 05 */ + {"FR", "EU", 05}, + {"DE", "EU", 05}, + {"IR", "EU", 05}, + {"UK", "EU", 05}, /* input ISO "UK" to : EU regrev 05 */ + {"KR", "XY", 03}, + {"AU", "XY", 03}, + {"CN", "XY", 03}, /* input ISO "CN" to : XY regrev 03 */ + {"TW", "XY", 03}, + {"AR", "XY", 03} +#endif /* EXAMPLE_TABLE */ +}; + + +/* Customized Locale convertor +* input : ISO 3166-1 country abbreviation +* output: customized cspec +*/ +void get_customized_country_code(char *country_iso_code, wl_country_t *cspec) +{ + int size, i; + + size = ARRAYSIZE(translate_custom_table); + + if (cspec == 0) + return; + + if (size == 0) + return; + + for (i = 0; i < size; i++) { + if (strcmp(country_iso_code, translate_custom_table[i].iso_abbrev) == 0) { + memcpy(cspec->ccode, translate_custom_table[i].custom_locale, WLC_CNTRY_BUF_SZ); + cspec->rev = translate_custom_table[i].custom_locale_rev; + break; + } + } + return; +} |