Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300857
b: refs/heads/master
c: 9e29511
h: refs/heads/master
i:
  300855: 9b116cb
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Apr 12, 2012
1 parent 36a3cb3 commit cd127ae
Show file tree
Hide file tree
Showing 18 changed files with 169 additions and 170 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: 7c5ba4a830cbb730770129b0004e2a06e47dbac5
refs/heads/master: 9e295116bb1f7300e5cdb87a41ce85b1efe79ec2
18 changes: 9 additions & 9 deletions trunk/drivers/net/wireless/iwlwifi/iwl-1000.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
static void iwl1000_set_ct_threshold(struct iwl_priv *priv)
{
/* want Celsius */
hw_params(priv).ct_kill_threshold = CT_KILL_THRESHOLD_LEGACY;
hw_params(priv).ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD;
priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD_LEGACY;
priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD;
}

/* NIC configuration for 1000 series */
Expand Down Expand Up @@ -122,20 +122,20 @@ static const struct iwl_sensitivity_ranges iwl1000_sensitivity = {

static void iwl1000_hw_set_hw_params(struct iwl_priv *priv)
{
hw_params(priv).ht40_channel = BIT(IEEE80211_BAND_2GHZ);
priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ);

hw_params(priv).tx_chains_num =
num_of_ant(hw_params(priv).valid_tx_ant);
priv->hw_params.tx_chains_num =
num_of_ant(priv->hw_params.valid_tx_ant);
if (cfg(priv)->rx_with_siso_diversity)
hw_params(priv).rx_chains_num = 1;
priv->hw_params.rx_chains_num = 1;
else
hw_params(priv).rx_chains_num =
num_of_ant(hw_params(priv).valid_rx_ant);
priv->hw_params.rx_chains_num =
num_of_ant(priv->hw_params.valid_rx_ant);

iwl1000_set_ct_threshold(priv);

/* Set initial sensitivity parameters */
hw_params(priv).sens = &iwl1000_sensitivity;
priv->hw_params.sens = &iwl1000_sensitivity;
}

static struct iwl_lib_ops iwl1000_lib = {
Expand Down
18 changes: 9 additions & 9 deletions trunk/drivers/net/wireless/iwlwifi/iwl-2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
static void iwl2000_set_ct_threshold(struct iwl_priv *priv)
{
/* want Celsius */
hw_params(priv).ct_kill_threshold = CT_KILL_THRESHOLD;
hw_params(priv).ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD;
priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD;
priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD;
}

/* NIC configuration for 2000 series */
Expand Down Expand Up @@ -116,20 +116,20 @@ static const struct iwl_sensitivity_ranges iwl2000_sensitivity = {

static void iwl2000_hw_set_hw_params(struct iwl_priv *priv)
{
hw_params(priv).ht40_channel = BIT(IEEE80211_BAND_2GHZ);
priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ);

hw_params(priv).tx_chains_num =
num_of_ant(hw_params(priv).valid_tx_ant);
priv->hw_params.tx_chains_num =
num_of_ant(priv->hw_params.valid_tx_ant);
if (cfg(priv)->rx_with_siso_diversity)
hw_params(priv).rx_chains_num = 1;
priv->hw_params.rx_chains_num = 1;
else
hw_params(priv).rx_chains_num =
num_of_ant(hw_params(priv).valid_rx_ant);
priv->hw_params.rx_chains_num =
num_of_ant(priv->hw_params.valid_rx_ant);

iwl2000_set_ct_threshold(priv);

/* Set initial sensitivity parameters */
hw_params(priv).sens = &iwl2000_sensitivity;
priv->hw_params.sens = &iwl2000_sensitivity;
}

static struct iwl_lib_ops iwl2000_lib = {
Expand Down
28 changes: 14 additions & 14 deletions trunk/drivers/net/wireless/iwlwifi/iwl-5000.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,45 +145,45 @@ static void iwl5150_set_ct_threshold(struct iwl_priv *priv)
s32 threshold = (s32)CELSIUS_TO_KELVIN(CT_KILL_THRESHOLD_LEGACY) -
iwl_temp_calib_to_offset(priv->shrd);

hw_params(priv).ct_kill_threshold = threshold * volt2temp_coef;
priv->hw_params.ct_kill_threshold = threshold * volt2temp_coef;
}

static void iwl5000_set_ct_threshold(struct iwl_priv *priv)
{
/* want Celsius */
hw_params(priv).ct_kill_threshold = CT_KILL_THRESHOLD_LEGACY;
priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD_LEGACY;
}

static void iwl5000_hw_set_hw_params(struct iwl_priv *priv)
{
hw_params(priv).ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
BIT(IEEE80211_BAND_5GHZ);

hw_params(priv).tx_chains_num =
num_of_ant(hw_params(priv).valid_tx_ant);
hw_params(priv).rx_chains_num =
num_of_ant(hw_params(priv).valid_rx_ant);
priv->hw_params.tx_chains_num =
num_of_ant(priv->hw_params.valid_tx_ant);
priv->hw_params.rx_chains_num =
num_of_ant(priv->hw_params.valid_rx_ant);

iwl5000_set_ct_threshold(priv);

/* Set initial sensitivity parameters */
hw_params(priv).sens = &iwl5000_sensitivity;
priv->hw_params.sens = &iwl5000_sensitivity;
}

static void iwl5150_hw_set_hw_params(struct iwl_priv *priv)
{
hw_params(priv).ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
BIT(IEEE80211_BAND_5GHZ);

hw_params(priv).tx_chains_num =
num_of_ant(hw_params(priv).valid_tx_ant);
hw_params(priv).rx_chains_num =
num_of_ant(hw_params(priv).valid_rx_ant);
priv->hw_params.tx_chains_num =
num_of_ant(priv->hw_params.valid_tx_ant);
priv->hw_params.rx_chains_num =
num_of_ant(priv->hw_params.valid_rx_ant);

iwl5150_set_ct_threshold(priv);

/* Set initial sensitivity parameters */
hw_params(priv).sens = &iwl5150_sensitivity;
priv->hw_params.sens = &iwl5150_sensitivity;
}

static void iwl5150_temperature(struct iwl_priv *priv)
Expand Down
18 changes: 9 additions & 9 deletions trunk/drivers/net/wireless/iwlwifi/iwl-6000.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@
static void iwl6000_set_ct_threshold(struct iwl_priv *priv)
{
/* want Celsius */
hw_params(priv).ct_kill_threshold = CT_KILL_THRESHOLD;
hw_params(priv).ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD;
priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD;
priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD;
}

static void iwl6050_additional_nic_config(struct iwl_priv *priv)
Expand Down Expand Up @@ -139,21 +139,21 @@ static const struct iwl_sensitivity_ranges iwl6000_sensitivity = {

static void iwl6000_hw_set_hw_params(struct iwl_priv *priv)
{
hw_params(priv).ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
BIT(IEEE80211_BAND_5GHZ);

hw_params(priv).tx_chains_num =
num_of_ant(hw_params(priv).valid_tx_ant);
priv->hw_params.tx_chains_num =
num_of_ant(priv->hw_params.valid_tx_ant);
if (cfg(priv)->rx_with_siso_diversity)
hw_params(priv).rx_chains_num = 1;
priv->hw_params.rx_chains_num = 1;
else
hw_params(priv).rx_chains_num =
num_of_ant(hw_params(priv).valid_rx_ant);
priv->hw_params.rx_chains_num =
num_of_ant(priv->hw_params.valid_rx_ant);

iwl6000_set_ct_threshold(priv);

/* Set initial sensitivity parameters */
hw_params(priv).sens = &iwl6000_sensitivity;
priv->hw_params.sens = &iwl6000_sensitivity;

}

Expand Down
22 changes: 11 additions & 11 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn-calib.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ static int iwl_sens_energy_cck(struct iwl_priv *priv,
u32 max_false_alarms = MAX_FA_CCK * rx_enable_time;
u32 min_false_alarms = MIN_FA_CCK * rx_enable_time;
struct iwl_sensitivity_data *data = NULL;
const struct iwl_sensitivity_ranges *ranges = hw_params(priv).sens;
const struct iwl_sensitivity_ranges *ranges = priv->hw_params.sens;

data = &(priv->sensitivity_data);

Expand Down Expand Up @@ -373,7 +373,7 @@ static int iwl_sens_auto_corr_ofdm(struct iwl_priv *priv,
u32 max_false_alarms = MAX_FA_OFDM * rx_enable_time;
u32 min_false_alarms = MIN_FA_OFDM * rx_enable_time;
struct iwl_sensitivity_data *data = NULL;
const struct iwl_sensitivity_ranges *ranges = hw_params(priv).sens;
const struct iwl_sensitivity_ranges *ranges = priv->hw_params.sens;

data = &(priv->sensitivity_data);

Expand Down Expand Up @@ -597,7 +597,7 @@ void iwl_init_sensitivity(struct iwl_priv *priv)
int ret = 0;
int i;
struct iwl_sensitivity_data *data = NULL;
const struct iwl_sensitivity_ranges *ranges = hw_params(priv).sens;
const struct iwl_sensitivity_ranges *ranges = priv->hw_params.sens;

if (priv->disable_sens_cal)
return;
Expand Down Expand Up @@ -833,28 +833,28 @@ static void iwl_find_disconn_antenna(struct iwl_priv *priv, u32* average_sig,
* To be safe, simply mask out any chains that we know
* are not on the device.
*/
active_chains &= hw_params(priv).valid_rx_ant;
active_chains &= priv->hw_params.valid_rx_ant;

num_tx_chains = 0;
for (i = 0; i < NUM_RX_CHAINS; i++) {
/* loops on all the bits of
* priv->hw_setting.valid_tx_ant */
u8 ant_msk = (1 << i);
if (!(hw_params(priv).valid_tx_ant & ant_msk))
if (!(priv->hw_params.valid_tx_ant & ant_msk))
continue;

num_tx_chains++;
if (data->disconn_array[i] == 0)
/* there is a Tx antenna connected */
break;
if (num_tx_chains == hw_params(priv).tx_chains_num &&
if (num_tx_chains == priv->hw_params.tx_chains_num &&
data->disconn_array[i]) {
/*
* If all chains are disconnected
* connect the first valid tx chain
*/
first_chain =
find_first_chain(hw_params(priv).valid_tx_ant);
find_first_chain(priv->hw_params.valid_tx_ant);
data->disconn_array[first_chain] = 0;
active_chains |= BIT(first_chain);
IWL_DEBUG_CALIB(priv,
Expand All @@ -864,13 +864,13 @@ static void iwl_find_disconn_antenna(struct iwl_priv *priv, u32* average_sig,
}
}

if (active_chains != hw_params(priv).valid_rx_ant &&
if (active_chains != priv->hw_params.valid_rx_ant &&
active_chains != priv->chain_noise_data.active_chains)
IWL_DEBUG_CALIB(priv,
"Detected that not all antennas are connected! "
"Connected: %#x, valid: %#x.\n",
active_chains,
hw_params(priv).valid_rx_ant);
priv->hw_params.valid_rx_ant);

/* Save for use within RXON, TX, SCAN commands, etc. */
data->active_chains = active_chains;
Expand Down Expand Up @@ -1055,7 +1055,7 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv)
cfg(priv)->bt_params->advanced_bt_coexist) {
/* Disable disconnected antenna algorithm for advanced
bt coex, assuming valid antennas are connected */
data->active_chains = hw_params(priv).valid_rx_ant;
data->active_chains = priv->hw_params.valid_rx_ant;
for (i = 0; i < NUM_RX_CHAINS; i++)
if (!(data->active_chains & (1<<i)))
data->disconn_array[i] = 1;
Expand Down Expand Up @@ -1085,7 +1085,7 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv)
min_average_noise, min_average_noise_antenna_i);

iwlagn_gain_computation(priv, average_noise,
find_first_chain(hw_params(priv).valid_rx_ant));
find_first_chain(priv->hw_params.valid_rx_ant));

/* Some power changes may have been made during the calibration.
* Update and commit the RXON
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ int iwlagn_txfifo_flush(struct iwl_priv *priv, u16 flush_control)
IWL_PAN_SCD_BK_MSK | IWL_PAN_SCD_MGMT_MSK |
IWL_PAN_SCD_MULTICAST_MSK;

if (hw_params(priv).sku & EEPROM_SKU_CAP_11N_ENABLE)
if (priv->hw_params.sku & EEPROM_SKU_CAP_11N_ENABLE)
flush_cmd.fifo_control |= IWL_AGG_TX_QUEUE_MSK;

IWL_DEBUG_INFO(priv, "fifo queue control: 0X%x\n",
Expand Down Expand Up @@ -868,7 +868,7 @@ void iwlagn_set_rxon_chain(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
if (priv->chain_noise_data.active_chains)
active_chains = priv->chain_noise_data.active_chains;
else
active_chains = hw_params(priv).valid_rx_ant;
active_chains = priv->hw_params.valid_rx_ant;

if (cfg(priv)->bt_params &&
cfg(priv)->bt_params->advanced_bt_coexist &&
Expand Down
Loading

0 comments on commit cd127ae

Please sign in to comment.