summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtul Mittal <atulmt@qti.qualcomm.com>2014-04-29 15:12:57 +0530
committerAkash Patel <c_akashp@qca.qualcomm.com>2014-05-01 09:07:08 -0700
commitabab7761c39dfffedc507f5a6b18895e35314880 (patch)
tree1d30dd183106b41e47c42000c1a5011566bb2365
parent38c147198249ff8bb4b8dfdec672bd775cca845f (diff)
qcacld : Fix for crash in gtk offload during wlan suspend
There is a corner case where cfg80211 suspend is successful and gtk offload configured in f/w but PCIe suspend is fails as scan starts on some interface. During resume gtk offload is disabled but as the device is not associated, this step is skipped. When next time suspend is issued and offloads are configured the f/w crashes because of double enable of gtkoffload. Change-Id: I4a86c3a8af8dfdfc7d59939ee4186fddd23ecf82 CRs-fixed: 654775
-rw-r--r--CORE/HDD/inc/wlan_hdd_main.h1
-rw-r--r--CORE/HDD/src/wlan_hdd_early_suspend.c15
-rw-r--r--CORE/HDD/src/wlan_hdd_hostapd.c1
-rw-r--r--CORE/HDD/src/wlan_hdd_main.c1
-rw-r--r--CORE/SERVICES/WMA/wma.c9
5 files changed, 23 insertions, 4 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
index 3ed5bda4b0c7..6eebefa94f79 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -1090,6 +1090,7 @@ struct hdd_adapter_s
unsigned int tx_flow_low_watermark;
unsigned int tx_flow_high_watermark_offset;
#endif /* QCA_LL_TX_FLOW_CT */
+ v_BOOL_t offloads_configured;
};
#define WLAN_HDD_GET_STATION_CTX_PTR(pAdapter) (&(pAdapter)->sessionCtx.station)
diff --git a/CORE/HDD/src/wlan_hdd_early_suspend.c b/CORE/HDD/src/wlan_hdd_early_suspend.c
index 4327719559e4..3fbeefa1bbc2 100644
--- a/CORE/HDD/src/wlan_hdd_early_suspend.c
+++ b/CORE/HDD/src/wlan_hdd_early_suspend.c
@@ -550,15 +550,26 @@ void hdd_conf_hostoffload(hdd_adapter_t *pAdapter, v_BOOL_t fenable)
pHddCtx->configuredMcastBcastFilter &=
~(HDD_MCASTBCASTFILTER_FILTER_ALL_MULTICAST);
}
+
#endif
+ /*
+ * This variable saves the state if offload were configured
+ * or not. helps in recovering when pcie fails to suspend
+ * because of ongoing scan and state is no longer associated.
+ */
+ pAdapter->offloads_configured = TRUE;
}
}
else
{
//Disable ARPOFFLOAD
- if (eConnectionState_Associated ==
- (WLAN_HDD_GET_STATION_CTX_PTR(pAdapter))->conn_info.connState)
+ if ( (eConnectionState_Associated ==
+ (WLAN_HDD_GET_STATION_CTX_PTR(pAdapter))->conn_info.connState) ||
+ (pAdapter->offloads_configured == TRUE)
+ )
{
+ pAdapter->offloads_configured = FALSE;
+
if (pHddCtx->cfg_ini->fhostArpOffload)
{
vstatus = hdd_conf_arp_offload(pAdapter, fenable);
diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c
index 5e8bcde59fa7..831e277f0a51 100644
--- a/CORE/HDD/src/wlan_hdd_hostapd.c
+++ b/CORE/HDD/src/wlan_hdd_hostapd.c
@@ -4629,6 +4629,7 @@ hdd_adapter_t* hdd_wlan_create_ap_dev( hdd_context_t *pHddCtx, tSirMacAddr macAd
vos_mem_copy(pWlanHostapdDev->dev_addr, (void *)macAddr,sizeof(tSirMacAddr));
vos_mem_copy(pHostapdAdapter->macAddressCurrent.bytes, (void *)macAddr, sizeof(tSirMacAddr));
+ pHostapdAdapter->offloads_configured = FALSE;
pWlanHostapdDev->destructor = free_netdev;
pWlanHostapdDev->ieee80211_ptr = &pHostapdAdapter->wdev ;
pHostapdAdapter->wdev.wiphy = pHddCtx->wiphy;
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index b8f427857035..eeea9bf786eb 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -7458,6 +7458,7 @@ static hdd_adapter_t* hdd_alloc_station_adapter( hdd_context_t *pHddCtx, tSirMac
vos_event_init(&pAdapter->scan_info.scan_finished_event);
pAdapter->scan_info.scan_pending_option = WEXT_SCAN_PENDING_GIVEUP;
+ pAdapter->offloads_configured = FALSE;
pAdapter->isLinkUpSvcNeeded = FALSE;
pAdapter->higherDtimTransition = eANI_BOOLEAN_TRUE;
//Init the net_device structure
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 7187edfac666..5691859e4c5e 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -4224,9 +4224,14 @@ bool wma_check_scan_in_progress(WMA_HANDLE handle)
tp_wma_handle wma_handle = handle;
int i;
- for (i = 0; i < wma_handle->max_bssid; i++)
- if (wma_handle->interfaces[i].scan_info.scan_id)
+ for (i = 0; i < wma_handle->max_bssid; i++){
+ if (wma_handle->interfaces[i].scan_info.scan_id){
+
+ WMA_LOGE("%s: scan in progress on interface[%d],scanid = %d",
+ __func__, i, wma_handle->interfaces[i].scan_info.scan_id );
return true;
+ }
+ }
return false;
}