Skip to content

Commit

Permalink
Staging: wlan-ng: Update prism2_set_tx_power() to use mBm
Browse files Browse the repository at this point in the history
Commit fa61cf7 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>
  • Loading branch information
Christoph Fritz authored and Greg Kroah-Hartman committed Aug 5, 2010
1 parent e956335 commit 9015e49
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/staging/wlan-ng/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -621,19 +621,19 @@ int prism2_leave_ibss(struct wiphy *wiphy, struct net_device *dev)
}


int prism2_set_tx_power(struct wiphy *wiphy, enum tx_power_setting type,
int dbm)
int prism2_set_tx_power(struct wiphy *wiphy, enum nl80211_tx_power_setting type,
int mbm)
{
struct prism2_wiphy_private *priv = wiphy_priv(wiphy);
wlandevice_t *wlandev = priv->wlandev;
u32 data;
int result;
int err = 0;

if (type == TX_POWER_AUTOMATIC)
if (type == NL80211_TX_POWER_AUTOMATIC)
data = 30;
else
data = dbm;
data = MBM_TO_DBM(mbm);

result = prism2_domibset_uint32(wlandev,
DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel,
Expand Down

0 comments on commit 9015e49

Please sign in to comment.