Commit 9015e499 authored by Christoph Fritz's avatar Christoph Fritz Committed by Greg Kroah-Hartman

Staging: wlan-ng: Update prism2_set_tx_power() to use mBm

Commit fa61cf70 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: default avatarChristoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e9563355
...@@ -621,8 +621,8 @@ int prism2_leave_ibss(struct wiphy *wiphy, struct net_device *dev) ...@@ -621,8 +621,8 @@ 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 prism2_set_tx_power(struct wiphy *wiphy, enum nl80211_tx_power_setting type,
int dbm) int mbm)
{ {
struct prism2_wiphy_private *priv = wiphy_priv(wiphy); struct prism2_wiphy_private *priv = wiphy_priv(wiphy);
wlandevice_t *wlandev = priv->wlandev; wlandevice_t *wlandev = priv->wlandev;
...@@ -630,10 +630,10 @@ int prism2_set_tx_power(struct wiphy *wiphy, enum tx_power_setting type, ...@@ -630,10 +630,10 @@ int prism2_set_tx_power(struct wiphy *wiphy, enum tx_power_setting type,
int result; int result;
int err = 0; int err = 0;
if (type == TX_POWER_AUTOMATIC) if (type == NL80211_TX_POWER_AUTOMATIC)
data = 30; data = 30;
else else
data = dbm; data = MBM_TO_DBM(mbm);
result = prism2_domibset_uint32(wlandev, result = prism2_domibset_uint32(wlandev,
DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel, DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment