summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGovind Singh <govinds@codeaurora.org>2016-06-21 14:35:35 +0530
committerVishwajith Upendra <vishwaji@codeaurora.org>2016-06-29 12:11:46 -0700
commitfe9ab254ad7f310478ffb15a1ba622cb954ba1ca (patch)
tree7e06a9a64ee3c13fa19c81de08d51dedd14744f8
parent607f34a72e065fb4bbda1a1e381053e2c6409c00 (diff)
qcacld-3.0: Refactor WMA data commands to fix WIN compilation
Refactor WMA data commands to remove dependency of WMA header files in common wmi layer. Change-Id: Ic16020d9e4fce4db71b265b88703f7cef7b8a275 CRs-Fixed: 1008872
-rw-r--r--core/wma/src/wma_data.c25
-rw-r--r--core/wma/src/wma_mgmt.c6
2 files changed, 21 insertions, 10 deletions
diff --git a/core/wma/src/wma_data.c b/core/wma/src/wma_data.c
index 3f7aa65f05ca..10ddf1dae559 100644
--- a/core/wma/src/wma_data.c
+++ b/core/wma/src/wma_data.c
@@ -2503,6 +2503,7 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
tpAniSirGlobal pMac;
tpSirMacMgmtHdr mHdr;
struct wmi_mgmt_params mgmt_param = {0};
+ struct wmi_desc_t *wmi_desc = NULL;
ol_pdev_handle ctrl_pdev;
if (NULL == wma_handle) {
@@ -2825,21 +2826,25 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
mgmt_param.tx_frame = tx_frame;
mgmt_param.frm_len = frmLen;
mgmt_param.vdev_id = vdev_id;
- mgmt_param.tx_complete_cb = tx_frm_download_comp_cb;
- mgmt_param.tx_ota_post_proc_cb = tx_frm_ota_comp_cb;
- mgmt_param.chanfreq = chanfreq;
mgmt_param.pdata = pData;
+ mgmt_param.chanfreq = chanfreq;
mgmt_param.qdf_ctx = cds_get_context(QDF_MODULE_ID_QDF_DEVICE);
- mgmt_param.wmi_desc = wmi_desc_get(wma_handle);
- if (NULL == mgmt_param.wmi_desc) {
- WMA_LOGE(FL("Failed to get wmi descriptor"));
+ wmi_desc = wmi_desc_get(wma_handle);
+ if (!wmi_desc) {
+ WMA_LOGE("%s: Failed to get wmi_desc", __func__);
status = QDF_STATUS_E_FAILURE;
} else {
+ mgmt_param.desc_id = wmi_desc->desc_id;
status = wmi_mgmt_unified_cmd_send(
- wma_handle->wmi_handle,
- &mgmt_param);
- if (status)
- wmi_desc_put(wma_handle, mgmt_param.wmi_desc);
+ wma_handle->wmi_handle,
+ &mgmt_param);
+ if (status) {
+ wmi_desc_put(wma_handle, wmi_desc);
+ } else {
+ wmi_desc->nbuf = tx_frame;
+ wmi_desc->tx_cmpl_cb = tx_frm_download_comp_cb;
+ wmi_desc->ota_post_proc_cb = tx_frm_ota_comp_cb;
+ }
}
} else {
/* Hand over the Tx Mgmt frame to TxRx */
diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c
index 240fa73e1f81..5d0020e45235 100644
--- a/core/wma/src/wma_mgmt.c
+++ b/core/wma/src/wma_mgmt.c
@@ -662,6 +662,12 @@ void wma_set_sta_keep_alive(tp_wma_handle wma, uint8_t vdev_id,
return;
}
+ if (timeperiod > WNI_CFG_INFRA_STA_KEEP_ALIVE_PERIOD_STAMAX) {
+ WMI_LOGE("Invalid period %d Max limit %d", timeperiod,
+ WNI_CFG_INFRA_STA_KEEP_ALIVE_PERIOD_STAMAX);
+ return;
+ }
+
params.vdev_id = vdev_id;
params.method = method;
params.timeperiod = timeperiod;