aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c7
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-calib.c9
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c12
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.h1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rx.c15
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rxon.c5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c21
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h11
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-debugfs.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-legacy.c5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-power.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-scan.c3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c5
16 files changed, 54 insertions, 57 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index 1d9dcd7e3b82..58213e72d107 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -762,8 +762,7 @@ void iwl3945_hw_build_tx_cmd_rate(struct iwl_priv *priv,
762 762
763 /* We need to figure out how to get the sta->supp_rates while 763 /* We need to figure out how to get the sta->supp_rates while
764 * in this running context */ 764 * in this running context */
765 rate_mask = IWL_RATES_MASK; 765 rate_mask = IWL_RATES_MASK_3945;
766
767 766
768 /* Set retry limit on DATA packets and Probe Responses*/ 767 /* Set retry limit on DATA packets and Probe Responses*/
769 if (ieee80211_is_probe_resp(fc)) 768 if (ieee80211_is_probe_resp(fc))
@@ -1650,7 +1649,7 @@ static int iwl3945_hw_reg_comp_txpower_temp(struct iwl_priv *priv)
1650 ref_temp); 1649 ref_temp);
1651 1650
1652 /* set tx power value for all rates, OFDM and CCK */ 1651 /* set tx power value for all rates, OFDM and CCK */
1653 for (rate_index = 0; rate_index < IWL_RATE_COUNT; 1652 for (rate_index = 0; rate_index < IWL_RATE_COUNT_3945;
1654 rate_index++) { 1653 rate_index++) {
1655 int power_idx = 1654 int power_idx =
1656 ch_info->power_info[rate_index].base_power_index; 1655 ch_info->power_info[rate_index].base_power_index;
@@ -1890,7 +1889,7 @@ int iwl3945_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
1890 1889
1891 /* If we issue a new RXON command which required a tune then we must 1890 /* If we issue a new RXON command which required a tune then we must
1892 * send a new TXPOWER command or we won't be able to Tx any frames */ 1891 * send a new TXPOWER command or we won't be able to Tx any frames */
1893 rc = priv->cfg->ops->lib->send_tx_power(priv); 1892 rc = iwl_set_tx_power(priv, priv->tx_power_next, true);
1894 if (rc) { 1893 if (rc) {
1895 IWL_ERR(priv, "Error setting Tx power (%d).\n", rc); 1894 IWL_ERR(priv, "Error setting Tx power (%d).\n", rc);
1896 return rc; 1895 return rc;
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 313e92ed568b..7c14eb31d954 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -1571,7 +1571,7 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *c
1571 1571
1572 /* If we issue a new RXON command which required a tune then we must 1572 /* If we issue a new RXON command which required a tune then we must
1573 * send a new TXPOWER command or we won't be able to Tx any frames */ 1573 * send a new TXPOWER command or we won't be able to Tx any frames */
1574 ret = iwl_set_tx_power(priv, priv->tx_power_user_lmt, true); 1574 ret = iwl_set_tx_power(priv, priv->tx_power_next, true);
1575 if (ret) { 1575 if (ret) {
1576 IWL_ERR(priv, "Error sending TX power (%d)\n", ret); 1576 IWL_ERR(priv, "Error sending TX power (%d)\n", ret);
1577 return ret; 1577 return ret;
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-calib.c b/drivers/net/wireless/iwlwifi/iwl-agn-calib.c
index d16bb5ede014..9006293e740c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-calib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-calib.c
@@ -631,8 +631,7 @@ void iwl_sensitivity_calibration(struct iwl_priv *priv, void *resp)
631 } 631 }
632 632
633 spin_lock_irqsave(&priv->lock, flags); 633 spin_lock_irqsave(&priv->lock, flags);
634 if (priv->cfg->bt_params && 634 if (iwl_bt_statistics(priv)) {
635 priv->cfg->bt_params->bt_statistics) {
636 rx_info = &(((struct iwl_bt_notif_statistics *)resp)-> 635 rx_info = &(((struct iwl_bt_notif_statistics *)resp)->
637 rx.general.common); 636 rx.general.common);
638 ofdm = &(((struct iwl_bt_notif_statistics *)resp)->rx.ofdm); 637 ofdm = &(((struct iwl_bt_notif_statistics *)resp)->rx.ofdm);
@@ -897,8 +896,7 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv, void *stat_resp)
897 } 896 }
898 897
899 spin_lock_irqsave(&priv->lock, flags); 898 spin_lock_irqsave(&priv->lock, flags);
900 if (priv->cfg->bt_params && 899 if (iwl_bt_statistics(priv)) {
901 priv->cfg->bt_params->bt_statistics) {
902 rx_info = &(((struct iwl_bt_notif_statistics *)stat_resp)-> 900 rx_info = &(((struct iwl_bt_notif_statistics *)stat_resp)->
903 rx.general.common); 901 rx.general.common);
904 } else { 902 } else {
@@ -913,8 +911,7 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv, void *stat_resp)
913 911
914 rxon_band24 = !!(ctx->staging.flags & RXON_FLG_BAND_24G_MSK); 912 rxon_band24 = !!(ctx->staging.flags & RXON_FLG_BAND_24G_MSK);
915 rxon_chnum = le16_to_cpu(ctx->staging.channel); 913 rxon_chnum = le16_to_cpu(ctx->staging.channel);
916 if (priv->cfg->bt_params && 914 if (iwl_bt_statistics(priv)) {
917 priv->cfg->bt_params->bt_statistics) {
918 stat_band24 = !!(((struct iwl_bt_notif_statistics *) 915 stat_band24 = !!(((struct iwl_bt_notif_statistics *)
919 stat_resp)->flag & 916 stat_resp)->flag &
920 STATISTICS_REPLY_FLG_BAND_24G_MSK); 917 STATISTICS_REPLY_FLG_BAND_24G_MSK);
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
index a6dbd8983dac..b500aaae53ec 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
@@ -39,8 +39,7 @@ static int iwl_statistics_flag(struct iwl_priv *priv, char *buf, int bufsz)
39 int p = 0; 39 int p = 0;
40 u32 flag; 40 u32 flag;
41 41
42 if (priv->cfg->bt_params && 42 if (iwl_bt_statistics(priv))
43 priv->cfg->bt_params->bt_statistics)
44 flag = le32_to_cpu(priv->_agn.statistics_bt.flag); 43 flag = le32_to_cpu(priv->_agn.statistics_bt.flag);
45 else 44 else
46 flag = le32_to_cpu(priv->_agn.statistics.flag); 45 flag = le32_to_cpu(priv->_agn.statistics.flag);
@@ -89,8 +88,7 @@ ssize_t iwl_ucode_rx_stats_read(struct file *file, char __user *user_buf,
89 * the last statistics notification from uCode 88 * the last statistics notification from uCode
90 * might not reflect the current uCode activity 89 * might not reflect the current uCode activity
91 */ 90 */
92 if (priv->cfg->bt_params && 91 if (iwl_bt_statistics(priv)) {
93 priv->cfg->bt_params->bt_statistics) {
94 ofdm = &priv->_agn.statistics_bt.rx.ofdm; 92 ofdm = &priv->_agn.statistics_bt.rx.ofdm;
95 cck = &priv->_agn.statistics_bt.rx.cck; 93 cck = &priv->_agn.statistics_bt.rx.cck;
96 general = &priv->_agn.statistics_bt.rx.general.common; 94 general = &priv->_agn.statistics_bt.rx.general.common;
@@ -536,8 +534,7 @@ ssize_t iwl_ucode_tx_stats_read(struct file *file,
536 * the last statistics notification from uCode 534 * the last statistics notification from uCode
537 * might not reflect the current uCode activity 535 * might not reflect the current uCode activity
538 */ 536 */
539 if (priv->cfg->bt_params && 537 if (iwl_bt_statistics(priv)) {
540 priv->cfg->bt_params->bt_statistics) {
541 tx = &priv->_agn.statistics_bt.tx; 538 tx = &priv->_agn.statistics_bt.tx;
542 accum_tx = &priv->_agn.accum_statistics_bt.tx; 539 accum_tx = &priv->_agn.accum_statistics_bt.tx;
543 delta_tx = &priv->_agn.delta_statistics_bt.tx; 540 delta_tx = &priv->_agn.delta_statistics_bt.tx;
@@ -737,8 +734,7 @@ ssize_t iwl_ucode_general_stats_read(struct file *file, char __user *user_buf,
737 * the last statistics notification from uCode 734 * the last statistics notification from uCode
738 * might not reflect the current uCode activity 735 * might not reflect the current uCode activity
739 */ 736 */
740 if (priv->cfg->bt_params && 737 if (iwl_bt_statistics(priv)) {
741 priv->cfg->bt_params->bt_statistics) {
742 general = &priv->_agn.statistics_bt.general.common; 738 general = &priv->_agn.statistics_bt.general.common;
743 dbg = &priv->_agn.statistics_bt.general.common.dbg; 739 dbg = &priv->_agn.statistics_bt.general.common.dbg;
744 div = &priv->_agn.statistics_bt.general.common.div; 740 div = &priv->_agn.statistics_bt.general.common.div;
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.h b/drivers/net/wireless/iwlwifi/iwl-agn-rs.h
index 75e50d33ecb3..184828c72b31 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.h
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.h
@@ -213,6 +213,7 @@ enum {
213 IWL_CCK_BASIC_RATES_MASK) 213 IWL_CCK_BASIC_RATES_MASK)
214 214
215#define IWL_RATES_MASK ((1 << IWL_RATE_COUNT) - 1) 215#define IWL_RATES_MASK ((1 << IWL_RATE_COUNT) - 1)
216#define IWL_RATES_MASK_3945 ((1 << IWL_RATE_COUNT_3945) - 1)
216 217
217#define IWL_INVALID_VALUE -1 218#define IWL_INVALID_VALUE -1
218 219
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c
index bbd40b7dd597..b192ca842f0a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c
@@ -73,8 +73,7 @@ static void iwl_rx_calc_noise(struct iwl_priv *priv)
73 int bcn_silence_a, bcn_silence_b, bcn_silence_c; 73 int bcn_silence_a, bcn_silence_b, bcn_silence_c;
74 int last_rx_noise; 74 int last_rx_noise;
75 75
76 if (priv->cfg->bt_params && 76 if (iwl_bt_statistics(priv))
77 priv->cfg->bt_params->bt_statistics)
78 rx_info = &(priv->_agn.statistics_bt.rx.general.common); 77 rx_info = &(priv->_agn.statistics_bt.rx.general.common);
79 else 78 else
80 rx_info = &(priv->_agn.statistics.rx.general); 79 rx_info = &(priv->_agn.statistics.rx.general);
@@ -125,8 +124,7 @@ static void iwl_accumulative_statistics(struct iwl_priv *priv,
125 struct statistics_general_common *general, *accum_general; 124 struct statistics_general_common *general, *accum_general;
126 struct statistics_tx *tx, *accum_tx; 125 struct statistics_tx *tx, *accum_tx;
127 126
128 if (priv->cfg->bt_params && 127 if (iwl_bt_statistics(priv)) {
129 priv->cfg->bt_params->bt_statistics) {
130 prev_stats = (__le32 *)&priv->_agn.statistics_bt; 128 prev_stats = (__le32 *)&priv->_agn.statistics_bt;
131 accum_stats = (u32 *)&priv->_agn.accum_statistics_bt; 129 accum_stats = (u32 *)&priv->_agn.accum_statistics_bt;
132 size = sizeof(struct iwl_bt_notif_statistics); 130 size = sizeof(struct iwl_bt_notif_statistics);
@@ -207,8 +205,7 @@ bool iwl_good_plcp_health(struct iwl_priv *priv,
207 struct statistics_rx_phy *ofdm; 205 struct statistics_rx_phy *ofdm;
208 struct statistics_rx_ht_phy *ofdm_ht; 206 struct statistics_rx_ht_phy *ofdm_ht;
209 207
210 if (priv->cfg->bt_params && 208 if (iwl_bt_statistics(priv)) {
211 priv->cfg->bt_params->bt_statistics) {
212 ofdm = &pkt->u.stats_bt.rx.ofdm; 209 ofdm = &pkt->u.stats_bt.rx.ofdm;
213 ofdm_ht = &pkt->u.stats_bt.rx.ofdm_ht; 210 ofdm_ht = &pkt->u.stats_bt.rx.ofdm_ht;
214 combined_plcp_delta = 211 combined_plcp_delta =
@@ -265,8 +262,7 @@ void iwl_rx_statistics(struct iwl_priv *priv,
265 int change; 262 int change;
266 struct iwl_rx_packet *pkt = rxb_addr(rxb); 263 struct iwl_rx_packet *pkt = rxb_addr(rxb);
267 264
268 if (priv->cfg->bt_params && 265 if (iwl_bt_statistics(priv)) {
269 priv->cfg->bt_params->bt_statistics) {
270 IWL_DEBUG_RX(priv, 266 IWL_DEBUG_RX(priv,
271 "Statistics notification received (%d vs %d).\n", 267 "Statistics notification received (%d vs %d).\n",
272 (int)sizeof(struct iwl_bt_notif_statistics), 268 (int)sizeof(struct iwl_bt_notif_statistics),
@@ -304,8 +300,7 @@ void iwl_rx_statistics(struct iwl_priv *priv,
304 300
305 iwl_recover_from_statistics(priv, pkt); 301 iwl_recover_from_statistics(priv, pkt);
306 302
307 if (priv->cfg->bt_params && 303 if (iwl_bt_statistics(priv))
308 priv->cfg->bt_params->bt_statistics)
309 memcpy(&priv->_agn.statistics_bt, &pkt->u.stats_bt, 304 memcpy(&priv->_agn.statistics_bt, &pkt->u.stats_bt,
310 sizeof(priv->_agn.statistics_bt)); 305 sizeof(priv->_agn.statistics_bt));
311 else 306 else
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
index 2a4ff832fbb8..6c2adc58d654 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
@@ -316,10 +316,9 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
316 * If we issue a new RXON command which required a tune then we must 316 * If we issue a new RXON command which required a tune then we must
317 * send a new TXPOWER command or we won't be able to Tx any frames. 317 * send a new TXPOWER command or we won't be able to Tx any frames.
318 * 318 *
319 * FIXME: which RXON requires a tune? Can we optimise this out in 319 * It's expected we set power here if channel is changing.
320 * some cases?
321 */ 320 */
322 ret = iwl_set_tx_power(priv, priv->tx_power_user_lmt, true); 321 ret = iwl_set_tx_power(priv, priv->tx_power_next, true);
323 if (ret) { 322 if (ret) {
324 IWL_ERR(priv, "Error sending TX power (%d)\n", ret); 323 IWL_ERR(priv, "Error sending TX power (%d)\n", ret);
325 return ret; 324 return ret;
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index eb16647cfbe0..646ccb2430b4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3077,8 +3077,7 @@ static void iwl_bg_run_time_calib_work(struct work_struct *work)
3077 } 3077 }
3078 3078
3079 if (priv->start_calib) { 3079 if (priv->start_calib) {
3080 if (priv->cfg->bt_params && 3080 if (iwl_bt_statistics(priv)) {
3081 priv->cfg->bt_params->bt_statistics) {
3082 iwl_chain_noise_calibration(priv, 3081 iwl_chain_noise_calibration(priv,
3083 (void *)&priv->_agn.statistics_bt); 3082 (void *)&priv->_agn.statistics_bt);
3084 iwl_sensitivity_calibration(priv, 3083 iwl_sensitivity_calibration(priv,
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index a46ad60216a0..4ad89389a0a9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -219,16 +219,12 @@ int iwlcore_init_geos(struct iwl_priv *priv)
219 if (!is_channel_valid(ch)) 219 if (!is_channel_valid(ch))
220 continue; 220 continue;
221 221
222 if (is_channel_a_band(ch)) 222 sband = &priv->bands[ch->band];
223 sband = &priv->bands[IEEE80211_BAND_5GHZ];
224 else
225 sband = &priv->bands[IEEE80211_BAND_2GHZ];
226 223
227 geo_ch = &sband->channels[sband->n_channels++]; 224 geo_ch = &sband->channels[sband->n_channels++];
228 225
229 geo_ch->center_freq = 226 geo_ch->center_freq =
230 ieee80211_channel_to_frequency(ch->channel, 227 ieee80211_channel_to_frequency(ch->channel, ch->band);
231 sband->band);
232 geo_ch->max_power = ch->max_power_avg; 228 geo_ch->max_power = ch->max_power_avg;
233 geo_ch->max_antenna_gain = 0xff; 229 geo_ch->max_antenna_gain = 0xff;
234 geo_ch->hw_value = ch->channel; 230 geo_ch->hw_value = ch->channel;
@@ -1162,6 +1158,8 @@ int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force)
1162{ 1158{
1163 int ret; 1159 int ret;
1164 s8 prev_tx_power; 1160 s8 prev_tx_power;
1161 bool defer;
1162 struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];
1165 1163
1166 lockdep_assert_held(&priv->mutex); 1164 lockdep_assert_held(&priv->mutex);
1167 1165
@@ -1189,10 +1187,15 @@ int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force)
1189 if (!iwl_is_ready_rf(priv)) 1187 if (!iwl_is_ready_rf(priv))
1190 return -EIO; 1188 return -EIO;
1191 1189
1192 /* scan complete use tx_power_next, need to be updated */ 1190 /* scan complete and commit_rxon use tx_power_next value,
1191 * it always need to be updated for newest request */
1193 priv->tx_power_next = tx_power; 1192 priv->tx_power_next = tx_power;
1194 if (test_bit(STATUS_SCANNING, &priv->status) && !force) { 1193
1195 IWL_DEBUG_INFO(priv, "Deferring tx power set while scanning\n"); 1194 /* do not set tx power when scanning or channel changing */
1195 defer = test_bit(STATUS_SCANNING, &priv->status) ||
1196 memcmp(&ctx->active, &ctx->staging, sizeof(ctx->staging));
1197 if (defer && !force) {
1198 IWL_DEBUG_INFO(priv, "Deferring tx power set\n");
1196 return 0; 1199 return 0;
1197 } 1200 }
1198 1201
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index bbc5aa7a7f2f..c83fcc60ccc5 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -741,6 +741,17 @@ static inline const struct ieee80211_supported_band *iwl_get_hw_mode(
741 return priv->hw->wiphy->bands[band]; 741 return priv->hw->wiphy->bands[band];
742} 742}
743 743
744static inline bool iwl_advanced_bt_coexist(struct iwl_priv *priv)
745{
746 return priv->cfg->bt_params &&
747 priv->cfg->bt_params->advanced_bt_coexist;
748}
749
750static inline bool iwl_bt_statistics(struct iwl_priv *priv)
751{
752 return priv->cfg->bt_params && priv->cfg->bt_params->bt_statistics;
753}
754
744extern bool bt_coex_active; 755extern bool bt_coex_active;
745extern bool bt_siso_mode; 756extern bool bt_siso_mode;
746 757
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
index 418c8ac26222..bdcb74279f1e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
@@ -1765,13 +1765,13 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name)
1765 DEBUGFS_ADD_FILE(chain_noise, dir_debug, S_IRUSR); 1765 DEBUGFS_ADD_FILE(chain_noise, dir_debug, S_IRUSR);
1766 if (priv->cfg->base_params->ucode_tracing) 1766 if (priv->cfg->base_params->ucode_tracing)
1767 DEBUGFS_ADD_FILE(ucode_tracing, dir_debug, S_IWUSR | S_IRUSR); 1767 DEBUGFS_ADD_FILE(ucode_tracing, dir_debug, S_IWUSR | S_IRUSR);
1768 if (priv->cfg->bt_params && priv->cfg->bt_params->bt_statistics) 1768 if (iwl_bt_statistics(priv))
1769 DEBUGFS_ADD_FILE(ucode_bt_stats, dir_debug, S_IRUSR); 1769 DEBUGFS_ADD_FILE(ucode_bt_stats, dir_debug, S_IRUSR);
1770 DEBUGFS_ADD_FILE(reply_tx_error, dir_debug, S_IRUSR); 1770 DEBUGFS_ADD_FILE(reply_tx_error, dir_debug, S_IRUSR);
1771 DEBUGFS_ADD_FILE(rxon_flags, dir_debug, S_IWUSR); 1771 DEBUGFS_ADD_FILE(rxon_flags, dir_debug, S_IWUSR);
1772 DEBUGFS_ADD_FILE(rxon_filter_flags, dir_debug, S_IWUSR); 1772 DEBUGFS_ADD_FILE(rxon_filter_flags, dir_debug, S_IWUSR);
1773 DEBUGFS_ADD_FILE(wd_timeout, dir_debug, S_IWUSR); 1773 DEBUGFS_ADD_FILE(wd_timeout, dir_debug, S_IWUSR);
1774 if (priv->cfg->bt_params && priv->cfg->bt_params->advanced_bt_coexist) 1774 if (iwl_advanced_bt_coexist(priv))
1775 DEBUGFS_ADD_FILE(bt_traffic, dir_debug, S_IRUSR); 1775 DEBUGFS_ADD_FILE(bt_traffic, dir_debug, S_IRUSR);
1776 if (priv->cfg->base_params->sensitivity_calib_by_driver) 1776 if (priv->cfg->base_params->sensitivity_calib_by_driver)
1777 DEBUGFS_ADD_BOOL(disable_sensitivity, dir_rf, 1777 DEBUGFS_ADD_BOOL(disable_sensitivity, dir_rf,
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 6fa1383d72ec..b5f21e041953 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -138,7 +138,7 @@ struct iwl_queue {
138 * space more than this */ 138 * space more than this */
139 int high_mark; /* high watermark, stop queue if free 139 int high_mark; /* high watermark, stop queue if free
140 * space less than this */ 140 * space less than this */
141} __packed; 141};
142 142
143/* One for each TFD */ 143/* One for each TFD */
144struct iwl_tx_info { 144struct iwl_tx_info {
diff --git a/drivers/net/wireless/iwlwifi/iwl-legacy.c b/drivers/net/wireless/iwlwifi/iwl-legacy.c
index 927fe37a43ab..e1ace3ce30b3 100644
--- a/drivers/net/wireless/iwlwifi/iwl-legacy.c
+++ b/drivers/net/wireless/iwlwifi/iwl-legacy.c
@@ -85,10 +85,9 @@ int iwl_legacy_mac_config(struct ieee80211_hw *hw, u32 changed)
85 IWL_DEBUG_MAC80211(priv, "enter to channel %d changed 0x%X\n", 85 IWL_DEBUG_MAC80211(priv, "enter to channel %d changed 0x%X\n",
86 channel->hw_value, changed); 86 channel->hw_value, changed);
87 87
88 if (unlikely(!priv->cfg->mod_params->disable_hw_scan && 88 if (unlikely(test_bit(STATUS_SCANNING, &priv->status))) {
89 test_bit(STATUS_SCANNING, &priv->status))) {
90 scan_active = 1; 89 scan_active = 1;
91 IWL_DEBUG_MAC80211(priv, "leave - scanning\n"); 90 IWL_DEBUG_MAC80211(priv, "scan active\n");
92 } 91 }
93 92
94 if (changed & (IEEE80211_CONF_CHANGE_SMPS | 93 if (changed & (IEEE80211_CONF_CHANGE_SMPS |
diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c
index 1eec18d909d8..25f7d474f346 100644
--- a/drivers/net/wireless/iwlwifi/iwl-power.c
+++ b/drivers/net/wireless/iwlwifi/iwl-power.c
@@ -226,8 +226,7 @@ static void iwl_static_sleep_cmd(struct iwl_priv *priv,
226 else 226 else
227 cmd->flags &= ~IWL_POWER_SHADOW_REG_ENA; 227 cmd->flags &= ~IWL_POWER_SHADOW_REG_ENA;
228 228
229 if (priv->cfg->bt_params && 229 if (iwl_advanced_bt_coexist(priv)) {
230 priv->cfg->bt_params->advanced_bt_coexist) {
231 if (!priv->cfg->bt_params->bt_sco_disable) 230 if (!priv->cfg->bt_params->bt_sco_disable)
232 cmd->flags |= IWL_POWER_BT_SCO_ENA; 231 cmd->flags |= IWL_POWER_BT_SCO_ENA;
233 else 232 else
@@ -313,8 +312,7 @@ static void iwl_power_fill_sleep_cmd(struct iwl_priv *priv,
313 else 312 else
314 cmd->flags &= ~IWL_POWER_SHADOW_REG_ENA; 313 cmd->flags &= ~IWL_POWER_SHADOW_REG_ENA;
315 314
316 if (priv->cfg->bt_params && 315 if (iwl_advanced_bt_coexist(priv)) {
317 priv->cfg->bt_params->advanced_bt_coexist) {
318 if (!priv->cfg->bt_params->bt_sco_disable) 316 if (!priv->cfg->bt_params->bt_sco_disable)
319 cmd->flags |= IWL_POWER_BT_SCO_ENA; 317 cmd->flags |= IWL_POWER_BT_SCO_ENA;
320 else 318 else
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
index 12d9363d0afe..08f1bea8b652 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -257,8 +257,7 @@ static void iwl_rx_scan_complete_notif(struct iwl_priv *priv,
257 queue_work(priv->workqueue, &priv->scan_completed); 257 queue_work(priv->workqueue, &priv->scan_completed);
258 258
259 if (priv->iw_mode != NL80211_IFTYPE_ADHOC && 259 if (priv->iw_mode != NL80211_IFTYPE_ADHOC &&
260 priv->cfg->bt_params && 260 iwl_advanced_bt_coexist(priv) &&
261 priv->cfg->bt_params->advanced_bt_coexist &&
262 priv->bt_status != scan_notif->bt_status) { 261 priv->bt_status != scan_notif->bt_status) {
263 if (scan_notif->bt_status) { 262 if (scan_notif->bt_status) {
264 /* BT on */ 263 /* BT on */
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 9c986f272c2d..2945acd955f0 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -2517,7 +2517,7 @@ static void iwl3945_alive_start(struct iwl_priv *priv)
2517 2517
2518 ieee80211_wake_queues(priv->hw); 2518 ieee80211_wake_queues(priv->hw);
2519 2519
2520 priv->active_rate = IWL_RATES_MASK; 2520 priv->active_rate = IWL_RATES_MASK_3945;
2521 2521
2522 iwl_power_update_mode(priv, true); 2522 iwl_power_update_mode(priv, true);
2523 2523
@@ -2535,13 +2535,14 @@ static void iwl3945_alive_start(struct iwl_priv *priv)
2535 /* Configure Bluetooth device coexistence support */ 2535 /* Configure Bluetooth device coexistence support */
2536 priv->cfg->ops->hcmd->send_bt_config(priv); 2536 priv->cfg->ops->hcmd->send_bt_config(priv);
2537 2537
2538 set_bit(STATUS_READY, &priv->status);
2539
2538 /* Configure the adapter for unassociated operation */ 2540 /* Configure the adapter for unassociated operation */
2539 iwl3945_commit_rxon(priv, ctx); 2541 iwl3945_commit_rxon(priv, ctx);
2540 2542
2541 iwl3945_reg_txpower_periodic(priv); 2543 iwl3945_reg_txpower_periodic(priv);
2542 2544
2543 IWL_DEBUG_INFO(priv, "ALIVE processing complete.\n"); 2545 IWL_DEBUG_INFO(priv, "ALIVE processing complete.\n");
2544 set_bit(STATUS_READY, &priv->status);
2545 wake_up_interruptible(&priv->wait_command_queue); 2546 wake_up_interruptible(&priv->wait_command_queue);
2546 2547
2547 return; 2548 return;