Browse Source

qcacld-3.0: Enable QOS if TDLS peers are QOS capable

qcacld-2.0 to qcacld-3.0 propagation

DUT is enabling QOS based on fixed capabilities in host which
is leading to issue of sending data frames withou QOS header
even though peers are capable.

Fix is to ensure that QOS will be enabled by interpreting
WMM IE.

Change-Id: I08d12ccfc6f1587f228618f2add4b5a1549df8ad
CRs-Fixed: 955872
Nitesh Shah 8 years ago
parent
commit
99934acf2d
3 changed files with 40 additions and 6 deletions
  1. 2 1
      core/hdd/inc/wlan_hdd_tdls.h
  2. 14 3
      core/hdd/src/wlan_hdd_cfg80211.c
  3. 24 2
      core/hdd/src/wlan_hdd_tdls.c

+ 2 - 1
core/hdd/inc/wlan_hdd_tdls.h

@@ -538,7 +538,8 @@ int wlan_hdd_tdls_recv_discovery_resp(hdd_adapter_t *pAdapter,
 int wlan_hdd_tdls_set_peer_caps(hdd_adapter_t *pAdapter,
 				const uint8_t *mac,
 				tCsrStaParams *StaParams,
-				bool isBufSta, bool isOffChannelSupported);
+				bool isBufSta, bool isOffChannelSupported,
+				bool is_qos_wmm_sta);
 
 int wlan_hdd_tdls_set_rssi(hdd_adapter_t *pAdapter, const uint8_t *mac,
 			   int8_t rxRssi);

+ 14 - 3
core/hdd/src/wlan_hdd_cfg80211.c

@@ -8879,6 +8879,7 @@ static int __wlan_hdd_change_station(struct wiphy *wiphy,
 	tCsrStaParams StaParams = { 0 };
 	uint8_t isBufSta = 0;
 	uint8_t isOffChannelSupported = 0;
+	bool is_qos_wmm_sta = false;
 #endif
 	int ret;
 
@@ -9067,10 +9068,20 @@ static int __wlan_hdd_change_station(struct wiphy *wiphy,
 				}
 			}
 
+			if (pHddCtx->config->fEnableTDLSWmmMode &&
+			    (params->sta_flags_set & BIT(NL80211_STA_FLAG_WME)))
+				is_qos_wmm_sta = true;
+
+			hdd_notice("%s: TDLS Peer is QOS capable"
+				" is_qos_wmm_sta= %d HTcapPresent = %d",
+				__func__, is_qos_wmm_sta,
+				StaParams.htcap_present);
+
 			status = wlan_hdd_tdls_set_peer_caps(pAdapter, mac,
-							     &StaParams,
-							     isBufSta,
-							     isOffChannelSupported);
+						&StaParams,
+						isBufSta,
+						isOffChannelSupported,
+						is_qos_wmm_sta);
 			if (QDF_STATUS_SUCCESS != status) {
 				hdd_err("wlan_hdd_tdls_set_peer_caps failed!");
 				return -EINVAL;

+ 24 - 2
core/hdd/src/wlan_hdd_tdls.c

@@ -1273,13 +1273,15 @@ int wlan_hdd_tdls_recv_discovery_resp(hdd_adapter_t *pAdapter,
  * @StaParams: CSR Station Parameter
  * @isBufSta: is peer buffer station
  * @isOffChannelSupported: Is off channel supported
+ * @is_qos_wmm_sta: Is QoS-WMM supported
  *
  * Return: 0 for success or negative errno otherwise
  */
 int wlan_hdd_tdls_set_peer_caps(hdd_adapter_t *pAdapter,
 				const uint8_t *mac,
 				tCsrStaParams *StaParams,
-				bool isBufSta, bool isOffChannelSupported)
+				bool isBufSta, bool isOffChannelSupported,
+				bool is_qos_wmm_sta)
 {
 	hddTdlsPeer_t *curr_peer;
 
@@ -1306,7 +1308,7 @@ int wlan_hdd_tdls_set_peer_caps(hdd_adapter_t *pAdapter,
 
 	curr_peer->supported_oper_classes_len =
 		StaParams->supported_oper_classes_len;
-	curr_peer->qos = StaParams->capability & CAPABILITIES_QOS_OFFSET;
+	curr_peer->qos = is_qos_wmm_sta;
 	return 0;
 }
 
@@ -4422,6 +4424,10 @@ static int __wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy,
 			return -EINVAL;
 		}
 		wlan_hdd_tdls_set_cap(pAdapter, peer, eTDLS_CAP_SUPPORTED);
+
+		qdf_mem_set(&tdlsLinkEstablishParams,
+			sizeof(tdlsLinkEstablishParams), 0);
+
 		if (eTDLS_LINK_CONNECTED != pTdlsPeer->link_status) {
 			if (IS_ADVANCE_TDLS_ENABLE) {
 
@@ -4459,6 +4465,22 @@ static int __wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy,
 							   eTDLS_LINK_CONNECTED,
 							   eTDLS_LINK_SUCCESS,
 							   true);
+
+			hdd_notice("%s: tdlsLinkEstablishParams of peer "
+				MAC_ADDRESS_STR "uapsdQueues: %d"
+				" qos: %d maxSp: %d isBufSta: %d"
+				" isOffChannelSupported: %d"
+				" isResponder: %d peerstaId: %d",
+				__func__,
+				MAC_ADDR_ARRAY(
+					tdlsLinkEstablishParams.peerMac),
+				tdlsLinkEstablishParams.uapsdQueues,
+				tdlsLinkEstablishParams.qos,
+				tdlsLinkEstablishParams.maxSp,
+				tdlsLinkEstablishParams.isBufSta,
+				tdlsLinkEstablishParams.isOffChannelSupported,
+				tdlsLinkEstablishParams.isResponder,
+				pTdlsPeer->staId);
 			/* start TDLS client registration with TL */
 			status =
 				hdd_roam_register_tdlssta(