diff options
author | Nitin Kumbhar <nkumbhar@nvidia.com> | 2011-02-21 10:42:36 +0530 |
---|---|---|
committer | Nitin Kumbhar <nkumbhar@nvidia.com> | 2011-02-21 10:42:36 +0530 |
commit | 65aaf50c61234103c3d9359dd8d4558306a262f8 (patch) | |
tree | 0c54a9223543b6f1ec901c388b0bf808fbbfbe83 | |
parent | e96fe79f41c61ade25b0d4f28e5caf92e802eda1 (diff) | |
parent | 01de8cb7aaf15245338261b25531736030be4063 (diff) |
merging android-tegra-2.6.36 into git-master/linux-2.6/android-tegra-2.6.36
Conflicts:
drivers/net/wireless/bcm4329/Makefile
Change-Id: I5e6994d4db216062b9cd1673f45bd9fdcf1f96ae
-rw-r--r-- | drivers/net/wireless/bcm4329/dhd_common.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/bcm4329/dhd_custom_gpio.c | 36 | ||||
-rw-r--r-- | drivers/net/wireless/bcm4329/dhd_linux.c | 11 | ||||
-rw-r--r-- | include/linux/wlan_plat.h | 1 |
4 files changed, 42 insertions, 16 deletions
diff --git a/drivers/net/wireless/bcm4329/dhd_common.c b/drivers/net/wireless/bcm4329/dhd_common.c index 9a345fb43076..8fcb95fde827 100644 --- a/drivers/net/wireless/bcm4329/dhd_common.c +++ b/drivers/net/wireless/bcm4329/dhd_common.c @@ -1911,12 +1911,12 @@ int dhd_pno_enable(dhd_pub_t *dhd, int pfn_enabled) if ((pfn_enabled) && \ ((ret = dhdcdc_set_ioctl(dhd, 0, WLC_GET_BSSID, \ (char *)&bssid, ETHER_ADDR_LEN)) == BCME_NOTASSOCIATED)) { - DHD_TRACE(("%s pno enable called in disassoc mode\n", __FUNCTION__)); + DHD_TRACE(("%s pno enable called in disassoc mode\n", __FUNCTION__)); } - else { - DHD_ERROR(("%s pno enable called in assoc mode ret=%d\n", \ - __FUNCTION__, ret)); - return ret; + else if (pfn_enabled) { + DHD_ERROR(("%s pno enable called in assoc mode ret=%d\n", \ + __FUNCTION__, ret)); + return ret; } /* Enable/disable PNO */ 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 d183ec881faf..1c4f1a383afa 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 = diff --git a/include/linux/wlan_plat.h b/include/linux/wlan_plat.h index 3b1e2e054fd5..40ec3482d1ef 100644 --- a/include/linux/wlan_plat.h +++ b/include/linux/wlan_plat.h @@ -21,6 +21,7 @@ struct wifi_platform_data { int (*set_carddetect)(int val); void *(*mem_prealloc)(int section, unsigned long size); int (*get_mac_addr)(unsigned char *buf); + void *(*get_country_code)(char *ccode); }; #endif |