linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [ath9k-devel] Possible to set MCS Index?
       [not found] <d355d36c0909300814w302f11a4rb5b23a80aee36c43@mail.gmail.com>
@ 2009-09-30 16:48 ` Luis R. Rodriguez
  2009-09-30 17:23   ` John W. Linville
       [not found]   ` <d355d36c0909301116l5b6f05f2s4834a47142810a54@mail.gmail.com>
  0 siblings, 2 replies; 3+ messages in thread
From: Luis R. Rodriguez @ 2009-09-30 16:48 UTC (permalink / raw)
  To: Matt Tierney; +Cc: ath9k-devel@lists.ath9k.org, linux-wireless

On Wed, Sep 30, 2009 at 08:14:57AM -0700, Matt Tierney wrote:
> This might be a naive question, but I was wondering if it's 
> possible to set the MCS index either from a high level interface 
> or through a hack in the ath9k code. I'd like to fix the MCS Index
> to 15 but I don't know where that is set or if I can 'force' it
> through modifying the ath9k code in wireless-testing. (It doesn't
> appear as if iw provides that sort of functionality and it wasn't
> clear that I could specify a HT rate in hostapd.conf.)

mac80211 rate control code is MCS rate unaware, but we do at least
let drivers pass the MCS rate for tx status reporting. ath9k
unfortunately reports back the wrong MCS rate though because
of the way ath9k rate control works... it seems correcting this
requires a rewrite of our ath9k rate control code and no one has
prioritized on that as its a non-functional fix.

The first step then is to make mac80211 rate controle code MCS
aware and adding MCS rate control support to minstrel, for example.

For ath9k it'd be nice to fix the rate control code to be able
to report the right MCS index, I really am not sure how involved
that is as I've tried to stay away from the rate control code.

A good step would be to get ath9k rate control to be switchable
to minstrel, for example. This can be done as a module parameter
to start but eventually I think it'd be nice to be able to switch
through iw on any given device. That would require quite a lot of
work though.

Once mac80211 is MCS rate control aware the next step would be to
add a commands to set an MCS rate.

The cheesy and quick way to this for ath9k would be through
ath9k/debufs.c

  Luis

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

* Re: [ath9k-devel] Possible to set MCS Index?
  2009-09-30 16:48 ` [ath9k-devel] Possible to set MCS Index? Luis R. Rodriguez
@ 2009-09-30 17:23   ` John W. Linville
       [not found]   ` <d355d36c0909301116l5b6f05f2s4834a47142810a54@mail.gmail.com>
  1 sibling, 0 replies; 3+ messages in thread
From: John W. Linville @ 2009-09-30 17:23 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: Matt Tierney, ath9k-devel@lists.ath9k.org, linux-wireless

On Wed, Sep 30, 2009 at 09:48:53AM -0700, Luis R. Rodriguez wrote:

> A good step would be to get ath9k rate control to be switchable
> to minstrel, for example. This can be done as a module parameter
> to start but eventually I think it'd be nice to be able to switch
> through iw on any given device. That would require quite a lot of
> work though.

ACK to the above...

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

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

* Re: [ath9k-devel] Possible to set MCS Index?
       [not found]   ` <d355d36c0909301116l5b6f05f2s4834a47142810a54@mail.gmail.com>
@ 2009-09-30 19:04     ` Luis R. Rodriguez
  0 siblings, 0 replies; 3+ messages in thread
From: Luis R. Rodriguez @ 2009-09-30 19:04 UTC (permalink / raw)
  To: Matt Tierney; +Cc: ath9k-devel@lists.ath9k.org, linux-wireless

On Wed, Sep 30, 2009 at 11:16 AM, Matt Tierney
<matt.tierney@post.harvard.edu> wrote:
>
>> mac80211 rate control code is MCS rate unaware, but we do at least
>> let drivers pass the MCS rate for tx status reporting. ath9k
>> unfortunately reports back the wrong MCS rate though because
>> of the way ath9k rate control works...
>
> Hm. I'm confused. I realize iw and the ath9k driver might be separate
> entities, but it seemed like iw was corroborating ath9k debug output with my
> setup. /sys/kernel/debug/ath9k/phy0/rcstat showed that one packet was
> successfully sent at the maximum rate possible with MCS Index 12 (162 Mbps)
> and index 12 seems to have that 1 bit flipped as the highest index in the
> "HT MCS Set" I copied in my `iw list` printout; albeit, that was one packet
> successfully sent compared to 1261 at 81.5 Mbps and 254 at 54 Mbps. Anyway,
> I thought that the HT MCS Set indicated the correct values (as seen in the
> ath9k rcstat) but I think you're saying it might not  =(

No, ath9k debugfs rcstat is fine. What we do not set properly for
mac80211 is the rx status bit rate for MCS rates, this means iw
station dump thing won't give you the right MCS rate.

> Is there a way for me to capture the MCS rate info sent from the driver for
> my own debugging view then? (It's not clear to me which ath9k debug bits to
> set in order to get that information when I modprobe ath9k, if there is a
> set that would give me that information).

You were using the right thing for now:

http://wireless.kernel.org/en/users/Drivers/ath9k/debug#rcstat

>> The first step then is to make mac80211 rate controle code MCS
>> aware and adding MCS rate control support to minstrel, for example.
>>
>> For ath9k it'd be nice to fix the rate control code to be able
>> to report the right MCS index, I really am not sure how involved
>> that is as I've tried to stay away from the rate control code.
>
> I see - this is messier than I anticipated... So, is what I'm trying to do
> (set MCS tx rates) something that I should examine in mac80211 code or is
> ath9k the place to be? (I'm not familiar with how all the pieces of ath9k,
> mac80211, nl80211, cfg80211, etc fit together so that's all contributing to
> my confusion...)

Try to work on a debugfs way to do this first. Something like:

echo 15 >  /sys/kernel/debug/ath9k/phy0/mcs-rate

To set MCS 15 statically.

>> A good step would be to get ath9k rate control to be switchable
>> to minstrel, for example. This can be done as a module parameter
>> to start but eventually I think it'd be nice to be able to switch
>> through iw on any given device. That would require quite a lot of
>> work though.
>
> Any suggestions on how to start thinking about this? Are there examples in
> the ath9k code of making this sort of adaptation?

As I said above, the easy way would be through debugfs. The nice thing
about debugfs is we can remove it at will later.

>> Once mac80211 is MCS rate control aware the next step would be to
>> add a commands to set an MCS rate.
>>
>> The cheesy and quick way to this for ath9k would be through
>> ath9k/debufs.c
>
> Would this be able to actually set an MCS rate though?

Why not?

> I thought that
> debug.c was composed of 'read-only' features.

Nope, you can echo to wiphy file to add a new virtual wiphy for
example, or to the debug file to change the debug level on demand. Hm,
I guess no one reads documentation or we need to really work harder on
promoting our wireless wiki.

> If it is possible, then this
> is the quick and dirty fix I'd like to use now,

Go for it.

  Luis

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

end of thread, other threads:[~2009-09-30 19:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <d355d36c0909300814w302f11a4rb5b23a80aee36c43@mail.gmail.com>
2009-09-30 16:48 ` [ath9k-devel] Possible to set MCS Index? Luis R. Rodriguez
2009-09-30 17:23   ` John W. Linville
     [not found]   ` <d355d36c0909301116l5b6f05f2s4834a47142810a54@mail.gmail.com>
2009-09-30 19:04     ` Luis R. Rodriguez

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).