Просмотр исходного кода

qcacld-3.0: Downgrade WMM AC for data frames for invalid tspec

As per the current implementation wmmAcTspecValid is reset during roaming
and set after establishing TSpec but currently wmmAcTspecValid is not
considered before classifying the data frames based on AC and UP.
Due to above issue after roaming we are still sending packets with UP
for which tspec session is not established.

Fix above issue by checking wmmAcTspecValid for AC before
classifying the frame.

Change-Id: I37039fa568696f0861b02d094c3a513dbc2b9967
CRs-Fixed: 915555
yeshwanth sriram guntuka 8 лет назад
Родитель
Сommit
a1ba9a2bfc
4 измененных файлов с 47 добавлено и 3 удалено
  1. 2 3
      core/hdd/src/wlan_hdd_assoc.c
  2. 11 0
      core/hdd/src/wlan_hdd_wmm.c
  3. 22 0
      core/sme/inc/sme_api.h
  4. 12 0
      core/sme/src/common/sme_api.c

+ 2 - 3
core/hdd/src/wlan_hdd_assoc.c

@@ -2194,8 +2194,6 @@ static inline bool hdd_is_key_install_required_for_ibss(
 static void hdd_change_peer_state_after_set_key(hdd_adapter_t *adapter,
 			tCsrRoamInfo *roaminfo, eCsrRoamResult roam_result)
 {
-	tHalHandle hal_ctx = WLAN_HDD_GET_HAL_CTX(adapter);
-	tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal_ctx);
 	hdd_station_ctx_t *hdd_sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
 	eCsrEncryptionType encr_type = hdd_sta_ctx->conn_info.ucEncryptionType;
 
@@ -2221,7 +2219,8 @@ static void hdd_change_peer_state_after_set_key(hdd_adapter_t *adapter,
 		 * ptk_installed is true. So, make ptk_installed to true in
 		 * case of 11R roaming.
 		 */
-		if (csr_neighbor_roam_is11r_assoc(mac_ctx, adapter->sessionId))
+		if (sme_neighbor_roam_is11r_assoc(WLAN_HDD_GET_HAL_CTX(adapter),
+						  adapter->sessionId))
 			hdd_sta_ctx->conn_info.ptk_installed = true;
 	} else {
 		hdd_sta_ctx->conn_info.ptk_installed = true;

+ 11 - 0
core/hdd/src/wlan_hdd_wmm.c

@@ -61,6 +61,7 @@
 #include <wlan_hdd_hostapd.h>
 #include <wlan_hdd_softap_tx_rx.h>
 #include <cds_sched.h>
+#include "sme_api.h"
 
 #define WLAN_HDD_MAX_DSCP 0x3f
 
@@ -1971,6 +1972,16 @@ QDF_STATUS hdd_wmm_connect(hdd_adapter_t *pAdapter,
 				pAdapter->hddWmmStatus.wmmAcStatus[ac].
 				wmmAcAccessAllowed = true;
 			}
+			if (!pRoamInfo->fReassocReq &&
+			    !sme_neighbor_roam_is11r_assoc(
+			    WLAN_HDD_GET_HAL_CTX(pAdapter),
+			    pAdapter->sessionId) &&
+			    !sme_roam_is_ese_assoc(pRoamInfo)) {
+				pAdapter->hddWmmStatus.wmmAcStatus[ac].
+					wmmAcTspecValid = false;
+				pAdapter->hddWmmStatus.wmmAcStatus[ac].
+					wmmAcAccessAllowed = false;
+			}
 		} else {
 			hdd_info("ac %d off", ac);
 			/* admission is not required so access is allowed */

+ 22 - 0
core/sme/inc/sme_api.h

@@ -1331,6 +1331,28 @@ QDF_STATUS sme_update_short_retry_limit_threshold(tHalHandle hal_handle,
 		struct sme_short_retry_limit *short_retry_limit_th);
 QDF_STATUS sme_update_long_retry_limit_threshold(tHalHandle hal_handle,
 		struct sme_long_retry_limit  *long_retry_limit_th);
+/**
+ * sme_roam_is_ese_assoc() - Check if association type is ESE
+ * @roam_info: Pointer to roam info
+ *
+ * Return: true if ESE Association, false otherwise.
+ */
+#ifdef FEATURE_WLAN_ESE
+bool sme_roam_is_ese_assoc(tCsrRoamInfo *roam_info);
+#else
+static inline bool sme_roam_is_ese_assoc(tCsrRoamInfo *roam_info)
+{
+	return false;
+}
+#endif
+/**
+ * sme_neighbor_roam_is11r_assoc() - Check if association type is 11R
+ * @hal_ctx: HAL handle
+ * @session_id: session id
+ *
+ * Return: true if 11r Association, false otherwise.
+ */
+bool sme_neighbor_roam_is11r_assoc(tHalHandle hal_ctx, uint8_t session_id);
 
 /**
  * sme_update_sta_inactivity_timeout(): Update sta_inactivity_timeout to FW

+ 12 - 0
core/sme/src/common/sme_api.c

@@ -16252,6 +16252,18 @@ QDF_STATUS sme_set_lost_link_info_cb(tHalHandle hal,
 	return status;
 }
 
+#ifdef FEATURE_WLAN_ESE
+bool sme_roam_is_ese_assoc(tCsrRoamInfo *roam_info)
+{
+	return roam_info->isESEAssoc;
+}
+#endif
+
+bool sme_neighbor_roam_is11r_assoc(tHalHandle hal_ctx, uint8_t session_id)
+{
+	tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal_ctx);
+	return csr_neighbor_roam_is11r_assoc(mac_ctx, session_id);
+}
 
 #ifdef WLAN_FEATURE_WOW_PULSE
 /**