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

Christoph Fritz chf.fritz at googlemail.com
Mon Aug 2 20:56:29 UTC 2010


On Mon, 2010-08-02 at 21:53 +0200, Christoph Fritz wrote:
> 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 at googlemail.com>
> ---
>  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 9488c52..15f24d5 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)
>  }
>  
> 
> -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;
> @@ -630,10 +630,10 @@ int prism2_set_tx_power(struct wiphy *wiphy, enum tx_power_setting type,
>  	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,

I forgot to add: This patch is against linux-next





More information about the devel mailing list