qcacmn: Add INI support to enabling sending ICMP to FW

Add INI support to enable the feature of sending
ICMP packets to FW at regular intervals.

Change-Id: I888bb2f65e8a497c3e6541f213def905d6dd0727
CRs-Fixed: 2813169
This commit is contained in:
Rakesh Pillai
2020-11-03 15:12:30 +05:30
gecommit door snandini
bovenliggende af0f724da2
commit 98f8f751dc
3 gewijzigde bestanden met toevoegingen van 52 en 1 verwijderingen

Bestand weergeven

@@ -1046,6 +1046,36 @@
false, \
"enable rx frame pending check in WoW mode")
#define WLAN_CFG_SEND_ALL_ICMP_REQ_TO_FW (-1)
#define WLAN_CFG_SEND_ICMP_REQ_TO_FW 0
#define WLAN_CFG_SEND_ICMP_REQ_TO_FW_MIN (-1)
#define WLAN_CFG_SEND_ICMP_REQ_TO_FW_MAX 100000
/*
* <ini>
* send_icmp_pkt_to_fw - Send ICMP Request packet to FW.
* @Min: -1
* @Max: 100000
* @Default: 0
*
* This ini is used to control DP Software to send ICMP request packets to FW
* at certain interval (in milliseconds).
* The value 0 is used to disable sending the ICMP requests to FW.
* The value -1 is used to send all ICMP requests to FW.
* Any value greater than zero indicates the time interval (in milliseconds)
* at which ICMP requests should be sent to FW.
*
* Usage: External
*
* </ini>
*/
#define CFG_DP_SEND_ICMP_REQ_TO_FW \
CFG_INI_INT("send_icmp_req_to_fw", \
WLAN_CFG_SEND_ICMP_REQ_TO_FW_MIN, \
WLAN_CFG_SEND_ICMP_REQ_TO_FW_MAX, \
WLAN_CFG_SEND_ICMP_REQ_TO_FW, \
CFG_VALUE_OR_DEFAULT, "Send ICMP Request packets to FW")
#define CFG_DP \
CFG(CFG_DP_HTT_PACKET_TYPE) \
CFG(CFG_DP_INT_BATCH_THRESHOLD_OTHER) \
@@ -1136,5 +1166,6 @@
CFG(CFG_DP_RX_RADIO_0_DEFAULT_REO) \
CFG(CFG_DP_RX_RADIO_1_DEFAULT_REO) \
CFG(CFG_DP_RX_RADIO_2_DEFAULT_REO) \
CFG(CFG_DP_WOW_CHECK_RX_PENDING)
CFG(CFG_DP_WOW_CHECK_RX_PENDING) \
CFG(CFG_DP_SEND_ICMP_REQ_TO_FW)
#endif /* _CFG_DP_H_ */

Bestand weergeven

@@ -632,6 +632,8 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
cfg_get(psoc, CFG_DP_RX_RADIO_2_DEFAULT_REO);
wlan_cfg_ctx->wow_check_rx_pending_enable =
cfg_get(psoc, CFG_DP_WOW_CHECK_RX_PENDING);
wlan_cfg_ctx->send_icmp_req_to_fw =
cfg_get(psoc, CFG_DP_SEND_ICMP_REQ_TO_FW);
return wlan_cfg_ctx;
}
@@ -1481,3 +1483,10 @@ uint8_t wlan_cfg_radio2_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return cfg->radio2_rx_default_reo;
}
#ifdef WLAN_DP_FEATURE_SEND_ICMP_TO_FW
int wlan_cfg_send_icmp_req_to_fw(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return cfg->send_icmp_req_to_fw;
}
#endif /* WLAN_DP_FEATURE_SEND_ICMP_TO_FW */

Bestand weergeven

@@ -192,6 +192,8 @@ struct wlan_srng_cfg {
* @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
* @send_icmp_req_to_fw: Enable sending ICMP Request packets to FW at
* regular intervals
*/
struct wlan_cfg_dp_soc_ctxt {
int num_int_ctxts;
@@ -308,6 +310,7 @@ struct wlan_cfg_dp_soc_ctxt {
uint8_t radio1_rx_default_reo;
uint8_t radio2_rx_default_reo;
bool wow_check_rx_pending_enable;
int send_icmp_req_to_fw;
};
/**
@@ -1479,6 +1482,14 @@ bool wlan_cfg_is_fst_in_cmem_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
*/
bool wlan_cfg_is_swlm_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
/**
* wlan_cfg_send_icmp_req_to_fw() - Check if ICMP request packets are to be
* sent to FW or not.
* @cfg: soc configuration context
*
* Return: Value set in the ini "send_icmp_req_to_fw"
*/
int wlan_cfg_send_icmp_req_to_fw(struct wlan_cfg_dp_soc_ctxt *cfg);
#endif
/**