diff options
author | Christoph Fritz <chf.fritz@googlemail.com> | 2010-08-02 15:53:35 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-05 17:18:29 -0400 |
commit | 9015e4996273c86574d6fd26df8a203941d3cc24 (patch) | |
tree | af94e53d73917ed64e40523e67b1f0afc2890ab0 | |
parent | e9563355ac1175dd3440dc2ea5c28b27ed51a283 (diff) |
Staging: wlan-ng: Update prism2_set_tx_power() to use mBm
Commit fa61cf70a6ae1089e459e4b59b2e8d8e90d8535e updates nl80211's function
.set_tx_power to use mBm units instead of dBm for greater accuracy and
smaller power levels.
This patchs updates prism2_set_tx_power() accordingly.
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/wlan-ng/cfg80211.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c index d32875a7ef94..368c30a9d5ff 100644 --- a/drivers/staging/wlan-ng/cfg80211.c +++ b/drivers/staging/wlan-ng/cfg80211.c | |||
@@ -621,8 +621,8 @@ int prism2_leave_ibss(struct wiphy *wiphy, struct net_device *dev) | |||
621 | } | 621 | } |
622 | 622 | ||
623 | 623 | ||
624 | int prism2_set_tx_power(struct wiphy *wiphy, enum tx_power_setting type, | 624 | int prism2_set_tx_power(struct wiphy *wiphy, enum nl80211_tx_power_setting type, |
625 | int dbm) | 625 | int mbm) |
626 | { | 626 | { |
627 | struct prism2_wiphy_private *priv = wiphy_priv(wiphy); | 627 | struct prism2_wiphy_private *priv = wiphy_priv(wiphy); |
628 | wlandevice_t *wlandev = priv->wlandev; | 628 | wlandevice_t *wlandev = priv->wlandev; |
@@ -630,10 +630,10 @@ int prism2_set_tx_power(struct wiphy *wiphy, enum tx_power_setting type, | |||
630 | int result; | 630 | int result; |
631 | int err = 0; | 631 | int err = 0; |
632 | 632 | ||
633 | if (type == TX_POWER_AUTOMATIC) | 633 | if (type == NL80211_TX_POWER_AUTOMATIC) |
634 | data = 30; | 634 | data = 30; |
635 | else | 635 | else |
636 | data = dbm; | 636 | data = MBM_TO_DBM(mbm); |
637 | 637 | ||
638 | result = prism2_domibset_uint32(wlandev, | 638 | result = prism2_domibset_uint32(wlandev, |
639 | DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel, | 639 | DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel, |