prima: Display tdls off channel status
Display tdls off channel status is enabled or disabled
through wifi_hal api.
Change-Id: I81bb48c01e3502e2d45d845de3015607b9ea35df
CRS-Fixed: 814331
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 32d6a09..b33f943 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -15050,6 +15050,7 @@
"%s: More then one peer connected, Disable "
"TDLS channel switch", __func__);
+ connPeer->isOffChannelEstablished = FALSE;
ret = sme_SendTdlsChanSwitchReq(
WLAN_HDD_GET_HAL_CTX(pAdapter),
pAdapter->sessionId,
@@ -15149,6 +15150,8 @@
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
"%s: Send TDLS channel switch request for channel %d",
__func__, pTdlsPeer->peerParams.channel);
+
+ pTdlsPeer->isOffChannelEstablished = TRUE;
ret = sme_SendTdlsChanSwitchReq(WLAN_HDD_GET_HAL_CTX(pAdapter),
pAdapter->sessionId,
pTdlsPeer->peerMac,
@@ -15260,6 +15263,7 @@
(connPeer->isOffChannelSupported == TRUE) &&
(connPeer->isOffChannelConfigured == TRUE))
{
+ connPeer->isOffChannelEstablished = TRUE;
status = sme_SendTdlsChanSwitchReq(
WLAN_HDD_GET_HAL_CTX(pAdapter),
pAdapter->sessionId,
@@ -15274,10 +15278,12 @@
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
"%s: TDLS channel switch "
"isOffChannelSupported %d "
- "isOffChannelConfigured %d",
+ "isOffChannelConfigured %d "
+ "isOffChannelEstablished %d",
__func__,
(connPeer ? connPeer->isOffChannelSupported : -1),
- (connPeer ? connPeer->isOffChannelConfigured : -1));
+ (connPeer ? connPeer->isOffChannelConfigured : -1),
+ (connPeer ? connPeer->isOffChannelEstablished : -1));
}
else
{
diff --git a/CORE/HDD/src/wlan_hdd_tdls.c b/CORE/HDD/src/wlan_hdd_tdls.c
index 42e2ab5..ac9fad6 100644
--- a/CORE/HDD/src/wlan_hdd_tdls.c
+++ b/CORE/HDD/src/wlan_hdd_tdls.c
@@ -2895,7 +2895,15 @@
*state = WIFI_TDLS_TRYING;
break;
case eTDLS_LINK_CONNECTED:
- *state = WIFI_TDLS_ESTABLISHED;
+ if ((TRUE == curr_peer->isOffChannelConfigured) &&
+ (TRUE == curr_peer->isOffChannelEstablished))
+ {
+ *state = WIFI_TDLS_ESTABLISHED_OFF_CHANNEL;
+ }
+ else
+ {
+ *state = WIFI_TDLS_ESTABLISHED;
+ }
break;
case eTDLS_LINK_TEARING:
*state = WIFI_TDLS_DROPPED;