Explorar o código

qcacmn: support new htt rx addba and delba msg

Add support for new HTT_T2H_MSG_TYPE_RX_ADDBA_EXTN and
HTT_T2H_MSG_TYPE_RX_DELBA_EXTN handling.

Change-Id: Ie06891092e5bf552bf721404222fb1b0b624ba36
CRs-Fixed: 3208118
Jinwei Chen %!s(int64=3) %!d(string=hai) anos
pai
achega
242339083b
Modificáronse 1 ficheiros con 72 adicións e 26 borrados
  1. 72 26
      dp/wifi3.0/dp_htt.c

+ 72 - 26
dp/wifi3.0/dp_htt.c

@@ -3126,6 +3126,40 @@ dp_rx_mlo_timestamp_ind_handler(void *soc_handle,
 }
 #endif
 
+/*
+ * dp_htt_rx_addba_handler() - RX Addba HTT msg handler
+ * @soc: DP Soc handler
+ * @peer_id: ID of peer
+ * @tid: TID number
+ * @win_sz: BA window size
+ *
+ * Return: None
+ */
+static void
+dp_htt_rx_addba_handler(struct dp_soc *soc, uint16_t peer_id,
+			uint8_t tid, uint16_t win_sz)
+{
+	uint16_t status;
+	struct dp_peer *peer;
+
+	peer = dp_peer_get_ref_by_id(soc, peer_id, DP_MOD_ID_HTT);
+
+	if (!peer) {
+		dp_err("Peer not found peer id %d", peer_id);
+		return;
+	}
+
+	status = dp_addba_requestprocess_wifi3((struct cdp_soc_t *)soc,
+					       peer->mac_addr.raw,
+					       peer->vdev->vdev_id, 0,
+					       tid, 0, win_sz, 0xffff);
+
+	dp_info("PeerID %d BAW %d TID %d stat %d",
+		peer_id, win_sz, tid, status);
+
+	dp_peer_unref_delete(peer, DP_MOD_ID_HTT);
+}
+
 /*
  * dp_htt_t2h_msg_handler() - Generic Target to host Msg/event handler
  * @context:	Opaque context (HTT SOC handle)
@@ -3280,9 +3314,7 @@ static void dp_htt_t2h_msg_handler(void *context, HTC_PACKET *pkt)
 		{
 			uint16_t peer_id;
 			uint8_t tid;
-			uint8_t win_sz;
-			uint16_t status;
-			struct dp_peer *peer;
+			uint16_t win_sz;
 
 			/*
 			 * Update REO Queue Desc with new values
@@ -3290,37 +3322,30 @@ static void dp_htt_t2h_msg_handler(void *context, HTC_PACKET *pkt)
 			peer_id = HTT_RX_ADDBA_PEER_ID_GET(*msg_word);
 			tid = HTT_RX_ADDBA_TID_GET(*msg_word);
 			win_sz = HTT_RX_ADDBA_WIN_SIZE_GET(*msg_word);
-			peer = dp_peer_get_ref_by_id(soc->dp_soc, peer_id,
-						     DP_MOD_ID_HTT);
 
 			/*
 			 * Window size needs to be incremented by 1
 			 * since fw needs to represent a value of 256
 			 * using just 8 bits
 			 */
-			if (peer) {
-				status = dp_addba_requestprocess_wifi3(
-					(struct cdp_soc_t *)soc->dp_soc,
-					peer->mac_addr.raw, peer->vdev->vdev_id,
-					0, tid, 0, win_sz + 1, 0xffff);
-
-				/*
-				 * If PEER_LOCK_REF_PROTECT enbled dec ref
-				 * which is inc by dp_peer_get_ref_by_id
-				 */
-				dp_peer_unref_delete(peer, DP_MOD_ID_HTT);
+			dp_htt_rx_addba_handler(soc->dp_soc, peer_id,
+						tid, win_sz + 1);
+			break;
+		}
+	case HTT_T2H_MSG_TYPE_RX_ADDBA_EXTN:
+		{
+			uint16_t peer_id;
+			uint8_t tid;
+			uint16_t win_sz;
 
-				QDF_TRACE(QDF_MODULE_ID_TXRX,
-					QDF_TRACE_LEVEL_INFO,
-					FL("PeerID %d BAW %d TID %d stat %d"),
-					peer_id, win_sz, tid, status);
+			peer_id = HTT_RX_ADDBA_EXTN_PEER_ID_GET(*msg_word);
+			tid = HTT_RX_ADDBA_EXTN_TID_GET(*msg_word);
 
-			} else {
-				QDF_TRACE(QDF_MODULE_ID_TXRX,
-					QDF_TRACE_LEVEL_ERROR,
-					FL("Peer not found peer id %d"),
-					peer_id);
-			}
+			msg_word++;
+			win_sz = HTT_RX_ADDBA_EXTN_WIN_SIZE_GET(*msg_word);
+
+			dp_htt_rx_addba_handler(soc->dp_soc, peer_id,
+						tid, win_sz);
 			break;
 		}
 	case HTT_T2H_MSG_TYPE_EXT_STATS_CONF:
@@ -3468,6 +3493,27 @@ static void dp_htt_t2h_msg_handler(void *context, HTC_PACKET *pkt)
 				  peer_id, win_sz, tid, status);
 			break;
 		}
+	case HTT_T2H_MSG_TYPE_RX_DELBA_EXTN:
+		{
+			uint16_t peer_id;
+			uint8_t tid;
+			uint16_t win_sz;
+			QDF_STATUS status;
+
+			peer_id = HTT_RX_DELBA_EXTN_PEER_ID_GET(*msg_word);
+			tid = HTT_RX_DELBA_EXTN_TID_GET(*msg_word);
+
+			msg_word++;
+			win_sz = HTT_RX_DELBA_EXTN_WIN_SIZE_GET(*msg_word);
+
+			status = dp_rx_delba_ind_handler(soc->dp_soc,
+							 peer_id, tid,
+							 win_sz);
+
+			dp_info("DELBA PeerID %d BAW %d TID %d stat %d",
+				peer_id, win_sz, tid, status);
+			break;
+		}
 	case HTT_T2H_MSG_TYPE_FSE_CMEM_BASE_SEND:
 		{
 			uint16_t num_entries;