From: Dmitry Shmidt Date: Thu, 18 Nov 2010 22:31:18 +0000 (-0800) Subject: net: wireless: bcm4329: Use non-DFS channels only for US X-Git-Tag: firefly_0821_release~9833^2~5^2~73 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7e17882ff36d62c066bf47af6299bb2cffea21ed;p=firefly-linux-kernel-4.4.55.git net: wireless: bcm4329: Use non-DFS channels only for US Signed-off-by: Dmitry Shmidt --- diff --git a/drivers/net/wireless/bcm4329/Makefile b/drivers/net/wireless/bcm4329/Makefile index 3f49a643e8ff..f808fb21256b 100644 --- a/drivers/net/wireless/bcm4329/Makefile +++ b/drivers/net/wireless/bcm4329/Makefile @@ -7,7 +7,7 @@ DHDCFLAGS = -DLINUX -DBCMDRIVER -DBCMDONGLEHOST -DDHDTHREAD -DBCMWPA2 \ -DDHD_USE_STATIC_BUF -DMMC_SDIO_ABORT -DDHD_DEBUG_TRAP -DSOFTAP \ -DEMBEDDED_PLATFORM -DARP_OFFLOAD_SUPPORT -DPKT_FILTER_SUPPORT \ -DGET_CUSTOM_MAC_ENABLE -DSET_RANDOM_MAC_SOFTAP -DCSCAN -DHW_OOB \ - -DKEEP_ALIVE \ + -DKEEP_ALIVE -DCONFIG_US_NON_DFS_CHANNELS_ONLY \ -Idrivers/net/wireless/bcm4329 -Idrivers/net/wireless/bcm4329/include DHDOFILES = dhd_linux.o linux_osl.o bcmutils.o dhd_common.o dhd_custom_gpio.o \ diff --git a/drivers/net/wireless/bcm4329/wl_iw.c b/drivers/net/wireless/bcm4329/wl_iw.c index 4f7fc8b7b556..3e3b09f048e9 100644 --- a/drivers/net/wireless/bcm4329/wl_iw.c +++ b/drivers/net/wireless/bcm4329/wl_iw.c @@ -632,11 +632,13 @@ wl_iw_set_country( country_offset = strcspn(extra, " "); country_code_size = strlen(extra) - country_offset; - if (country_offset != 0) { strncpy(country_code, extra + country_offset + 1, MIN(country_code_size, sizeof(country_code))); - +#ifdef CONFIG_US_NON_DFS_CHANNELS_ONLY + if (!strncmp(country_code, "US", 2)) + strncpy(country_code, "Q2", WLC_CNTRY_BUF_SZ); +#endif if ((error = dev_wlc_ioctl(dev, WLC_SET_COUNTRY, &country_code, sizeof(country_code))) >= 0) { p += snprintf(p, MAX_WX_STRING, "OK");