aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorReinette Chatre <reinette.chatre@intel.com>2010-04-16 16:43:40 -0400
committerReinette Chatre <reinette.chatre@intel.com>2010-04-16 16:43:40 -0400
commit8715fa28fb4fad62f6004d276ec8e1aa5e664e76 (patch)
tree5e07f18c04f497833c6b5f043360f5ef58f1f028 /drivers/net/wireless
parenta5e944f1d955f3819503348426763e21e0413ba6 (diff)
parentf2fa1b015e9c199e45c836c769d94db595150731 (diff)
Merge branch 'wireless-2.6' into wireless-next-2.6
Conflicts: drivers/net/wireless/iwlwifi/iwl-6000.c
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-6000.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-calib.c12
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-eeprom.h4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-scan.c31
8 files changed, 41 insertions, 15 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index dd03384432f4..f5d0665fd88a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -261,7 +261,7 @@ static struct iwl_lib_ops iwl6000_lib = {
261 EEPROM_REG_BAND_3_CHANNELS, 261 EEPROM_REG_BAND_3_CHANNELS,
262 EEPROM_REG_BAND_4_CHANNELS, 262 EEPROM_REG_BAND_4_CHANNELS,
263 EEPROM_REG_BAND_5_CHANNELS, 263 EEPROM_REG_BAND_5_CHANNELS,
264 EEPROM_REG_BAND_24_HT40_CHANNELS, 264 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
265 EEPROM_REG_BAND_52_HT40_CHANNELS 265 EEPROM_REG_BAND_52_HT40_CHANNELS
266 }, 266 },
267 .verify_signature = iwlcore_eeprom_verify_signature, 267 .verify_signature = iwlcore_eeprom_verify_signature,
@@ -328,7 +328,7 @@ static struct iwl_lib_ops iwl6050_lib = {
328 EEPROM_REG_BAND_3_CHANNELS, 328 EEPROM_REG_BAND_3_CHANNELS,
329 EEPROM_REG_BAND_4_CHANNELS, 329 EEPROM_REG_BAND_4_CHANNELS,
330 EEPROM_REG_BAND_5_CHANNELS, 330 EEPROM_REG_BAND_5_CHANNELS,
331 EEPROM_REG_BAND_24_HT40_CHANNELS, 331 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
332 EEPROM_REG_BAND_52_HT40_CHANNELS 332 EEPROM_REG_BAND_52_HT40_CHANNELS
333 }, 333 },
334 .verify_signature = iwlcore_eeprom_verify_signature, 334 .verify_signature = iwlcore_eeprom_verify_signature,
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 8a002c6f3a61..955315b26435 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3304,6 +3304,7 @@ static void iwl_cancel_deferred_work(struct iwl_priv *priv)
3304 3304
3305 cancel_delayed_work_sync(&priv->init_alive_start); 3305 cancel_delayed_work_sync(&priv->init_alive_start);
3306 cancel_delayed_work(&priv->scan_check); 3306 cancel_delayed_work(&priv->scan_check);
3307 cancel_work_sync(&priv->start_internal_scan);
3307 cancel_delayed_work(&priv->alive_start); 3308 cancel_delayed_work(&priv->alive_start);
3308 cancel_work_sync(&priv->beacon_update); 3309 cancel_work_sync(&priv->beacon_update);
3309 del_timer_sync(&priv->statistics_periodic); 3310 del_timer_sync(&priv->statistics_periodic);
diff --git a/drivers/net/wireless/iwlwifi/iwl-calib.c b/drivers/net/wireless/iwlwifi/iwl-calib.c
index dbb50a8e0ce3..dca20b124992 100644
--- a/drivers/net/wireless/iwlwifi/iwl-calib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-calib.c
@@ -807,6 +807,18 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv,
807 } 807 }
808 } 808 }
809 809
810 /*
811 * The above algorithm sometimes fails when the ucode
812 * reports 0 for all chains. It's not clear why that
813 * happens to start with, but it is then causing trouble
814 * because this can make us enable more chains than the
815 * hardware really has.
816 *
817 * To be safe, simply mask out any chains that we know
818 * are not on the device.
819 */
820 active_chains &= priv->hw_params.valid_rx_ant;
821
810 num_tx_chains = 0; 822 num_tx_chains = 0;
811 for (i = 0; i < NUM_RX_CHAINS; i++) { 823 for (i = 0; i < NUM_RX_CHAINS; i++) {
812 /* loops on all the bits of 824 /* loops on all the bits of
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index f09bff823ab6..73f5fc6c35d5 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -2801,7 +2801,6 @@ static void iwl_force_rf_reset(struct iwl_priv *priv)
2801 */ 2801 */
2802 IWL_DEBUG_INFO(priv, "perform radio reset.\n"); 2802 IWL_DEBUG_INFO(priv, "perform radio reset.\n");
2803 iwl_internal_short_hw_scan(priv); 2803 iwl_internal_short_hw_scan(priv);
2804 return;
2805} 2804}
2806 2805
2807 2806
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index d89755f5031a..6c3f0127f743 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -502,7 +502,7 @@ void iwl_init_scan_params(struct iwl_priv *priv);
502int iwl_scan_cancel(struct iwl_priv *priv); 502int iwl_scan_cancel(struct iwl_priv *priv);
503int iwl_scan_cancel_timeout(struct iwl_priv *priv, unsigned long ms); 503int iwl_scan_cancel_timeout(struct iwl_priv *priv, unsigned long ms);
504int iwl_mac_hw_scan(struct ieee80211_hw *hw, struct cfg80211_scan_request *req); 504int iwl_mac_hw_scan(struct ieee80211_hw *hw, struct cfg80211_scan_request *req);
505int iwl_internal_short_hw_scan(struct iwl_priv *priv); 505void iwl_internal_short_hw_scan(struct iwl_priv *priv);
506int iwl_force_reset(struct iwl_priv *priv, int mode); 506int iwl_force_reset(struct iwl_priv *priv, int mode);
507u16 iwl_fill_probe_req(struct iwl_priv *priv, struct ieee80211_mgmt *frame, 507u16 iwl_fill_probe_req(struct iwl_priv *priv, struct ieee80211_mgmt *frame,
508 const u8 *ie, int ie_len, int left); 508 const u8 *ie, int ie_len, int left);
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 9466e909f553..b2d94c7c6457 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -1264,6 +1264,7 @@ struct iwl_priv {
1264 struct work_struct tt_work; 1264 struct work_struct tt_work;
1265 struct work_struct ct_enter; 1265 struct work_struct ct_enter;
1266 struct work_struct ct_exit; 1266 struct work_struct ct_exit;
1267 struct work_struct start_internal_scan;
1267 1268
1268 struct tasklet_struct irq_tasklet; 1269 struct tasklet_struct irq_tasklet;
1269 1270
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.h b/drivers/net/wireless/iwlwifi/iwl-eeprom.h
index cb6d50b78140..ef0e3256eec2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-eeprom.h
+++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.h
@@ -203,6 +203,10 @@ struct iwl_eeprom_enhanced_txpwr {
203#define EEPROM_REG_BAND_52_HT40_CHANNELS ((0x92)\ 203#define EEPROM_REG_BAND_52_HT40_CHANNELS ((0x92)\
204 | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 22 bytes */ 204 | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 22 bytes */
205 205
206/* 6000 regulatory - indirect access */
207#define EEPROM_6000_REG_BAND_24_HT40_CHANNELS ((0x80)\
208 | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 14 bytes */
209
206/* 6000 and up regulatory tx power - indirect access */ 210/* 6000 and up regulatory tx power - indirect access */
207/* max. elements per section */ 211/* max. elements per section */
208#define EEPROM_MAX_TXPOWER_SECTION_ELEMENTS (8) 212#define EEPROM_MAX_TXPOWER_SECTION_ELEMENTS (8)
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
index d817c9c184a5..c3b06c4b6f3e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -469,6 +469,8 @@ EXPORT_SYMBOL(iwl_init_scan_params);
469 469
470static int iwl_scan_initiate(struct iwl_priv *priv) 470static int iwl_scan_initiate(struct iwl_priv *priv)
471{ 471{
472 WARN_ON(!mutex_is_locked(&priv->mutex));
473
472 IWL_DEBUG_INFO(priv, "Starting scan...\n"); 474 IWL_DEBUG_INFO(priv, "Starting scan...\n");
473 set_bit(STATUS_SCANNING, &priv->status); 475 set_bit(STATUS_SCANNING, &priv->status);
474 priv->is_internal_short_scan = false; 476 priv->is_internal_short_scan = false;
@@ -546,24 +548,31 @@ EXPORT_SYMBOL(iwl_mac_hw_scan);
546 * internal short scan, this function should only been called while associated. 548 * internal short scan, this function should only been called while associated.
547 * It will reset and tune the radio to prevent possible RF related problem 549 * It will reset and tune the radio to prevent possible RF related problem
548 */ 550 */
549int iwl_internal_short_hw_scan(struct iwl_priv *priv) 551void iwl_internal_short_hw_scan(struct iwl_priv *priv)
550{ 552{
551 int ret = 0; 553 queue_work(priv->workqueue, &priv->start_internal_scan);
554}
555
556static void iwl_bg_start_internal_scan(struct work_struct *work)
557{
558 struct iwl_priv *priv =
559 container_of(work, struct iwl_priv, start_internal_scan);
560
561 mutex_lock(&priv->mutex);
552 562
553 if (!iwl_is_ready_rf(priv)) { 563 if (!iwl_is_ready_rf(priv)) {
554 ret = -EIO;
555 IWL_DEBUG_SCAN(priv, "not ready or exit pending\n"); 564 IWL_DEBUG_SCAN(priv, "not ready or exit pending\n");
556 goto out; 565 goto unlock;
557 } 566 }
567
558 if (test_bit(STATUS_SCANNING, &priv->status)) { 568 if (test_bit(STATUS_SCANNING, &priv->status)) {
559 IWL_DEBUG_SCAN(priv, "Scan already in progress.\n"); 569 IWL_DEBUG_SCAN(priv, "Scan already in progress.\n");
560 ret = -EAGAIN; 570 goto unlock;
561 goto out;
562 } 571 }
572
563 if (test_bit(STATUS_SCAN_ABORTING, &priv->status)) { 573 if (test_bit(STATUS_SCAN_ABORTING, &priv->status)) {
564 IWL_DEBUG_SCAN(priv, "Scan request while abort pending\n"); 574 IWL_DEBUG_SCAN(priv, "Scan request while abort pending\n");
565 ret = -EAGAIN; 575 goto unlock;
566 goto out;
567 } 576 }
568 577
569 priv->scan_bands = 0; 578 priv->scan_bands = 0;
@@ -576,9 +585,8 @@ int iwl_internal_short_hw_scan(struct iwl_priv *priv)
576 set_bit(STATUS_SCANNING, &priv->status); 585 set_bit(STATUS_SCANNING, &priv->status);
577 priv->is_internal_short_scan = true; 586 priv->is_internal_short_scan = true;
578 queue_work(priv->workqueue, &priv->request_scan); 587 queue_work(priv->workqueue, &priv->request_scan);
579 588 unlock:
580out: 589 mutex_unlock(&priv->mutex);
581 return ret;
582} 590}
583 591
584#define IWL_SCAN_CHECK_WATCHDOG (7 * HZ) 592#define IWL_SCAN_CHECK_WATCHDOG (7 * HZ)
@@ -962,6 +970,7 @@ void iwl_setup_scan_deferred_work(struct iwl_priv *priv)
962 INIT_WORK(&priv->scan_completed, iwl_bg_scan_completed); 970 INIT_WORK(&priv->scan_completed, iwl_bg_scan_completed);
963 INIT_WORK(&priv->request_scan, iwl_bg_request_scan); 971 INIT_WORK(&priv->request_scan, iwl_bg_request_scan);
964 INIT_WORK(&priv->abort_scan, iwl_bg_abort_scan); 972 INIT_WORK(&priv->abort_scan, iwl_bg_abort_scan);
973 INIT_WORK(&priv->start_internal_scan, iwl_bg_start_internal_scan);
965 INIT_DELAYED_WORK(&priv->scan_check, iwl_bg_scan_check); 974 INIT_DELAYED_WORK(&priv->scan_check, iwl_bg_scan_check);
966} 975}
967EXPORT_SYMBOL(iwl_setup_scan_deferred_work); 976EXPORT_SYMBOL(iwl_setup_scan_deferred_work);