Page MenuHomeFreeBSD

D57055.id.diff
No OneTemporary

D57055.id.diff

diff --git a/sys/dev/ath/if_ath_tx.c b/sys/dev/ath/if_ath_tx.c
--- a/sys/dev/ath/if_ath_tx.c
+++ b/sys/dev/ath/if_ath_tx.c
@@ -6225,7 +6225,8 @@
* Also, don't call it if bar_tx/bar_wait are 0; something
* has beaten us to the punch? (XXX figure out what?)
*/
- if (status == 0 || attempts == 50) {
+ if (status == 0 ||
+ ieee80211_ht_check_bar_exceed_retry_count(ni, attempts)) {
ATH_TX_LOCK(sc);
if (atid->bar_tx == 0 || atid->bar_wait == 0)
DPRINTF(sc, ATH_DEBUG_SW_TX_BAR,
diff --git a/sys/net80211/ieee80211_ht.h b/sys/net80211/ieee80211_ht.h
--- a/sys/net80211/ieee80211_ht.h
+++ b/sys/net80211/ieee80211_ht.h
@@ -247,5 +247,7 @@
bool ieee80211_ht_check_tx_shortgi_40(const struct ieee80211_node *ni);
bool ieee80211_ht_check_tx_ht40(const struct ieee80211_node *ni);
bool ieee80211_ht_check_tx_ht(const struct ieee80211_node *ht);
+bool ieee80211_ht_check_bar_exceed_retry_count(const struct ieee80211_node *,
+ int);
#endif /* _NET80211_IEEE80211_HT_H_ */
diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c
--- a/sys/net80211/ieee80211_ht.c
+++ b/sys/net80211/ieee80211_ht.c
@@ -2899,7 +2899,7 @@
if ((tap->txa_flags & IEEE80211_AGGR_BARPEND) == 0)
return;
/* XXX ? */
- if (tap->txa_attempts >= ieee80211_bar_maxtries) {
+ if (ieee80211_ht_check_bar_exceed_retry_count(ni, tap->txa_attempts)) {
struct ieee80211com *ic = ni->ni_ic;
ni->ni_vap->iv_stats.is_ampdu_bar_tx_fail++;
@@ -3845,3 +3845,21 @@
IEEE80211_IS_CHAN_HT40(ni->ni_chan) &&
(ni->ni_chw == NET80211_STA_RX_BW_40));
}
+
+/**
+ * @brief Return whether the given BAR retry count exceeds the configured count
+ *
+ * @param ni ieee80211_node to check against
+ * @param count BAR retry count
+ * @returns true if the count has exceeded the configured count, false if not
+ */
+bool
+ieee80211_ht_check_bar_exceed_retry_count(const struct ieee80211_node *ni __unused,
+ int count)
+{
+ /*
+ * Note: ni isn't used here because the BAR limit is currently
+ * global. It's here for future work.
+ */
+ return (count >= ieee80211_bar_maxtries);
+}

File Metadata

Mime Type
text/plain
Expires
Wed, Sep 23, 5:22 AM (2 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39406644
Default Alt Text
D57055.id.diff (2 KB)

Event Timeline