qcacmn: add an ini field to control rx frame pending check

Add a ini control field to control rx frame pending check
logic in WoW case. In some cases, power consumption is more
important than rx frame ping loss, so add a control flag

Change-Id: I8c4d3725edddb82a0f06dc70c22a8dd5243209f2
CRs-Fixed: 2806786
This commit is contained in:
Yu Tian 2020-10-28 13:38:18 +08:00 • committed by snandini
commit dc0b7858fc
6 changed files with 32 additions and 2 deletions

View file

@ -2664,7 +2664,10 @@ cdp_rx_get_pending(ol_txrx_soc_handle soc)
!soc->ol_ops->dp_rx_get_pending)
return 0;
return soc->ol_ops->dp_rx_get_pending(soc);
if (cdp_cfg_get(soc, cfg_dp_wow_check_rx_pending))
return soc->ol_ops->dp_rx_get_pending(soc);
else
return 0;
}
#ifdef QCA_SUPPORT_WDS_EXTENDED

View file

@ -2345,6 +2345,7 @@ struct cdp_monitor_filter {
* @cfg_dp_ce_classify_enable: get CE classify enable config
* @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
*/
enum cdp_dp_cfg {
cfg_dp_enable_data_stall,
@ -2366,6 +2367,7 @@ enum cdp_dp_cfg {
cfg_dp_ce_classify_enable,
cfg_dp_disable_intra_bss_fwd,
cfg_dp_pktlog_buffer_size,
cfg_dp_wow_check_rx_pending,
};
/**

View file

@ -10634,6 +10634,8 @@ static uint32_t dp_get_cfg(struct cdp_soc_t *soc, enum cdp_dp_cfg cfg)
case cfg_dp_pktlog_buffer_size:
value = dpsoc->wlan_cfg_ctx->pktlog_buffer_size;
break;
case cfg_dp_wow_check_rx_pending:
value = dpsoc->wlan_cfg_ctx->wow_check_rx_pending_enable;
default:
value = 0;
}

View file

@ -999,6 +999,24 @@
#define CFG_DP_SWLM_ENABLE \
CFG_INI_BOOL("gEnableSWLM", false, \
"Enable/Disable DP SWLM")
/*
* <ini>
* wow_check_rx_pending_enable - control to check RX frames pending in Wow
* @Min: 0
* @Max: 1
* @Default: 0
*
* This ini is used to control DP Software to perform RX pending check
* before entering WoW mode
*
* Usage: Internal
*
* </ini>
*/
#define CFG_DP_WOW_CHECK_RX_PENDING \
CFG_INI_BOOL("wow_check_rx_pending_enable", \
false, \
"enable rx frame pending check in WoW mode")
#define CFG_DP \
CFG(CFG_DP_HTT_PACKET_TYPE) \
@ -1086,5 +1104,6 @@
CFG(CFG_DP_POLL_MODE_ENABLE) \
CFG(CFG_DP_SWLM_ENABLE) \
CFG(CFG_DP_TX_PER_PKT_VDEV_ID_CHECK) \
CFG(CFG_DP_RX_FST_IN_CMEM)
CFG(CFG_DP_RX_FST_IN_CMEM) \
CFG(CFG_DP_WOW_CHECK_RX_PENDING)
#endif /* _CFG_DP_H_ */

View file

@ -624,6 +624,8 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
wlan_cfg_ctx->fst_in_cmem = cfg_get(psoc, CFG_DP_RX_FST_IN_CMEM);
wlan_cfg_ctx->tx_per_pkt_vdev_id_check =
cfg_get(psoc, CFG_DP_TX_PER_PKT_VDEV_ID_CHECK);
wlan_cfg_ctx->wow_check_rx_pending_enable =
cfg_get(psoc, CFG_DP_WOW_CHECK_RX_PENDING);
return wlan_cfg_ctx;
}

View file

@ -191,6 +191,7 @@ struct wlan_srng_cfg {
* @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
* @wow_check_rx_pending_enable: Enable RX frame pending check in WoW
*/
struct wlan_cfg_dp_soc_ctxt {
int num_int_ctxts;
@ -303,6 +304,7 @@ struct wlan_cfg_dp_soc_ctxt {
uint8_t is_swlm_enabled;
bool fst_in_cmem;
bool tx_per_pkt_vdev_id_check;
bool wow_check_rx_pending_enable;
};
/**