icnss2: Add support to configure WLAN_EN_DELAY
Add support to configure WLAN_EN_DELAY using sysfs. When temperature detected is less than threshold configure WLAN_EN_DELAY value from sysfs if it is greater than default WLAN_EN_DELAY value. Change-Id: I94ac0c6bb3bd2bc2da122d3cf1215b8fe964159f CRs-Fixed: 3230892
This commit is contained in:
@@ -777,6 +777,16 @@ retry:
|
|||||||
icnss_pr_dbg("smem state, Entry: %s", icnss_smp2p_str[smp2p_entry]);
|
icnss_pr_dbg("smem state, Entry: %s", icnss_smp2p_str[smp2p_entry]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline
|
||||||
|
void icnss_set_wlan_en_delay(struct icnss_priv *priv)
|
||||||
|
{
|
||||||
|
if (priv->wlan_en_delay_ms_user > WLAN_EN_DELAY) {
|
||||||
|
priv->wlan_en_delay_ms = priv->wlan_en_delay_ms_user;
|
||||||
|
} else {
|
||||||
|
priv->wlan_en_delay_ms = WLAN_EN_DELAY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int icnss_driver_event_server_arrive(struct icnss_priv *priv,
|
static int icnss_driver_event_server_arrive(struct icnss_priv *priv,
|
||||||
void *data)
|
void *data)
|
||||||
{
|
{
|
||||||
@@ -818,7 +828,7 @@ static int icnss_driver_event_server_arrive(struct icnss_priv *priv,
|
|||||||
if (!icnss_get_temperature(priv, &temp)) {
|
if (!icnss_get_temperature(priv, &temp)) {
|
||||||
icnss_pr_dbg("Temperature: %d\n", temp);
|
icnss_pr_dbg("Temperature: %d\n", temp);
|
||||||
if (temp < WLAN_EN_TEMP_THRESHOLD)
|
if (temp < WLAN_EN_TEMP_THRESHOLD)
|
||||||
priv->wlan_en_delay_ms = WLAN_EN_DELAY;
|
icnss_set_wlan_en_delay(priv);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = wlfw_host_cap_send_sync(priv);
|
ret = wlfw_host_cap_send_sync(priv);
|
||||||
@@ -3712,7 +3722,7 @@ static ssize_t wlan_en_delay_store(struct device *dev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
icnss_pr_dbg("WLAN_EN delay: %dms", wlan_en_delay);
|
icnss_pr_dbg("WLAN_EN delay: %dms", wlan_en_delay);
|
||||||
priv->wlan_en_delay_ms = wlan_en_delay;
|
priv->wlan_en_delay_ms_user = wlan_en_delay;
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
@@ -476,6 +476,7 @@ struct icnss_priv {
|
|||||||
struct mbox_client mbox_client_data;
|
struct mbox_client mbox_client_data;
|
||||||
struct mbox_chan *mbox_chan;
|
struct mbox_chan *mbox_chan;
|
||||||
u32 wlan_en_delay_ms;
|
u32 wlan_en_delay_ms;
|
||||||
|
u32 wlan_en_delay_ms_user;
|
||||||
struct class *icnss_ramdump_class;
|
struct class *icnss_ramdump_class;
|
||||||
dev_t icnss_ramdump_dev;
|
dev_t icnss_ramdump_dev;
|
||||||
struct completion smp2p_soc_wake_wait;
|
struct completion smp2p_soc_wake_wait;
|
||||||
|
Reference in New Issue
Block a user