summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Chang <schang@qca.qualcomm.com>2013-12-03 11:08:36 -0800
committerPrakash Dhavali <pdhavali@qca.qualcomm.com>2013-12-06 03:17:28 -0800
commit4d5f2cf39f20dbc2aacc57c342b55127cd669f10 (patch)
tree21928ce5b2e4aa6a6202da7be9c5407d258e7a64
parentb2079b85e4e4ea6e2bfb130f50dca1f93983e1af (diff)
wlan: WMA handler for MCC TX VDEV PAUSE event
WMA handler for MCC TX VDEV PAUSE event. FW event handler on host side Change-Id: I1bcc90c14938002c9e20c885c55028776bea256c
-rw-r--r--CORE/SERVICES/COMMON/wdi_in.h2
-rw-r--r--CORE/SERVICES/WMA/wma.c52
2 files changed, 53 insertions, 1 deletions
diff --git a/CORE/SERVICES/COMMON/wdi_in.h b/CORE/SERVICES/COMMON/wdi_in.h
index df28d1d8ddb6..275f01293d08 100644
--- a/CORE/SERVICES/COMMON/wdi_in.h
+++ b/CORE/SERVICES/COMMON/wdi_in.h
@@ -338,7 +338,7 @@ wdi_in_vdev_pause(ol_txrx_vdev_handle data_vdev);
*
* @param data_vdev - the virtual device being unpaused
*/
-#if defined(CONFIG_HL_SUPPORT)
+#if defined(CONFIG_HL_SUPPORT) || defined(QCA_SUPPORT_TXRX_VDEV_PAUSE_LL)
void
wdi_in_vdev_unpause(ol_txrx_vdev_handle data_vdev);
#else
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 0c718fff637b..5c8deb1c006e 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -2082,6 +2082,10 @@ static ol_txrx_vdev_handle wma_vdev_attach(tp_wma_handle wma_handle,
self_sta_req->selfMacAddr,
self_sta_req->sessionId,
txrx_vdev_type);
+#ifdef QCA_SUPPORT_TXRX_VDEV_PAUSE_LL
+ WMA_LOGE("LL TX Pause Mutex init");
+ adf_os_spinlock_init(&txrx_vdev_handle->ll_pause.mutex);
+#endif /* QCA_SUPPORT_TXRX_VDEV_PAUSE_LL */
WMA_LOGA("vdev_id %hu, txrx_vdev_handle = %p", self_sta_req->sessionId,
txrx_vdev_handle);
@@ -10397,6 +10401,46 @@ skip_pno_cmp_ind:
#endif
+#ifdef QCA_SUPPORT_TXRX_VDEV_PAUSE_LL
+static int wma_mcc_vdev_tx_pause_evt_handler(void *handle, u_int8_t *event,
+ u_int32_t len)
+{
+ tp_wma_handle wma = (tp_wma_handle) handle;
+ WMI_TX_PAUSE_EVENTID_param_tlvs *param_buf;
+ wmi_tx_pause_event_fixed_param *wmi_event;
+ ol_txrx_vdev_handle txrx_vdev;
+
+ param_buf = (WMI_TX_PAUSE_EVENTID_param_tlvs *) event;
+ if (!param_buf) {
+ WMA_LOGE("Invalid roam event buffer");
+ return -EINVAL;
+ }
+
+ wmi_event = param_buf->fixed_param;
+ WMA_LOGD("tlv_header 0x%x, pause_type 0x%x, action 0x%x, vdev_map 0x%x, peer_id 0x%x, tid_map 0x%x\n",
+ (int)wmi_event->tlv_header, (int)wmi_event->pause_type,
+ (int)wmi_event->action, (int)wmi_event->vdev_map,
+ (int)wmi_event->peer_id, (int)wmi_event->tid_map);
+
+ txrx_vdev = wma->interfaces[wmi_event->vdev_map].handle;
+
+ if (txrx_vdev)
+ {
+ if ((PAUSE_TYPE_CHOP == wmi_event->pause_type) &&
+ (!wmi_event->action))
+ {
+ wdi_in_vdev_pause(txrx_vdev);
+ }
+ if ((PAUSE_TYPE_CHOP == wmi_event->pause_type) &&
+ (wmi_event->action))
+ {
+ wdi_in_vdev_unpause(txrx_vdev);
+ }
+ }
+
+ return 0;
+}
+#endif /* QCA_SUPPORT_TXRX_VDEV_PAUSE_LL */
/* function : wma_start
* Descriptin :
* Args :
@@ -10490,6 +10534,14 @@ VOS_STATUS wma_start(v_VOID_t *vos_ctx)
}
#endif
+#ifdef QCA_SUPPORT_TXRX_VDEV_PAUSE_LL
+ WMA_LOGE("MCC TX Pause Event Handler register");
+ status = wmi_unified_register_event_handler(
+ wma_handle->wmi_handle,
+ WMI_TX_PAUSE_EVENTID,
+ wma_mcc_vdev_tx_pause_evt_handler);
+#endif /* QCA_SUPPORT_TXRX_VDEV_PAUSE_LL */
+
vos_status = VOS_STATUS_SUCCESS;
#ifdef QCA_WIFI_FTM