diff options
author | Rebecca Schultz Zavin <rebecca@android.com> | 2011-02-16 09:56:33 -0800 |
---|---|---|
committer | Rebecca Schultz Zavin <rebecca@android.com> | 2011-02-16 09:56:33 -0800 |
commit | fd57a71c00ece424649b261ee786264b3ac5b5f5 (patch) | |
tree | 0b00ed3852ea7800e88699ea8e5d667f0e0ad01d /drivers/net/wireless | |
parent | 21cc82b575b16307184369646e98afc1116f6db9 (diff) | |
parent | 696ecacfc59e5a8e822afb6a8f92b35cfdcabb63 (diff) |
Merge remote branch 'common/android-2.6.36' into android-tegra-2.6.36
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/bcm4329/dhd_custom_gpio.c | 36 | ||||
-rw-r--r-- | drivers/net/wireless/bcm4329/dhd_linux.c | 11 |
2 files changed, 36 insertions, 11 deletions
diff --git a/drivers/net/wireless/bcm4329/dhd_custom_gpio.c b/drivers/net/wireless/bcm4329/dhd_custom_gpio.c index 4739b97b48bc..aaca56cb7c25 100644 --- a/drivers/net/wireless/bcm4329/dhd_custom_gpio.c +++ b/drivers/net/wireless/bcm4329/dhd_custom_gpio.c @@ -47,6 +47,7 @@ int wifi_set_carddetect(int on); int wifi_set_power(int on, unsigned long msec); int wifi_get_irq_number(unsigned long *irq_flags_ptr); int wifi_get_mac_addr(unsigned char *buf); +void *wifi_get_country_code(char *ccode); #endif #if defined(OOB_INTR_ONLY) @@ -178,23 +179,22 @@ dhd_custom_get_mac_address(unsigned char *buf) } #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} + {"EU", "EU", 5}, /* input ISO "EU" to : EU regrev 05 */ + {"FR", "EU", 5}, + {"DE", "EU", 5}, + {"IR", "EU", 5}, + {"UK", "EU", 5}, /* input ISO "UK" to : EU regrev 05 */ + {"KR", "XY", 3}, + {"AU", "XY", 3}, + {"CN", "XY", 3}, /* input ISO "CN" to : XY regrev 03 */ + {"TW", "XY", 3}, + {"AR", "XY", 3} #endif /* EXAMPLE_TABLE */ }; @@ -205,6 +205,19 @@ const struct cntry_locales_custom translate_custom_table[] = { */ void get_customized_country_code(char *country_iso_code, wl_country_t *cspec) { +#ifdef CUSTOMER_HW2 + struct cntry_locales_custom *cloc_ptr; + + if (!cspec) + return; + + cloc_ptr = wifi_get_country_code(country_iso_code); + if (cloc_ptr) { + strlcpy(cspec->ccode, cloc_ptr->custom_locale, WLC_CNTRY_BUF_SZ); + cspec->rev = cloc_ptr->custom_locale_rev; + } + return; +#else int size, i; size = ARRAYSIZE(translate_custom_table); @@ -223,4 +236,5 @@ void get_customized_country_code(char *country_iso_code, wl_country_t *cspec) } } return; +#endif } diff --git a/drivers/net/wireless/bcm4329/dhd_linux.c b/drivers/net/wireless/bcm4329/dhd_linux.c index 389a6ecc58a5..3bfdd6989fba 100644 --- a/drivers/net/wireless/bcm4329/dhd_linux.c +++ b/drivers/net/wireless/bcm4329/dhd_linux.c @@ -126,6 +126,17 @@ int wifi_get_mac_addr(unsigned char *buf) return -EOPNOTSUPP; } +void *wifi_get_country_code(char *ccode) +{ + DHD_TRACE(("%s\n", __FUNCTION__)); + if (!ccode) + return NULL; + if (wifi_control_data && wifi_control_data->get_country_code) { + return wifi_control_data->get_country_code(ccode); + } + return NULL; +} + static int wifi_probe(struct platform_device *pdev) { struct wifi_platform_data *wifi_ctrl = |