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

qcacmn: Setup max BA value for tids for mesh peers during peer add

Setup max BA value for tids for mesh peers during peer add

Change-Id: Ia18f5d65db819d87b81c217e5e11fba3316b8d16
CRs-Fixed: 3536290
Himanshu Batra 1 год назад
Родитель
Сommit
c290e36c21
3 измененных файлов с 50 добавлено и 8 удалено
  1. 17 3
      dp/wifi3.0/be/dp_be_rx.c
  2. 16 2
      dp/wifi3.0/dp_rx_tid.c
  3. 17 3
      dp/wifi3.0/li/dp_li_rx.c

+ 17 - 3
dp/wifi3.0/be/dp_be_rx.c

@@ -2239,9 +2239,23 @@ dp_rx_null_q_desc_handle_be(struct dp_soc *soc, qdf_nbuf_t nbuf,
 		if (peer) {
 			rx_tid = &peer->rx_tid[tid];
 			qdf_spin_lock_bh(&rx_tid->tid_lock);
-			if (!peer->rx_tid[tid].hw_qdesc_vaddr_unaligned)
-				dp_rx_tid_setup_wifi3(peer, tid, 1,
-						      IEEE80211_SEQ_MAX);
+			if (!peer->rx_tid[tid].hw_qdesc_vaddr_unaligned) {
+			/* For Mesh peer, if on one of the mesh AP the
+			 * mesh peer is not deleted, the new addition of mesh
+			 * peer on other mesh AP doesn't do BA negotiation
+			 * leading to mismatch in BA windows.
+			 * To avoid this send max BA window during init.
+			 */
+				if (qdf_unlikely(vdev->mesh_vdev) ||
+				    qdf_unlikely(txrx_peer->nawds_enabled))
+					dp_rx_tid_setup_wifi3(
+						peer, tid,
+						hal_get_rx_max_ba_window(soc->hal_soc,tid),
+						IEEE80211_SEQ_MAX);
+				else
+					dp_rx_tid_setup_wifi3(peer, tid, 1,
+							      IEEE80211_SEQ_MAX);
+			}
 			qdf_spin_unlock_bh(&rx_tid->tid_lock);
 			/* IEEE80211_SEQ_MAX indicates invalid start_seq */
 			dp_peer_unref_delete(peer, DP_MOD_ID_RX_ERR);

+ 16 - 2
dp/wifi3.0/dp_rx_tid.c

@@ -1152,6 +1152,10 @@ static void dp_peer_rx_tids_init(struct dp_peer *peer)
 
 void dp_peer_rx_tid_setup(struct dp_peer *peer)
 {
+	struct dp_soc *soc = peer->vdev->pdev->soc;
+	struct dp_txrx_peer *txrx_peer = dp_get_txrx_peer(peer);
+	struct dp_vdev *vdev = peer->vdev;
+
 	dp_peer_rx_tids_init(peer);
 
 	/* Setup default (non-qos) rx tid queue */
@@ -1159,9 +1163,19 @@ void dp_peer_rx_tid_setup(struct dp_peer *peer)
 
 	/* Setup rx tid queue for TID 0.
 	 * Other queues will be setup on receiving first packet, which will cause
-	 * NULL REO queue error
+	 * NULL REO queue error. For Mesh peer, if on one of the mesh AP the
+	 * mesh peer is not deleted, the new addition of mesh peer on other mesh AP
+	 * doesn't do BA negotiation leading to mismatch in BA windows.
+	 * To avoid this send max BA window during init.
 	 */
-	dp_rx_tid_setup_wifi3(peer, 0, 1, 0);
+	if (qdf_unlikely(vdev->mesh_vdev) ||
+	    qdf_unlikely(txrx_peer->nawds_enabled))
+		dp_rx_tid_setup_wifi3(
+				peer, 0,
+				hal_get_rx_max_ba_window(soc->hal_soc, 0),
+				0);
+	else
+		dp_rx_tid_setup_wifi3(peer, 0, 1, 0);
 
 	/*
 	 * Setup the rest of TID's to handle LFR

+ 17 - 3
dp/wifi3.0/li/dp_li_rx.c

@@ -1518,9 +1518,23 @@ dp_rx_null_q_desc_handle_li(struct dp_soc *soc, qdf_nbuf_t nbuf,
 		if (peer) {
 			rx_tid = &peer->rx_tid[tid];
 			qdf_spin_lock_bh(&rx_tid->tid_lock);
-			if (!peer->rx_tid[tid].hw_qdesc_vaddr_unaligned)
-				dp_rx_tid_setup_wifi3(peer, tid, 1,
-						      IEEE80211_SEQ_MAX);
+			if (!peer->rx_tid[tid].hw_qdesc_vaddr_unaligned) {
+			/* For Mesh peer, if on one of the mesh AP the
+			 * mesh peer is not deleted, the new addition of mesh
+			 * peer on other mesh AP doesn't do BA negotiation
+			 * leading to mismatch in BA windows.
+			 * To avoid this send max BA window during init.
+			 */
+				if (qdf_unlikely(vdev->mesh_vdev) ||
+				    qdf_unlikely(txrx_peer->nawds_enabled))
+					dp_rx_tid_setup_wifi3(
+						peer, tid,
+						hal_get_rx_max_ba_window(soc->hal_soc,tid),
+						IEEE80211_SEQ_MAX);
+				else
+					dp_rx_tid_setup_wifi3(peer, tid, 1,
+							      IEEE80211_SEQ_MAX);
+			}
 			qdf_spin_unlock_bh(&rx_tid->tid_lock);
 			/* IEEE80211_SEQ_MAX indicates invalid start_seq */
 			dp_peer_unref_delete(peer, DP_MOD_ID_RX_ERR);