Merge "wlan: Do not make hdd context as NULL in hdd adapter"
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 541af37..138ce72 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -12790,14 +12790,6 @@
}
hdd_set_conparam(1);
- status = hdd_sta_id_hash_attach(pAdapter);
- if (VOS_STATUS_SUCCESS != status)
- {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- FL("Failed to initialize hash for AP"));
- return -EINVAL;
- }
-
/*interface type changed update in wiphy structure*/
if(wdev)
{
diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c
index c2d917e..8115be8 100644
--- a/CORE/HDD/src/wlan_hdd_hostapd.c
+++ b/CORE/HDD/src/wlan_hdd_hostapd.c
@@ -5556,6 +5556,15 @@
ini_cfg->apEndChannelNum,
ini_cfg->apOperatingBand);
}
+
+ status = hdd_sta_id_hash_attach(pAdapter);
+ if (VOS_STATUS_SUCCESS != status)
+ {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ FL("Failed to initialize hash for AP"));
+ goto error_wmm_init;
+ }
+
/* Action frame registered in one adapter which will
* applicable to all interfaces
*/
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 7143eb1..903781a 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -10112,14 +10112,6 @@
hdd_initialize_adapter_common(pAdapter);
- status = hdd_sta_id_hash_attach(pAdapter);
- if (VOS_STATUS_SUCCESS != status)
- {
- hddLog(VOS_TRACE_LEVEL_FATAL,
- FL("failed to attach hash for session %d"), session_type);
- goto err_free_netdev;
- }
-
status = hdd_register_hostapd( pAdapter, rtnl_held );
if( VOS_STATUS_SUCCESS != status )
{
@@ -11689,12 +11681,6 @@
case WLAN_HDD_SOFTAP:
if (pHddCtx->cfg_ini->sap_internal_restart) {
hdd_init_ap_mode(pAdapter, true);
- status = hdd_sta_id_hash_attach(pAdapter);
- if (VOS_STATUS_SUCCESS != status)
- {
- hddLog(VOS_TRACE_LEVEL_FATAL,
- FL("failed to attach hash for"));
- }
}
break;