From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luis R. Rodriguez Date: Mon, 9 Feb 2009 18:25:14 -0800 Subject: [ath9k-devel] Transmit power control using ath9k In-Reply-To: <20090210015755.GB4386@tesla> References: <604f6e750902090738n47e3eb65y62a6e9ce5e883adf@mail.gmail.com> <20090210015755.GB4386@tesla> Message-ID: <20090210022514.GD4386@tesla> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org 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