Skip to contentSkip to conversation

wireless: fix set tx power..

RFC New Luis R. Rodriguez 1 participant 2 messages Nov 23, 2011 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore
#0 lore raw

cover wireless: fix set tx power..

While reviewing setting tx power I noticed some drivers had this busted by assuming we passed dBm while we actually pass the value in mBm from cfg80211. Would it be better to simply define a typedef here to avoid other bogus uses later?

Luis R. Rodriguez (5):
cfg80211: clarify set tx power mBm documentation
ath6kl: fix ath6kl's set tx power
brcm80211: fix usage of set tx power
brcm80211: avoid code duplication on set tx power
mwifiex: fix usage of set tx power

 drivers/net/wireless/ath/ath6kl/cfg80211.c         |    3 ++-
 .../net/wireless/brcm80211/brcmfmac/wl_cfg80211.c  |    9 ++-------
 drivers/net/wireless/mwifiex/cfg80211.c            |    3 ++-
 include/net/cfg80211.h                             |    3 ++-
 4 files changed, 8 insertions(+), 10 deletions(-)
Signature · 1 line
1.7.4.15.g7811d
#1 lore raw

RFC 1/5 cfg80211: clarify set tx power mBm documentation

Tons of drivers missed that we use mBm and not dBm...

---
 include/net/cfg80211.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
include/net/cfg80211.h +2 -1
index d5e1891..a992782 100644
@@ -1399,7 +1399,8 @@ struct cfg80211_gtk_rekey_data {
  *	have changed. The actual parameter values are available in
  *	struct wiphy. If returning an error, no value should be changed.
  *
- * @set_tx_power: set the transmit power according to the parameters
+ * @set_tx_power: set the transmit power according to the parameters,
+ *	the power passed is in mBm, to get dBm use MBM_TO_DBM().
  * @get_tx_power: store the current TX power into the dbm variable;
  *	return 0 if successful
  *
Signature · 1 line
1.7.4.15.g7811d