diff options
| author | Edhar, Mahesh Kumar <c_medhar@qti.qualcomm.com> | 2015-06-25 10:36:35 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2015-06-29 18:43:59 +0530 |
| commit | 0b30a7789ffd66cfb25544cdd2ee5f4ec98918f7 (patch) | |
| tree | da69742fd7b5e2c96e9a2cc58b213ed2419c5d79 | |
| parent | b47b1d36a682daf504accb8bf00460799b3ae52e (diff) | |
qcacld-2.0: Change to properly update CC set by CORE
From kernel 3.14 onwards CC set by core will be reflected only if
the wiphy->regd is null else we will still consider the regulatory
rules from previous regdomain set by driver.
Change code to set wiphy->regd to NULL if driver notifier
callback is called with CORE as initiator.
Change-Id: Ia9c9fa5c3b749a114fed696954929a98566b19d9
CRs-Fixed: 861216
| -rw-r--r-- | CORE/VOSS/src/vos_nvitem.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/CORE/VOSS/src/vos_nvitem.c b/CORE/VOSS/src/vos_nvitem.c index 6f699ddf8736..ecd28078b8a5 100644 --- a/CORE/VOSS/src/vos_nvitem.c +++ b/CORE/VOSS/src/vos_nvitem.c @@ -1705,11 +1705,19 @@ int wlan_hdd_linux_reg_notifier(struct wiphy *wiphy, #endif } - if (NL80211_REGDOM_SET_BY_CORE == request->initiator) + if (NL80211_REGDOM_SET_BY_CORE == request->initiator) { +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) || defined(WITH_BACKPORTS) + if (wiphy->regd == NULL) + return; + + wiphy->regd = NULL; +#endif pHddCtx->reg.cc_src = COUNTRY_CODE_SET_BY_CORE; - else if (NL80211_REGDOM_SET_BY_DRIVER == request->initiator) + } else if (NL80211_REGDOM_SET_BY_DRIVER == request->initiator) { pHddCtx->reg.cc_src = COUNTRY_CODE_SET_BY_DRIVER; - else pHddCtx->reg.cc_src = COUNTRY_CODE_SET_BY_USER; + } else { + pHddCtx->reg.cc_src = COUNTRY_CODE_SET_BY_USER; + } /* first lookup the country in the local database */ country_code[0] = request->alpha2[0]; |
