Jelajahi Sumber

qcacld-3.0: Send correct Nth beacon config to FW in pkt capture

Currently, when user sets pkt capture beacon capture config
using vendor command, both nth beacon interval and connect
beacon config is sent to firmware. This leads to reception
of all beacons even if nth beacon interval is configured.

Whenever nth beacon interval and connect beacon is configured
from user, firmware expects host to not send connect beacon
config to FW. This change also adds Nth beacon filter check
for beacons in packet capture management rx path.

Change-Id: I046a282c5f79598b686c4fd95554e2330c6bfb39
CRs-Fixed: 3150806
Vulupala Shashank Reddy 3 tahun lalu
induk
melakukan
7309dbf3db

+ 8 - 2
components/pkt_capture/core/src/wlan_pkt_capture_main.c

@@ -1315,7 +1315,12 @@ QDF_STATUS pkt_capture_set_filter(struct pkt_capture_frame_filter frame_filter,
 	if (vdev_priv->frame_filter.mgmt_rx_frame_filter &
 	    PKT_CAPTURE_MGMT_FRAME_TYPE_ALL) {
 		mode |= PACKET_CAPTURE_MODE_MGMT_ONLY;
-		config |= PACKET_CAPTURE_CONFIG_BEACON_ENABLE;
+		vdev_priv->frame_filter.mgmt_rx_frame_filter |=
+					PKT_CAPTURE_MGMT_CONNECT_BEACON;
+		vdev_priv->frame_filter.mgmt_rx_frame_filter |=
+					PKT_CAPTURE_MGMT_CONNECT_SCAN_BEACON;
+		if (!send_bcn)
+			config |= PACKET_CAPTURE_CONFIG_BEACON_ENABLE;
 		config |= PACKET_CAPTURE_CONFIG_OFF_CHANNEL_BEACON_ENABLE;
 	} else {
 		if (vdev_priv->frame_filter.mgmt_rx_frame_filter &
@@ -1330,7 +1335,8 @@ QDF_STATUS pkt_capture_set_filter(struct pkt_capture_frame_filter frame_filter,
 	if (check_enable_beacon) {
 		if (vdev_priv->frame_filter.mgmt_rx_frame_filter &
 		    PKT_CAPTURE_MGMT_CONNECT_BEACON)
-			config |= PACKET_CAPTURE_CONFIG_BEACON_ENABLE;
+			if (!send_bcn)
+				config |= PACKET_CAPTURE_CONFIG_BEACON_ENABLE;
 
 		if (vdev_priv->frame_filter.mgmt_rx_frame_filter &
 		    PKT_CAPTURE_MGMT_CONNECT_SCAN_BEACON)

+ 8 - 7
components/pkt_capture/core/src/wlan_pkt_capture_mgmt_txrx.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2020, 2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -506,15 +506,16 @@ pkt_capture_is_beacon_forward_enable(struct wlan_objmgr_vdev *vdev,
 				 &connected_bssid))
 		my_beacon = true;
 
-	if (vdev_priv->frame_filter.mgmt_rx_frame_filter &
-	    PKT_CAPTURE_MGMT_CONNECT_BEACON && !my_beacon)
-		return false;
+	if (((vdev_priv->frame_filter.mgmt_rx_frame_filter &
+	    PKT_CAPTURE_MGMT_CONNECT_BEACON) ||
+	    vdev_priv->frame_filter.connected_beacon_interval) && my_beacon)
+		return true;
 
 	if (vdev_priv->frame_filter.mgmt_rx_frame_filter &
-	    PKT_CAPTURE_MGMT_CONNECT_SCAN_BEACON && my_beacon)
-		return false;
+	    PKT_CAPTURE_MGMT_CONNECT_SCAN_BEACON && !my_beacon)
+		return true;
 
-	return true;
+	return false;
 }
 
 #ifdef DP_MON_RSSI_IN_DBM