Linux wireless drivers development
 help / color / mirror / Atom feed
* help with ath5k --- wlan0 no private ioctls
@ 2010-11-25  5:43 Octav Chipara
  2010-11-26 15:54 ` Bob Copeland
  0 siblings, 1 reply; 4+ messages in thread
From: Octav Chipara @ 2010-11-25  5:43 UTC (permalink / raw)
  To: linux-wireless

Hi,

I'm having some problems properly configuring ath5k. I'm trying to set
the retransmission count so that the card will not perform more than a
transmission:

iwconfig wlan0 retry 1

The command succeeds, and if I run iwconfig wlan0, it shows a
transmission of 1. However, the driver behaves as if it makes multiple
retransmissions (there was no decrease in throughput -- tested using
scp and the tcpdump trace seemed to indicate the presence of multiple
retransmissions). I tried to set the value directly using iwpriv and I
get wlan0 no private ioctls.

Any help would be greatly appreciated. Below are my iwconfig and lsmod output.

Thanks,
-- Octav


wlan0     IEEE 802.11abg  ESSID:"wiisard-mesh"
          Mode:Ad-Hoc  Frequency:2.427 GHz  Cell: 8A:BF:8D:26:41:67
          Tx-Power=10 dBm
          Retry limit:0   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off

wlan1     IEEE 802.11abg  Mode:Monitor  Tx-Power=20 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off

=====

Module                  Size  Used by
arc4                    1153  4
ath5k                 130104  0
ath                    13021  1 ath5k
aes_i586                7268  0
mac80211              237508  1 ath5k
pl2303                 15740  0
cfg80211              142500  3 ath5k,ath,mac80211
aes_generic            26863  1 aes_i586
compat                  4997  2 mac80211,cfg80211
usbserial              33019  1 pl2303
geode_aes               4558  0
pcmcia_core            32964  1 compat
geode_rng               1011  0
led_class               2864  1 ath5k
cs5535_gpio             2571  0
pata_cs5536             3224  0
via_rhine              19154  0
pata_amd                8766  1
mii                     4381  1 via_rhine

===

filename:
/lib/modules/2.6.32-21-386/updates/drivers/net/wireless/ath/ath5k/ath5k.ko
version:        0.6.0 (EXPERIMENTAL)
license:        Dual BSD/GPL
description:    Support for 5xxx series of Atheros 802.11 wireless LAN cards.
author:         Nick Kossifidis
author:         Jiri Slaby
srcversion:     94B41D157F11583E198BF6A
alias:          pci:v0000168Cd0000001Dsv*sd*bc*sc*i*
alias:          pci:v0000168Cd0000001Csv*sd*bc*sc*i*
alias:          pci:v0000168Cd0000001Bsv*sd*bc*sc*i*
alias:          pci:v0000168Cd0000001Asv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000019sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000018sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000017sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000016sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000015sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000014sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00001014sv*sd*bc*sc*i*
alias:          pci:v000010B7d00000013sv*sd*bc*sc*i*
alias:          pci:v0000A727d00000013sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000013sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000012sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000011sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000007sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000207sv*sd*bc*sc*i*
depends:        mac80211,led-class,cfg80211,ath
vermagic:       2.6.32-21-386 SMP mod_unload modversions 486
parm:           nohwcrypt:Disable hardware encryption. (bool)
parm:           all_channels:Expose all channels the device can use. (bool)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: help with ath5k --- wlan0 no private ioctls
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Bob Copeland @ 2010-11-26 15:54 UTC (permalink / raw)
  To: Octav Chipara; +Cc: linux-wireless

On Thu, Nov 25, 2010 at 12:43 AM, Octav Chipara <ochipara@gmail.com> wrote:
> Hi,
>
> I'm having some problems properly configuring ath5k. I'm trying to set
> the retransmission count so that the card will not perform more than a
> transmission:
>
> iwconfig wlan0 retry 1

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.

You can try the pid controller for now, it directly uses these
settings.

> I tried to set the value directly using iwpriv and I
> get wlan0 no private ioctls.

Unlearn iwpriv -- ath5k will never support it.

-- 
Bob Copeland %% www.bobcopeland.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: help with ath5k --- wlan0 no private ioctls
  2010-11-26 15:54 ` Bob Copeland
@ 2010-11-26 17:09   ` Octav Chipara
  2010-11-26 19:37     ` Bob Copeland
  0 siblings, 1 reply; 4+ messages in thread
From: Octav Chipara @ 2010-11-26 17:09 UTC (permalink / raw)
  To: Bob Copeland; +Cc: linux-wireless

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?

Thanks,
-- Octav

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: help with ath5k --- wlan0 no private ioctls
  2010-11-26 17:09   ` Octav Chipara
@ 2010-11-26 19:37     ` Bob Copeland
  0 siblings, 0 replies; 4+ messages in thread
From: Bob Copeland @ 2010-11-26 19:37 UTC (permalink / raw)
  To: Octav Chipara; +Cc: linux-wireless

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-11-26 19:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox