summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Hsu <ryanhsu@qca.qualcomm.com>2016-04-22 16:44:24 -0700
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-04-26 13:13:38 +0530
commit9318253ab35476aa905e751dbdd60ff5ae32f897 (patch)
treea263f35e21232bb8f09c4a29cefd946fab472d68
parent988c9a32540e7bf7ee870e6b5bac47d484fff630 (diff)
qcacld-2.0: Enable the FTM mode to retrieve the radio index
The wlan_hdd_nl_init() is escaped for FTM case due to the multicast logging feature is not required for FTM mode. But with recent logging feature change, when CNSS_LOGGER enabled, the wlan_hdd_nl_init() is used to register to cnss_logger module and retrieves the radio index. So allow the wlan_hdd_nl_init() be called in both FTM and normal mode, then the radio index can be correctly assigned. This change doesn't impact to the non CNSS_LOGGER case as it does still initialized, but never been used. Change-Id: Ic78982baef8770494c4319df8b1bde45f4d2bd02 CRs-fixed: 1007357
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c4
-rw-r--r--CORE/HDD/src/wlan_hdd_main.c15
2 files changed, 9 insertions, 10 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 0c89f7c442c6..9cc5c762ff22 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -22777,7 +22777,7 @@ static int __wlan_hdd_cfg80211_testmode(struct wiphy *wiphy,
buf = nla_data(tb[WLAN_HDD_TM_ATTR_DATA]);
buf_len = nla_len(tb[WLAN_HDD_TM_ATTR_DATA]);
- pr_info("****FTM Tx cmd len = %d*****\n", buf_len);
+ hddLog(LOGE, FL("****FTM Tx cmd len = %d*****"), buf_len);
status = wlan_hdd_ftm_testmode_cmd(buf, buf_len, FALSE);
@@ -22856,7 +22856,7 @@ void wlan_hdd_testmode_rx_event(void *buf, size_t buf_len)
nla_put(skb, WLAN_HDD_TM_ATTR_DATA, buf_len, buf))
goto nla_put_failure;
- pr_info("****FTM Rx cmd len = %zu*****\n", buf_len);
+ hddLog(LOGE, FL("****FTM Rx cmd len = %zu*****"), buf_len);
cfg80211_testmode_event(skb, GFP_KERNEL);
return;
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 6d5a88e996ff..d6383694ba6d 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -12971,7 +12971,6 @@ void hdd_wlan_exit(hdd_context_t *pHddCtx)
wlan_hdd_send_status_pkg(NULL, NULL, 0, 0);
#endif
- nl_srv_exit();
hdd_close_cesium_nl_sock();
hdd_runtime_suspend_deinit(pHddCtx);
@@ -12993,6 +12992,7 @@ void hdd_wlan_exit(hdd_context_t *pHddCtx)
hdd_list_destroy(&pHddCtx->hdd_roc_req_q);
free_hdd_ctx:
+ nl_srv_exit();
/* Free up dynamically allocated members inside HDD Adapter */
if (pHddCtx->cfg_ini) {
@@ -14576,6 +14576,12 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
print_hdd_cfg(pHddCtx);
+ /* Initialize the nlink service */
+ if (wlan_hdd_nl_init(pHddCtx) != 0) {
+ hddLog(LOGP, FL("nl_srv_init failed"));
+ goto err_config;
+ }
+
if (VOS_FTM_MODE == hdd_get_conparam())
goto ftm_processing;
@@ -15029,12 +15035,6 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
reg_netdev_notifier_done = TRUE;
#endif
- /* Initialize the nlink service */
- if (wlan_hdd_nl_init(pHddCtx) != 0) {
- hddLog(LOGP, FL("nl_srv_init failed"));
- goto err_reg_netdev;
- }
-
#ifdef WLAN_KD_READY_NOTIFIER
pHddCtx->kd_nl_init = 1;
#endif /* WLAN_KD_READY_NOTIFIER */
@@ -15318,7 +15318,6 @@ err_nl_srv:
nl_srv_exit();
hdd_close_cesium_nl_sock();
-err_reg_netdev:
if (rtnl_lock_enable == TRUE) {
rtnl_lock_enable = FALSE;
rtnl_unlock();