|
@@ -48,6 +48,8 @@
|
|
|
#include "mac_trace.h"
|
|
|
#endif
|
|
|
|
|
|
+static tAniSirGlobal global_mac_context;
|
|
|
+
|
|
|
extern tSirRetStatus halDoCfgInit(tpAniSirGlobal pMac);
|
|
|
extern tSirRetStatus halProcessStartEvent(tpAniSirGlobal pMac);
|
|
|
|
|
@@ -103,25 +105,13 @@ tSirRetStatus mac_stop(tHalHandle hHal, tHalStopType stopType)
|
|
|
tSirRetStatus mac_open(struct wlan_objmgr_psoc *psoc, tHalHandle *pHalHandle,
|
|
|
tHddHandle hHdd, struct cds_config_info *cds_cfg)
|
|
|
{
|
|
|
- tpAniSirGlobal p_mac = NULL;
|
|
|
+ tpAniSirGlobal p_mac = &global_mac_context;
|
|
|
tSirRetStatus status = eSIR_SUCCESS;
|
|
|
QDF_STATUS qdf_status;
|
|
|
|
|
|
if (pHalHandle == NULL)
|
|
|
return eSIR_FAILURE;
|
|
|
|
|
|
- /*
|
|
|
- * Make sure this adapter is not already opened. (Compare pAdapter pointer in already
|
|
|
- * allocated p_mac structures.)
|
|
|
- * If it is opened just return pointer to previously allocated p_mac pointer.
|
|
|
- * Or should this result in error?
|
|
|
- */
|
|
|
-
|
|
|
- /* Allocate p_mac */
|
|
|
- p_mac = qdf_mem_malloc(sizeof(tAniSirGlobal));
|
|
|
- if (NULL == p_mac)
|
|
|
- return eSIR_MEM_ALLOC_FAILED;
|
|
|
-
|
|
|
/*
|
|
|
* Set various global fields of p_mac here
|
|
|
* (Could be platform dependant as some variables in p_mac are platform
|
|
@@ -188,8 +178,6 @@ tSirRetStatus mac_close(tHalHandle hHal)
|
|
|
}
|
|
|
wlan_objmgr_psoc_release_ref(pMac->psoc, WLAN_LEGACY_MAC_ID);
|
|
|
pMac->psoc = NULL;
|
|
|
- /* Finally, de-allocate the global MAC datastructure: */
|
|
|
- qdf_mem_free(pMac);
|
|
|
|
|
|
return eSIR_SUCCESS;
|
|
|
}
|