summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrinivas Girigowda <sgirigow@qca.qualcomm.com>2014-06-17 16:30:28 -0700
committerAkash Patel <c_akashp@qca.qualcomm.com>2014-06-19 20:51:27 -0700
commit9dcd691ec6c185c45eccc047a6fc87133596d7cd (patch)
treed4ab932ec5e637b1b136d091bf9211e578755439
parenta12a6c69bb9a22654bb24116b969ec3d8302c314 (diff)
qcacld: Do not suspend wlan in the middle of roaming.
The wlan suspend code path is different in pronto and CLD. In CLD driver, during cfg80211 suspend wlan there is no check to make sure if driver is in the middle of roaming, hence if the wlan suspend happens while roaming is also in progress, then sending data via hdd_hard_start_xmit() after PCIe is suspended caused L2 master port error. Fix this in wlan_hdd_cfg80211_suspend_wlan by adding a check to see if driver is in the middle of roaming. reject the suspend if roaming is in progress so that kernel shall try to suspend again later Change-Id: If4f769c0e328df360863c65bd16e0d36434dcec5 CRs-Fixed: 681513
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c5
-rw-r--r--CORE/SME/inc/sme_Api.h11
-rw-r--r--CORE/SME/src/sme_common/sme_Api.c20
3 files changed, 35 insertions, 1 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 75c06e81aeca..7f2af960cb17 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -10982,6 +10982,11 @@ int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
return -EAGAIN;
}
+ if (sme_staInMiddleOfRoaming(pHddCtx->hHal)) {
+ hddLog(VOS_TRACE_LEVEL_DEBUG, FL("Roaming in progress "
+ "Do not allow suspend"));
+ return -EAGAIN;
+ }
#ifdef QCA_WIFI_2_0
/* Stop ongoing scan on each interface */
status = hdd_get_front_adapter ( pHddCtx, &pAdapterNode );
diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h
index 273263a66276..774ee5ef1ae1 100644
--- a/CORE/SME/inc/sme_Api.h
+++ b/CORE/SME/inc/sme_Api.h
@@ -3647,6 +3647,15 @@ eHalStatus sme_UpdateDFSScanMode(tHalHandle hHal, v_U8_t allowDFSChannelRoam);
\return DFS roaming mode 0 (disabled), 1 (passive), 2 (active)
\sa
--------------------------------------------------------------------------*/
-v_U8_t sme_GetDFSScanMode(tHalHandle hHal);
+v_BOOL_t sme_GetDFSScanMode(tHalHandle hHal);
+
+/* ---------------------------------------------------------------------------
+ \fn sme_staInMiddleOfRoaming
+ \brief This function returns TRUE if STA is in the middle of roaming state
+ \param hHal - HAL handle for device
+ \- return TRUE or FALSE
+ -------------------------------------------------------------------------*/
+tANI_BOOLEAN sme_staInMiddleOfRoaming(tHalHandle hHal);
+
#endif //#if !defined( __SME_API_H )
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
index 96c3a0221e44..eabb489993d6 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -12589,3 +12589,23 @@ eHalStatus sme_UpdateAddIE(tHalHandle hHal,
return (status);
}
+/* ---------------------------------------------------------------------------
+ \fn sme_staInMiddleOfRoaming
+ \brief This function returns TRUE if STA is in the middle of roaming state
+ \param hHal - HAL handle for device
+ \- return TRUE or FALSE
+ -------------------------------------------------------------------------*/
+tANI_BOOLEAN sme_staInMiddleOfRoaming(tHalHandle hHal)
+{
+ tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
+ eHalStatus status = eHAL_STATUS_SUCCESS;
+ tANI_BOOLEAN ret = FALSE;
+
+ if (eHAL_STATUS_SUCCESS == (status = sme_AcquireGlobalLock(&pMac->sme))) {
+ ret = csrNeighborMiddleOfRoaming(hHal);
+ sme_ReleaseGlobalLock(&pMac->sme);
+ }
+ return ret;
+}
+
+