|
@@ -3791,17 +3791,6 @@ static struct hdd_adapter *hdd_alloc_station_adapter(struct hdd_context *hdd_ctx
|
|
|
return NULL;
|
|
|
}
|
|
|
|
|
|
- init_completion(&adapter->disconnect_comp_var);
|
|
|
- init_completion(&adapter->roaming_comp_var);
|
|
|
- init_completion(&adapter->linkup_event_var);
|
|
|
- init_completion(&adapter->cancel_rem_on_chan_var);
|
|
|
- init_completion(&adapter->rem_on_chan_ready_event);
|
|
|
- init_completion(&adapter->sta_authorized_event);
|
|
|
- init_completion(&adapter->offchannel_tx_event);
|
|
|
- init_completion(&adapter->tx_action_cnf_event);
|
|
|
- init_completion(&adapter->ibss_peer_info_comp);
|
|
|
- init_completion(&adapter->lfr_fw_status.disable_lfr_event);
|
|
|
-
|
|
|
adapter->offloads_configured = false;
|
|
|
adapter->is_link_up_service_needed = false;
|
|
|
adapter->disconnection_in_progress = false;
|
|
@@ -4753,6 +4742,29 @@ error:
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * hdd_init_completion() - Initialize Completion Variables
|
|
|
+ * @adapter: HDD adapter
|
|
|
+ *
|
|
|
+ * This function Initialize the completion variables for
|
|
|
+ * a particular adapter
|
|
|
+ *
|
|
|
+ * Return: None
|
|
|
+ */
|
|
|
+static void hdd_init_completion(struct hdd_adapter *adapter)
|
|
|
+{
|
|
|
+ init_completion(&adapter->disconnect_comp_var);
|
|
|
+ init_completion(&adapter->roaming_comp_var);
|
|
|
+ init_completion(&adapter->linkup_event_var);
|
|
|
+ init_completion(&adapter->cancel_rem_on_chan_var);
|
|
|
+ init_completion(&adapter->rem_on_chan_ready_event);
|
|
|
+ init_completion(&adapter->sta_authorized_event);
|
|
|
+ init_completion(&adapter->offchannel_tx_event);
|
|
|
+ init_completion(&adapter->tx_action_cnf_event);
|
|
|
+ init_completion(&adapter->ibss_peer_info_comp);
|
|
|
+ init_completion(&adapter->lfr_fw_status.disable_lfr_event);
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* hdd_open_adapter() - open and setup the hdd adatper
|
|
|
* @hdd_ctx: global hdd context
|
|
@@ -4932,6 +4944,7 @@ struct hdd_adapter *hdd_open_adapter(struct hdd_context *hdd_ctx, uint8_t sessio
|
|
|
return NULL;
|
|
|
}
|
|
|
|
|
|
+ hdd_init_completion(adapter);
|
|
|
INIT_WORK(&adapter->scan_block_work, wlan_hdd_cfg80211_scan_block_cb);
|
|
|
qdf_list_create(&adapter->blocked_scan_request_q, WLAN_MAX_SCAN_COUNT);
|
|
|
qdf_mutex_create(&adapter->blocked_scan_request_q_lock);
|