* [PATCH 1/5] cfg80211: clarify set tx power mBm documentation
2011-11-28 21:38 [PATCH 0/5] wireless: fix set tx power Luis R. Rodriguez
@ 2011-11-28 21:38 ` Luis R. Rodriguez
2011-11-28 21:38 ` [PATCH 2/5] ath6kl: fix set tx power Luis R. Rodriguez
` (4 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Luis R. Rodriguez @ 2011-11-28 21:38 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Luis R. Rodriguez
Tons of drivers missed that we use mBm and not dBm...
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
include/net/cfg80211.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index ce6236b..f0e82b2 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1402,7 +1402,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
*
--
1.7.4.15.g7811d
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 2/5] ath6kl: fix set tx power
2011-11-28 21:38 [PATCH 0/5] wireless: fix set tx power Luis R. Rodriguez
2011-11-28 21:38 ` [PATCH 1/5] cfg80211: clarify set tx power mBm documentation Luis R. Rodriguez
@ 2011-11-28 21:38 ` Luis R. Rodriguez
2011-11-28 21:38 ` [PATCH 3/5] brcm80211: fix usage of " Luis R. Rodriguez
` (3 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Luis R. Rodriguez @ 2011-11-28 21:38 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Luis R. Rodriguez
ath6kl assumed cfg80211 passed to us power in dBm but it is in mBm.
Acked-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
Kalle queued this up already.
drivers/net/wireless/ath/ath6kl/cfg80211.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 0252604..9f3d3f0 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -1181,11 +1181,12 @@ static int ath6kl_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
*/
static int ath6kl_cfg80211_set_txpower(struct wiphy *wiphy,
enum nl80211_tx_power_setting type,
- int dbm)
+ int mbm)
{
struct ath6kl *ar = (struct ath6kl *)wiphy_priv(wiphy);
struct ath6kl_vif *vif;
u8 ath6kl_dbm;
+ int dbm = MBM_TO_DBM(mbm);
ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: type 0x%x, dbm %d\n", __func__,
type, dbm);
--
1.7.4.15.g7811d
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 3/5] brcm80211: fix usage of set tx power
2011-11-28 21:38 [PATCH 0/5] wireless: fix set tx power Luis R. Rodriguez
2011-11-28 21:38 ` [PATCH 1/5] cfg80211: clarify set tx power mBm documentation Luis R. Rodriguez
2011-11-28 21:38 ` [PATCH 2/5] ath6kl: fix set tx power Luis R. Rodriguez
@ 2011-11-28 21:38 ` Luis R. Rodriguez
2011-11-30 20:11 ` Franky Lin
2011-11-28 21:38 ` [PATCH 4/5] brcm80211: avoid code duplication on " Luis R. Rodriguez
` (2 subsequent siblings)
5 siblings, 1 reply; 10+ messages in thread
From: Luis R. Rodriguez @ 2011-11-28 21:38 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Luis R. Rodriguez
mBm is passed but dBm was assumed...
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
.../net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index cc19a73..fc98981 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -1429,7 +1429,7 @@ brcmf_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *ndev,
static s32
brcmf_cfg80211_set_tx_power(struct wiphy *wiphy,
- enum nl80211_tx_power_setting type, s32 dbm)
+ enum nl80211_tx_power_setting type, s32 mbm)
{
struct brcmf_cfg80211_priv *cfg_priv = wiphy_to_cfg(wiphy);
@@ -1437,6 +1437,7 @@ brcmf_cfg80211_set_tx_power(struct wiphy *wiphy,
u16 txpwrmw;
s32 err = 0;
s32 disable = 0;
+ s32 dbm = MBM_TO_DBM(mbm);
WL_TRACE("Enter\n");
if (!check_sys_up(wiphy))
--
1.7.4.15.g7811d
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 4/5] brcm80211: avoid code duplication on set tx power
2011-11-28 21:38 [PATCH 0/5] wireless: fix set tx power Luis R. Rodriguez
` (2 preceding siblings ...)
2011-11-28 21:38 ` [PATCH 3/5] brcm80211: fix usage of " Luis R. Rodriguez
@ 2011-11-28 21:38 ` Luis R. Rodriguez
2011-11-30 20:11 ` Franky Lin
2011-11-28 21:38 ` [PATCH 5/5] mwifiex: fix usage of " Luis R. Rodriguez
2011-11-29 6:36 ` [PATCH 0/5] wireless: fix " Kalle Valo
5 siblings, 1 reply; 10+ messages in thread
From: Luis R. Rodriguez @ 2011-11-28 21:38 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Luis R. Rodriguez
Both cases are doing the same so treat the switch cases
for both as an "or".
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
.../net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index fc98981..f23b0c3 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -1447,12 +1447,6 @@ brcmf_cfg80211_set_tx_power(struct wiphy *wiphy,
case NL80211_TX_POWER_AUTOMATIC:
break;
case NL80211_TX_POWER_LIMITED:
- if (dbm < 0) {
- WL_ERR("TX_POWER_LIMITED - dbm is negative\n");
- err = -EINVAL;
- goto done;
- }
- break;
case NL80211_TX_POWER_FIXED:
if (dbm < 0) {
WL_ERR("TX_POWER_FIXED - dbm is negative\n");
--
1.7.4.15.g7811d
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 5/5] mwifiex: fix usage of set tx power
2011-11-28 21:38 [PATCH 0/5] wireless: fix set tx power Luis R. Rodriguez
` (3 preceding siblings ...)
2011-11-28 21:38 ` [PATCH 4/5] brcm80211: avoid code duplication on " Luis R. Rodriguez
@ 2011-11-28 21:38 ` Luis R. Rodriguez
2011-11-29 6:36 ` [PATCH 0/5] wireless: fix " Kalle Valo
5 siblings, 0 replies; 10+ messages in thread
From: Luis R. Rodriguez @ 2011-11-28 21:38 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Luis R. Rodriguez
mBm is passed but dBm was assumed...
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
drivers/net/wireless/mwifiex/cfg80211.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index e9ab9a3..0db97cc 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -120,10 +120,11 @@ mwifiex_cfg80211_del_key(struct wiphy *wiphy, struct net_device *netdev,
static int
mwifiex_cfg80211_set_tx_power(struct wiphy *wiphy,
enum nl80211_tx_power_setting type,
- int dbm)
+ int mbm)
{
struct mwifiex_private *priv = mwifiex_cfg80211_get_priv(wiphy);
struct mwifiex_power_cfg power_cfg;
+ int dbm = MBM_TO_DBM(mbm);
if (type == NL80211_TX_POWER_FIXED) {
power_cfg.is_power_auto = 0;
--
1.7.4.15.g7811d
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH 0/5] wireless: fix set tx power
2011-11-28 21:38 [PATCH 0/5] wireless: fix set tx power Luis R. Rodriguez
` (4 preceding siblings ...)
2011-11-28 21:38 ` [PATCH 5/5] mwifiex: fix usage of " Luis R. Rodriguez
@ 2011-11-29 6:36 ` Kalle Valo
2011-11-29 15:14 ` Luis R. Rodriguez
5 siblings, 1 reply; 10+ messages in thread
From: Kalle Valo @ 2011-11-29 6:36 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: linville, linux-wireless
"Luis R. Rodriguez" <mcgrof@qca.qualcomm.com> writes:
> The driver maintainers have approved of these now except for brcm80211.
> I should note that Kalle indicated he was going to queue up the ath6kl
> patch though so not sure if you want to wait for his patch or just suck
> mine in.
John, please don't take the ath6kl patch as it's already in ath6kl.git:
https://github.com/kvalo/ath6kl/commit/b992a28557afdcabcee7d8af88471dddfe791c11
> I think it makes sense to roll these in together as a series,
I don't see any benefit from this.
> the rebase that Kalle would do shouldn't be impacted by this I think.
I don't rebase ath6kl.git unless absolutely necessary. And I prefer that
ath6kl patches would go through ath6kl.git, I get less conflicts that
way.
--
Kalle Valo
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH 0/5] wireless: fix set tx power
2011-11-29 6:36 ` [PATCH 0/5] wireless: fix " Kalle Valo
@ 2011-11-29 15:14 ` Luis R. Rodriguez
0 siblings, 0 replies; 10+ messages in thread
From: Luis R. Rodriguez @ 2011-11-29 15:14 UTC (permalink / raw)
To: Kalle Valo; +Cc: linville, linux-wireless
On Tue, Nov 29, 2011 at 1:36 AM, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com> writes:
>
>> The driver maintainers have approved of these now except for brcm80211.
>> I should note that Kalle indicated he was going to queue up the ath6kl
>> patch though so not sure if you want to wait for his patch or just suck
>> mine in.
>
> John, please don't take the ath6kl patch as it's already in ath6kl.git:
>
> https://github.com/kvalo/ath6kl/commit/b992a28557afdcabcee7d8af88471dddfe791c11
>
>> I think it makes sense to roll these in together as a series,
>
> I don't see any benefit from this.
>
>> the rebase that Kalle would do shouldn't be impacted by this I think.
>
> I don't rebase ath6kl.git unless absolutely necessary. And I prefer that
> ath6kl patches would go through ath6kl.git, I get less conflicts that
> way.
Alrighty, then the others can be sucked in.
Luis
^ permalink raw reply [flat|nested] 10+ messages in thread