prima: Update correct tdls off channel status.
Update the correct value for tdls off channel setting
so that proper value will be reflected to the user.
Change-Id: Ic4fc04fa3876ce7c30b352b7625fc5bd8b657457
CRs-Fixed: 822723
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index fcc418e..6a97a9b 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -15185,6 +15185,9 @@
return -EINVAL;
}
+ /* before starting tdls connection, set tdls
+ * off channel established status to default value */
+ pTdlsPeer->isOffChannelEstablished = FALSE;
/* TDLS Off Channel, Disable tdls channel switch,
when there are more than one tdls link */
numCurrTdlsPeers = wlan_hdd_tdlsConnectedPeers(pAdapter);
@@ -15373,7 +15376,8 @@
{
long status;
-
+ /* set tdls off channel status to false for this peer */
+ pTdlsPeer->isOffChannelEstablished = FALSE;
wlan_hdd_tdls_set_peer_link_status(pTdlsPeer,
eTDLS_LINK_TEARING,
(pTdlsPeer->link_status == eTDLS_LINK_TEARING)?
diff --git a/CORE/HDD/src/wlan_hdd_tdls.c b/CORE/HDD/src/wlan_hdd_tdls.c
index 329c8cb..4f3bcc4 100644
--- a/CORE/HDD/src/wlan_hdd_tdls.c
+++ b/CORE/HDD/src/wlan_hdd_tdls.c
@@ -2893,8 +2893,7 @@
*state = WIFI_TDLS_TRYING;
break;
case eTDLS_LINK_CONNECTED:
- if ((TRUE == curr_peer->isOffChannelConfigured) &&
- (TRUE == curr_peer->isOffChannelEstablished))
+ if (TRUE == curr_peer->isOffChannelEstablished)
{
*state = WIFI_TDLS_ESTABLISHED_OFF_CHANNEL;
}