Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 265840
b: refs/heads/master
c: 10b15e6
h: refs/heads/master
v: v3
  • Loading branch information
Emmanuel Grumbach authored and John W. Linville committed Aug 29, 2011
1 parent 90aadbf commit f2d4f37
Show file tree
Hide file tree
Showing 14 changed files with 62 additions and 61 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: 63013ae30159c90d2a873e20e680e7810fa533fa
refs/heads/master: 10b15e6f67ba4d9abb8788100a5267341cc98b7b
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/iwlwifi/iwl-5000.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static void iwl5000_nic_config(struct iwl_priv *priv)

iwl_rf_config(priv);

spin_lock_irqsave(&priv->lock, flags);
spin_lock_irqsave(&priv->shrd->lock, flags);

/* W/A : NIC is stuck in a reset state after Early PCIe power off
* (PCIe power is lost before PERST# is asserted),
Expand All @@ -80,7 +80,7 @@ static void iwl5000_nic_config(struct iwl_priv *priv)
~APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS);


spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock_irqrestore(&priv->shrd->lock, flags);
}

static struct iwl_sensitivity_ranges iwl5000_sensitivity = {
Expand Down
14 changes: 7 additions & 7 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn-calib.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,13 +658,13 @@ void iwl_sensitivity_calibration(struct iwl_priv *priv)
return;
}

spin_lock_irqsave(&priv->lock, flags);
spin_lock_irqsave(&priv->shrd->lock, flags);
rx_info = &priv->statistics.rx_non_phy;
ofdm = &priv->statistics.rx_ofdm;
cck = &priv->statistics.rx_cck;
if (rx_info->interference_data_flag != INTERFERENCE_DATA_AVAILABLE) {
IWL_DEBUG_CALIB(priv, "<< invalid data.\n");
spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock_irqrestore(&priv->shrd->lock, flags);
return;
}

Expand All @@ -688,7 +688,7 @@ void iwl_sensitivity_calibration(struct iwl_priv *priv)
statis.beacon_energy_c =
le32_to_cpu(rx_info->beacon_energy_c);

spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock_irqrestore(&priv->shrd->lock, flags);

IWL_DEBUG_CALIB(priv, "rx_enable_time = %u usecs\n", rx_enable_time);

Expand Down Expand Up @@ -976,13 +976,13 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv)
return;
}

spin_lock_irqsave(&priv->lock, flags);
spin_lock_irqsave(&priv->shrd->lock, flags);

rx_info = &priv->statistics.rx_non_phy;

if (rx_info->interference_data_flag != INTERFERENCE_DATA_AVAILABLE) {
IWL_DEBUG_CALIB(priv, " << Interference data unavailable\n");
spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock_irqrestore(&priv->shrd->lock, flags);
return;
}

Expand All @@ -997,7 +997,7 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv)
if ((rxon_chnum != stat_chnum) || (rxon_band24 != stat_band24)) {
IWL_DEBUG_CALIB(priv, "Stats not from chan=%d, band24=%d\n",
rxon_chnum, rxon_band24);
spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock_irqrestore(&priv->shrd->lock, flags);
return;
}

Expand All @@ -1016,7 +1016,7 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv)
chain_sig_b = le32_to_cpu(rx_info->beacon_rssi_b) & IN_BAND_FILTER;
chain_sig_c = le32_to_cpu(rx_info->beacon_rssi_c) & IN_BAND_FILTER;

spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock_irqrestore(&priv->shrd->lock, flags);

data->beacon_count++;

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 @@ -1673,9 +1673,9 @@ void iwlagn_bt_coex_profile_notif(struct iwl_priv *priv,

/* FIXME: based on notification, adjust the prio_boost */

spin_lock_irqsave(&priv->lock, flags);
spin_lock_irqsave(&priv->shrd->lock, flags);
priv->bt_ci_compliance = coex->bt_ci_compliance;
spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock_irqrestore(&priv->shrd->lock, flags);
}

void iwlagn_bt_rx_handler_setup(struct iwl_priv *priv)
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
Original file line number Diff line number Diff line change
Expand Up @@ -877,12 +877,12 @@ static void rs_bt_update_lq(struct iwl_priv *priv, struct iwl_rxon_context *ctx,
* Is there a need to switch between
* full concurrency and 3-wire?
*/
spin_lock_irqsave(&priv->lock, flags);
spin_lock_irqsave(&priv->shrd->lock, flags);
if (priv->bt_ci_compliance && priv->bt_ant_couple_ok)
full_concurrent = true;
else
full_concurrent = false;
spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock_irqrestore(&priv->shrd->lock, flags);
}
if ((priv->bt_traffic_load != priv->last_bt_traffic_load) ||
(priv->bt_full_concurrent != full_concurrent)) {
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
goto out;
}

spin_lock_irqsave(&priv->lock, flags);
spin_lock_irqsave(&priv->shrd->lock, flags);

for_each_context(priv, ctx) {
/* Configure HT40 channels */
Expand Down Expand Up @@ -620,7 +620,7 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
ctx->vif);
}

spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock_irqrestore(&priv->shrd->lock, flags);

iwl_update_bcast_stations(priv);

Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
if (info->control.vif)
ctx = iwl_rxon_ctx_from_vif(info->control.vif);

spin_lock_irqsave(&priv->lock, flags);
spin_lock_irqsave(&priv->shrd->lock, flags);
if (iwl_is_rfkill(priv)) {
IWL_DEBUG_DROP(priv, "Dropping - RF KILL\n");
goto drop_unlock_priv;
Expand Down Expand Up @@ -404,7 +404,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
else
txq_id = ctx->ac_to_queue[skb_get_queue_mapping(skb)];

/* irqs already disabled/saved above when locking priv->lock */
/* irqs already disabled/saved above when locking priv->shrd->lock */
spin_lock(&priv->sta_lock);

if (ieee80211_is_data_qos(fc)) {
Expand Down Expand Up @@ -461,7 +461,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
}

spin_unlock(&priv->sta_lock);
spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock_irqrestore(&priv->shrd->lock, flags);

/*
* Avoid atomic ops if it isn't an associated client.
Expand All @@ -478,7 +478,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
drop_unlock_sta:
spin_unlock(&priv->sta_lock);
drop_unlock_priv:
spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock_irqrestore(&priv->shrd->lock, flags);
return -1;
}

Expand Down Expand Up @@ -620,7 +620,7 @@ int iwlagn_tx_agg_stop(struct iwl_priv *priv, struct ieee80211_vif *vif,

/* do not restore/save irqs */
spin_unlock(&priv->sta_lock);
spin_lock(&priv->lock);
spin_lock(&priv->shrd->lock);

/*
* the only reason this call can fail is queue number out of range,
Expand All @@ -630,7 +630,7 @@ int iwlagn_tx_agg_stop(struct iwl_priv *priv, struct ieee80211_vif *vif,
* mac80211 to clean up it own data.
*/
trans_txq_agg_disable(&priv->trans, txq_id, ssn, tx_fifo_id);
spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock_irqrestore(&priv->shrd->lock, flags);

ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid);

Expand Down
14 changes: 7 additions & 7 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1673,10 +1673,10 @@ static void iwl_rf_kill_ct_config(struct iwl_priv *priv)
unsigned long flags;
int ret = 0;

spin_lock_irqsave(&priv->lock, flags);
spin_lock_irqsave(&priv->shrd->lock, flags);
iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR,
CSR_UCODE_DRV_GP1_REG_BIT_CT_KILL_EXIT);
spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock_irqrestore(&priv->shrd->lock, flags);
priv->thermal_throttle.ct_kill_toggle = false;

if (priv->cfg->base_params->support_ct_kill_exit) {
Expand Down Expand Up @@ -3083,7 +3083,7 @@ static void iwlagn_mac_channel_switch(struct ieee80211_hw *hw,
goto out;
}

spin_lock_irq(&priv->lock);
spin_lock_irq(&priv->shrd->lock);

priv->current_ht_config.smps = conf->smps_mode;

Expand Down Expand Up @@ -3113,7 +3113,7 @@ static void iwlagn_mac_channel_switch(struct ieee80211_hw *hw,
iwl_set_rxon_ht(priv, ht_conf);
iwl_set_flags_for_band(priv, ctx, channel->band, ctx->vif);

spin_unlock_irq(&priv->lock);
spin_unlock_irq(&priv->shrd->lock);

iwl_set_rate(priv);
/*
Expand Down Expand Up @@ -3640,7 +3640,7 @@ int iwl_probe(struct iwl_bus *bus, struct iwl_cfg *cfg)
* we should init now
*/
spin_lock_init(&priv->reg_lock);
spin_lock_init(&priv->lock);
spin_lock_init(&priv->shrd->lock);

/*
* stop and reset the on-board processor just in case it is in a
Expand Down Expand Up @@ -3796,9 +3796,9 @@ void __devexit iwl_remove(struct iwl_priv * priv)
/* make sure we flush any pending irq or
* tasklet for the driver
*/
spin_lock_irqsave(&priv->lock, flags);
spin_lock_irqsave(&priv->shrd->lock, flags);
iwl_disable_interrupts(priv);
spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock_irqrestore(&priv->shrd->lock, flags);

trans_sync_irq(&priv->trans);

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/iwlwifi/iwl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,7 @@ int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,

q = AC_NUM - 1 - queue;

spin_lock_irqsave(&priv->lock, flags);
spin_lock_irqsave(&priv->shrd->lock, flags);

/*
* MULTI-FIXME
Expand All @@ -1204,7 +1204,7 @@ int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
ctx->qos_data.def_qos_parm.ac[q].reserved1 = 0;
}

spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock_irqrestore(&priv->shrd->lock, flags);

IWL_DEBUG_MAC80211(priv, "leave\n");
return 0;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/wireless/iwlwifi/iwl-dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,6 @@ struct iwl_priv {
u8 mgmt_tx_ant;

/* spinlock */
spinlock_t lock; /* protect general shared data */
spinlock_t hcmd_lock; /* protect hcmd */
spinlock_t reg_lock; /* protect hw register access */
struct mutex mutex;
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ struct iwl_hw_params {
* @priv: pointer to the upper layer data
* @hw_params: see struct iwl_hw_params
* @workqueue: the workqueue used by all the layers of the driver
* @lock: protect general shared data
*/
struct iwl_shared {
#ifdef CONFIG_IWLWIFI_DEBUG
Expand All @@ -163,6 +164,7 @@ struct iwl_shared {
struct iwl_hw_params hw_params;

struct workqueue_struct *workqueue;
spinlock_t lock;
};

/*Whatever _m is (iwl_trans, iwl_priv, iwl_bus, these macros will work */
Expand Down
28 changes: 14 additions & 14 deletions trunk/drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,9 @@ void iwlagn_rx_replenish(struct iwl_priv *priv)

iwlagn_rx_allocate(priv, GFP_KERNEL);

spin_lock_irqsave(&priv->lock, flags);
spin_lock_irqsave(&priv->shrd->lock, flags);
iwlagn_rx_queue_restock(priv);
spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock_irqrestore(&priv->shrd->lock, flags);
}

static void iwlagn_rx_replenish_now(struct iwl_priv *priv)
Expand Down Expand Up @@ -499,7 +499,7 @@ void iwl_irq_tasklet(struct iwl_priv *priv)
u32 inta_mask;
#endif

spin_lock_irqsave(&priv->lock, flags);
spin_lock_irqsave(&priv->shrd->lock, flags);

/* Ack/clear/reset pending uCode interrupts.
* Note: Some bits in CSR_INT are "OR" of bits in CSR_FH_INT_STATUS,
Expand All @@ -525,7 +525,7 @@ void iwl_irq_tasklet(struct iwl_priv *priv)
}
#endif

spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock_irqrestore(&priv->shrd->lock, flags);

/* saved interrupt in inta variable now we can reset priv->inta */
priv->inta = 0;
Expand Down Expand Up @@ -774,7 +774,7 @@ int iwl_reset_ict(struct iwl_priv *priv)
if (!priv->ict_tbl_vir)
return 0;

spin_lock_irqsave(&priv->lock, flags);
spin_lock_irqsave(&priv->shrd->lock, flags);
iwl_disable_interrupts(priv);

memset(&priv->ict_tbl[0], 0, sizeof(u32) * ICT_COUNT);
Expand All @@ -794,7 +794,7 @@ int iwl_reset_ict(struct iwl_priv *priv)
priv->ict_index = 0;
iwl_write32(priv, CSR_INT, priv->inta_mask);
iwl_enable_interrupts(priv);
spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock_irqrestore(&priv->shrd->lock, flags);

return 0;
}
Expand All @@ -804,9 +804,9 @@ void iwl_disable_ict(struct iwl_priv *priv)
{
unsigned long flags;

spin_lock_irqsave(&priv->lock, flags);
spin_lock_irqsave(&priv->shrd->lock, flags);
priv->use_ict = false;
spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock_irqrestore(&priv->shrd->lock, flags);
}

static irqreturn_t iwl_isr(int irq, void *data)
Expand All @@ -820,7 +820,7 @@ static irqreturn_t iwl_isr(int irq, void *data)
if (!priv)
return IRQ_NONE;

spin_lock_irqsave(&priv->lock, flags);
spin_lock_irqsave(&priv->shrd->lock, flags);

/* Disable (but don't clear!) interrupts here to avoid
* back-to-back ISRs and sporadic interrupts from our NIC.
Expand Down Expand Up @@ -864,7 +864,7 @@ static irqreturn_t iwl_isr(int irq, void *data)
iwl_enable_interrupts(priv);

unplugged:
spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock_irqrestore(&priv->shrd->lock, flags);
return IRQ_HANDLED;

none:
Expand All @@ -873,7 +873,7 @@ static irqreturn_t iwl_isr(int irq, void *data)
if (test_bit(STATUS_INT_ENABLED, &priv->shrd->status) && !priv->inta)
iwl_enable_interrupts(priv);

spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock_irqrestore(&priv->shrd->lock, flags);
return IRQ_NONE;
}

Expand Down Expand Up @@ -901,7 +901,7 @@ irqreturn_t iwl_isr_ict(int irq, void *data)
if (!priv->use_ict)
return iwl_isr(irq, data);

spin_lock_irqsave(&priv->lock, flags);
spin_lock_irqsave(&priv->shrd->lock, flags);

/* Disable (but don't clear!) interrupts here to avoid
* back-to-back ISRs and sporadic interrupts from our NIC.
Expand Down Expand Up @@ -967,7 +967,7 @@ irqreturn_t iwl_isr_ict(int irq, void *data)
iwl_enable_interrupts(priv);
}

spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock_irqrestore(&priv->shrd->lock, flags);
return IRQ_HANDLED;

none:
Expand All @@ -977,6 +977,6 @@ irqreturn_t iwl_isr_ict(int irq, void *data)
if (test_bit(STATUS_INT_ENABLED, &priv->shrd->status) && !priv->inta)
iwl_enable_interrupts(priv);

spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock_irqrestore(&priv->shrd->lock, flags);
return IRQ_NONE;
}
Loading

0 comments on commit f2d4f37

Please sign in to comment.