diff --git a/wlan_cfg/cfg_dp.h b/wlan_cfg/cfg_dp.h index ec7aec966d..6df6d85f30 100644 --- a/wlan_cfg/cfg_dp.h +++ b/wlan_cfg/cfg_dp.h @@ -891,6 +891,10 @@ CFG_INI_BOOL("dp_rx_monitor_protocol_flow_tag_enable", true, \ "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") + /* * * dp_rx_fisa_enable - Control Rx datapath FISA @@ -1072,5 +1076,6 @@ CFG(CFG_DP_RX_PENDING_LO_THRESHOLD) \ CFG(CFG_DP_LEGACY_MODE_CSUM_DISABLE) \ 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_ */ diff --git a/wlan_cfg/wlan_cfg.c b/wlan_cfg/wlan_cfg.c index 40e2638305..eeec815415 100644 --- a/wlan_cfg/wlan_cfg.c +++ b/wlan_cfg/wlan_cfg.c @@ -621,6 +621,9 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc) wlan_cfg_ctx->is_poll_mode_enabled = cfg_get(psoc, CFG_DP_POLL_MODE_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; } @@ -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; } +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 wlan_cfg_set_peer_ext_stats(struct wlan_cfg_dp_soc_ctxt *cfg, bool val) diff --git a/wlan_cfg/wlan_cfg.h b/wlan_cfg/wlan_cfg.h index 1787b1f3e0..9a5a8460ea 100644 --- a/wlan_cfg/wlan_cfg.h +++ b/wlan_cfg/wlan_cfg.h @@ -190,6 +190,7 @@ struct wlan_srng_cfg { * @rx_pending_high_threshold: threshold of starting pkt drop * @rx_pending_low_threshold: threshold of stopping pkt drop * @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 { int num_int_ctxts; @@ -300,6 +301,7 @@ struct wlan_cfg_dp_soc_ctxt { uint32_t rx_pending_low_threshold; bool is_poll_mode_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 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 *