From: Felix Fietkau <nbd@openwrt.org>
To: linux-wireless <linux-wireless@vger.kernel.org>
Cc: Johannes Berg <johannes@sipsolutions.net>, Michael Buesch <mb@bu3sch.de>
Subject: [PATCH 1/2] mac80211: detect hardware rate fallback for non-MRR hardware
Date: Fri, 10 Oct 2008 02:55:19 +0200 [thread overview]
Message-ID: <48EEA7F7.6020508@openwrt.org> (raw)
In-Reply-To: <48EEA7A4.2020303@openwrt.org>
This fixes tx status processing for drivers that do not support mrr.
If the retry count is bigger than the maximum retry count configured in
the hardware, do not count the rate attempt as successful, the hardware
has probably switched to a lower rate.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
--- a/net/mac80211/rc80211_minstrel.c
+++ b/net/mac80211/rc80211_minstrel.c
@@ -171,6 +171,7 @@ minstrel_tx_status(void *priv, struct ie
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
struct ieee80211_tx_altrate *ar = info->status.retries;
struct minstrel_priv *mp = priv;
+ struct ieee80211_local *local = hw_to_local(mp->hw);
int i, ndx, tries;
int success = 0;
@@ -180,6 +181,13 @@ minstrel_tx_status(void *priv, struct ie
if (!mp->has_mrr || (ar[0].rate_idx < 0)) {
ndx = rix_to_ndx(mi, info->tx_rate_idx);
tries = info->status.retry_count + 1;
+
+ /* If the driver does not support the MRR API, but uses
+ * a fallback rate, use the long retry limit as indication
+ * that a rate switch has happened */
+ if (!mp->has_mrr && (tries >= local->long_retry_limit))
+ success = 0;
+
mi->r[ndx].success += success;
mi->r[ndx].attempts += tries;
return;
next prev parent reply other threads:[~2008-10-10 0:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-10 0:53 [PATCH 0/2] make b43 work with minstrel Felix Fietkau
2008-10-10 0:55 ` Felix Fietkau [this message]
2008-10-10 0:56 ` [PATCH 2/2] b43: fix tx status reporting on rate fallback Felix Fietkau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48EEA7F7.6020508@openwrt.org \
--to=nbd@openwrt.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=mb@bu3sch.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).