qcacld-3.0: Remove wma_open() cds_ctx parameter

Currently wma_open() takes a cds_ctx parameter. All of the other WMA
functions which previously took a cds_ctx no longer use that
parameter, and those functions have been modified to remove the unused
parameter. wma_open() still needs the cds_ctx, but it can get that
context by calling cds_get_global_context(), so remove the cds_ctx
parameter to be consistent with the other WMA functions.

Note: the fact that wma_open() needs the cds_ctx, and then
dereferences it, is a layering violation that needs to be addressed in
the future.

Change-Id: I176e2ac68cc2e8081645a4ce3c158b41d3018587
CRs-Fixed: 2109263
This commit is contained in:
Jeff Johnson 2017-09-13 10:06:03 -07:00 • committed by snandini
commit ff6addf320
3 changed files with 10 additions and 5 deletions

View file

@ -531,8 +531,7 @@ QDF_STATUS cds_open(struct wlan_objmgr_psoc *psoc)
}
/*Open the WMA module */
qdf_status = wma_open(psoc, gp_cds_context,
hdd_update_tgt_cfg, cds_cfg);
qdf_status = wma_open(psoc, hdd_update_tgt_cfg, cds_cfg);
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
/* Critical Error ... Cannot proceed further */

View file

@ -713,7 +713,7 @@ QDF_STATUS wma_tx_packet(void *pWMA,
uint8_t txFlag, uint8_t sessionId, bool tdlsflag,
uint16_t channel_freq);
QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc, void *p_cds_context,
QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc,
wma_tgt_cfg_cb pTgtUpdCB, struct cds_config_info *cds_cfg);
/**

View file

@ -2208,13 +2208,12 @@ void wma_vdev_deinit(struct wma_txrx_node *vdev)
/**
* wma_open() - Allocate wma context and initialize it.
* @psoc: Psoc pointer
* @cds_context: cds context
* @wma_tgt_cfg_cb: tgt config callback fun
* @cds_cfg: mac parameters
*
* Return: 0 on success, errno on failure
*/
QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc, void *cds_context,
QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc,
wma_tgt_cfg_cb tgt_cfg_cb,
struct cds_config_info *cds_cfg)
{
@ -2228,9 +2227,16 @@ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc, void *cds_context,
struct target_psoc_info *tgt_psoc_info;
bool use_cookie = false;
int i;
void *cds_context;
WMA_LOGD("%s: Enter", __func__);
cds_context = cds_get_global_context();
if (!cds_context) {
WMA_LOGE("%s: Invalid CDS context", __func__);
return QDF_STATUS_E_INVAL;
}
g_wmi_version_info.major = __WMI_VER_MAJOR_;
g_wmi_version_info.minor = __WMI_VER_MINOR_;
g_wmi_version_info.revision = __WMI_REVISION_;