[ath9k-devel] Transmit power control using ath9k

2009-02-09 Thread Kishore Ramachandran
Greetings,

I have an AR9160-based 11n miniPCI card, and was wondering if the card and
ath9k support transmit power control? If they do, is it on a fine-grained
level (e.g. per-packet change allowed)? Also, am guessing that
setting/getting the value of this parameter via the iw tool would be useful?
Please let me know.

Regards,
Kishore
___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel


Re: [ath9k-devel] Transmit power control using ath9k

2009-02-09 Thread Luis R. Rodriguez
On Mon, Feb 09, 2009 at 07:38:51AM -0800, Kishore Ramachandran wrote:
 Greetings,
 
 I have an AR9160-based 11n miniPCI card, and was wondering if the card and 
 ath9k support transmit power control?

You mean the ability to change desired TX power?

If so then yes, we support that by mac80211, and mac80211 then tells us. This
is handled in mac80211 through the ieee80211_ops:

struct ieee80211_ops ath9k_ops = {
.tx = ath9k_tx,
.start  = ath9k_start,
.stop   = ath9k_stop,
.add_interface  = ath9k_add_interface,
.remove_interface   = ath9k_remove_interface,
.config = ath9k_config,
.config_interface   = ath9k_config_interface,
.configure_filter   = ath9k_configure_filter,
.sta_notify = ath9k_sta_notify,
.conf_tx= ath9k_conf_tx,
.bss_info_changed   = ath9k_bss_info_changed,
.set_key= ath9k_set_key,
.get_tsf= ath9k_get_tsf,
.set_tsf= ath9k_set_tsf,
.reset_tsf  = ath9k_reset_tsf,
.ampdu_action   = ath9k_ampdu_action,
};

In the TX power case this is handled in ath9k_config():

-
if (changed  IEEE80211_CONF_CHANGE_POWER)
sc-sc_config.txpowlimit = 2 * conf-power_level;
-

Now, currently the way mac80211 receives this from userspace is through
the old wireless-extensions SIOCSIWTXPOW ioctl. mac80211 implements this via
ieee80211_ioctl_siwtxpower().

 If they do, is it on a fine-grained level (e.g. per-packet change allowed)?

As you can see from above, this is not a question for ath9k but for mac80211,
as mac80211 just informs us when the tx power has to be changed. The answer
to the question does mac80211 supports changing TX power dynamically for each
packet is yes, we do that by allowing userspace to pass desired tweaking 
through
a radiotap header. In fact not only is TX power supported but other fields such
as rate.

For further details check out:

Documentation/networking/mac80211-injection.txt

I just had to review that today. The only oudated information there is the URL
to packetspammer, which I have a correct URL for you today:

http://git.warmcat.com/cgi-bin/cgit.cgi?url=packetspammer.git/

The actual git URL is:

git://git.warmcat.com/packetspammer.git/

 Also, am guessing that setting/getting the value of this parameter via the iw 
 tool would be useful?

Sure, so that means through nl80211, that would be welcomed, as
well as setting the rate. Let me know if you have any other questions.

  Luis
___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel


Re: [ath9k-devel] Transmit power control using ath9k

2009-02-09 Thread Luis R. Rodriguez
On Mon, Feb 09, 2009 at 05:57:55PM -0800, Luis Rodriguez wrote:
 On Mon, Feb 09, 2009 at 07:38:51AM -0800, Kishore Ramachandran wrote:
  Greetings,
 
  I have an AR9160-based 11n miniPCI card, and was wondering if the card and 
  ath9k support transmit power control?
 
 You mean the ability to change desired TX power?
 
 If so then yes, we support that by mac80211, and mac80211 then tells us. This
 is handled in mac80211 through the ieee80211_ops:
 
 struct ieee80211_ops ath9k_ops = {
 .tx = ath9k_tx,
 .start  = ath9k_start,
 .stop   = ath9k_stop,
 .add_interface  = ath9k_add_interface,
 .remove_interface   = ath9k_remove_interface,
 .config = ath9k_config,
 .config_interface   = ath9k_config_interface,
 .configure_filter   = ath9k_configure_filter,
 .sta_notify = ath9k_sta_notify,
 .conf_tx= ath9k_conf_tx,
 .bss_info_changed   = ath9k_bss_info_changed,
 .set_key= ath9k_set_key,
 .get_tsf= ath9k_get_tsf,
 .set_tsf= ath9k_set_tsf,
 .reset_tsf  = ath9k_reset_tsf,
 .ampdu_action   = ath9k_ampdu_action,
 };
 
 In the TX power case this is handled in ath9k_config():
 
 -
 if (changed  IEEE80211_CONF_CHANGE_POWER)
 sc-sc_config.txpowlimit = 2 * conf-power_level;
 -
 
 Now, currently the way mac80211 receives this from userspace is through
 the old wireless-extensions SIOCSIWTXPOW ioctl. mac80211 implements this via
 ieee80211_ioctl_siwtxpower().
 
  If they do, is it on a fine-grained level (e.g. per-packet change allowed)?
 
 As you can see from above, this is not a question for ath9k but for mac80211,
 as mac80211 just informs us when the tx power has to be changed. The answer
 to the question does mac80211 supports changing TX power dynamically for each
 packet is yes, we do that by allowing userspace to pass desired tweaking 
 through
 a radiotap header. In fact not only is TX power supported but other fields 
 such
 as rate.
 
 For further details check out:
 
 Documentation/networking/mac80211-injection.txt
 
 I just had to review that today. The only oudated information there is the URL
 to packetspammer, which I have a correct URL for you today:
 
 http://git.warmcat.com/cgi-bin/cgit.cgi?url=packetspammer.git/
 
 The actual git URL is:
 
 git://git.warmcat.com/packetspammer.git/
 
  Also, am guessing that setting/getting the value of this parameter via the 
  iw tool would be useful?
 
 Sure, so that means through nl80211, that would be welcomed, as
 well as setting the rate. Let me know if you have any other questions.

BTW I don't see any documentation for packetspammer so I have started it:

http://wireless.kernel.org/en/users/Documentation/packetspammer

Please feel free to help elaborate it.

  Luis
___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel


[ath9k-devel] How to disable 11n mode

2009-02-09 Thread Andy
Hi All,

I am debuging ath9k in opensolaris,  and i have two questions.

1. How to disable 11n mode when i attach the device?

2. If i don't use 11n mode, should sc-sc_tx_chainmask/sc-sc_rx_chainmask
be initialized to 1?

Thanks very much!

Br,

Andy
___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel