summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrepo-branch stable-internal Tushnim Bhattacharyya <tushnimb@qca.qualcomm.com>2015-05-08 11:07:01 -0700
committerAnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com>2015-05-11 19:01:08 +0530
commit44eb61882e3efdda6f4ce92713018f6070eae39a (patch)
tree551ce1502f2b050447b4520b006baca5e41284dc
parentc0c3f9d5ca5e8968e13a1144f52f3f6a380e7f66 (diff)
qcacld 2.0: Fix to block p2pProcessRemainOnChannelCmd during roaming
propagation from prima/pronto Currently, p2pProcessRemainOnChannelCmd is getting invoked during reassociation which is affecting EAPOL exchanges as NULL packets are seen before EAPOL exchanges and causing disconnection.Fix this by not allowing p2pProcessRemainOnChannelCmd during reassociation. Change-Id: I0b8fd7a11e7d93c2d28c7d64e48f124fdfff24b3 CRs-Fixed: 777263
-rw-r--r--CORE/HDD/inc/wlan_hdd_main.h2
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c24
-rw-r--r--CORE/HDD/src/wlan_hdd_p2p.c4
-rw-r--r--CORE/SME/inc/sme_Api.h2
-rw-r--r--CORE/SME/src/sme_common/sme_Api.c18
5 files changed, 38 insertions, 12 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
index 8055d1fb07b5..03b75172fb13 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -1607,7 +1607,7 @@ int wlan_hdd_validate_context(hdd_context_t *pHddCtx);
v_BOOL_t hdd_is_valid_mac_address(const tANI_U8* pMacAddr);
VOS_STATUS hdd_issta_p2p_clientconnected(hdd_context_t *pHddCtx);
void hdd_ipv4_notifier_work_queue(struct work_struct *work);
-bool hdd_isConnectionInProgress(hdd_context_t *pHddCtx, bool is_roc);
+bool hdd_isConnectionInProgress(hdd_context_t *pHddCtx);
#ifdef WLAN_FEATURE_PACKET_FILTERING
int wlan_hdd_setIPv6Filter(hdd_context_t *pHddCtx, tANI_U8 filterType, tANI_U8 sessionId);
#endif
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 3d3c0e1f5345..cf606b6311fb 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -12332,7 +12332,7 @@ allow_suspend:
*
* Return: true if connection in progress; false otherwise.
*/
-bool hdd_isConnectionInProgress(hdd_context_t *pHddCtx, bool is_roc)
+bool hdd_isConnectionInProgress(hdd_context_t *pHddCtx)
{
hdd_adapter_list_node_t *pAdapterNode = NULL, *pNext = NULL;
hdd_station_ctx_t *pHddStaCtx = NULL;
@@ -12355,9 +12355,8 @@ bool hdd_isConnectionInProgress(hdd_context_t *pHddCtx, bool is_roc)
hddLog(LOG1, FL("Adapter with device mode %s(%d) exists"),
hdd_device_mode_to_string(pAdapter->device_mode),
pAdapter->device_mode);
- if ((((!is_roc) &&
- (WLAN_HDD_INFRA_STATION ==
- pAdapter->device_mode)) ||
+ if (((WLAN_HDD_INFRA_STATION ==
+ pAdapter->device_mode) ||
(WLAN_HDD_P2P_CLIENT ==
pAdapter->device_mode) ||
(WLAN_HDD_P2P_DEVICE ==
@@ -12371,10 +12370,17 @@ bool hdd_isConnectionInProgress(hdd_context_t *pHddCtx, bool is_roc)
pAdapter->sessionId);
return true;
}
-
- if (((!is_roc) &&
- (WLAN_HDD_INFRA_STATION ==
- pAdapter->device_mode)) ||
+ if ((WLAN_HDD_INFRA_STATION == pAdapter->device_mode) &&
+ smeNeighborRoamIsHandoffInProgress(
+ WLAN_HDD_GET_HAL_CTX(pAdapter), pAdapter->sessionId))
+ {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ "%s: %p(%d) Reassociation is in progress", __func__,
+ WLAN_HDD_GET_STATION_CTX_PTR(pAdapter), pAdapter->sessionId);
+ return VOS_TRUE;
+ }
+ if ((WLAN_HDD_INFRA_STATION ==
+ pAdapter->device_mode) ||
(WLAN_HDD_P2P_CLIENT ==
pAdapter->device_mode) ||
(WLAN_HDD_P2P_DEVICE ==
@@ -12592,7 +12598,7 @@ int __wlan_hdd_cfg80211_scan( struct wiphy *wiphy,
/* Check if scan is allowed at this point of time.
*/
- if (hdd_isConnectionInProgress(pHddCtx, false)) {
+ if (hdd_isConnectionInProgress(pHddCtx)) {
hddLog(LOGE, FL("Scan not allowed"));
return -EBUSY;
}
diff --git a/CORE/HDD/src/wlan_hdd_p2p.c b/CORE/HDD/src/wlan_hdd_p2p.c
index f63a7d8c7495..7b968a2da699 100644
--- a/CORE/HDD/src/wlan_hdd_p2p.c
+++ b/CORE/HDD/src/wlan_hdd_p2p.c
@@ -741,7 +741,7 @@ void wlan_hdd_roc_request_dequeue(struct work_struct *work)
/* If driver is busy then we can't run RoC */
if (hdd_ctx->isLoadInProgress || hdd_ctx->isUnloadInProgress ||
- hdd_isConnectionInProgress(hdd_ctx, true)) {
+ hdd_isConnectionInProgress(hdd_ctx)) {
hddLog(LOGE,
FL("Wlan Load/Unload or Connection is in progress"));
return;
@@ -812,7 +812,7 @@ static int wlan_hdd_request_remain_on_channel( struct wiphy *wiphy,
return ret;
}
- if (hdd_isConnectionInProgress((hdd_context_t *)pAdapter->pHddCtx, true)) {
+ if (hdd_isConnectionInProgress((hdd_context_t *)pAdapter->pHddCtx)) {
hddLog(LOGE, FL("Connection is in progress"));
isBusy = VOS_TRUE;
}
diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h
index d6790679d0cb..537ac942d00d 100644
--- a/CORE/SME/inc/sme_Api.h
+++ b/CORE/SME/inc/sme_Api.h
@@ -4301,4 +4301,6 @@ sme_set_tsf_gpio(tHalHandle hHal, uint32_t pinvalue)
}
#endif
+bool smeNeighborRoamIsHandoffInProgress(tHalHandle hHal, tANI_U8 sessionId);
+
#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 5c85d03974ae..461a3bbcbfd1 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -16393,3 +16393,21 @@ eHalStatus sme_wifi_start_logger(tHalHandle hal,
}
return status;
}
+
+/**
+ * smeNeighborRoamIsHandoffInProgress() - Function to know if
+ * handoff is in progress
+ * @hal: Handle returned by macOpen
+ * @sessionId: sessionId of the STA session
+ *
+ * This function is a wrapper to call
+ * csrNeighborRoamIsHandoffInProgress to know if handoff is in
+ * progress
+ *
+ * Return: True or False
+ *
+ */
+bool smeNeighborRoamIsHandoffInProgress(tHalHandle hHal, tANI_U8 sessionId)
+{
+ return csrNeighborRoamIsHandoffInProgress(PMAC_STRUCT(hHal), sessionId);
+}