Transmit power control using ath9k
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20090209/9285c552/attachment.htm
Quoted 3 lines · Kishore Ramachandran
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().
Quoted 1 line
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/
Quoted 1 line
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
Quoted 58 lines · Luis Rodriguez
Quoted 3 lines · Kishore Ramachandran
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_opsath9k_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().Quoted 1 line
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.txtI 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/
Quoted 8 lines
The actual git URL is:
git://git.warmcat.com/packetspammer.git/Quoted 1 line
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