summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaresh Jayaram <c_njayar@qti.qualcomm.com>2014-03-26 15:57:44 -0700
committerAkash Patel <c_akashp@qca.qualcomm.com>2014-04-16 19:26:38 -0700
commiteef5f962728489f5037fb42ddd2056b4193707c8 (patch)
tree054b50c4cbb5096fb1d338d248767c367e27dd96
parent3a956f15f15dc94ae6d34fe417a12ed373f35d9e (diff)
TDLS: Enhance TDLS external control operations (gTDLSExternalControl=1)
This commit enhances the external control operations to 1.Allows gTDLSTxStatsPeriod to accept a minimal value of 10 msec. 2.Allows gTDLSIdlePacketThreshold to accept a minimal value of 0 packets. 3.Caters the requirement of establishing the TDLS link irrespective of the data traffic, the moment tdls_setup is issued by the framework. 4.Only teardown based on non-zero idle packet threshold, to address a use case where this threshold does not get consider for TEAR DOWN Change-Id: I170afed07607440924e72515c23b2ddca8e83b62 CRs-fixed: 647532
-rw-r--r--CORE/HDD/inc/wlan_hdd_cfg.h4
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c23
-rw-r--r--CORE/HDD/src/wlan_hdd_tdls.c9
3 files changed, 31 insertions, 5 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h
index d9c50dc1417e..8eea17fb4966 100644
--- a/CORE/HDD/inc/wlan_hdd_cfg.h
+++ b/CORE/HDD/inc/wlan_hdd_cfg.h
@@ -1907,7 +1907,7 @@ typedef enum
#define CFG_TDLS_IMPLICIT_TRIGGER_DEFAULT ( 0 )
#define CFG_TDLS_TX_STATS_PERIOD "gTDLSTxStatsPeriod"
-#define CFG_TDLS_TX_STATS_PERIOD_MIN ( 2000 )
+#define CFG_TDLS_TX_STATS_PERIOD_MIN ( 10 )
#define CFG_TDLS_TX_STATS_PERIOD_MAX ( 4294967295UL )
#define CFG_TDLS_TX_STATS_PERIOD_DEFAULT ( 5000 )
@@ -1932,7 +1932,7 @@ typedef enum
#define CFG_TDLS_IDLE_TIMEOUT_DEFAULT ( 5000 )
#define CFG_TDLS_IDLE_PACKET_THRESHOLD "gTDLSIdlePacketThreshold"
-#define CFG_TDLS_IDLE_PACKET_THRESHOLD_MIN ( 1 )
+#define CFG_TDLS_IDLE_PACKET_THRESHOLD_MIN ( 0 )
#define CFG_TDLS_IDLE_PACKET_THRESHOLD_MAX ( 40000 )
#define CFG_TDLS_IDLE_PACKET_THRESHOLD_DEFAULT ( 5 )
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index ab946ca2b034..c989ced6cf5e 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -9574,6 +9574,7 @@ static int wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy, struct net_device *d
}
case NL80211_TDLS_SETUP:
{
+ hddTdlsPeer_t *pTdlsPeer;
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
" %s : NL80211_TDLS_SETUP for " MAC_ADDRESS_STR,
__func__, MAC_ADDR_ARRAY(peer));
@@ -9587,7 +9588,27 @@ static int wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy, struct net_device *d
return -ENOTSUPP;
}
- return wlan_hdd_tdls_add_force_peer(pAdapter, peer);
+ if (0 != wlan_hdd_tdls_add_force_peer(pAdapter, peer)) {
+
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: NL80211_TDLS_SETUP: Add force peer failed",
+ __func__);
+ return -EINVAL;
+ }
+
+ /* To cater the requirement of establishing the TDLS link
+ * irrespective of the data traffic , get an entry of TDLS peer.
+ */
+ pTdlsPeer = wlan_hdd_tdls_get_peer(pAdapter, peer);
+
+ if (pTdlsPeer == NULL) {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: peer "MAC_ADDRESS_STR
+ " does not exist, NL80211_TDLS_SETUP failed",
+ __func__, MAC_ADDR_ARRAY(peer));
+ return -EINVAL;
+ }
+ break;
}
case NL80211_TDLS_DISCOVERY_REQ:
/* We don't support in-driver setup/teardown/discovery */
diff --git a/CORE/HDD/src/wlan_hdd_tdls.c b/CORE/HDD/src/wlan_hdd_tdls.c
index 03aa874dfe9c..1cc5e04b5283 100644
--- a/CORE/HDD/src/wlan_hdd_tdls.c
+++ b/CORE/HDD/src/wlan_hdd_tdls.c
@@ -357,10 +357,15 @@ static v_VOID_t wlan_hdd_tdls_update_peer_cb( v_PVOID_t userData )
goto next_peer;
}
- if ((curr_peer->tx_pkt <
+ /* Only teardown based on non zero idle packet threshold, to address a use
+ * case where this threshold does not get consider for TEAR DOWN.
+ */
+
+ if (( 0 != pHddTdlsCtx->threshold_config.idle_packet_n ) &&
+ ((curr_peer->tx_pkt <
pHddTdlsCtx->threshold_config.idle_packet_n) &&
(curr_peer->rx_pkt <
- pHddTdlsCtx->threshold_config.idle_packet_n)) {
+ pHddTdlsCtx->threshold_config.idle_packet_n))) {
if (VOS_TIMER_STATE_RUNNING !=
vos_timer_getCurrentState(&curr_peer->peerIdleTimer)) {
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_WARN,