drivers: net: bcmdhd: enable CRD through kernel config
Nitin Bindal [Wed, 11 Apr 2012 10:37:00 +0000 (15:37 +0530)]
Enable Custom Regulatory Domain(CRD) support, only if
BCMDHD_CUSTOM_REGULATORY_DOMAIN kernel config is set.
By default BCMDHD_CUSTOM_REGULATORY_DOMAIN is enabled.

Bug 947472

Change-Id: I40ea3c3c531d4e309c0928db396b9cc832be43cc
Signed-off-by: Nitin Bindal <nbindal@nvidia.com>
Reviewed-on: http://git-master/r/88266
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

drivers/net/wireless/bcmdhd/Kconfig
drivers/net/wireless/bcmdhd/Makefile
drivers/net/wireless/bcmdhd/wl_cfg80211.c

index 4c3461a..427cd99 100644 (file)
@@ -77,3 +77,10 @@ config BCMDHD_INSMOD_NO_FW_LOAD
        default n
        ---help---
        Enable delayes firmware
+
+config BCMDHD_CUSTOM_REGULATORY_DOMAIN
+       bool "Enable Custom Regulatory Domain"
+       depends on BCMDHD
+       default y
+       ---help---
+       Use Custom Regulatory Domain set by driver.
index 918e59f..85e93f7 100644 (file)
@@ -30,6 +30,10 @@ ifeq ($(CONFIG_BCMDHD_INSMOD_NO_FW_LOAD),y)
 DHDCFLAGS += -DENABLE_INSMOD_NO_FW_LOAD
 endif
 
+ifeq ($(CONFIG_BCMDHD_CUSTOM_REGULATORY_DOMAIN),y)
+DHDCFLAGS += -DENABLE_CUSTOM_REGULATORY_DOMAIN
+endif
+
 DHDOFILES = aiutils.o bcmsdh_sdmmc_linux.o dhd_linux.o siutils.o bcmutils.o   \
        dhd_linux_sched.o bcmwifi.o dhd_sdio.o bcmevent.o dhd_bta.o hndpmu.o  \
        bcmsdh.o dhd_cdc.o bcmsdh_linux.o dhd_common.o linux_osl.o            \
index daa7d26..04affb5 100644 (file)
@@ -4086,9 +4086,11 @@ static struct wireless_dev *wl_alloc_wdev(struct device *sdiofunc_dev)
 #endif
                WIPHY_FLAG_4ADDR_STATION;
 
+#ifdef ENABLE_CUSTOM_REGULATORY_DOMAIN
        WL_DBG(("Registering custom regulatory)\n"));
        wdev->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY;
        wiphy_apply_custom_regulatory(wdev->wiphy, &brcm_regdom);
+#endif
        /* Now we can register wiphy with cfg80211 module */
        err = wiphy_register(wdev->wiphy);
        if (unlikely(err < 0)) {