diff --git a/components/pkt_capture/core/src/wlan_pkt_capture_main.c b/components/pkt_capture/core/src/wlan_pkt_capture_main.c index 7ddfa1f9c091..5233107b9f09 100644 --- a/components/pkt_capture/core/src/wlan_pkt_capture_main.c +++ b/components/pkt_capture/core/src/wlan_pkt_capture_main.c @@ -1313,7 +1313,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 & @@ -1328,7 +1333,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) diff --git a/components/pkt_capture/core/src/wlan_pkt_capture_mgmt_txrx.c b/components/pkt_capture/core/src/wlan_pkt_capture_mgmt_txrx.c index 1fda09c0e0f5..a56d5f3de791 100644 --- a/components/pkt_capture/core/src/wlan_pkt_capture_mgmt_txrx.c +++ b/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