prima: Enable TDLS off-channel based on FW feature capability
Enable TDLS off-channel functionality only if FW advertizes
the feature capability support.
CRs-fixed: 799369
Change-Id: I73413c1c77502cda36beb9fc0e2b6ba2270cc9e2
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 9e52e9a..09d000c 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -14688,7 +14688,9 @@
return -EINVAL;
}
- if (NULL != tdls_peer_params)
+ /* check FW TDLS Off Channel capability */
+ if ((TRUE == sme_IsFeatureSupportedByFW(TDLS_OFF_CHANNEL)) &&
+ (NULL != tdls_peer_params))
{
pTdlsPeer->peerParams.channel = tdls_peer_params->channel;
pTdlsPeer->peerParams.global_operating_class =
@@ -14723,7 +14725,9 @@
else
{
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: Invalid TDLS Peer Params", __func__);
+ "%s: TDLS off channel FW capability %d or "
+ "Invalid TDLS Peer Params", __func__,
+ sme_IsFeatureSupportedByFW(TDLS_OFF_CHANNEL));
}
if ( 0 != wlan_hdd_tdls_set_force_peer(pAdapter, peer, TRUE) ) {