qcacld-3.0: Record the channel number for pktcapture mode

For packet capture mode, record the channel number on
which STA vdev is operating on.

Change-Id: Id52536b5b238dc1e4fe4c612a651c6fe8ddc17d3
CRs-Fixed: 2627713
This commit is contained in:
Vulupala Shashank Reddy 2020-02-19 15:44:35 +05:30 committed by nshrivas
parent b43e1bc3ee
commit d493c152c9
7 changed files with 61 additions and 1 deletions

View File

@ -162,4 +162,13 @@ pkt_capture_get_pktcap_mode(struct wlan_objmgr_psoc *psoc);
* Return: number of buffers dropped
*/
uint32_t pkt_capture_drop_nbuf_list(qdf_nbuf_t buf_list);
/**
* pkt_capture_record_channel() - Update Channel Information
* for packet capture mode
* @vdev: pointer to vdev
*
* Return: None
*/
void pkt_capture_record_channel(struct wlan_objmgr_vdev *vdev);
#endif /* end of _WLAN_PKT_CAPTURE_MAIN_H_ */

View File

@ -26,6 +26,7 @@
#include "wlan_pkt_capture_mon_thread.h"
#include "wlan_pkt_capture_mgmt_txrx.h"
#include "target_if_pkt_capture.h"
#include "cdp_txrx_ctrl.h"
static struct wlan_objmgr_vdev *gp_pkt_capture_vdev;
@ -429,3 +430,27 @@ pkt_capture_psoc_destroy_notification(struct wlan_objmgr_psoc *psoc, void *arg)
qdf_mem_free(psoc_priv);
return status;
}
void pkt_capture_record_channel(struct wlan_objmgr_vdev *vdev)
{
struct wlan_objmgr_pdev *pdev = wlan_vdev_get_pdev(vdev);
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
struct wlan_channel *des_chan;
cdp_config_param_type val;
struct wlan_objmgr_psoc *psoc;
psoc = wlan_vdev_get_psoc(vdev);
if (!pkt_capture_get_mode(psoc))
return;
/*
* Record packet capture channel here
*/
des_chan = vdev->vdev_mlme.des_chan;
val.cdp_pdev_param_monitor_chan = des_chan->ch_ieee;
cdp_txrx_set_pdev_param(soc, wlan_objmgr_pdev_get_pdev_id(pdev),
CDP_MONITOR_CHANNEL, val);
val.cdp_pdev_param_mon_freq = des_chan->ch_freq;
cdp_txrx_set_pdev_param(soc, wlan_objmgr_pdev_get_pdev_id(pdev),
CDP_MONITOR_FREQUENCY, val);
}

View File

@ -237,6 +237,14 @@ void ucfg_pkt_capture_tx_completion_process(
uint8_t tid, uint8_t status, bool pkt_format,
uint8_t *bssid, htt_pdev_handle pdev);
/**
* ucfg_pkt_capture_record_channel() - Update Channel Information
* for packet capture mode
* @vdev: pointer to vdev
*
* Return: None
*/
void ucfg_pkt_capture_record_channel(struct wlan_objmgr_vdev *vdev);
#else
static inline
QDF_STATUS ucfg_pkt_capture_init(void)
@ -353,5 +361,10 @@ ucfg_pkt_capture_tx_completion_process(
{
}
static inline void
ucfg_pkt_capture_record_channel(struct wlan_objmgr_vdev *vdev)
{
}
#endif /* WLAN_FEATURE_PKT_CAPTURE */
#endif /* _WLAN_PKT_CAPTURE_UCFG_API_H_ */

View File

@ -260,7 +260,7 @@ int ucfg_pkt_capture_enable_ops(struct wlan_objmgr_vdev *vdev)
return -EINVAL;
}
mode = ucfg_pkt_capture_get_mode(psoc);
mode = pkt_capture_get_mode(psoc);
ret = tx_ops->pkt_capture_send_mode(psoc,
vdev->vdev_objmgr.vdev_id,
mode);
@ -321,3 +321,8 @@ ucfg_pkt_capture_tx_completion_process(
mon_buf_list, TXRX_PROCESS_TYPE_DATA_TX_COMPL,
tid, status, pkt_format, bssid, pdev);
}
void ucfg_pkt_capture_record_channel(struct wlan_objmgr_vdev *vdev)
{
pkt_capture_record_channel(vdev);
}

View File

@ -74,6 +74,7 @@
#include "wlan_hdd_ftm_time_sync.h"
#include <ol_defines.h>
#include "wlan_pkt_capture_ucfg_api.h"
/* These are needed to recognize WPA and RSN suite types */
#define HDD_WPA_OUI_SIZE 4
@ -1451,6 +1452,7 @@ static void hdd_send_association_event(struct net_device *dev,
/* start timer in sta/p2p_cli */
hdd_bus_bw_compute_prev_txrx_stats(adapter);
hdd_bus_bw_compute_timer_start(hdd_ctx);
ucfg_pkt_capture_record_channel(adapter->vdev);
} else if (eConnectionState_IbssConnected == /* IBss Associated */
sta_ctx->conn_info.conn_state) {
policy_mgr_update_connection_info(hdd_ctx->psoc,

View File

@ -42,6 +42,7 @@
#include "nan_datapath.h"
#include "wlan_reg_services_api.h"
#include "wma.h"
#include "wlan_pkt_capture_ucfg_api.h"
#define MAX_SUPPORTED_PEERS_WEP 16
@ -2903,6 +2904,8 @@ void lim_process_switch_channel_rsp(struct mac_context *mac,
pe_debug("Send p2p operating channel change conf action frame once first beacon is received on new channel");
pe_session->send_p2p_conf_frame = true;
}
ucfg_pkt_capture_record_channel(pe_session->vdev);
break;
case LIM_SWITCH_CHANNEL_SAP_DFS:
/* Note: This event code specific to SAP mode
@ -2929,6 +2932,7 @@ void lim_process_switch_channel_rsp(struct mac_context *mac,
*/
policy_mgr_update_connection_info(mac->psoc,
pe_session->smeSessionId);
ucfg_pkt_capture_record_channel(pe_session->vdev);
break;
default:
break;

View File

@ -67,6 +67,7 @@
#include "wlan_scan_utils_api.h"
#include <ol_defines.h>
#include "wlan_pkt_capture_ucfg_api.h"
#define RSN_AUTH_KEY_MGMT_SAE WLAN_RSN_SEL(WLAN_AKM_SAE)
#define MAX_PWR_FCC_CHAN_12 8
@ -21417,6 +21418,7 @@ static QDF_STATUS csr_process_roam_sync_callback(struct mac_context *mac_ctx,
session->roam_synch_in_progress = false;
csr_check_and_set_sae_single_pmk_cap(mac_ctx, session,
session_id);
ucfg_pkt_capture_record_channel(vdev);
if (WLAN_REG_IS_5GHZ_CH_FREQ(bss_desc->chan_freq)) {
session->disable_hi_rssi = true;