diff --git a/wlan_cfg/cfg_dp.h b/wlan_cfg/cfg_dp.h index e5e7dc49d0..fb728835ae 100644 --- a/wlan_cfg/cfg_dp.h +++ b/wlan_cfg/cfg_dp.h @@ -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 + +/* + * + * 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 + * + * + */ +#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_ */ diff --git a/wlan_cfg/wlan_cfg.c b/wlan_cfg/wlan_cfg.c index 29f823cdf5..d4abba16b5 100644 --- a/wlan_cfg/wlan_cfg.c +++ b/wlan_cfg/wlan_cfg.c @@ -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 */ diff --git a/wlan_cfg/wlan_cfg.h b/wlan_cfg/wlan_cfg.h index 76629de1c7..5db355f868 100644 --- a/wlan_cfg/wlan_cfg.h +++ b/wlan_cfg/wlan_cfg.h @@ -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 /**