[openwrt/openwrt] mac80211: add missing return code checks in AQL improvements

LEDE Commits lede-commits at lists.infradead.org
Fri Aug 21 12:30:06 EDT 2020


nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/010682067b65847c8d9c3637b7c8afa9f93b2e08

commit 010682067b65847c8d9c3637b7c8afa9f93b2e08
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Aug 21 18:06:50 2020 +0200

    mac80211: add missing return code checks in AQL improvements
    
    Fixes throughput issues with some drivers (e.g. ath10k)
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...12-mac80211-factor-out-code-to-look-up-the-average-pack.patch | 5 +++--
 ...13-mac80211-improve-AQL-aggregation-estimation-for-low-.patch | 9 +++++----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/package/kernel/mac80211/patches/subsys/312-mac80211-factor-out-code-to-look-up-the-average-pack.patch b/package/kernel/mac80211/patches/subsys/312-mac80211-factor-out-code-to-look-up-the-average-pack.patch
index 105bbe2529..06db852c30 100644
--- a/package/kernel/mac80211/patches/subsys/312-mac80211-factor-out-code-to-look-up-the-average-pack.patch
+++ b/package/kernel/mac80211/patches/subsys/312-mac80211-factor-out-code-to-look-up-the-average-pack.patch
@@ -104,7 +104,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  }
  EXPORT_SYMBOL_GPL(ieee80211_calc_rx_airtime);
  
-@@ -530,46 +546,56 @@ static bool ieee80211_fill_rate_info(str
+@@ -530,46 +546,57 @@ static bool ieee80211_fill_rate_info(str
  	return false;
  }
  
@@ -179,7 +179,8 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +{
 +	struct ieee80211_rx_status stat;
 +
-+	ieee80211_fill_rx_status(&stat, hw, rate, ri, band, len);
++	if (ieee80211_fill_rx_status(&stat, hw, rate, ri, band, len))
++		return 0;
 +
  	return ieee80211_calc_rx_airtime(hw, &stat, len);
  }
diff --git a/package/kernel/mac80211/patches/subsys/313-mac80211-improve-AQL-aggregation-estimation-for-low-.patch b/package/kernel/mac80211/patches/subsys/313-mac80211-improve-AQL-aggregation-estimation-for-low-.patch
index 565d9bec43..7f7c75db59 100644
--- a/package/kernel/mac80211/patches/subsys/313-mac80211-improve-AQL-aggregation-estimation-for-low-.patch
+++ b/package/kernel/mac80211/patches/subsys/313-mac80211-improve-AQL-aggregation-estimation-for-low-.patch
@@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/mac80211/airtime.c
 +++ b/net/mac80211/airtime.c
-@@ -646,27 +646,40 @@ u32 ieee80211_calc_expected_tx_airtime(s
+@@ -647,27 +647,41 @@ u32 ieee80211_calc_expected_tx_airtime(s
  	if (pubsta) {
  		struct sta_info *sta = container_of(pubsta, struct sta_info,
  						    sta);
@@ -26,11 +26,12 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 -		if (!(rate->flags & (IEEE80211_TX_RC_VHT_MCS |
 -				     IEEE80211_TX_RC_MCS)))
 -			ampdu = false;
-+		ieee80211_fill_rx_status(&stat, hw, rate, ri, band, len);
-+
++		if (ieee80211_fill_rx_status(&stat, hw, rate, ri, band, len))
++			return 0;
+ 
 +		if (stat.encoding == RX_ENC_LEGACY || !ampdu)
 +			return ieee80211_calc_rx_airtime(hw, &stat, len);
- 
++
 +		duration = ieee80211_get_rate_duration(hw, &stat, &overhead);
  		/*
  		 * Assume that HT/VHT transmission on any AC except VO will



More information about the lede-commits mailing list