瀏覽代碼

qcacmn: Per tid BA window size enhancement for HKv2

For HKv2, BA window size can be configured on per tid
basis as opposed to per peer basis on Hkv1. This per
peer per tid configuration on Hkv2 is for Tid 0 to 7.

Change-Id: Ic4afee92792af829a9ad8fdfc211625743b9d052
sumedh baikady 6 年之前
父節點
當前提交
61cbe85a14
共有 3 個文件被更改,包括 30 次插入18 次删除
  1. 1 0
      dp/wifi3.0/dp_main.c
  2. 27 18
      dp/wifi3.0/dp_peer.c
  3. 2 0
      dp/wifi3.0/dp_types.h

+ 1 - 0
dp/wifi3.0/dp_main.c

@@ -8891,6 +8891,7 @@ void *dp_soc_attach_wifi3(void *ctrl_psoc, void *hif_handle,
 		wlan_cfg_set_raw_mode_war(soc->wlan_cfg_ctx, false);
 		soc->hw_nac_monitor_support = 1;
 		soc->ast_override_support = 1;
+		soc->per_tid_basize_max_tid = 8;
 		soc->num_hw_dscp_tid_map = HAL_MAX_HW_DSCP_TID_V2_MAPS;
 		break;
 	default:

+ 27 - 18
dp/wifi3.0/dp_peer.c

@@ -1955,6 +1955,10 @@ void dp_peer_cleanup(struct dp_vdev *vdev, struct dp_peer *peer)
  *                                64 window size is received.
  *                                This is done as a WAR since HW can
  *                                have only one setting per peer (64 or 256).
+ *                                For HKv2, we use per tid buffersize setting
+ *                                for 0 to per_tid_basize_max_tid. For tid
+ *                                more than per_tid_basize_max_tid we use HKv1
+ *                                method.
  * @peer: Datapath peer
  *
  * Return: void
@@ -1965,7 +1969,8 @@ static void dp_teardown_256_ba_sessions(struct dp_peer *peer)
 	int tid;
 	struct dp_rx_tid *rx_tid = NULL;
 
-	for (tid = 0; tid < DP_MAX_TIDS; tid++) {
+	tid = peer->vdev->pdev->soc->per_tid_basize_max_tid;
+	for (; tid < DP_MAX_TIDS; tid++) {
 		rx_tid = &peer->rx_tid[tid];
 		qdf_spin_lock_bh(&rx_tid->tid_lock);
 
@@ -2123,22 +2128,27 @@ static void dp_check_ba_buffersize(struct dp_peer *peer,
 	struct dp_rx_tid *rx_tid = NULL;
 
 	rx_tid = &peer->rx_tid[tid];
-
-	if (peer->active_ba_session_cnt == 0) {
+	if (peer->vdev->pdev->soc->per_tid_basize_max_tid &&
+	    tid < peer->vdev->pdev->soc->per_tid_basize_max_tid) {
 		rx_tid->ba_win_size = buffersize;
+		return;
 	} else {
-		if (peer->hw_buffer_size == 64) {
-			if (buffersize <= 64)
-				rx_tid->ba_win_size = buffersize;
-			else
-				rx_tid->ba_win_size = peer->hw_buffer_size;
-		} else if (peer->hw_buffer_size == 256) {
-			if (buffersize > 64) {
-				rx_tid->ba_win_size = buffersize;
-			} else {
-				rx_tid->ba_win_size = buffersize;
-				peer->hw_buffer_size = 64;
-				peer->kill_256_sessions = 1;
+		if (peer->active_ba_session_cnt == 0) {
+			rx_tid->ba_win_size = buffersize;
+		} else {
+			if (peer->hw_buffer_size == 64) {
+				if (buffersize <= 64)
+					rx_tid->ba_win_size = buffersize;
+				else
+					rx_tid->ba_win_size = peer->hw_buffer_size;
+			} else if (peer->hw_buffer_size == 256) {
+				if (buffersize > 64) {
+					rx_tid->ba_win_size = buffersize;
+				} else {
+					rx_tid->ba_win_size = buffersize;
+					peer->hw_buffer_size = 64;
+					peer->kill_256_sessions = 1;
+				}
 			}
 		}
 	}
@@ -2190,17 +2200,16 @@ int dp_addba_requestprocess_wifi3(void *peer_handle,
 		qdf_spin_unlock_bh(&rx_tid->tid_lock);
 		return QDF_STATUS_E_FAILURE;
 	}
-
 	dp_check_ba_buffersize(peer, tid, buffersize);
 
-	if (dp_rx_tid_setup_wifi3(peer, tid, buffersize, startseqnum)) {
+	if (dp_rx_tid_setup_wifi3(peer, tid,
+	    rx_tid->ba_win_size, startseqnum)) {
 		rx_tid->ba_status = DP_RX_BA_INACTIVE;
 		qdf_spin_unlock_bh(&rx_tid->tid_lock);
 		return QDF_STATUS_E_FAILURE;
 	}
 	rx_tid->ba_status = DP_RX_BA_IN_PROGRESS;
 
-	rx_tid->ba_win_size = buffersize;
 	rx_tid->dialogtoken = dialogtoken;
 	rx_tid->startseqnum = startseqnum;
 

+ 2 - 0
dp/wifi3.0/dp_types.h

@@ -953,6 +953,8 @@ struct dp_soc {
 	uint8_t hw_nac_monitor_support;
 	/* Flag to indicate if HTT v2 is enabled*/
 	bool is_peer_map_unmap_v2;
+	/* Per peer per Tid ba window size support */
+	uint8_t per_tid_basize_max_tid;
 };
 
 #ifdef IPA_OFFLOAD