aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2011-08-26 02:10:43 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-08-29 15:25:31 -0400
commit10b15e6f67ba4d9abb8788100a5267341cc98b7b (patch)
treeca9f512e2d2d6c1311c65ad508cec1c169cd6987 /drivers/net/wireless
parent63013ae30159c90d2a873e20e680e7810fa533fa (diff)
iwlagn: priv->lock moves to iwl_shared
Since it is used by all the layers, it needs to move to iwl_shared. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-calib.c14
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-lib.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rxon.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-tx.c12
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c14
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-shared.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c28
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans.c26
13 files changed, 61 insertions, 60 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index e073422edab4..feefb5b0987c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -69,7 +69,7 @@ static void iwl5000_nic_config(struct iwl_priv *priv)
69 69
70 iwl_rf_config(priv); 70 iwl_rf_config(priv);
71 71
72 spin_lock_irqsave(&priv->lock, flags); 72 spin_lock_irqsave(&priv->shrd->lock, flags);
73 73
74 /* W/A : NIC is stuck in a reset state after Early PCIe power off 74 /* W/A : NIC is stuck in a reset state after Early PCIe power off
75 * (PCIe power is lost before PERST# is asserted), 75 * (PCIe power is lost before PERST# is asserted),
@@ -80,7 +80,7 @@ static void iwl5000_nic_config(struct iwl_priv *priv)
80 ~APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS); 80 ~APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS);
81 81
82 82
83 spin_unlock_irqrestore(&priv->lock, flags); 83 spin_unlock_irqrestore(&priv->shrd->lock, flags);
84} 84}
85 85
86static struct iwl_sensitivity_ranges iwl5000_sensitivity = { 86static struct iwl_sensitivity_ranges iwl5000_sensitivity = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-calib.c b/drivers/net/wireless/iwlwifi/iwl-agn-calib.c
index f0e38a14053a..fb6da14bef4e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-calib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-calib.c
@@ -658,13 +658,13 @@ void iwl_sensitivity_calibration(struct iwl_priv *priv)
658 return; 658 return;
659 } 659 }
660 660
661 spin_lock_irqsave(&priv->lock, flags); 661 spin_lock_irqsave(&priv->shrd->lock, flags);
662 rx_info = &priv->statistics.rx_non_phy; 662 rx_info = &priv->statistics.rx_non_phy;
663 ofdm = &priv->statistics.rx_ofdm; 663 ofdm = &priv->statistics.rx_ofdm;
664 cck = &priv->statistics.rx_cck; 664 cck = &priv->statistics.rx_cck;
665 if (rx_info->interference_data_flag != INTERFERENCE_DATA_AVAILABLE) { 665 if (rx_info->interference_data_flag != INTERFERENCE_DATA_AVAILABLE) {
666 IWL_DEBUG_CALIB(priv, "<< invalid data.\n"); 666 IWL_DEBUG_CALIB(priv, "<< invalid data.\n");
667 spin_unlock_irqrestore(&priv->lock, flags); 667 spin_unlock_irqrestore(&priv->shrd->lock, flags);
668 return; 668 return;
669 } 669 }
670 670
@@ -688,7 +688,7 @@ void iwl_sensitivity_calibration(struct iwl_priv *priv)
688 statis.beacon_energy_c = 688 statis.beacon_energy_c =
689 le32_to_cpu(rx_info->beacon_energy_c); 689 le32_to_cpu(rx_info->beacon_energy_c);
690 690
691 spin_unlock_irqrestore(&priv->lock, flags); 691 spin_unlock_irqrestore(&priv->shrd->lock, flags);
692 692
693 IWL_DEBUG_CALIB(priv, "rx_enable_time = %u usecs\n", rx_enable_time); 693 IWL_DEBUG_CALIB(priv, "rx_enable_time = %u usecs\n", rx_enable_time);
694 694
@@ -976,13 +976,13 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv)
976 return; 976 return;
977 } 977 }
978 978
979 spin_lock_irqsave(&priv->lock, flags); 979 spin_lock_irqsave(&priv->shrd->lock, flags);
980 980
981 rx_info = &priv->statistics.rx_non_phy; 981 rx_info = &priv->statistics.rx_non_phy;
982 982
983 if (rx_info->interference_data_flag != INTERFERENCE_DATA_AVAILABLE) { 983 if (rx_info->interference_data_flag != INTERFERENCE_DATA_AVAILABLE) {
984 IWL_DEBUG_CALIB(priv, " << Interference data unavailable\n"); 984 IWL_DEBUG_CALIB(priv, " << Interference data unavailable\n");
985 spin_unlock_irqrestore(&priv->lock, flags); 985 spin_unlock_irqrestore(&priv->shrd->lock, flags);
986 return; 986 return;
987 } 987 }
988 988
@@ -997,7 +997,7 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv)
997 if ((rxon_chnum != stat_chnum) || (rxon_band24 != stat_band24)) { 997 if ((rxon_chnum != stat_chnum) || (rxon_band24 != stat_band24)) {
998 IWL_DEBUG_CALIB(priv, "Stats not from chan=%d, band24=%d\n", 998 IWL_DEBUG_CALIB(priv, "Stats not from chan=%d, band24=%d\n",
999 rxon_chnum, rxon_band24); 999 rxon_chnum, rxon_band24);
1000 spin_unlock_irqrestore(&priv->lock, flags); 1000 spin_unlock_irqrestore(&priv->shrd->lock, flags);
1001 return; 1001 return;
1002 } 1002 }
1003 1003
@@ -1016,7 +1016,7 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv)
1016 chain_sig_b = le32_to_cpu(rx_info->beacon_rssi_b) & IN_BAND_FILTER; 1016 chain_sig_b = le32_to_cpu(rx_info->beacon_rssi_b) & IN_BAND_FILTER;
1017 chain_sig_c = le32_to_cpu(rx_info->beacon_rssi_c) & IN_BAND_FILTER; 1017 chain_sig_c = le32_to_cpu(rx_info->beacon_rssi_c) & IN_BAND_FILTER;
1018 1018
1019 spin_unlock_irqrestore(&priv->lock, flags); 1019 spin_unlock_irqrestore(&priv->shrd->lock, flags);
1020 1020
1021 data->beacon_count++; 1021 data->beacon_count++;
1022 1022
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index 7c3e3eace955..7ace5078cc99 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -1673,9 +1673,9 @@ void iwlagn_bt_coex_profile_notif(struct iwl_priv *priv,
1673 1673
1674 /* FIXME: based on notification, adjust the prio_boost */ 1674 /* FIXME: based on notification, adjust the prio_boost */
1675 1675
1676 spin_lock_irqsave(&priv->lock, flags); 1676 spin_lock_irqsave(&priv->shrd->lock, flags);
1677 priv->bt_ci_compliance = coex->bt_ci_compliance; 1677 priv->bt_ci_compliance = coex->bt_ci_compliance;
1678 spin_unlock_irqrestore(&priv->lock, flags); 1678 spin_unlock_irqrestore(&priv->shrd->lock, flags);
1679} 1679}
1680 1680
1681void iwlagn_bt_rx_handler_setup(struct iwl_priv *priv) 1681void iwlagn_bt_rx_handler_setup(struct iwl_priv *priv)
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 6812409a57c4..cff6442ab0c0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -877,12 +877,12 @@ static void rs_bt_update_lq(struct iwl_priv *priv, struct iwl_rxon_context *ctx,
877 * Is there a need to switch between 877 * Is there a need to switch between
878 * full concurrency and 3-wire? 878 * full concurrency and 3-wire?
879 */ 879 */
880 spin_lock_irqsave(&priv->lock, flags); 880 spin_lock_irqsave(&priv->shrd->lock, flags);
881 if (priv->bt_ci_compliance && priv->bt_ant_couple_ok) 881 if (priv->bt_ci_compliance && priv->bt_ant_couple_ok)
882 full_concurrent = true; 882 full_concurrent = true;
883 else 883 else
884 full_concurrent = false; 884 full_concurrent = false;
885 spin_unlock_irqrestore(&priv->lock, flags); 885 spin_unlock_irqrestore(&priv->shrd->lock, flags);
886 } 886 }
887 if ((priv->bt_traffic_load != priv->last_bt_traffic_load) || 887 if ((priv->bt_traffic_load != priv->last_bt_traffic_load) ||
888 (priv->bt_full_concurrent != full_concurrent)) { 888 (priv->bt_full_concurrent != full_concurrent)) {
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
index e74c2429c1c8..fadfc38b87bf 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
@@ -576,7 +576,7 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
576 goto out; 576 goto out;
577 } 577 }
578 578
579 spin_lock_irqsave(&priv->lock, flags); 579 spin_lock_irqsave(&priv->shrd->lock, flags);
580 580
581 for_each_context(priv, ctx) { 581 for_each_context(priv, ctx) {
582 /* Configure HT40 channels */ 582 /* Configure HT40 channels */
@@ -620,7 +620,7 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
620 ctx->vif); 620 ctx->vif);
621 } 621 }
622 622
623 spin_unlock_irqrestore(&priv->lock, flags); 623 spin_unlock_irqrestore(&priv->shrd->lock, flags);
624 624
625 iwl_update_bcast_stations(priv); 625 iwl_update_bcast_stations(priv);
626 626
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index 3e2a9040de1b..89d7b30525f9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -336,7 +336,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
336 if (info->control.vif) 336 if (info->control.vif)
337 ctx = iwl_rxon_ctx_from_vif(info->control.vif); 337 ctx = iwl_rxon_ctx_from_vif(info->control.vif);
338 338
339 spin_lock_irqsave(&priv->lock, flags); 339 spin_lock_irqsave(&priv->shrd->lock, flags);
340 if (iwl_is_rfkill(priv)) { 340 if (iwl_is_rfkill(priv)) {
341 IWL_DEBUG_DROP(priv, "Dropping - RF KILL\n"); 341 IWL_DEBUG_DROP(priv, "Dropping - RF KILL\n");
342 goto drop_unlock_priv; 342 goto drop_unlock_priv;
@@ -404,7 +404,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
404 else 404 else
405 txq_id = ctx->ac_to_queue[skb_get_queue_mapping(skb)]; 405 txq_id = ctx->ac_to_queue[skb_get_queue_mapping(skb)];
406 406
407 /* irqs already disabled/saved above when locking priv->lock */ 407 /* irqs already disabled/saved above when locking priv->shrd->lock */
408 spin_lock(&priv->sta_lock); 408 spin_lock(&priv->sta_lock);
409 409
410 if (ieee80211_is_data_qos(fc)) { 410 if (ieee80211_is_data_qos(fc)) {
@@ -461,7 +461,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
461 } 461 }
462 462
463 spin_unlock(&priv->sta_lock); 463 spin_unlock(&priv->sta_lock);
464 spin_unlock_irqrestore(&priv->lock, flags); 464 spin_unlock_irqrestore(&priv->shrd->lock, flags);
465 465
466 /* 466 /*
467 * Avoid atomic ops if it isn't an associated client. 467 * Avoid atomic ops if it isn't an associated client.
@@ -478,7 +478,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
478drop_unlock_sta: 478drop_unlock_sta:
479 spin_unlock(&priv->sta_lock); 479 spin_unlock(&priv->sta_lock);
480drop_unlock_priv: 480drop_unlock_priv:
481 spin_unlock_irqrestore(&priv->lock, flags); 481 spin_unlock_irqrestore(&priv->shrd->lock, flags);
482 return -1; 482 return -1;
483} 483}
484 484
@@ -620,7 +620,7 @@ int iwlagn_tx_agg_stop(struct iwl_priv *priv, struct ieee80211_vif *vif,
620 620
621 /* do not restore/save irqs */ 621 /* do not restore/save irqs */
622 spin_unlock(&priv->sta_lock); 622 spin_unlock(&priv->sta_lock);
623 spin_lock(&priv->lock); 623 spin_lock(&priv->shrd->lock);
624 624
625 /* 625 /*
626 * the only reason this call can fail is queue number out of range, 626 * the only reason this call can fail is queue number out of range,
@@ -630,7 +630,7 @@ int iwlagn_tx_agg_stop(struct iwl_priv *priv, struct ieee80211_vif *vif,
630 * mac80211 to clean up it own data. 630 * mac80211 to clean up it own data.
631 */ 631 */
632 trans_txq_agg_disable(&priv->trans, txq_id, ssn, tx_fifo_id); 632 trans_txq_agg_disable(&priv->trans, txq_id, ssn, tx_fifo_id);
633 spin_unlock_irqrestore(&priv->lock, flags); 633 spin_unlock_irqrestore(&priv->shrd->lock, flags);
634 634
635 ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid); 635 ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid);
636 636
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index e77c4c47762b..6d2c13e7f51b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -1673,10 +1673,10 @@ static void iwl_rf_kill_ct_config(struct iwl_priv *priv)
1673 unsigned long flags; 1673 unsigned long flags;
1674 int ret = 0; 1674 int ret = 0;
1675 1675
1676 spin_lock_irqsave(&priv->lock, flags); 1676 spin_lock_irqsave(&priv->shrd->lock, flags);
1677 iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR, 1677 iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR,
1678 CSR_UCODE_DRV_GP1_REG_BIT_CT_KILL_EXIT); 1678 CSR_UCODE_DRV_GP1_REG_BIT_CT_KILL_EXIT);
1679 spin_unlock_irqrestore(&priv->lock, flags); 1679 spin_unlock_irqrestore(&priv->shrd->lock, flags);
1680 priv->thermal_throttle.ct_kill_toggle = false; 1680 priv->thermal_throttle.ct_kill_toggle = false;
1681 1681
1682 if (priv->cfg->base_params->support_ct_kill_exit) { 1682 if (priv->cfg->base_params->support_ct_kill_exit) {
@@ -3083,7 +3083,7 @@ static void iwlagn_mac_channel_switch(struct ieee80211_hw *hw,
3083 goto out; 3083 goto out;
3084 } 3084 }
3085 3085
3086 spin_lock_irq(&priv->lock); 3086 spin_lock_irq(&priv->shrd->lock);
3087 3087
3088 priv->current_ht_config.smps = conf->smps_mode; 3088 priv->current_ht_config.smps = conf->smps_mode;
3089 3089
@@ -3113,7 +3113,7 @@ static void iwlagn_mac_channel_switch(struct ieee80211_hw *hw,
3113 iwl_set_rxon_ht(priv, ht_conf); 3113 iwl_set_rxon_ht(priv, ht_conf);
3114 iwl_set_flags_for_band(priv, ctx, channel->band, ctx->vif); 3114 iwl_set_flags_for_band(priv, ctx, channel->band, ctx->vif);
3115 3115
3116 spin_unlock_irq(&priv->lock); 3116 spin_unlock_irq(&priv->shrd->lock);
3117 3117
3118 iwl_set_rate(priv); 3118 iwl_set_rate(priv);
3119 /* 3119 /*
@@ -3640,7 +3640,7 @@ int iwl_probe(struct iwl_bus *bus, struct iwl_cfg *cfg)
3640 * we should init now 3640 * we should init now
3641 */ 3641 */
3642 spin_lock_init(&priv->reg_lock); 3642 spin_lock_init(&priv->reg_lock);
3643 spin_lock_init(&priv->lock); 3643 spin_lock_init(&priv->shrd->lock);
3644 3644
3645 /* 3645 /*
3646 * stop and reset the on-board processor just in case it is in a 3646 * stop and reset the on-board processor just in case it is in a
@@ -3796,9 +3796,9 @@ void __devexit iwl_remove(struct iwl_priv * priv)
3796 /* make sure we flush any pending irq or 3796 /* make sure we flush any pending irq or
3797 * tasklet for the driver 3797 * tasklet for the driver
3798 */ 3798 */
3799 spin_lock_irqsave(&priv->lock, flags); 3799 spin_lock_irqsave(&priv->shrd->lock, flags);
3800 iwl_disable_interrupts(priv); 3800 iwl_disable_interrupts(priv);
3801 spin_unlock_irqrestore(&priv->lock, flags); 3801 spin_unlock_irqrestore(&priv->shrd->lock, flags);
3802 3802
3803 trans_sync_irq(&priv->trans); 3803 trans_sync_irq(&priv->trans);
3804 3804
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index a5a694daddde..40ad889264a9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1186,7 +1186,7 @@ int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
1186 1186
1187 q = AC_NUM - 1 - queue; 1187 q = AC_NUM - 1 - queue;
1188 1188
1189 spin_lock_irqsave(&priv->lock, flags); 1189 spin_lock_irqsave(&priv->shrd->lock, flags);
1190 1190
1191 /* 1191 /*
1192 * MULTI-FIXME 1192 * MULTI-FIXME
@@ -1204,7 +1204,7 @@ int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
1204 ctx->qos_data.def_qos_parm.ac[q].reserved1 = 0; 1204 ctx->qos_data.def_qos_parm.ac[q].reserved1 = 0;
1205 } 1205 }
1206 1206
1207 spin_unlock_irqrestore(&priv->lock, flags); 1207 spin_unlock_irqrestore(&priv->shrd->lock, flags);
1208 1208
1209 IWL_DEBUG_MAC80211(priv, "leave\n"); 1209 IWL_DEBUG_MAC80211(priv, "leave\n");
1210 return 0; 1210 return 0;
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index bf166bcb0080..c60a24232d6b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -1226,7 +1226,6 @@ struct iwl_priv {
1226 u8 mgmt_tx_ant; 1226 u8 mgmt_tx_ant;
1227 1227
1228 /* spinlock */ 1228 /* spinlock */
1229 spinlock_t lock; /* protect general shared data */
1230 spinlock_t hcmd_lock; /* protect hcmd */ 1229 spinlock_t hcmd_lock; /* protect hcmd */
1231 spinlock_t reg_lock; /* protect hw register access */ 1230 spinlock_t reg_lock; /* protect hw register access */
1232 struct mutex mutex; 1231 struct mutex mutex;
diff --git a/drivers/net/wireless/iwlwifi/iwl-shared.h b/drivers/net/wireless/iwlwifi/iwl-shared.h
index 74ff711c7212..1c2c31c15f60 100644
--- a/drivers/net/wireless/iwlwifi/iwl-shared.h
+++ b/drivers/net/wireless/iwlwifi/iwl-shared.h
@@ -149,6 +149,7 @@ struct iwl_hw_params {
149 * @priv: pointer to the upper layer data 149 * @priv: pointer to the upper layer data
150 * @hw_params: see struct iwl_hw_params 150 * @hw_params: see struct iwl_hw_params
151 * @workqueue: the workqueue used by all the layers of the driver 151 * @workqueue: the workqueue used by all the layers of the driver
152 * @lock: protect general shared data
152 */ 153 */
153struct iwl_shared { 154struct iwl_shared {
154#ifdef CONFIG_IWLWIFI_DEBUG 155#ifdef CONFIG_IWLWIFI_DEBUG
@@ -163,6 +164,7 @@ struct iwl_shared {
163 struct iwl_hw_params hw_params; 164 struct iwl_hw_params hw_params;
164 165
165 struct workqueue_struct *workqueue; 166 struct workqueue_struct *workqueue;
167 spinlock_t lock;
166}; 168};
167 169
168/*Whatever _m is (iwl_trans, iwl_priv, iwl_bus, these macros will work */ 170/*Whatever _m is (iwl_trans, iwl_priv, iwl_bus, these macros will work */
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c
index 0b798153f0df..26497dd454a6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c
@@ -329,9 +329,9 @@ void iwlagn_rx_replenish(struct iwl_priv *priv)
329 329
330 iwlagn_rx_allocate(priv, GFP_KERNEL); 330 iwlagn_rx_allocate(priv, GFP_KERNEL);
331 331
332 spin_lock_irqsave(&priv->lock, flags); 332 spin_lock_irqsave(&priv->shrd->lock, flags);
333 iwlagn_rx_queue_restock(priv); 333 iwlagn_rx_queue_restock(priv);
334 spin_unlock_irqrestore(&priv->lock, flags); 334 spin_unlock_irqrestore(&priv->shrd->lock, flags);
335} 335}
336 336
337static void iwlagn_rx_replenish_now(struct iwl_priv *priv) 337static void iwlagn_rx_replenish_now(struct iwl_priv *priv)
@@ -499,7 +499,7 @@ void iwl_irq_tasklet(struct iwl_priv *priv)
499 u32 inta_mask; 499 u32 inta_mask;
500#endif 500#endif
501 501
502 spin_lock_irqsave(&priv->lock, flags); 502 spin_lock_irqsave(&priv->shrd->lock, flags);
503 503
504 /* Ack/clear/reset pending uCode interrupts. 504 /* Ack/clear/reset pending uCode interrupts.
505 * Note: Some bits in CSR_INT are "OR" of bits in CSR_FH_INT_STATUS, 505 * Note: Some bits in CSR_INT are "OR" of bits in CSR_FH_INT_STATUS,
@@ -525,7 +525,7 @@ void iwl_irq_tasklet(struct iwl_priv *priv)
525 } 525 }
526#endif 526#endif
527 527
528 spin_unlock_irqrestore(&priv->lock, flags); 528 spin_unlock_irqrestore(&priv->shrd->lock, flags);
529 529
530 /* saved interrupt in inta variable now we can reset priv->inta */ 530 /* saved interrupt in inta variable now we can reset priv->inta */
531 priv->inta = 0; 531 priv->inta = 0;
@@ -774,7 +774,7 @@ int iwl_reset_ict(struct iwl_priv *priv)
774 if (!priv->ict_tbl_vir) 774 if (!priv->ict_tbl_vir)
775 return 0; 775 return 0;
776 776
777 spin_lock_irqsave(&priv->lock, flags); 777 spin_lock_irqsave(&priv->shrd->lock, flags);
778 iwl_disable_interrupts(priv); 778 iwl_disable_interrupts(priv);
779 779
780 memset(&priv->ict_tbl[0], 0, sizeof(u32) * ICT_COUNT); 780 memset(&priv->ict_tbl[0], 0, sizeof(u32) * ICT_COUNT);
@@ -794,7 +794,7 @@ int iwl_reset_ict(struct iwl_priv *priv)
794 priv->ict_index = 0; 794 priv->ict_index = 0;
795 iwl_write32(priv, CSR_INT, priv->inta_mask); 795 iwl_write32(priv, CSR_INT, priv->inta_mask);
796 iwl_enable_interrupts(priv); 796 iwl_enable_interrupts(priv);
797 spin_unlock_irqrestore(&priv->lock, flags); 797 spin_unlock_irqrestore(&priv->shrd->lock, flags);
798 798
799 return 0; 799 return 0;
800} 800}
@@ -804,9 +804,9 @@ void iwl_disable_ict(struct iwl_priv *priv)
804{ 804{
805 unsigned long flags; 805 unsigned long flags;
806 806
807 spin_lock_irqsave(&priv->lock, flags); 807 spin_lock_irqsave(&priv->shrd->lock, flags);
808 priv->use_ict = false; 808 priv->use_ict = false;
809 spin_unlock_irqrestore(&priv->lock, flags); 809 spin_unlock_irqrestore(&priv->shrd->lock, flags);
810} 810}
811 811
812static irqreturn_t iwl_isr(int irq, void *data) 812static irqreturn_t iwl_isr(int irq, void *data)
@@ -820,7 +820,7 @@ static irqreturn_t iwl_isr(int irq, void *data)
820 if (!priv) 820 if (!priv)
821 return IRQ_NONE; 821 return IRQ_NONE;
822 822
823 spin_lock_irqsave(&priv->lock, flags); 823 spin_lock_irqsave(&priv->shrd->lock, flags);
824 824
825 /* Disable (but don't clear!) interrupts here to avoid 825 /* Disable (but don't clear!) interrupts here to avoid
826 * back-to-back ISRs and sporadic interrupts from our NIC. 826 * back-to-back ISRs and sporadic interrupts from our NIC.
@@ -864,7 +864,7 @@ static irqreturn_t iwl_isr(int irq, void *data)
864 iwl_enable_interrupts(priv); 864 iwl_enable_interrupts(priv);
865 865
866 unplugged: 866 unplugged:
867 spin_unlock_irqrestore(&priv->lock, flags); 867 spin_unlock_irqrestore(&priv->shrd->lock, flags);
868 return IRQ_HANDLED; 868 return IRQ_HANDLED;
869 869
870 none: 870 none:
@@ -873,7 +873,7 @@ static irqreturn_t iwl_isr(int irq, void *data)
873 if (test_bit(STATUS_INT_ENABLED, &priv->shrd->status) && !priv->inta) 873 if (test_bit(STATUS_INT_ENABLED, &priv->shrd->status) && !priv->inta)
874 iwl_enable_interrupts(priv); 874 iwl_enable_interrupts(priv);
875 875
876 spin_unlock_irqrestore(&priv->lock, flags); 876 spin_unlock_irqrestore(&priv->shrd->lock, flags);
877 return IRQ_NONE; 877 return IRQ_NONE;
878} 878}
879 879
@@ -901,7 +901,7 @@ irqreturn_t iwl_isr_ict(int irq, void *data)
901 if (!priv->use_ict) 901 if (!priv->use_ict)
902 return iwl_isr(irq, data); 902 return iwl_isr(irq, data);
903 903
904 spin_lock_irqsave(&priv->lock, flags); 904 spin_lock_irqsave(&priv->shrd->lock, flags);
905 905
906 /* Disable (but don't clear!) interrupts here to avoid 906 /* Disable (but don't clear!) interrupts here to avoid
907 * back-to-back ISRs and sporadic interrupts from our NIC. 907 * back-to-back ISRs and sporadic interrupts from our NIC.
@@ -967,7 +967,7 @@ irqreturn_t iwl_isr_ict(int irq, void *data)
967 iwl_enable_interrupts(priv); 967 iwl_enable_interrupts(priv);
968 } 968 }
969 969
970 spin_unlock_irqrestore(&priv->lock, flags); 970 spin_unlock_irqrestore(&priv->shrd->lock, flags);
971 return IRQ_HANDLED; 971 return IRQ_HANDLED;
972 972
973 none: 973 none:
@@ -977,6 +977,6 @@ irqreturn_t iwl_isr_ict(int irq, void *data)
977 if (test_bit(STATUS_INT_ENABLED, &priv->shrd->status) && !priv->inta) 977 if (test_bit(STATUS_INT_ENABLED, &priv->shrd->status) && !priv->inta)
978 iwl_enable_interrupts(priv); 978 iwl_enable_interrupts(priv);
979 979
980 spin_unlock_irqrestore(&priv->lock, flags); 980 spin_unlock_irqrestore(&priv->shrd->lock, flags);
981 return IRQ_NONE; 981 return IRQ_NONE;
982} 982}
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
index ab421529d12c..61e17dd4f389 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
@@ -444,7 +444,7 @@ void iwl_trans_txq_agg_setup(struct iwl_priv *priv, int sta_id, int tid,
444 444
445 ra_tid = BUILD_RAxTID(sta_id, tid); 445 ra_tid = BUILD_RAxTID(sta_id, tid);
446 446
447 spin_lock_irqsave(&priv->lock, flags); 447 spin_lock_irqsave(&priv->shrd->lock, flags);
448 448
449 /* Stop this Tx queue before configuring it */ 449 /* Stop this Tx queue before configuring it */
450 iwlagn_tx_queue_stop_scheduler(priv, txq_id); 450 iwlagn_tx_queue_stop_scheduler(priv, txq_id);
@@ -480,7 +480,7 @@ void iwl_trans_txq_agg_setup(struct iwl_priv *priv, int sta_id, int tid,
480 /* Set up Status area in SRAM, map to Tx DMA/FIFO, activate the queue */ 480 /* Set up Status area in SRAM, map to Tx DMA/FIFO, activate the queue */
481 iwl_trans_tx_queue_set_status(priv, &priv->txq[txq_id], tx_fifo, 1); 481 iwl_trans_tx_queue_set_status(priv, &priv->txq[txq_id], tx_fifo, 1);
482 482
483 spin_unlock_irqrestore(&priv->lock, flags); 483 spin_unlock_irqrestore(&priv->shrd->lock, flags);
484} 484}
485 485
486int iwl_trans_txq_agg_disable(struct iwl_priv *priv, u16 txq_id, 486int iwl_trans_txq_agg_disable(struct iwl_priv *priv, u16 txq_id,
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.c b/drivers/net/wireless/iwlwifi/iwl-trans.c
index a3e1bd0abc28..cc3fc237d320 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans.c
@@ -210,10 +210,10 @@ static int iwl_rx_init(struct iwl_priv *priv)
210 210
211 iwl_trans_rx_hw_init(priv, rxq); 211 iwl_trans_rx_hw_init(priv, rxq);
212 212
213 spin_lock_irqsave(&priv->lock, flags); 213 spin_lock_irqsave(&priv->shrd->lock, flags);
214 rxq->need_update = 1; 214 rxq->need_update = 1;
215 iwl_rx_queue_update_write_ptr(priv, rxq); 215 iwl_rx_queue_update_write_ptr(priv, rxq);
216 spin_unlock_irqrestore(&priv->lock, flags); 216 spin_unlock_irqrestore(&priv->shrd->lock, flags);
217 217
218 return 0; 218 return 0;
219} 219}
@@ -546,7 +546,7 @@ static int iwl_tx_init(struct iwl_priv *priv)
546 alloc = true; 546 alloc = true;
547 } 547 }
548 548
549 spin_lock_irqsave(&priv->lock, flags); 549 spin_lock_irqsave(&priv->shrd->lock, flags);
550 550
551 /* Turn off all Tx DMA fifos */ 551 /* Turn off all Tx DMA fifos */
552 iwl_write_prph(priv, SCD_TXFACT, 0); 552 iwl_write_prph(priv, SCD_TXFACT, 0);
@@ -554,7 +554,7 @@ static int iwl_tx_init(struct iwl_priv *priv)
554 /* Tell NIC where to find the "keep warm" buffer */ 554 /* Tell NIC where to find the "keep warm" buffer */
555 iwl_write_direct32(priv, FH_KW_MEM_ADDR_REG, priv->kw.dma >> 4); 555 iwl_write_direct32(priv, FH_KW_MEM_ADDR_REG, priv->kw.dma >> 4);
556 556
557 spin_unlock_irqrestore(&priv->lock, flags); 557 spin_unlock_irqrestore(&priv->shrd->lock, flags);
558 558
559 /* Alloc and init all Tx queues, including the command queue (#4/#9) */ 559 /* Alloc and init all Tx queues, including the command queue (#4/#9) */
560 for (txq_id = 0; txq_id < hw_params(priv).max_txq_num; txq_id++) { 560 for (txq_id = 0; txq_id < hw_params(priv).max_txq_num; txq_id++) {
@@ -598,13 +598,13 @@ static int iwl_nic_init(struct iwl_priv *priv)
598 unsigned long flags; 598 unsigned long flags;
599 599
600 /* nic_init */ 600 /* nic_init */
601 spin_lock_irqsave(&priv->lock, flags); 601 spin_lock_irqsave(&priv->shrd->lock, flags);
602 iwl_apm_init(priv); 602 iwl_apm_init(priv);
603 603
604 /* Set interrupt coalescing calibration timer to default (512 usecs) */ 604 /* Set interrupt coalescing calibration timer to default (512 usecs) */
605 iwl_write8(priv, CSR_INT_COALESCING, IWL_HOST_INT_CALIB_TIMEOUT_DEF); 605 iwl_write8(priv, CSR_INT_COALESCING, IWL_HOST_INT_CALIB_TIMEOUT_DEF);
606 606
607 spin_unlock_irqrestore(&priv->lock, flags); 607 spin_unlock_irqrestore(&priv->shrd->lock, flags);
608 608
609 iwl_set_pwr_vmain(priv); 609 iwl_set_pwr_vmain(priv);
610 610
@@ -728,7 +728,7 @@ static int iwl_trans_start_device(struct iwl_priv *priv)
728 728
729/* 729/*
730 * Activate/Deactivate Tx DMA/FIFO channels according tx fifos mask 730 * Activate/Deactivate Tx DMA/FIFO channels according tx fifos mask
731 * must be called under priv->lock and mac access 731 * must be called under priv->shrd->lock and mac access
732 */ 732 */
733static void iwl_trans_txq_set_sched(struct iwl_priv *priv, u32 mask) 733static void iwl_trans_txq_set_sched(struct iwl_priv *priv, u32 mask)
734{ 734{
@@ -777,7 +777,7 @@ static void iwl_trans_tx_start(struct iwl_priv *priv)
777 int i, chan; 777 int i, chan;
778 u32 reg_val; 778 u32 reg_val;
779 779
780 spin_lock_irqsave(&priv->lock, flags); 780 spin_lock_irqsave(&priv->shrd->lock, flags);
781 781
782 priv->scd_base_addr = iwl_read_prph(priv, SCD_SRAM_BASE_ADDR); 782 priv->scd_base_addr = iwl_read_prph(priv, SCD_SRAM_BASE_ADDR);
783 a = priv->scd_base_addr + SCD_CONTEXT_MEM_LOWER_BOUND; 783 a = priv->scd_base_addr + SCD_CONTEXT_MEM_LOWER_BOUND;
@@ -872,7 +872,7 @@ static void iwl_trans_tx_start(struct iwl_priv *priv)
872 iwl_trans_tx_queue_set_status(priv, &priv->txq[i], fifo, 0); 872 iwl_trans_tx_queue_set_status(priv, &priv->txq[i], fifo, 0);
873 } 873 }
874 874
875 spin_unlock_irqrestore(&priv->lock, flags); 875 spin_unlock_irqrestore(&priv->shrd->lock, flags);
876 876
877 /* Enable L1-Active */ 877 /* Enable L1-Active */
878 iwl_clear_bits_prph(priv, APMG_PCIDEV_STT_REG, 878 iwl_clear_bits_prph(priv, APMG_PCIDEV_STT_REG,
@@ -888,7 +888,7 @@ static int iwl_trans_tx_stop(struct iwl_priv *priv)
888 unsigned long flags; 888 unsigned long flags;
889 889
890 /* Turn off all Tx DMA fifos */ 890 /* Turn off all Tx DMA fifos */
891 spin_lock_irqsave(&priv->lock, flags); 891 spin_lock_irqsave(&priv->shrd->lock, flags);
892 892
893 iwl_trans_txq_set_sched(priv, 0); 893 iwl_trans_txq_set_sched(priv, 0);
894 894
@@ -902,7 +902,7 @@ static int iwl_trans_tx_stop(struct iwl_priv *priv)
902 " DMA channel %d [0x%08x]", ch, 902 " DMA channel %d [0x%08x]", ch,
903 iwl_read_direct32(priv, FH_TSSR_TX_STATUS_REG)); 903 iwl_read_direct32(priv, FH_TSSR_TX_STATUS_REG));
904 } 904 }
905 spin_unlock_irqrestore(&priv->lock, flags); 905 spin_unlock_irqrestore(&priv->shrd->lock, flags);
906 906
907 if (!priv->txq) { 907 if (!priv->txq) {
908 IWL_WARN(priv, "Stopping tx queues that aren't allocated..."); 908 IWL_WARN(priv, "Stopping tx queues that aren't allocated...");
@@ -924,9 +924,9 @@ static void iwl_trans_stop_device(struct iwl_priv *priv)
924 iwl_write32(priv, CSR_RESET, CSR_RESET_REG_FLAG_NEVO_RESET); 924 iwl_write32(priv, CSR_RESET, CSR_RESET_REG_FLAG_NEVO_RESET);
925 925
926 /* tell the device to stop sending interrupts */ 926 /* tell the device to stop sending interrupts */
927 spin_lock_irqsave(&priv->lock, flags); 927 spin_lock_irqsave(&priv->shrd->lock, flags);
928 iwl_disable_interrupts(priv); 928 iwl_disable_interrupts(priv);
929 spin_unlock_irqrestore(&priv->lock, flags); 929 spin_unlock_irqrestore(&priv->shrd->lock, flags);
930 trans_sync_irq(&priv->trans); 930 trans_sync_irq(&priv->trans);
931 931
932 /* device going down, Stop using ICT table */ 932 /* device going down, Stop using ICT table */