mac80211: remove user_power_level from driver API
authorJohannes Berg <johannes@sipsolutions.net>
Tue, 6 Jan 2009 22:23:56 +0000 (23:23 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 29 Jan 2009 20:59:53 +0000 (15:59 -0500)
I missed this during review of "mac80211: Fix tx power setting",
the user_power_level shouldn't be available to the driver but
rather be an internal value used to calculate the value for the
driver.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
include/net/mac80211.h
net/mac80211/ieee80211_i.h
net/mac80211/main.c
net/mac80211/wext.c

index 9215b1ec90ec3365731e07c8e6797f2fd069629c..0ffe932942fddd7cab4899dee4e83de41f52ba14 100644 (file)
@@ -546,7 +546,6 @@ enum ieee80211_conf_changed {
  * @listen_interval: listen interval in units of beacon interval
  * @flags: configuration flags defined above
  * @power_level: requested transmit power (in dBm)
- * @user_power_level: User configured transmit power (in dBm)
  * @channel: the channel to tune to
  * @ht: the HT configuration for the device
  * @long_frame_max_tx_count: Maximum number of transmissions for a "long" frame
@@ -560,7 +559,6 @@ struct ieee80211_conf {
        int beacon_int;
        u32 flags;
        int power_level;
-       int user_power_level;
 
        u16 listen_interval;
        bool radio_enabled;
index 85c4d3144f9fb9fc06cf807e01c988db9b1cfc88..fa5ca14517f5a2f544bad51b116781fa891fd653 100644 (file)
@@ -705,6 +705,8 @@ struct ieee80211_local {
        struct work_struct dynamic_ps_disable_work;
        struct timer_list dynamic_ps_timer;
 
+       int user_power_level; /* in dBm */
+
 #ifdef CONFIG_MAC80211_DEBUGFS
        struct local_debugfsdentries {
                struct dentry *rcdir;
index dca4b7da6cade958e56057ec504098cea1737a2f..b55b9970dc976a0c94e769433674cc0a493a1b5b 100644 (file)
@@ -214,10 +214,10 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
                changed |= IEEE80211_CONF_CHANGE_CHANNEL;
        }
 
-       if (!local->hw.conf.user_power_level)
+       if (!local->user_power_level)
                power = chan->max_power;
        else
-               power = min(chan->max_power, local->hw.conf.user_power_level);
+               power = min(chan->max_power, local->user_power_level);
        if (local->hw.conf.power_level != power) {
                changed |= IEEE80211_CONF_CHANGE_POWER;
                local->hw.conf.power_level = power;
index bb2c7135a1c8b5ef0ba4da612364a81ed0c8d633..5690c3d41e7d650f09d7c39753c7a08fade0430f 100644 (file)
@@ -551,7 +551,7 @@ static int ieee80211_ioctl_siwtxpower(struct net_device *dev,
        else /* Automatic power level setting */
                new_power_level = chan->max_power;
 
-       local->hw.conf.user_power_level = new_power_level;
+       local->user_power_level = new_power_level;
        if (local->hw.conf.power_level != new_power_level)
                reconf_flags |= IEEE80211_CONF_CHANGE_POWER;