From 104f37b97b7bdb55dc4ecb9ab4293cde4faa727a Mon Sep 17 00:00:00 2001 From: Rajkumar Manoharan Date: Wed, 13 Nov 2013 15:45:21 +0530 Subject: cld: sme: fix data transmission on disconnect indication The earlier commit "cld: Stop data transmission prior to disconnect request" fixed system hang issue when the user is initiating disconnect. But it has to be fixed when AP is initiating disconnect and the station is pushing uplink traffic heavily. Once SME receives deauth/disassoc indication, it is proceeding to roam or post SME command to disconnect without stopping data transmission. Under heavy uplink udp traffic, due to the latency in MC thread processing, all this data is causing the AP to repeatedly exchanging deauth frame with reason code 7 (Class 3 frame received from nonassociated station) and causing system hang. Change-Id: I6e0167cf393bda5775715d5ef5c11f7e07ad45e4 CRs-Fixed: 573721 --- CORE/HDD/src/wlan_hdd_assoc.c | 7 +++++++ CORE/SME/src/csr/csrApiRoam.c | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c index 63d7b7954919..762689a7374d 100644 --- a/CORE/HDD/src/wlan_hdd_assoc.c +++ b/CORE/HDD/src/wlan_hdd_assoc.c @@ -2415,6 +2415,13 @@ eHalStatus hdd_smeRoamCallback( void *pContext, tCsrRoamInfo *pRoamInfo, tANI_U3 } break; case eCSR_ROAM_LOSTLINK: + if(roamResult == eCSR_ROAM_RESULT_LOSTLINK) { + VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, + "Roaming started due to connection lost"); + netif_tx_disable(pAdapter->dev); + netif_carrier_off(pAdapter->dev); + break; + } case eCSR_ROAM_DISASSOCIATED: { hdd_context_t* pHddCtx = (hdd_context_t*)pAdapter->pHddCtx; diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c index becbba0a5cd5..4f8831792550 100644 --- a/CORE/SME/src/csr/csrApiRoam.c +++ b/CORE/SME/src/csr/csrApiRoam.c @@ -13767,6 +13767,15 @@ static void csrRoamLinkDown(tpAniSirGlobal pMac, tANI_U32 sessionId) { return; } + /* + * Incase of station mode, immediately stop data transmission whenever + * link down is detected. + */ + if (csrRoamIsStaMode(pMac, sessionId)) { + smsLog(pMac, LOG1, FL("Inform Link lost for session %d"), sessionId); + csrRoamCallCallback(pMac, sessionId, NULL, 0, eCSR_ROAM_LOSTLINK, + eCSR_ROAM_RESULT_LOSTLINK); + } /* deregister the clients requesting stats from PE/TL & also stop the corresponding timers*/ csrRoamDeregStatisticsReq(pMac); pMac->roam.vccLinkQuality = eCSR_ROAM_LINK_QUAL_POOR_IND; -- cgit v1.2.3