wlan-ap-Telecominfraproject/feeds/wifi-ax/hostapd/patches/c00-009-hostapd-detect-active-sta-using-TX-duration-in-ATF.patch
John Crispin 528a778e38 open-converged-wireless: Import 21.02 based uCentral tree
Signed-off-by: John Crispin <john@phrozen.org>
2021-03-25 12:19:47 +01:00

27 lines
729 B
Diff

--- a/src/ap/airtime_policy.c
+++ b/src/ap/airtime_policy.c
@@ -80,8 +80,12 @@ static void count_backlogged_sta(struct
if (hostapd_drv_read_sta_data(hapd, &data, sta->addr))
continue;
- if (data.backlog_bytes > 0)
+ if (data.backlog_bytes > 0 ||
+ data.tx_airtime > sta->tx_airtime) {
set_new_backlog_time(hapd, sta, &now);
+ sta->tx_airtime = data.tx_airtime;
+ }
+
if (os_reltime_before(&now, &sta->backlogged_until))
num_backlogged++;
}
--- a/src/ap/sta_info.h
+++ b/src/ap/sta_info.h
@@ -286,6 +286,7 @@ struct sta_info {
#ifdef CONFIG_AIRTIME_POLICY
unsigned int airtime_weight;
struct os_reltime backlogged_until;
+ unsigned long long tx_airtime;
#endif /* CONFIG_AIRTIME_POLICY */
};