summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYue Ma <yuem@qca.qualcomm.com>2013-12-03 11:33:16 -0800
committerPrakash Dhavali <pdhavali@qca.qualcomm.com>2013-12-06 03:17:28 -0800
commitadb7fa76fddcb6fdddbd7f594bd49d1f1e2ab676 (patch)
treeb6d78ce01207976fc06edd2b09765da865f9de57
parent44c4ba46692a7e6a39c1089fe5385e524037bc19 (diff)
qcacld: Fix a bug for SSR
When SSR happens, all the cfg80211 callback funtions will check if the isLogpInProgress variable in HDD context set to TRUE, if it is, they will return. The HDD context should be gotten from the private data pointer of wiphy, not from the pointer in current adapter, since during SSR all the adapters will be reset, so this check won't take effect. Change-Id: Ie74383b9369cdba87ca1ca956875137b49248645 CRs-Fixed: 562329
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c34
1 files changed, 24 insertions, 10 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index cab47699ab02..75838aa6e45a 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -6329,9 +6329,9 @@ static int wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy,
static int wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
u8* mac, struct station_info *sinfo)
{
- hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR( dev );
- hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
- int ssidlen = pHddStaCtx->conn_info.SSID.SSID.length;
+ hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
+ hdd_station_ctx_t *pHddStaCtx;
+ int ssidlen;
tANI_U8 rate_flags;
hdd_context_t *pHddCtx = (hdd_context_t*) wiphy_priv(wiphy);
@@ -6359,6 +6359,27 @@ static int wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, struct net_device
ENTER();
+ if (pHddCtx->isLogpInProgress)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s:LOGP in Progress. Ignore!!!", __func__);
+ return -EAGAIN;
+ }
+
+ if (NULL == pAdapter)
+ {
+ hddLog(VOS_TRACE_LEVEL_FATAL, "%s: pAdapter is NULL!", __func__);
+ return -EINVAL;;
+ }
+
+ pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
+ if (NULL == pHddStaCtx)
+ {
+ hddLog(VOS_TRACE_LEVEL_FATAL, "%s: pHddStaCtx is NULL!", __func__);
+ return -EINVAL;;
+ }
+
+ ssidlen = pHddStaCtx->conn_info.SSID.SSID.length;
if ((eConnectionState_Associated != pHddStaCtx->conn_info.connState) ||
(0 == ssidlen))
{
@@ -6368,13 +6389,6 @@ static int wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, struct net_device
return 0;
}
- if ( (WLAN_HDD_GET_CTX(pAdapter))->isLogpInProgress )
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s:LOGP in Progress. Ignore!!!", __func__);
- return -EAGAIN;
- }
-
wlan_hdd_get_rssi(pAdapter, &sinfo->signal);
sinfo->filled |= STATION_INFO_SIGNAL;