Re: [PATCH] mac80211: enable TPC through mac80211 stack
On Fri, 2014-11-28 at 16:02 +0100, Lorenzo Bianconi wrote: I just need to notify lower driver (ath9k in my case) to setup TPC registers in order to take into account TX power configured in frame descriptors. For that purpose I added tpc_enabled flags in ieee80211_bss_conf and in ieee80211_conf. Is there any other variables I can use to notify that configuration? Well, arguably, you can just do that unconditionally. If you want to do it right according to the nl80211 API that we introduced due to wext compatibility (IIRC), you'd have to look at the value passed in enum nl80211_tx_power_setting. This can take NL80211_TX_POWER_AUTOMATIC - no limit from userspace NL80211_TX_POWER_LIMITED - limit, but allow using less than specified NL80211_TX_POWER_FIXED - use exactly what userspace wanted I don't think any driver really implements this today, but you could take this as a hint and only enable TPC (with or without the user's specified limit) in the first two cases. Sounds good to me. I will send a patch v2 where I will enable TPC if tx_power_setting has been set to NL80211_TX_POWER_AUTOMATIC or NL80211_TX_POWER_LIMITED. Right now ath9k computes maximum TX power value per-rate as minimum between user TX power and channel/regulatory constraints. Best regards, Lorenzo johannes -- UNIX is Sexy: who | grep -i blonde | talk; cd ~; wine; talk; touch; unzip; touch; strip; gasp; finger; gasp; mount; fsck; more; yes; gasp; umount; make clean; sleep -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] mac80211: enable TPC through mac80211 stack
I would like to enable TPC in ath9k using iw command: iw dev wlan0 set txpower auto I knew user_power_level is set to IEEE80211_UNSET_POWER_LEVEL in that case. Is there a better way than to check user_power_level? But ... the API already allows for that flexibility? I think if anything you should expose the TX power type that the nl80211 API has. johannes -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] mac80211: enable TPC through mac80211 stack
I would like to enable TPC in ath9k using iw command: iw dev wlan0 set txpower auto I knew user_power_level is set to IEEE80211_UNSET_POWER_LEVEL in that case. Is there a better way than to check user_power_level? But ... the API already allows for that flexibility? I think if anything you should expose the TX power type that the nl80211 API has. I just need to notify lower driver (ath9k in my case) to setup TPC registers in order to take into account TX power configured in frame descriptors. For that purpose I added tpc_enabled flags in ieee80211_bss_conf and in ieee80211_conf. Is there any other variables I can use to notify that configuration? Lorenzo johannes -- UNIX is Sexy: who | grep -i blonde | talk; cd ~; wine; talk; touch; unzip; touch; strip; gasp; finger; gasp; mount; fsck; more; yes; gasp; umount; make clean; sleep -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] mac80211: enable TPC through mac80211 stack
On Thu, 2014-11-27 at 14:39 +0100, Lorenzo Bianconi wrote: Configure per packet Transmit Power Control (TPC) in lower drivers checking if user_power_level has been set to IEEE80211_UNSET_POWER_LEVEL Err, what? Why? how? what does this do? johannes -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] mac80211: enable TPC through mac80211 stack
On Thu, 2014-11-27 at 14:39 +0100, Lorenzo Bianconi wrote: Configure per packet Transmit Power Control (TPC) in lower drivers checking if user_power_level has been set to IEEE80211_UNSET_POWER_LEVEL Err, what? Why? how? what does this do? johannes I would like to enable TPC in ath9k using iw command: iw dev wlan0 set txpower auto I knew user_power_level is set to IEEE80211_UNSET_POWER_LEVEL in that case. Is there a better way than to check user_power_level? Regards, Lorenzo -- UNIX is Sexy: who | grep -i blonde | talk; cd ~; wine; talk; touch; unzip; touch; strip; gasp; finger; gasp; mount; fsck; more; yes; gasp; umount; make clean; sleep -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html