2011-11-23 16:08:46

by Luis R. Rodriguez

[permalink] [raw]
Subject: [RFC 5/5] mwifiex: fix usage of set tx power

mBm is passed but dBm was assumed...

Cc: Bing Zhao <[email protected]>
Cc: Amitkumar Karwar <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
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



2011-11-23 22:48:49

by Bing Zhao

[permalink] [raw]
Subject: RE: [RFC 5/5] mwifiex: fix usage of set tx power

Hi Luis,

> Subject: [RFC 5/5] mwifiex: fix usage of set tx power
>
> mBm is passed but dBm was assumed...
>
> Cc: Bing Zhao <[email protected]>
> Cc: Amitkumar Karwar <[email protected]>
> Signed-off-by: Luis R. Rodriguez <[email protected]>

Acked-by: Bing Zhao <[email protected]>

Thanks,
Bing

> ---
> 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