summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c8
-rw-r--r--core/hdd/src/wlan_hdd_main.c39
2 files changed, 23 insertions, 24 deletions
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 40c582b4ea83..363f370d6890 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -11694,16 +11694,14 @@ static int __wlan_hdd_cfg80211_testmode(struct wiphy *wiphy,
void *buf;
QDF_STATUS status;
if (!tb[WLAN_HDD_TM_ATTR_DATA]) {
- hddLog(LOGE,
- FL
- ("WLAN_HDD_TM_ATTR_DATA attribute is invalid"));
+ hdd_err("WLAN_HDD_TM_ATTR_DATA attribute is invalid");
return -EINVAL;
}
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);
+ hdd_info("****FTM Tx cmd len = %d*****", buf_len);
status = wlan_hdd_ftm_testmode_cmd(buf, buf_len);
@@ -11785,7 +11783,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);
+ hdd_info("****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 c8506a34729c..828c4fd172a1 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -4068,6 +4068,8 @@ void hdd_wlan_exit(hdd_context_t *hdd_ctx)
hdd_unregister_wext_all_adapters(hdd_ctx);
+ hdd_exit_netlink_services(hdd_ctx);
+
if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
hdd_disable_ftm(hdd_ctx);
@@ -4169,8 +4171,6 @@ void hdd_wlan_exit(hdd_context_t *hdd_ctx)
hdd_wlan_green_ap_deinit(hdd_ctx);
- hdd_exit_netlink_services(hdd_ctx);
-
hdd_close_all_adapters(hdd_ctx, false);
hdd_ipa_cleanup(hdd_ctx);
@@ -6117,11 +6117,14 @@ int hdd_wlan_startup(struct device *dev, void *hif_sc)
if (IS_ERR(hdd_ctx))
return PTR_ERR(hdd_ctx);
+ ret = hdd_init_netlink_services(hdd_ctx);
+ if (ret)
+ goto err_hdd_free_context;
+
if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
ret = hdd_enable_ftm(hdd_ctx);
-
if (ret)
- goto err_hdd_free_context;
+ goto err_exit_nl_srv;
goto success;
}
@@ -6131,7 +6134,7 @@ int hdd_wlan_startup(struct device *dev, void *hif_sc)
status = cds_open();
if (!QDF_IS_STATUS_SUCCESS(status)) {
hddLog(QDF_TRACE_LEVEL_FATAL, FL("cds_open failed"));
- goto err_hdd_free_context;
+ goto err_exit_nl_srv;
}
wlan_hdd_update_wiphy(hdd_ctx->wiphy, hdd_ctx->config);
@@ -6215,11 +6218,6 @@ int hdd_wlan_startup(struct device *dev, void *hif_sc)
/* FW capabilities received, Set the Dot11 mode */
sme_setdef_dot11mode(hdd_ctx->hHal);
- ret = hdd_init_netlink_services(hdd_ctx);
-
- if (ret)
- goto err_close_adapter;
-
/*
* Action frame registered in one adapter which will
* applicable to all interfaces
@@ -6257,14 +6255,14 @@ int hdd_wlan_startup(struct device *dev, void *hif_sc)
status = cds_init_policy_mgr();
if (!QDF_IS_STATUS_SUCCESS(status)) {
hdd_err("Policy manager initialization failed");
- goto err_exit_nl_srv;
+ goto err_debugfs_exit;
}
ret = hdd_init_thermal_info(hdd_ctx);
if (ret) {
hdd_err("Error while initializing thermal information");
- goto err_exit_nl_srv;
+ goto err_debugfs_exit;
}
if (0 != hdd_lro_init(hdd_ctx))
@@ -6326,13 +6324,8 @@ int hdd_wlan_startup(struct device *dev, void *hif_sc)
goto success;
-err_exit_nl_srv:
- hdd_exit_netlink_services(hdd_ctx);
-
- if (!QDF_IS_STATUS_SUCCESS(cds_deinit_policy_mgr())) {
- hdd_err("Failed to deinit policy manager");
- /* Proceed and complete the clean up */
- }
+err_debugfs_exit:
+ hdd_debugfs_exit(adapter);
err_close_adapter:
hdd_release_rtnl_lock();
@@ -6358,6 +6351,14 @@ err_cds_close:
}
cds_close(hdd_ctx->pcds_context);
+err_exit_nl_srv:
+ hdd_exit_netlink_services(hdd_ctx);
+
+ if (!QDF_IS_STATUS_SUCCESS(cds_deinit_policy_mgr())) {
+ hdd_err("Failed to deinit policy manager");
+ /* Proceed and complete the clean up */
+ }
+
err_hdd_free_context:
hdd_context_destroy(hdd_ctx);
QDF_BUG(1);