Эх сурвалжийг харах

qcacmn: Check Non-zero Rx RSSI during vdev / pdev aggregate

MultiVap if no sta associated or monitor mode,
data packets do not carry any rx rssi
or rate values while aggregating pdev or vdev stats.
Do not update for vap in if rx rssi or
rx rate value is zero.
Do not attach monitor vdev to vdev list

Change-Id: Ie64a05d795660d557d928cb9b874fa5e702f4f55
Anish Nataraj 6 жил өмнө
parent
commit
83d08110b1

+ 2 - 1
dp/wifi3.0/dp_internal.h

@@ -558,7 +558,8 @@ static inline void dp_update_vdev_stats(struct cdp_vdev_stats *tgtobj,
 		DP_STATS_AGGR(_tgtobj, _srcobj, tx.dropped.age_out); \
 								\
 		DP_STATS_AGGR(_tgtobj, _srcobj, rx.err.mic_err); \
-		DP_STATS_UPD_STRUCT(_tgtobj, _srcobj, rx.rssi); \
+		if (_srcobj->stats.rx.rssi != 0) \
+			DP_STATS_UPD_STRUCT(_tgtobj, _srcobj, rx.rssi); \
 		DP_STATS_UPD_STRUCT(_tgtobj, _srcobj, rx.rx_rate); \
 		DP_STATS_AGGR(_tgtobj, _srcobj, rx.err.decrypt_err); \
 		DP_STATS_AGGR(_tgtobj, _srcobj, rx.non_ampdu_cnt); \

+ 14 - 7
dp/wifi3.0/dp_main.c

@@ -3599,18 +3599,21 @@ static struct cdp_vdev *dp_vdev_attach_wifi3(struct cdp_pdev *txrx_pdev,
 	qdf_mem_copy(
 		&vdev->mac_addr.raw[0], vdev_mac_addr, OL_TXRX_MAC_ADDR_LEN);
 
-	vdev->tx_encap_type = wlan_cfg_pkt_type(soc->wlan_cfg_ctx);
-	vdev->rx_decap_type = wlan_cfg_pkt_type(soc->wlan_cfg_ctx);
-	vdev->dscp_tid_map_id = 0;
-	vdev->mcast_enhancement_en = 0;
-	vdev->raw_mode_war = wlan_cfg_get_raw_mode_war(soc->wlan_cfg_ctx);
-
 	/* TODO: Initialize default HTT meta data that will be used in
 	 * TCL descriptors for packets transmitted from this VDEV
 	 */
 
 	TAILQ_INIT(&vdev->peer_list);
 
+	if (wlan_op_mode_monitor == vdev->opmode)
+		return (struct cdp_vdev *)vdev;
+
+	vdev->tx_encap_type = wlan_cfg_pkt_type(soc->wlan_cfg_ctx);
+	vdev->rx_decap_type = wlan_cfg_pkt_type(soc->wlan_cfg_ctx);
+	vdev->dscp_tid_map_id = 0;
+	vdev->mcast_enhancement_en = 0;
+	vdev->raw_mode_war = wlan_cfg_get_raw_mode_war(soc->wlan_cfg_ctx);
+
 	qdf_spin_lock_bh(&pdev->vdev_list_lock);
 	/* add this vdev into the pdev's list */
 	TAILQ_INSERT_TAIL(&pdev->vdev_list, vdev, vdev_list_elem);
@@ -3754,6 +3757,8 @@ static void dp_vdev_detach_wifi3(struct cdp_vdev *vdev_handle,
 	/* preconditions */
 	qdf_assert(vdev);
 
+	if (wlan_op_mode_monitor == vdev->opmode)
+		goto free_vdev;
 
 	if (wlan_op_mode_sta == vdev->opmode)
 		dp_peer_delete_wifi3(vdev->vap_bss_peer, 0);
@@ -3800,8 +3805,10 @@ static void dp_vdev_detach_wifi3(struct cdp_vdev *vdev_handle,
 	TAILQ_REMOVE(&pdev->vdev_list, vdev, vdev_list_elem);
 	QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_INFO_HIGH,
 		FL("deleting vdev object %pK (%pM)"), vdev, vdev->mac_addr.raw);
-	qdf_mem_free(vdev);
+
 	qdf_spin_unlock_bh(&pdev->vdev_list_lock);
+free_vdev:
+	qdf_mem_free(vdev);
 
 	if (callback)
 		callback(cb_context);