qcacmn: Add ini interface for frame vdev id check

Add ini interface to enable disable frame vdev id check
in tx.

Change-Id: Ieedfb11c4ff181255150e9350140b6b6c9b425e6
CRs-Fixed: 2756303
This commit is contained in:
Ankit Kumar
2020-08-14 16:52:45 +05:30
committed by snandini
parent 4fdb9be461
commit aae959eec4
3 changed files with 46 additions and 1 deletions

View File

@@ -891,6 +891,10 @@
CFG_INI_BOOL("dp_rx_monitor_protocol_flow_tag_enable", true, \ CFG_INI_BOOL("dp_rx_monitor_protocol_flow_tag_enable", true, \
"Enable/Disable Rx Protocol & Flow tags in Monitor mode") "Enable/Disable Rx Protocol & Flow tags in Monitor mode")
#define CFG_DP_TX_PER_PKT_VDEV_ID_CHECK \
CFG_INI_BOOL("dp_tx_allow_per_pkt_vdev_id_check", false, \
"Enable/Disable tx Per Pkt vdev id check")
/* /*
* <ini> * <ini>
* dp_rx_fisa_enable - Control Rx datapath FISA * dp_rx_fisa_enable - Control Rx datapath FISA
@@ -1072,5 +1076,6 @@
CFG(CFG_DP_RX_PENDING_LO_THRESHOLD) \ CFG(CFG_DP_RX_PENDING_LO_THRESHOLD) \
CFG(CFG_DP_LEGACY_MODE_CSUM_DISABLE) \ CFG(CFG_DP_LEGACY_MODE_CSUM_DISABLE) \
CFG(CFG_DP_POLL_MODE_ENABLE) \ CFG(CFG_DP_POLL_MODE_ENABLE) \
CFG(CFG_DP_SWLM_ENABLE) CFG(CFG_DP_SWLM_ENABLE) \
CFG(CFG_DP_TX_PER_PKT_VDEV_ID_CHECK)
#endif /* _CFG_DP_H_ */ #endif /* _CFG_DP_H_ */

View File

@@ -621,6 +621,9 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
wlan_cfg_ctx->is_poll_mode_enabled = wlan_cfg_ctx->is_poll_mode_enabled =
cfg_get(psoc, CFG_DP_POLL_MODE_ENABLE); cfg_get(psoc, CFG_DP_POLL_MODE_ENABLE);
wlan_cfg_ctx->is_swlm_enabled = cfg_get(psoc, CFG_DP_SWLM_ENABLE); wlan_cfg_ctx->is_swlm_enabled = cfg_get(psoc, CFG_DP_SWLM_ENABLE);
wlan_cfg_ctx->tx_per_pkt_vdev_id_check =
cfg_get(psoc, CFG_DP_TX_PER_PKT_VDEV_ID_CHECK);
return wlan_cfg_ctx; return wlan_cfg_ctx;
} }
@@ -1401,6 +1404,19 @@ wlan_cfg_is_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
return cfg->is_rx_mon_protocol_flow_tag_enabled; return cfg->is_rx_mon_protocol_flow_tag_enabled;
} }
void
wlan_cfg_set_tx_per_pkt_vdev_id_check(struct wlan_cfg_dp_soc_ctxt *cfg,
bool val)
{
cfg->tx_per_pkt_vdev_id_check = val;
}
bool
wlan_cfg_is_tx_per_pkt_vdev_id_check_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return cfg->tx_per_pkt_vdev_id_check;
}
void void
wlan_cfg_set_peer_ext_stats(struct wlan_cfg_dp_soc_ctxt *cfg, wlan_cfg_set_peer_ext_stats(struct wlan_cfg_dp_soc_ctxt *cfg,
bool val) bool val)

View File

@@ -190,6 +190,7 @@ struct wlan_srng_cfg {
* @rx_pending_high_threshold: threshold of starting pkt drop * @rx_pending_high_threshold: threshold of starting pkt drop
* @rx_pending_low_threshold: threshold of stopping pkt drop * @rx_pending_low_threshold: threshold of stopping pkt drop
* @is_swlm_enabled: flag to enable/disable SWLM * @is_swlm_enabled: flag to enable/disable SWLM
* @tx_per_pkt_vdev_id_check: Enable tx perpkt vdev id check
*/ */
struct wlan_cfg_dp_soc_ctxt { struct wlan_cfg_dp_soc_ctxt {
int num_int_ctxts; int num_int_ctxts;
@@ -300,6 +301,7 @@ struct wlan_cfg_dp_soc_ctxt {
uint32_t rx_pending_low_threshold; uint32_t rx_pending_low_threshold;
bool is_poll_mode_enabled; bool is_poll_mode_enabled;
uint8_t is_swlm_enabled; uint8_t is_swlm_enabled;
bool tx_per_pkt_vdev_id_check;
}; };
/** /**
@@ -1353,6 +1355,28 @@ wlan_cfg_set_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg,
bool bool
wlan_cfg_is_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg); wlan_cfg_is_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
/**
* wlan_cfg_set_tx_per_pkt_vdev_id_check() - set flag to enable perpkt
* vdev id check in tx.
* @wlan_cfg_dp_soc_ctxt: soc configuration context
* @val: feature flag value
*
* Return: None
*/
void
wlan_cfg_set_tx_per_pkt_vdev_id_check(struct wlan_cfg_dp_soc_ctxt *cfg,
bool val);
/**
* wlan_cfg_is_tx_per_pkt_vdev_id_check_enabled() - get flag to check if
* perpkt vdev id check is enabled in tx.
* @wlan_cfg_dp_soc_ctxt: soc configuration context
*
* Return: true if feature is enabled, false otherwise
*/
bool
wlan_cfg_is_tx_per_pkt_vdev_id_check_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
/** /**
* wlan_cfg_fill_interrupt_mask() - set interrupt mask * wlan_cfg_fill_interrupt_mask() - set interrupt mask
* *