aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/8139too.c2
-rw-r--r--drivers/net/wan/hdlc_ppp.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-6000.c3
-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
10 files changed, 48 insertions, 15 deletions
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c
index d149624b4a44..d0cb372a0f0d 100644
--- a/drivers/net/8139too.c
+++ b/drivers/net/8139too.c
@@ -1944,7 +1944,7 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp,
1944 netif_dbg(tp, rx_status, dev, "%s() status %04x, size %04x, cur %04x\n", 1944 netif_dbg(tp, rx_status, dev, "%s() status %04x, size %04x, cur %04x\n",
1945 __func__, rx_status, rx_size, cur_rx); 1945 __func__, rx_status, rx_size, cur_rx);
1946#if RTL8139_DEBUG > 2 1946#if RTL8139_DEBUG > 2
1947 print_dump_hex(KERN_DEBUG, "Frame contents: ", 1947 print_hex_dump(KERN_DEBUG, "Frame contents: ",
1948 DUMP_PREFIX_OFFSET, 16, 1, 1948 DUMP_PREFIX_OFFSET, 16, 1,
1949 &rx_ring[ring_offset], 70, true); 1949 &rx_ring[ring_offset], 70, true);
1950#endif 1950#endif
diff --git a/drivers/net/wan/hdlc_ppp.c b/drivers/net/wan/hdlc_ppp.c
index b9b9d6b01c0b..941f053e650e 100644
--- a/drivers/net/wan/hdlc_ppp.c
+++ b/drivers/net/wan/hdlc_ppp.c
@@ -628,9 +628,15 @@ static void ppp_stop(struct net_device *dev)
628 ppp_cp_event(dev, PID_LCP, STOP, 0, 0, 0, NULL); 628 ppp_cp_event(dev, PID_LCP, STOP, 0, 0, 0, NULL);
629} 629}
630 630
631static void ppp_close(struct net_device *dev)
632{
633 ppp_tx_flush();
634}
635
631static struct hdlc_proto proto = { 636static struct hdlc_proto proto = {
632 .start = ppp_start, 637 .start = ppp_start,
633 .stop = ppp_stop, 638 .stop = ppp_stop,
639 .close = ppp_close,
634 .type_trans = ppp_type_trans, 640 .type_trans = ppp_type_trans,
635 .ioctl = ppp_ioctl, 641 .ioctl = ppp_ioctl,
636 .netif_rx = ppp_rx, 642 .netif_rx = ppp_rx,
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index dd03384432f4..3e32693d1c2f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -262,6 +262,7 @@ static struct iwl_lib_ops iwl6000_lib = {
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_REG_BAND_24_HT40_CHANNELS,
265 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
265 EEPROM_REG_BAND_52_HT40_CHANNELS 266 EEPROM_REG_BAND_52_HT40_CHANNELS
266 }, 267 },
267 .verify_signature = iwlcore_eeprom_verify_signature, 268 .verify_signature = iwlcore_eeprom_verify_signature,
@@ -328,7 +329,7 @@ static struct iwl_lib_ops iwl6050_lib = {
328 EEPROM_REG_BAND_3_CHANNELS, 329 EEPROM_REG_BAND_3_CHANNELS,
329 EEPROM_REG_BAND_4_CHANNELS, 330 EEPROM_REG_BAND_4_CHANNELS,
330 EEPROM_REG_BAND_5_CHANNELS, 331 EEPROM_REG_BAND_5_CHANNELS,
331 EEPROM_REG_BAND_24_HT40_CHANNELS, 332 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
332 EEPROM_REG_BAND_52_HT40_CHANNELS 333 EEPROM_REG_BAND_52_HT40_CHANNELS
333 }, 334 },
334 .verify_signature = iwlcore_eeprom_verify_signature, 335 .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 0b497d4bc659..310bc6aeb99b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3305,6 +3305,7 @@ static void iwl_cancel_deferred_work(struct iwl_priv *priv)
3305 3305
3306 cancel_delayed_work_sync(&priv->init_alive_start); 3306 cancel_delayed_work_sync(&priv->init_alive_start);
3307 cancel_delayed_work(&priv->scan_check); 3307 cancel_delayed_work(&priv->scan_check);
3308 cancel_work_sync(&priv->start_internal_scan);
3308 cancel_delayed_work(&priv->alive_start); 3309 cancel_delayed_work(&priv->alive_start);
3309 cancel_work_sync(&priv->beacon_update); 3310 cancel_work_sync(&priv->beacon_update);
3310 del_timer_sync(&priv->statistics_periodic); 3311 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 0471c3f8713e..f1fd00b1a65d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-calib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-calib.c
@@ -808,6 +808,18 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv,
808 } 808 }
809 } 809 }
810 810
811 /*
812 * The above algorithm sometimes fails when the ucode
813 * reports 0 for all chains. It's not clear why that
814 * happens to start with, but it is then causing trouble
815 * because this can make us enable more chains than the
816 * hardware really has.
817 *
818 * To be safe, simply mask out any chains that we know
819 * are not on the device.
820 */
821 active_chains &= priv->hw_params.valid_rx_ant;
822
811 num_tx_chains = 0; 823 num_tx_chains = 0;
812 for (i = 0; i < NUM_RX_CHAINS; i++) { 824 for (i = 0; i < NUM_RX_CHAINS; i++) {
813 /* loops on all the bits of 825 /* 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 2a89747d3473..b75808aad1ef 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -2802,7 +2802,6 @@ static void iwl_force_rf_reset(struct iwl_priv *priv)
2802 */ 2802 */
2803 IWL_DEBUG_INFO(priv, "perform radio reset.\n"); 2803 IWL_DEBUG_INFO(priv, "perform radio reset.\n");
2804 iwl_internal_short_hw_scan(priv); 2804 iwl_internal_short_hw_scan(priv);
2805 return;
2806} 2805}
2807 2806
2808 2807
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 ae981932ce61..de0446d4bfe9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -470,6 +470,8 @@ EXPORT_SYMBOL(iwl_init_scan_params);
470 470
471static int iwl_scan_initiate(struct iwl_priv *priv) 471static int iwl_scan_initiate(struct iwl_priv *priv)
472{ 472{
473 WARN_ON(!mutex_is_locked(&priv->mutex));
474
473 IWL_DEBUG_INFO(priv, "Starting scan...\n"); 475 IWL_DEBUG_INFO(priv, "Starting scan...\n");
474 set_bit(STATUS_SCANNING, &priv->status); 476 set_bit(STATUS_SCANNING, &priv->status);
475 priv->is_internal_short_scan = false; 477 priv->is_internal_short_scan = false;
@@ -547,24 +549,31 @@ EXPORT_SYMBOL(iwl_mac_hw_scan);
547 * internal short scan, this function should only been called while associated. 549 * internal short scan, this function should only been called while associated.
548 * It will reset and tune the radio to prevent possible RF related problem 550 * It will reset and tune the radio to prevent possible RF related problem
549 */ 551 */
550int iwl_internal_short_hw_scan(struct iwl_priv *priv) 552void iwl_internal_short_hw_scan(struct iwl_priv *priv)
551{ 553{
552 int ret = 0; 554 queue_work(priv->workqueue, &priv->start_internal_scan);
555}
556
557static void iwl_bg_start_internal_scan(struct work_struct *work)
558{
559 struct iwl_priv *priv =
560 container_of(work, struct iwl_priv, start_internal_scan);
561
562 mutex_lock(&priv->mutex);
553 563
554 if (!iwl_is_ready_rf(priv)) { 564 if (!iwl_is_ready_rf(priv)) {
555 ret = -EIO;
556 IWL_DEBUG_SCAN(priv, "not ready or exit pending\n"); 565 IWL_DEBUG_SCAN(priv, "not ready or exit pending\n");
557 goto out; 566 goto unlock;
558 } 567 }
568
559 if (test_bit(STATUS_SCANNING, &priv->status)) { 569 if (test_bit(STATUS_SCANNING, &priv->status)) {
560 IWL_DEBUG_SCAN(priv, "Scan already in progress.\n"); 570 IWL_DEBUG_SCAN(priv, "Scan already in progress.\n");
561 ret = -EAGAIN; 571 goto unlock;
562 goto out;
563 } 572 }
573
564 if (test_bit(STATUS_SCAN_ABORTING, &priv->status)) { 574 if (test_bit(STATUS_SCAN_ABORTING, &priv->status)) {
565 IWL_DEBUG_SCAN(priv, "Scan request while abort pending\n"); 575 IWL_DEBUG_SCAN(priv, "Scan request while abort pending\n");
566 ret = -EAGAIN; 576 goto unlock;
567 goto out;
568 } 577 }
569 578
570 priv->scan_bands = 0; 579 priv->scan_bands = 0;
@@ -577,9 +586,8 @@ int iwl_internal_short_hw_scan(struct iwl_priv *priv)
577 set_bit(STATUS_SCANNING, &priv->status); 586 set_bit(STATUS_SCANNING, &priv->status);
578 priv->is_internal_short_scan = true; 587 priv->is_internal_short_scan = true;
579 queue_work(priv->workqueue, &priv->request_scan); 588 queue_work(priv->workqueue, &priv->request_scan);
580 589 unlock:
581out: 590 mutex_unlock(&priv->mutex);
582 return ret;
583} 591}
584 592
585#define IWL_SCAN_CHECK_WATCHDOG (7 * HZ) 593#define IWL_SCAN_CHECK_WATCHDOG (7 * HZ)
@@ -963,6 +971,7 @@ void iwl_setup_scan_deferred_work(struct iwl_priv *priv)
963 INIT_WORK(&priv->scan_completed, iwl_bg_scan_completed); 971 INIT_WORK(&priv->scan_completed, iwl_bg_scan_completed);
964 INIT_WORK(&priv->request_scan, iwl_bg_request_scan); 972 INIT_WORK(&priv->request_scan, iwl_bg_request_scan);
965 INIT_WORK(&priv->abort_scan, iwl_bg_abort_scan); 973 INIT_WORK(&priv->abort_scan, iwl_bg_abort_scan);
974 INIT_WORK(&priv->start_internal_scan, iwl_bg_start_internal_scan);
966 INIT_DELAYED_WORK(&priv->scan_check, iwl_bg_scan_check); 975 INIT_DELAYED_WORK(&priv->scan_check, iwl_bg_scan_check);
967} 976}
968EXPORT_SYMBOL(iwl_setup_scan_deferred_work); 977EXPORT_SYMBOL(iwl_setup_scan_deferred_work);