From: Bob Copeland <me@bobcopeland.com>
To: Octav Chipara <ochipara@gmail.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: help with ath5k --- wlan0 no private ioctls
Date: Fri, 26 Nov 2010 14:37:55 -0500 [thread overview]
Message-ID: <20101126193754.GB5815@hash.localnet> (raw)
In-Reply-To: <AANLkTikMDT5qXrNZSdwsZDE6_rCcHnbv9pCWpHVaZo3K@mail.gmail.com>
On Fri, Nov 26, 2010 at 09:09:25AM -0800, Octav Chipara wrote:
> HI,
>
> > Hmm, someone can correct me if I'm wrong, but according to my
> > reading of the code, minstrel only uses hw->max_rate_tries
> > and not wiphy->retry_{short,long}. Also it looks like the only
> > drivers that poke at these values only use it for failure
> > indication when they don't support accurate tx status reporting.
> >
>
> Is there an easy way to control them? Can you set it through iwconfig?
No, you can easily patch the driver but this is ostensibly a
hardware-specific setting (although in ath5k it is more or less
arbitrary).
You can use pid controller, or maybe try this completely untested patch.
Again this is only based on a glance at the code, I do not know if this
is a real diagnosis of your issue.
From: Bob Copeland <me@bobcopeland.com>
Date: Fri, 26 Nov 2010 14:28:35 -0500
Subject: [PATCH] mac80211: minstrel: honor max retry counts from cfg80211
We may configure dot11{Short,Long}RetryLimit in addition to whatever
the hardware sets up as the maximum frame retry limit. The pid
controller used these values but minstrel did not.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
---
net/mac80211/rc80211_minstrel.c | 9 +++++++--
net/mac80211/rc80211_minstrel.h | 1 +
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c
index 778c604..cf5393d 100644
--- a/net/mac80211/rc80211_minstrel.c
+++ b/net/mac80211/rc80211_minstrel.c
@@ -424,10 +424,10 @@ minstrel_rate_init(void *priv, struct ieee80211_supported_band *sband,
tx_time_cts += tx_time_single + mi->sp_ack_dur;
tx_time_rtscts += tx_time_single + 2 * mi->sp_ack_dur;
if ((tx_time_cts < mp->segment_size) &&
- (mr->retry_count_cts < mp->max_retry))
+ (mr->retry_count_cts < mp->max_long_retry))
mr->retry_count_cts++;
if ((tx_time_rtscts < mp->segment_size) &&
- (mr->retry_count_rtscts < mp->max_retry))
+ (mr->retry_count_rtscts < mp->max_long_retry))
mr->retry_count_rtscts++;
} while ((tx_time < mp->segment_size) &&
(++mr->retry_count < mp->max_retry));
@@ -526,6 +526,11 @@ minstrel_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)
/* safe default, does not necessarily have to match hw properties */
mp->max_retry = 7;
+ mp->max_long_retry = min(mp->max_retry,
+ (unsigned int) hw->conf.long_frame_max_tx_count);
+ mp->max_retry = min(mp->max_retry,
+ (unsigned int) hw->conf.short_frame_max_tx_count);
+
if (hw->max_rates >= 4)
mp->has_mrr = true;
diff --git a/net/mac80211/rc80211_minstrel.h b/net/mac80211/rc80211_minstrel.h
index 0f5a833..5079b88 100644
--- a/net/mac80211/rc80211_minstrel.h
+++ b/net/mac80211/rc80211_minstrel.h
@@ -73,6 +73,7 @@ struct minstrel_priv {
unsigned int cw_min;
unsigned int cw_max;
unsigned int max_retry;
+ unsigned int max_long_retry;
unsigned int ewma_level;
unsigned int segment_size;
unsigned int update_interval;
--
1.5.6.5
--
Bob Copeland %% www.bobcopeland.com
prev parent reply other threads:[~2010-11-26 19:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-25 5:43 help with ath5k --- wlan0 no private ioctls Octav Chipara
2010-11-26 15:54 ` Bob Copeland
2010-11-26 17:09 ` Octav Chipara
2010-11-26 19:37 ` Bob Copeland [this message]
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=20101126193754.GB5815@hash.localnet \
--to=me@bobcopeland.com \
--cc=linux-wireless@vger.kernel.org \
--cc=ochipara@gmail.com \
/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