qcacmn: Add support for local pkt capture cfg ini

Add support for local pkt capture cfg ini.

Change-Id: I7b7e50010d71482d97de46d87ed2c70c78e74cd2
CRs-Fixed: 3415783
This commit is contained in:
Srinivas Girigowda
2023-01-30 18:21:18 -08:00
committed by Madan Koyyalamudi
parent 0419d28f6e
commit 9de0de3f01
5 changed files with 66 additions and 2 deletions

View File

@@ -2911,6 +2911,7 @@ struct cdp_monitor_filter {
* @cfg_dp_disable_intra_bss_fwd: get intra bss fwd config
* @cfg_dp_pktlog_buffer_size: get packet log buffer size config
* @cfg_dp_wow_check_rx_pending: get wow rx pending frame check config
* @cfg_dp_local_pkt_capture: get local packet capture config
*/
enum cdp_dp_cfg {
cfg_dp_enable_data_stall,
@@ -2935,6 +2936,7 @@ enum cdp_dp_cfg {
cfg_dp_disable_intra_bss_fwd,
cfg_dp_pktlog_buffer_size,
cfg_dp_wow_check_rx_pending,
cfg_dp_local_pkt_capture,
};
/**

View File

@@ -9852,6 +9852,9 @@ static uint32_t dp_get_cfg(struct cdp_soc_t *soc, enum cdp_dp_cfg cfg)
case cfg_dp_wow_check_rx_pending:
value = dpsoc->wlan_cfg_ctx->wow_check_rx_pending_enable;
break;
case cfg_dp_local_pkt_capture:
value = wlan_cfg_get_local_pkt_capture(dpsoc->wlan_cfg_ctx);
break;
default:
value = 0;
}

View File

@@ -771,6 +771,31 @@
#define CFG_DP_SAWF_STATS_CONFIG
#endif
#ifdef WLAN_FEATURE_LOCAL_PKT_CAPTURE
/*
* <ini>
* local_pkt_capture - Enable/Disable Local packet capture
* @Default: false
*
* This ini is used to enable/disable local packet capture.
*
* Related: None
*
* Usage: External
*
* </ini>
*/
#define CFG_DP_LOCAL_PKT_CAPTURE \
CFG_INI_BOOL( \
"local_packet_capture", \
false, \
"Local packet capture")
#define CFG_DP_LOCAL_PKT_CAPTURE_CONFIG CFG(CFG_DP_LOCAL_PKT_CAPTURE)
#else
#define CFG_DP_LOCAL_PKT_CAPTURE_CONFIG
#endif
/*
* <ini>
* dp_rx_pending_hl_threshold - High threshold of frame number to start
@@ -2027,5 +2052,6 @@
CFG(CFG_DP_TXMON_SW_PEER_FILTERING) \
CFG_TX_PKT_INSPECT_FOR_ILP_CFG \
CFG(CFG_DP_POINTER_TIMER_THRESHOLD_RX) \
CFG(CFG_DP_POINTER_NUM_THRESHOLD_RX)
CFG(CFG_DP_POINTER_NUM_THRESHOLD_RX) \
CFG_DP_LOCAL_PKT_CAPTURE_CONFIG
#endif /* _CFG_DP_H_ */

View File

@@ -3752,6 +3752,22 @@ static void wlan_soc_tx_capt_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
}
#endif
#ifdef WLAN_FEATURE_LOCAL_PKT_CAPTURE
static void
wlan_soc_local_pkt_capture_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
{
wlan_cfg_ctx->local_pkt_capture =
cfg_get(psoc, CFG_DP_LOCAL_PKT_CAPTURE);
}
#else
static void
wlan_soc_local_pkt_capture_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
{
}
#endif
void
wlan_cfg_soc_update_tgt_params(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
struct cdp_ctrl_objmgr_psoc *psoc)
@@ -4243,7 +4259,7 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
wlan_cfg_ctx->pointer_num_threshold_rx =
cfg_get(psoc, CFG_DP_POINTER_NUM_THRESHOLD_RX);
wlan_soc_tx_packet_inspect_attach(psoc, wlan_cfg_ctx);
wlan_soc_local_pkt_capture_cfg_attach(psoc, wlan_cfg_ctx);
return wlan_cfg_ctx;
}
#endif

View File

@@ -338,6 +338,7 @@ struct wlan_srng_cfg {
* based ILP feature is enabled
* @pointer_timer_threshold_rx: RX REO2SW ring pointer update timer threshold
* @pointer_num_threshold_rx: RX REO2SW ring pointer update entries threshold
* @local_pkt_capture: flag indicating enable/disable of local packet capture
*/
struct wlan_cfg_dp_soc_ctxt {
int num_int_ctxts;
@@ -537,6 +538,9 @@ struct wlan_cfg_dp_soc_ctxt {
#endif
uint16_t pointer_timer_threshold_rx;
uint8_t pointer_num_threshold_rx;
#ifdef WLAN_FEATURE_LOCAL_PKT_CAPTURE
bool local_pkt_capture;
#endif
};
/**
@@ -2502,4 +2506,17 @@ wlan_cfg_get_pointer_timer_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg);
uint8_t
wlan_cfg_get_pointer_num_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg);
#ifdef WLAN_FEATURE_LOCAL_PKT_CAPTURE
static inline
bool wlan_cfg_get_local_pkt_capture(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return cfg->local_pkt_capture;
}
#else
static inline
bool wlan_cfg_get_local_pkt_capture(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return false;
}
#endif
#endif /*__WLAN_CFG_H*/