|
@@ -5098,7 +5098,7 @@ out:
|
|
|
*
|
|
|
* Return: None.
|
|
|
*/
|
|
|
-static void hdd_unregister_notifiers(hdd_context_t *hdd_ctx)
|
|
|
+void hdd_unregister_notifiers(hdd_context_t *hdd_ctx)
|
|
|
{
|
|
|
hdd_wlan_unregister_ip6_notifier(hdd_ctx);
|
|
|
|
|
@@ -5378,9 +5378,9 @@ static void hdd_wlan_exit(hdd_context_t *hdd_ctx)
|
|
|
}
|
|
|
|
|
|
/*
|
|
|
- * Close the scheduler before calling cds_close to make sure no thread
|
|
|
- * is scheduled after the each module close is called i.e after all the
|
|
|
- * data structures are freed.
|
|
|
+ * Close the scheduler before calling cds_close to make sure
|
|
|
+ * no thread is scheduled after the each module close is
|
|
|
+ * is called i.e after all the data structures are freed.
|
|
|
*/
|
|
|
qdf_status = cds_sched_close(p_cds_context);
|
|
|
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
|
@@ -5413,10 +5413,15 @@ static void hdd_wlan_exit(hdd_context_t *hdd_ctx)
|
|
|
|
|
|
wlansap_global_deinit();
|
|
|
wlan_hdd_deinit_chan_info(hdd_ctx);
|
|
|
- wiphy_unregister(wiphy);
|
|
|
- wlan_hdd_cfg80211_deinit(wiphy);
|
|
|
-
|
|
|
- hdd_lpass_notify_stop(hdd_ctx);
|
|
|
+ /*
|
|
|
+ * If there is re_init failure wiphy would have already de-registered
|
|
|
+ * check the wiphy status before un-registering again
|
|
|
+ */
|
|
|
+ if (!wiphy && wiphy->registered) {
|
|
|
+ wiphy_unregister(wiphy);
|
|
|
+ wlan_hdd_cfg80211_deinit(wiphy);
|
|
|
+ hdd_lpass_notify_stop(hdd_ctx);
|
|
|
+ }
|
|
|
|
|
|
hdd_exit_netlink_services(hdd_ctx);
|
|
|
mutex_destroy(&hdd_ctx->iface_change_lock);
|
|
@@ -6113,10 +6118,11 @@ static int wlan_hdd_init_tx_rx_histogram(hdd_context_t *hdd_ctx)
|
|
|
*/
|
|
|
void wlan_hdd_deinit_tx_rx_histogram(hdd_context_t *hdd_ctx)
|
|
|
{
|
|
|
- if (hdd_ctx->hdd_txrx_hist) {
|
|
|
- qdf_mem_free(hdd_ctx->hdd_txrx_hist);
|
|
|
- hdd_ctx->hdd_txrx_hist = NULL;
|
|
|
- }
|
|
|
+ if (!hdd_ctx || hdd_ctx->hdd_txrx_hist == NULL)
|
|
|
+ return;
|
|
|
+
|
|
|
+ qdf_mem_free(hdd_ctx->hdd_txrx_hist);
|
|
|
+ hdd_ctx->hdd_txrx_hist = NULL;
|
|
|
}
|
|
|
|
|
|
static uint8_t *convert_level_to_string(uint32_t level)
|
|
@@ -8810,7 +8816,6 @@ int hdd_wlan_stop_modules(hdd_context_t *hdd_ctx, bool ftm_mode)
|
|
|
qdf_device_t qdf_ctx;
|
|
|
QDF_STATUS qdf_status;
|
|
|
int ret = 0;
|
|
|
- p_cds_sched_context cds_sched_context = NULL;
|
|
|
bool is_idle_stop = !cds_is_driver_unloading() &&
|
|
|
!cds_is_driver_recovering();
|
|
|
int active_threads;
|
|
@@ -8825,11 +8830,6 @@ int hdd_wlan_stop_modules(hdd_context_t *hdd_ctx, bool ftm_mode)
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
|
- cds_sched_context = get_cds_sched_ctxt();
|
|
|
- if (!cds_sched_context) {
|
|
|
- hdd_err("cds scheduler context NULL");
|
|
|
- return -EINVAL;
|
|
|
- }
|
|
|
mutex_lock(&hdd_ctx->iface_change_lock);
|
|
|
hdd_ctx->stop_modules_in_progress = true;
|
|
|
|