瀏覽代碼

qcacmn: setup tid queues only if default route is set

ensure we setup tid queues only if default route is set
Also we no longer set default route or tid queue setup
for BSS Peer.

Change-Id: Id240b9b8ddd67136ff85e1098840938928857fc4
Tallapragada Kalyan 6 年之前
父節點
當前提交
8c93d5d032
共有 4 個文件被更改,包括 27 次插入3 次删除
  1. 15 0
      dp/wifi3.0/dp_main.c
  2. 10 1
      dp/wifi3.0/dp_peer.c
  3. 1 2
      dp/wifi3.0/dp_rx_err.c
  4. 1 0
      dp/wifi3.0/dp_types.h

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

@@ -3904,6 +3904,9 @@ static void *dp_peer_create_wifi3(struct cdp_vdev *vdev_handle,
 	peer = dp_peer_can_reuse(vdev, peer_mac_addr);
 
 	if (peer) {
+		qdf_atomic_init(&peer->is_default_route_set);
+		dp_peer_cleanup(vdev, peer);
+
 		peer->delete_in_progress = false;
 
 		dp_peer_delete_ast_entries(soc, peer);
@@ -4068,6 +4071,16 @@ static void dp_peer_setup_wifi3(struct cdp_vdev *vdev_hdl, void *peer_hdl)
 	 */
 	reo_dest = pdev->reo_dest;
 
+	/*
+	 * There are corner cases where the AD1 = AD2 = "VAPs address"
+	 * i.e both the devices have same MAC address. In these
+	 * cases we want such pkts to be processed in NULL Q handler
+	 * which is REO2TCL ring. for this reason we should
+	 * not setup reo_queues and default route for bss_peer.
+	 */
+	if (peer->bss_peer && vdev->opmode == wlan_op_mode_ap)
+		return;
+
 	if (soc->cdp_soc.ol_ops->peer_set_default_routing) {
 		/* TODO: Check the destination ring number to be passed to FW */
 		soc->cdp_soc.ol_ops->peer_set_default_routing(
@@ -4075,6 +4088,8 @@ static void dp_peer_setup_wifi3(struct cdp_vdev *vdev_hdl, void *peer_hdl)
 				peer->vdev->vdev_id, hash_based, reo_dest);
 	}
 
+	qdf_atomic_set(&peer->is_default_route_set, 1);
+
 	dp_peer_rx_init(pdev, peer);
 	return;
 }

+ 10 - 1
dp/wifi3.0/dp_peer.c

@@ -1489,7 +1489,8 @@ int dp_rx_tid_setup_wifi3(struct dp_peer *peer, int tid,
 	void *hw_qdesc_vaddr;
 	uint32_t alloc_tries = 0;
 
-	if (peer->delete_in_progress)
+	if (peer->delete_in_progress ||
+	    !qdf_atomic_read(&peer->is_default_route_set))
 		return QDF_STATUS_E_FAILURE;
 
 	rx_tid->ba_win_size = ba_window_size;
@@ -1995,6 +1996,14 @@ int dp_addba_resp_tx_completion_wifi3(void *peer_handle,
 		return QDF_STATUS_E_FAILURE;
 	}
 
+	if (!qdf_atomic_read(&peer->is_default_route_set)) {
+		qdf_spin_unlock_bh(&rx_tid->tid_lock);
+		QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_DEBUG,
+			  "%s: default route is not set for peer: %pM",
+			  __func__, peer->mac_addr.raw);
+		return QDF_STATUS_E_FAILURE;
+	}
+
 	/* First Session */
 	if (peer->active_ba_session_cnt == 0) {
 		if (rx_tid->ba_win_size > 64 && rx_tid->ba_win_size <= 256)

+ 1 - 2
dp/wifi3.0/dp_rx_err.c

@@ -692,8 +692,7 @@ dp_rx_null_q_desc_handle(struct dp_soc *soc, qdf_nbuf_t nbuf,
 		 * unicast. Should we check this?
 		 */
 		tid = hal_rx_mpdu_start_tid_get(soc->hal_soc, rx_tlv_hdr);
-		if (peer &&
-			peer->rx_tid[tid].hw_qdesc_vaddr_unaligned == NULL) {
+		if (peer && !peer->rx_tid[tid].hw_qdesc_vaddr_unaligned) {
 			/* IEEE80211_SEQ_MAX indicates invalid start_seq */
 			dp_rx_tid_setup_wifi3(peer, tid, 1, IEEE80211_SEQ_MAX);
 		}

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

@@ -1546,6 +1546,7 @@ struct dp_peer {
 	 * should be terminated.
 	 */
 	uint8_t kill_256_sessions;
+	qdf_atomic_t is_default_route_set;
 };
 
 #ifdef CONFIG_WIN