summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@qti.qualcomm.com>2014-02-28 12:57:52 +0530
committerAkash Patel <c_akashp@qca.qualcomm.com>2014-03-04 23:00:36 -0800
commit0546e3271bbf466ddedb8c304a5d1a455d1f784e (patch)
treef634017881606b4648b58ccd5a7d9faffc899d16
parent9195724bfd83b41955cfdc44ef5e6377f2d0615c (diff)
qcacld: Abort data transmission immediately upon deauthentication
A system crash was reported when AP is initiating disconnect and the station is pushing UDP uplink traffic at higher bandwidth. There is higher latency (~500ms) observed between posting the SME message by LIM and processing it where the netif tx is stopped. Due to higher data rate, AP is flooding deauth frame for every packet is received. Since LIM messages are higher in order in MCThread, it is not yielding the CPU to process SME messages immediately. This change make sure that data transmission is paused immediately and flushes the pending frames in firmware. CRs-Fixed: 583617 Change-Id: I5e6519b99aa70a96a12e091b5433f4336ae7cc88
-rw-r--r--CORE/MAC/src/pe/lim/limProcessDeauthFrame.c3
-rw-r--r--CORE/SERVICES/COMMON/wmi_unified.h1
-rw-r--r--CORE/SERVICES/WMA/wma.c27
-rw-r--r--CORE/WDA/inc/wlan_qct_wda.h4
4 files changed, 35 insertions, 0 deletions
diff --git a/CORE/MAC/src/pe/lim/limProcessDeauthFrame.c b/CORE/MAC/src/pe/lim/limProcessDeauthFrame.c
index 5c93dda99047..a52956088c12 100644
--- a/CORE/MAC/src/pe/lim/limProcessDeauthFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessDeauthFrame.c
@@ -496,6 +496,9 @@ limProcessDeauthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession p
{
pMac->lim.deauthMsgCnt = 0;
}
+ if (eLIM_STA_ROLE == psessionEntry->limSystemRole)
+ WDA_TxAbort(psessionEntry->smeSessionId);
+
/// Deauthentication from peer MAC entity
limPostSmeMessage(pMac, LIM_MLM_DEAUTH_IND, (tANI_U32 *) &mlmDeauthInd);
diff --git a/CORE/SERVICES/COMMON/wmi_unified.h b/CORE/SERVICES/COMMON/wmi_unified.h
index acccfb8bc6e5..24aa5eb08bef 100644
--- a/CORE/SERVICES/COMMON/wmi_unified.h
+++ b/CORE/SERVICES/COMMON/wmi_unified.h
@@ -2201,6 +2201,7 @@ typedef enum {
PAUSE_TYPE_P2P_GO_PS = 0x5, /** only vdev_map is valid, actually only one vdev id is set at one time */
PAUSE_TYPE_STA_ADD_BA = 0x6, /** only peer_id and tid_map are valid, actually only one tid is set at one time */
PAUSE_TYPE_AP_PS = 0x7, /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */
+ PAUSE_TYPE_HOST = 0x15,/** host is requesting vdev pause */
} wmi_tx_pause_type;
typedef enum {
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 7538173b7141..f5d5f84bf35d 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -958,6 +958,7 @@ static int wma_vdev_stop_resp_handler(void *handle, u_int8_t *cmd_param_info,
iface = &wma->interfaces[resp_event->vdev_id];
ol_txrx_vdev_flush(iface->handle);
wdi_in_vdev_unpause(iface->handle);
+ iface->pause_bitmap = 0;
adf_os_atomic_set(&iface->bss_status, WMA_BSS_STATUS_STOPPED);
WMA_LOGD("%s: (type %d subtype %d) BSS is stopped",
__func__, iface->type, iface->sub_type);
@@ -5901,6 +5902,7 @@ void wma_vdev_resp_timer(void *data)
}
ol_txrx_vdev_flush(iface->handle);
wdi_in_vdev_unpause(iface->handle);
+ iface->pause_bitmap = 0;
adf_os_atomic_set(&iface->bss_status, WMA_BSS_STATUS_STOPPED);
WMA_LOGD("%s: (type %d subtype %d) BSS is stopped",
__func__, iface->type, iface->sub_type);
@@ -19162,3 +19164,28 @@ void ol_rx_err(ol_pdev_handle pdev, u_int8_t vdev_id,
adf_os_mem_copy(mic_err_ind->info.TSC, pn, SIR_CIPHER_SEQ_CTR_SIZE);
wma_send_msg(wma, SIR_HAL_MIC_FAILURE_IND, (void *) mic_err_ind, 0);
}
+
+void WDA_TxAbort(v_U8_t vdev_id)
+{
+#define PEER_ALL_TID_BITMASK 0xffffffff
+ tp_wma_handle wma;
+ u_int32_t peer_tid_bitmap = PEER_ALL_TID_BITMASK;
+ struct wma_txrx_node *iface;
+
+ wma = vos_get_context(VOS_MODULE_ID_WDA,
+ vos_get_global_context(VOS_MODULE_ID_WDA, NULL));
+ iface = &wma->interfaces[vdev_id];
+ if (!wma || !iface->handle) {
+ WMA_LOGE("%s: Failed to get handle wma: %p iface: %p",
+ __func__, wma, iface->handle);
+ return;
+ }
+ WMA_LOGA("%s: vdevid %d bssid %pM", __func__, vdev_id, iface->bssid);
+ iface->pause_bitmap |= (1 << PAUSE_TYPE_HOST);
+ wdi_in_vdev_pause(iface->handle);
+
+ /* Flush all TIDs except MGMT TID for this peer in Target */
+ peer_tid_bitmap &= ~(0x1 << WMI_MGMT_TID);
+ wmi_unified_peer_flush_tids_send(wma->wmi_handle, iface->bssid,
+ peer_tid_bitmap, vdev_id);
+}
diff --git a/CORE/WDA/inc/wlan_qct_wda.h b/CORE/WDA/inc/wlan_qct_wda.h
index 222e78d8a12f..2422dfbe74cc 100644
--- a/CORE/WDA/inc/wlan_qct_wda.h
+++ b/CORE/WDA/inc/wlan_qct_wda.h
@@ -1494,6 +1494,7 @@ WDA_DS_PeekRxPacketInfo
#define WDA_TrafficStatsTimerActivate WMA_TrafficStatsTimerActivate
#define WDA_SetEnableSSR(enable_ssr) (void)enable_ssr
+void WDA_TxAbort(v_U8_t vdev_id);
#else /* #ifdef QCA_WIFI_2_0 */
@@ -2195,6 +2196,9 @@ void WDA_TrafficStatsTimerActivate(wpt_boolean activate);
===========================================================================*/
void WDA_SetEnableSSR(v_BOOL_t enableSSR);
+static inline void WDA_TxAbort(v_U8_t vdev_id)
+{
+}
#endif /* #ifdef QCA_WIFI_2_0 */
/* Powersave Offload Changes */