summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanumanth Reddy Pothula <c_hpothu@codeaurora.org>2017-02-02 23:19:47 +0530
committerqcabuildsw <qcabuildsw@localhost>2017-02-21 03:55:39 -0800
commitffa649b5283b6f9ccfa9c70de95f0b2b11bcee3d (patch)
treec2757da6914599c891f23bdb33b50d028fdf3841
parenta599de9004e9befbb36934e001dfae34aceb014c (diff)
qcacld-2.0: During SSR, restore DFS regulatory domain with valid value
When SAP is beaconing on DFS channel and SSR is triggered, SAP is not coming-up, as DFS regulatory domain in WMA context is reset. To Start sap in DFS channel after SSR is triggered, save WMA context's DFS regulatory domain in hdd context and restore same during re-init. Change-Id: I5d81f4e38c35cd5d94143b90e61076df26789c52 CRs-Fixed: 2001648
-rw-r--r--CORE/HDD/inc/wlan_hdd_cfg.h9
-rw-r--r--CORE/HDD/inc/wlan_hdd_main.h1
-rw-r--r--CORE/HDD/src/wlan_hdd_early_suspend.c2
-rw-r--r--CORE/HDD/src/wlan_hdd_main.c18
-rw-r--r--CORE/VOSS/src/vos_nvitem.c4
5 files changed, 33 insertions, 1 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h
index 85f10d82603c..c71f65cc3233 100644
--- a/CORE/HDD/inc/wlan_hdd_cfg.h
+++ b/CORE/HDD/inc/wlan_hdd_cfg.h
@@ -5598,6 +5598,15 @@ void print_hdd_cfg(hdd_context_t *pHddCtx);
void hdd_set_btc_bt_wlan_interval(hdd_context_t *pHddCtx);
VOS_STATUS hdd_update_nss(hdd_context_t *hdd_ctx, uint8_t nss);
+/**
+ * hdd_set_dfs_regdomain() - During SSR, restore DFS regulatory domain
+ * with valid value
+ * @phddctx: context for hdd
+ * @restore: valure to verify the state
+ *
+ * Return: None
+ */
+void hdd_set_dfs_regdomain(hdd_context_t *phddctx, bool restore);
#ifdef FEATURE_WLAN_SUB_20_MHZ
uint8_t hdd_cfg_get_sub20_dyn_capabilities(hdd_context_t *hdd_ctx_ptr);
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
index 9691a30368c0..b912069c1d2e 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -2099,6 +2099,7 @@ struct hdd_context_s
v_U8_t last_scan_reject_session_id;
scan_reject_states last_scan_reject_reason;
v_TIME_t last_scan_reject_timestamp;
+ uint8_t hdd_dfs_regdomain;
};
/*---------------------------------------------------------------------------
diff --git a/CORE/HDD/src/wlan_hdd_early_suspend.c b/CORE/HDD/src/wlan_hdd_early_suspend.c
index 091d1b16db1d..e6d2bec7fd37 100644
--- a/CORE/HDD/src/wlan_hdd_early_suspend.c
+++ b/CORE/HDD/src/wlan_hdd_early_suspend.c
@@ -2291,6 +2291,8 @@ VOS_STATUS hdd_wlan_re_init(void *hif_sc)
goto err_vosclose;
}
+ hdd_set_dfs_regdomain(pHddCtx,true);
+
vosStatus = hdd_set_sme_chan_list(pHddCtx);
if (!VOS_IS_STATUS_SUCCESS(vosStatus)) {
hddLog(VOS_TRACE_LEVEL_FATAL,
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 6c63415b5bfe..0df6fb764f07 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -13923,6 +13923,24 @@ VOS_STATUS hdd_set_sme_chan_list(hdd_context_t *hdd_ctx)
hdd_ctx->reg.cc_src);
}
+void hdd_set_dfs_regdomain(hdd_context_t *phddctx, bool restore)
+{
+ if(!restore) {
+ if (vos_nv_get_dfs_region(&phddctx->hdd_dfs_regdomain)) {
+ hddLog(VOS_TRACE_LEVEL_FATAL,
+ "%s: unable to retrieve dfs region from hdd",
+ __func__);
+ }
+ }
+ else {
+ if (vos_nv_set_dfs_region(phddctx->hdd_dfs_regdomain)) {
+ hddLog(VOS_TRACE_LEVEL_FATAL,
+ "%s: unable to set dfs region",
+ __func__);
+ }
+ }
+}
+
/**
* hdd_is_5g_supported() - to know if ini configuration supports 5GHz
* @pHddCtx: Pointer to the hdd context
diff --git a/CORE/VOSS/src/vos_nvitem.c b/CORE/VOSS/src/vos_nvitem.c
index 4f3c87798a7a..5cae9a048acf 100644
--- a/CORE/VOSS/src/vos_nvitem.c
+++ b/CORE/VOSS/src/vos_nvitem.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -2388,6 +2388,8 @@ int __wlan_hdd_linux_reg_notifier(struct wiphy *wiphy,
regdmn_set_dfs_region(&pHddCtx->reg);
+ hdd_set_dfs_regdomain(pHddCtx,false);
+
if ((NL80211_REGDOM_SET_BY_DRIVER == request->initiator) ||
(NL80211_REGDOM_SET_BY_USER == request->initiator))
complete(&pHddCtx->reg_init);