Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 134191
b: refs/heads/master
c: 62ea9c5
h: refs/heads/master
i:
  134189: cf009a9
  134187: fba38de
  134183: 2f4ed54
  134175: 4c400d2
v: v3
  • Loading branch information
Winkler, Tomas authored and John W. Linville committed Jan 29, 2009
1 parent 3cdadcd commit ed3acb4
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 805cee5b81f1e493820601fe7990aef935c2c621
refs/heads/master: 62ea9c5b9e531dbf6b2601e6c9e2705a56983b6e
6 changes: 3 additions & 3 deletions trunk/drivers/net/wireless/iwlwifi/iwl-3945.c
Original file line number Diff line number Diff line change
Expand Up @@ -1675,7 +1675,7 @@ static void iwl3945_hw_reg_set_scan_power(struct iwl_priv *priv, u32 scan_tbl_in
/* further limit to user's max power preference.
* FIXME: Other spectrum management power limitations do not
* seem to apply?? */
power = min(power, priv->user_txpower_limit);
power = min(power, priv->tx_power_user_lmt);
scan_power_info->requested_power = power;

/* find difference between new scan *power* and current "normal"
Expand Down Expand Up @@ -1947,14 +1947,14 @@ int iwl3945_hw_reg_set_txpower(struct iwl_priv *priv, s8 power)
u8 a_band;
u8 i;

if (priv->user_txpower_limit == power) {
if (priv->tx_power_user_lmt == power) {
IWL_DEBUG_POWER("Requested Tx power same as current "
"limit: %ddBm.\n", power);
return 0;
}

IWL_DEBUG_POWER("Setting upper limit clamp to %ddBm.\n", power);
priv->user_txpower_limit = power;
priv->tx_power_user_lmt = power;

/* set up new Tx powers for each and every channel, 2.4 and 5.x */

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/iwlwifi/iwl-4965.c
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,7 @@ static int iwl4965_fill_txpower_tbl(struct iwl_priv *priv, u8 band, u16 channel,
s32 factory_actual_pwr[2];
s32 power_index;

/* user_txpower_limit is in dBm, convert to half-dBm (half-dB units
/* tx_power_user_lmt is in dBm, convert to half-dBm (half-dB units
* are used for indexing into txpower table) */
user_target_power = 2 * priv->tx_power_user_lmt;

Expand Down
5 changes: 0 additions & 5 deletions trunk/drivers/net/wireless/iwlwifi/iwl-dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -1068,9 +1068,6 @@ struct iwl_priv {

/*For 3945*/
#define IWL_DEFAULT_TX_POWER 0x0F
s8 user_txpower_limit;
s8 max_channel_txpower_limit;

/* We declare this const so it can only be
* changed via explicit cast within the
* routines that actually update the physical
Expand All @@ -1088,8 +1085,6 @@ struct iwl_priv {
struct iwl3945_eeprom eeprom39;

u32 sta_supp_rates;
u8 call_post_assoc_from_beacon;

}; /*iwl_priv */

static inline void iwl_txq_ctx_activate(struct iwl_priv *priv, int txq_id)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/iwlwifi/iwl-eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ int iwl_init_channel_map(struct iwl_priv *priv)
flags & EEPROM_CHANNEL_RADAR))
? "" : "not ");

/* Set the user_txpower_limit to the highest power
/* Set the tx_power_user_lmt to the highest power
* supported by any channel */
if (eeprom_ch_info[ch].max_power_avg >
priv->tx_power_user_lmt)
Expand Down
15 changes: 7 additions & 8 deletions trunk/drivers/net/wireless/iwlwifi/iwl3945-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -3949,11 +3949,11 @@ static int iwl3945_init_channel_map(struct iwl_priv *priv)
flags & EEPROM_CHANNEL_RADAR))
? "" : "not ");

/* Set the user_txpower_limit to the highest power
/* Set the tx_power_user_lmt to the highest power
* supported by any channel */
if (eeprom_ch_info[ch].max_power_avg >
priv->user_txpower_limit)
priv->user_txpower_limit =
priv->tx_power_user_lmt)
priv->tx_power_user_lmt =
eeprom_ch_info[ch].max_power_avg;

ch_info++;
Expand Down Expand Up @@ -4228,8 +4228,8 @@ static int iwl3945_init_geos(struct iwl_priv *priv)
if (ch->flags & EEPROM_CHANNEL_RADAR)
geo_ch->flags |= IEEE80211_CHAN_RADAR;

if (ch->max_power_avg > priv->max_channel_txpower_limit)
priv->max_channel_txpower_limit =
if (ch->max_power_avg > priv->tx_power_channel_lmt)
priv->tx_power_channel_lmt =
ch->max_power_avg;
} else {
geo_ch->flags |= IEEE80211_CHAN_DISABLED;
Expand Down Expand Up @@ -6307,7 +6307,6 @@ static void iwl3945_mac_reset_tsf(struct ieee80211_hw *hw)
spin_lock_irqsave(&priv->lock, flags);
priv->assoc_id = 0;
priv->assoc_capability = 0;
priv->call_post_assoc_from_beacon = 0;

/* new association get rid of ibss beacon skb */
if (priv->ibss_beacon)
Expand Down Expand Up @@ -6451,7 +6450,7 @@ static ssize_t show_tx_power(struct device *d,
struct device_attribute *attr, char *buf)
{
struct iwl_priv *priv = (struct iwl_priv *)d->driver_data;
return sprintf(buf, "%d\n", priv->user_txpower_limit);
return sprintf(buf, "%d\n", priv->tx_power_user_lmt);
}

static ssize_t store_tx_power(struct device *d,
Expand Down Expand Up @@ -6974,7 +6973,7 @@ static int iwl3945_init_drv(struct iwl_priv *priv)
priv->rates_mask = IWL_RATES_MASK;
/* If power management is turned on, default to AC mode */
priv->power_mode = IWL39_POWER_AC;
priv->user_txpower_limit = IWL_DEFAULT_TX_POWER;
priv->tx_power_user_lmt = IWL_DEFAULT_TX_POWER;

ret = iwl3945_init_channel_map(priv);
if (ret) {
Expand Down

0 comments on commit ed3acb4

Please sign in to comment.