qcacld-3.0: Check for last busy mark by datapath rx process

Currently as part of cfg80211 wlan stats command after fetching the
stats runtime sync suspend is issued which puts the link in low
power state with out waiting for link inactivity timeout. This leads
to throughput degradation in case of rx direction as in rx processing
data path extends the timer by marking last busy to avoid immediate
runtime suspend. But runtime sync suspend does not take in to account
of the link idle timeout value before suspending the link. So in this
change before issuing runtime sync suspend check the duration since
last busy mark by data path rx process. If the duration is less than
run time delay just do runtime put.

Change-Id: I4e071ddda1c6a815f29d5b44b95e699a212b59d6
CRs-Fixed: 2511423
This commit is contained in:
Sravan Kumar Kairam 2019-08-21 20:52:09 +05:30 committed by nshrivas
parent c2824eacc0
commit 10ed0e822a
3 changed files with 40 additions and 1 deletions

View File

@ -449,4 +449,14 @@ void hdd_print_netdev_txq_status(struct net_device *dev);
uint32_t
wlan_hdd_dump_queue_history_state(struct hdd_netif_queue_history *q_hist,
char *buf, uint32_t size);
/**
* wlan_hdd_rx_rpm_mark_last_busy() - Check if dp rx marked last busy
* @hdd_ctx: Pointer to hdd context
* @hif_ctx: Pointer to hif context
*
* Return: dp mark last busy less than runtime delay value
*/
bool wlan_hdd_rx_rpm_mark_last_busy(struct hdd_context *hdd_ctx,
void *hif_ctx);
#endif /* end #if !defined(WLAN_HDD_TX_RX_H) */

View File

@ -4672,15 +4672,23 @@ static int _wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
const uint8_t *mac,
struct station_info *sinfo)
{
struct hdd_context *hdd_ctx = wiphy_priv(wiphy);
void *hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
int errno;
errno = wlan_hdd_validate_context(hdd_ctx);
if (errno)
return errno;
errno = hif_pm_runtime_get_sync(hif_ctx);
if (errno)
return errno;
errno = __wlan_hdd_cfg80211_get_station(wiphy, dev, mac, sinfo);
if (wlan_hdd_rx_rpm_mark_last_busy(hdd_ctx, hif_ctx))
hif_pm_runtime_put(hif_ctx);
else
hif_pm_runtime_put_sync_suspend(hif_ctx);
return errno;

View File

@ -3106,3 +3106,24 @@ void hdd_dp_cfg_update(struct wlan_objmgr_psoc *psoc,
hdd_dp_dp_trace_cfg_update(config, psoc);
hdd_dp_nud_tracking_cfg_update(config, psoc);
}
bool wlan_hdd_rx_rpm_mark_last_busy(struct hdd_context *hdd_ctx,
void *hif_ctx)
{
uint64_t duration_us, dp_rx_busy_us, current_us;
uint32_t rpm_delay_ms;
if (!hif_pm_runtime_is_dp_rx_busy(hif_ctx))
return false;
dp_rx_busy_us = hif_pm_runtime_get_dp_rx_busy_mark(hif_ctx);
current_us = qdf_get_log_timestamp_usecs();
duration_us = (unsigned long)((ULONG_MAX - dp_rx_busy_us) +
current_us + 1);
rpm_delay_ms = ucfg_pmo_get_runtime_pm_delay(hdd_ctx->psoc);
if ((duration_us / 1000) < rpm_delay_ms)
return true;
else
return false;
}