diff options
Diffstat (limited to 'drivers/net/wireless')
24 files changed, 185 insertions, 72 deletions
diff --git a/drivers/net/wireless/ath/ath9k/Kconfig b/drivers/net/wireless/ath/ath9k/Kconfig index d9ff8413ab9a..d9c08c619a3a 100644 --- a/drivers/net/wireless/ath/ath9k/Kconfig +++ b/drivers/net/wireless/ath/ath9k/Kconfig | |||
@@ -26,7 +26,6 @@ config ATH9K | |||
26 | config ATH9K_PCI | 26 | config ATH9K_PCI |
27 | bool "Atheros ath9k PCI/PCIe bus support" | 27 | bool "Atheros ath9k PCI/PCIe bus support" |
28 | depends on ATH9K && PCI | 28 | depends on ATH9K && PCI |
29 | default PCI | ||
30 | ---help--- | 29 | ---help--- |
31 | This option enables the PCI bus support in ath9k. | 30 | This option enables the PCI bus support in ath9k. |
32 | 31 | ||
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_calib.c b/drivers/net/wireless/ath/ath9k/ar9002_calib.c index 015d97439935..2d4c0910295b 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c | |||
@@ -829,7 +829,7 @@ static bool ar9002_hw_init_cal(struct ath_hw *ah, struct ath9k_channel *chan) | |||
829 | if (AR_SREV_9271(ah)) { | 829 | if (AR_SREV_9271(ah)) { |
830 | if (!ar9285_hw_cl_cal(ah, chan)) | 830 | if (!ar9285_hw_cl_cal(ah, chan)) |
831 | return false; | 831 | return false; |
832 | } else if (AR_SREV_9285_12_OR_LATER(ah)) { | 832 | } else if (AR_SREV_9285(ah) && AR_SREV_9285_12_OR_LATER(ah)) { |
833 | if (!ar9285_hw_clc(ah, chan)) | 833 | if (!ar9285_hw_clc(ah, chan)) |
834 | return false; | 834 | return false; |
835 | } else { | 835 | } else { |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c index 0ca7635d0669..ff8150e46f0e 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | |||
@@ -4645,10 +4645,16 @@ static void ar9003_hw_set_power_per_rate_table(struct ath_hw *ah, | |||
4645 | case 1: | 4645 | case 1: |
4646 | break; | 4646 | break; |
4647 | case 2: | 4647 | case 2: |
4648 | scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN; | 4648 | if (scaledPower > REDUCE_SCALED_POWER_BY_TWO_CHAIN) |
4649 | scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN; | ||
4650 | else | ||
4651 | scaledPower = 0; | ||
4649 | break; | 4652 | break; |
4650 | case 3: | 4653 | case 3: |
4651 | scaledPower -= REDUCE_SCALED_POWER_BY_THREE_CHAIN; | 4654 | if (scaledPower > REDUCE_SCALED_POWER_BY_THREE_CHAIN) |
4655 | scaledPower -= REDUCE_SCALED_POWER_BY_THREE_CHAIN; | ||
4656 | else | ||
4657 | scaledPower = 0; | ||
4652 | break; | 4658 | break; |
4653 | } | 4659 | } |
4654 | 4660 | ||
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c index eee23ecd118a..892c48b15434 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c | |||
@@ -1381,3 +1381,25 @@ void ar9003_hw_bb_watchdog_dbg_info(struct ath_hw *ah) | |||
1381 | "==== BB update: done ====\n\n"); | 1381 | "==== BB update: done ====\n\n"); |
1382 | } | 1382 | } |
1383 | EXPORT_SYMBOL(ar9003_hw_bb_watchdog_dbg_info); | 1383 | EXPORT_SYMBOL(ar9003_hw_bb_watchdog_dbg_info); |
1384 | |||
1385 | void ar9003_hw_disable_phy_restart(struct ath_hw *ah) | ||
1386 | { | ||
1387 | u32 val; | ||
1388 | |||
1389 | /* While receiving unsupported rate frame rx state machine | ||
1390 | * gets into a state 0xb and if phy_restart happens in that | ||
1391 | * state, BB would go hang. If RXSM is in 0xb state after | ||
1392 | * first bb panic, ensure to disable the phy_restart. | ||
1393 | */ | ||
1394 | if (!((MS(ah->bb_watchdog_last_status, | ||
1395 | AR_PHY_WATCHDOG_RX_OFDM_SM) == 0xb) || | ||
1396 | ah->bb_hang_rx_ofdm)) | ||
1397 | return; | ||
1398 | |||
1399 | ah->bb_hang_rx_ofdm = true; | ||
1400 | val = REG_READ(ah, AR_PHY_RESTART); | ||
1401 | val &= ~AR_PHY_RESTART_ENA; | ||
1402 | |||
1403 | REG_WRITE(ah, AR_PHY_RESTART, val); | ||
1404 | } | ||
1405 | EXPORT_SYMBOL(ar9003_hw_disable_phy_restart); | ||
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_9287.c b/drivers/net/wireless/ath/ath9k/eeprom_9287.c index 7856f0d4512d..343fc9f946db 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c | |||
@@ -524,10 +524,16 @@ static void ath9k_hw_set_ar9287_power_per_rate_table(struct ath_hw *ah, | |||
524 | case 1: | 524 | case 1: |
525 | break; | 525 | break; |
526 | case 2: | 526 | case 2: |
527 | scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN; | 527 | if (scaledPower > REDUCE_SCALED_POWER_BY_TWO_CHAIN) |
528 | scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN; | ||
529 | else | ||
530 | scaledPower = 0; | ||
528 | break; | 531 | break; |
529 | case 3: | 532 | case 3: |
530 | scaledPower -= REDUCE_SCALED_POWER_BY_THREE_CHAIN; | 533 | if (scaledPower > REDUCE_SCALED_POWER_BY_THREE_CHAIN) |
534 | scaledPower -= REDUCE_SCALED_POWER_BY_THREE_CHAIN; | ||
535 | else | ||
536 | scaledPower = 0; | ||
531 | break; | 537 | break; |
532 | } | 538 | } |
533 | scaledPower = max((u16)0, scaledPower); | 539 | scaledPower = max((u16)0, scaledPower); |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 72543ce8f616..1be7c8bbef84 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -1555,9 +1555,12 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, | |||
1555 | if (ah->btcoex_hw.enabled) | 1555 | if (ah->btcoex_hw.enabled) |
1556 | ath9k_hw_btcoex_enable(ah); | 1556 | ath9k_hw_btcoex_enable(ah); |
1557 | 1557 | ||
1558 | if (AR_SREV_9300_20_OR_LATER(ah)) | 1558 | if (AR_SREV_9300_20_OR_LATER(ah)) { |
1559 | ar9003_hw_bb_watchdog_config(ah); | 1559 | ar9003_hw_bb_watchdog_config(ah); |
1560 | 1560 | ||
1561 | ar9003_hw_disable_phy_restart(ah); | ||
1562 | } | ||
1563 | |||
1561 | ath9k_hw_apply_gpio_override(ah); | 1564 | ath9k_hw_apply_gpio_override(ah); |
1562 | 1565 | ||
1563 | return 0; | 1566 | return 0; |
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index 57435ce62792..4b157c53d1a8 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -842,6 +842,7 @@ struct ath_hw { | |||
842 | 842 | ||
843 | u32 bb_watchdog_last_status; | 843 | u32 bb_watchdog_last_status; |
844 | u32 bb_watchdog_timeout_ms; /* in ms, 0 to disable */ | 844 | u32 bb_watchdog_timeout_ms; /* in ms, 0 to disable */ |
845 | u8 bb_hang_rx_ofdm; /* true if bb hang due to rx_ofdm */ | ||
845 | 846 | ||
846 | unsigned int paprd_target_power; | 847 | unsigned int paprd_target_power; |
847 | unsigned int paprd_training_power; | 848 | unsigned int paprd_training_power; |
@@ -990,6 +991,7 @@ void ar9002_hw_enable_wep_aggregation(struct ath_hw *ah); | |||
990 | void ar9003_hw_bb_watchdog_config(struct ath_hw *ah); | 991 | void ar9003_hw_bb_watchdog_config(struct ath_hw *ah); |
991 | void ar9003_hw_bb_watchdog_read(struct ath_hw *ah); | 992 | void ar9003_hw_bb_watchdog_read(struct ath_hw *ah); |
992 | void ar9003_hw_bb_watchdog_dbg_info(struct ath_hw *ah); | 993 | void ar9003_hw_bb_watchdog_dbg_info(struct ath_hw *ah); |
994 | void ar9003_hw_disable_phy_restart(struct ath_hw *ah); | ||
993 | void ar9003_paprd_enable(struct ath_hw *ah, bool val); | 995 | void ar9003_paprd_enable(struct ath_hw *ah, bool val); |
994 | void ar9003_paprd_populate_single_table(struct ath_hw *ah, | 996 | void ar9003_paprd_populate_single_table(struct ath_hw *ah, |
995 | struct ath9k_hw_cal_data *caldata, | 997 | struct ath9k_hw_cal_data *caldata, |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index a198ee374b05..2ca351fe6d3c 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -670,7 +670,8 @@ void ath9k_tasklet(unsigned long data) | |||
670 | u32 status = sc->intrstatus; | 670 | u32 status = sc->intrstatus; |
671 | u32 rxmask; | 671 | u32 rxmask; |
672 | 672 | ||
673 | if (status & ATH9K_INT_FATAL) { | 673 | if ((status & ATH9K_INT_FATAL) || |
674 | (status & ATH9K_INT_BB_WATCHDOG)) { | ||
674 | ath_reset(sc, true); | 675 | ath_reset(sc, true); |
675 | return; | 676 | return; |
676 | } | 677 | } |
@@ -737,6 +738,7 @@ irqreturn_t ath_isr(int irq, void *dev) | |||
737 | { | 738 | { |
738 | #define SCHED_INTR ( \ | 739 | #define SCHED_INTR ( \ |
739 | ATH9K_INT_FATAL | \ | 740 | ATH9K_INT_FATAL | \ |
741 | ATH9K_INT_BB_WATCHDOG | \ | ||
740 | ATH9K_INT_RXORN | \ | 742 | ATH9K_INT_RXORN | \ |
741 | ATH9K_INT_RXEOL | \ | 743 | ATH9K_INT_RXEOL | \ |
742 | ATH9K_INT_RX | \ | 744 | ATH9K_INT_RX | \ |
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c index 17542214c93f..ba7f36ab0a74 100644 --- a/drivers/net/wireless/ath/ath9k/rc.c +++ b/drivers/net/wireless/ath/ath9k/rc.c | |||
@@ -689,7 +689,8 @@ static void ath_rc_rate_set_series(const struct ath_rate_table *rate_table, | |||
689 | 689 | ||
690 | if (WLAN_RC_PHY_HT(rate_table->info[rix].phy)) { | 690 | if (WLAN_RC_PHY_HT(rate_table->info[rix].phy)) { |
691 | rate->flags |= IEEE80211_TX_RC_MCS; | 691 | rate->flags |= IEEE80211_TX_RC_MCS; |
692 | if (WLAN_RC_PHY_40(rate_table->info[rix].phy)) | 692 | if (WLAN_RC_PHY_40(rate_table->info[rix].phy) && |
693 | conf_is_ht40(&txrc->hw->conf)) | ||
693 | rate->flags |= IEEE80211_TX_RC_40_MHZ_WIDTH; | 694 | rate->flags |= IEEE80211_TX_RC_40_MHZ_WIDTH; |
694 | if (WLAN_RC_PHY_SGI(rate_table->info[rix].phy)) | 695 | if (WLAN_RC_PHY_SGI(rate_table->info[rix].phy)) |
695 | rate->flags |= IEEE80211_TX_RC_SHORT_GI; | 696 | rate->flags |= IEEE80211_TX_RC_SHORT_GI; |
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c index 9ed65157bef5..05960ddde24e 100644 --- a/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c | |||
@@ -3093,7 +3093,7 @@ static int b43_nphy_cal_tx_iq_lo(struct b43_wldev *dev, | |||
3093 | int freq; | 3093 | int freq; |
3094 | bool avoid = false; | 3094 | bool avoid = false; |
3095 | u8 length; | 3095 | u8 length; |
3096 | u16 tmp, core, type, count, max, numb, last, cmd; | 3096 | u16 tmp, core, type, count, max, numb, last = 0, cmd; |
3097 | const u16 *table; | 3097 | const u16 *table; |
3098 | bool phy6or5x; | 3098 | bool phy6or5x; |
3099 | 3099 | ||
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-lib.c b/drivers/net/wireless/iwlegacy/iwl-4965-lib.c index 7e5e85a017b5..a7a4739880dc 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965-lib.c +++ b/drivers/net/wireless/iwlegacy/iwl-4965-lib.c | |||
@@ -628,11 +628,11 @@ void iwl4965_rx_reply_rx(struct iwl_priv *priv, | |||
628 | 628 | ||
629 | /* rx_status carries information about the packet to mac80211 */ | 629 | /* rx_status carries information about the packet to mac80211 */ |
630 | rx_status.mactime = le64_to_cpu(phy_res->timestamp); | 630 | rx_status.mactime = le64_to_cpu(phy_res->timestamp); |
631 | rx_status.band = (phy_res->phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? | ||
632 | IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; | ||
631 | rx_status.freq = | 633 | rx_status.freq = |
632 | ieee80211_channel_to_frequency(le16_to_cpu(phy_res->channel), | 634 | ieee80211_channel_to_frequency(le16_to_cpu(phy_res->channel), |
633 | rx_status.band); | 635 | rx_status.band); |
634 | rx_status.band = (phy_res->phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? | ||
635 | IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; | ||
636 | rx_status.rate_idx = | 636 | rx_status.rate_idx = |
637 | iwl4965_hwrate_to_mac80211_idx(rate_n_flags, rx_status.band); | 637 | iwl4965_hwrate_to_mac80211_idx(rate_n_flags, rx_status.band); |
638 | rx_status.flag = 0; | 638 | rx_status.flag = 0; |
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965.c b/drivers/net/wireless/iwlegacy/iwl-4965.c index f5433c74b845..f9db25bb35c3 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965.c +++ b/drivers/net/wireless/iwlegacy/iwl-4965.c | |||
@@ -1543,7 +1543,7 @@ static void iwl4965_temperature_calib(struct iwl_priv *priv) | |||
1543 | s32 temp; | 1543 | s32 temp; |
1544 | 1544 | ||
1545 | temp = iwl4965_hw_get_temperature(priv); | 1545 | temp = iwl4965_hw_get_temperature(priv); |
1546 | if (temp < 0) | 1546 | if (IWL_TX_POWER_TEMPERATURE_OUT_OF_RANGE(temp)) |
1547 | return; | 1547 | return; |
1548 | 1548 | ||
1549 | if (priv->temperature != temp) { | 1549 | if (priv->temperature != temp) { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index f8c710db6e6f..fda6fe08cf91 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -603,19 +603,27 @@ struct iwl_cfg iwl6050_2abg_cfg = { | |||
603 | IWL_DEVICE_6050, | 603 | IWL_DEVICE_6050, |
604 | }; | 604 | }; |
605 | 605 | ||
606 | #define IWL_DEVICE_6150 \ | ||
607 | .fw_name_pre = IWL6050_FW_PRE, \ | ||
608 | .ucode_api_max = IWL6050_UCODE_API_MAX, \ | ||
609 | .ucode_api_min = IWL6050_UCODE_API_MIN, \ | ||
610 | .ops = &iwl6150_ops, \ | ||
611 | .eeprom_ver = EEPROM_6150_EEPROM_VERSION, \ | ||
612 | .eeprom_calib_ver = EEPROM_6150_TX_POWER_VERSION, \ | ||
613 | .base_params = &iwl6050_base_params, \ | ||
614 | .need_dc_calib = true, \ | ||
615 | .led_mode = IWL_LED_BLINK, \ | ||
616 | .internal_wimax_coex = true | ||
617 | |||
606 | struct iwl_cfg iwl6150_bgn_cfg = { | 618 | struct iwl_cfg iwl6150_bgn_cfg = { |
607 | .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN", | 619 | .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN", |
608 | .fw_name_pre = IWL6050_FW_PRE, | 620 | IWL_DEVICE_6150, |
609 | .ucode_api_max = IWL6050_UCODE_API_MAX, | ||
610 | .ucode_api_min = IWL6050_UCODE_API_MIN, | ||
611 | .eeprom_ver = EEPROM_6150_EEPROM_VERSION, | ||
612 | .eeprom_calib_ver = EEPROM_6150_TX_POWER_VERSION, | ||
613 | .ops = &iwl6150_ops, | ||
614 | .base_params = &iwl6050_base_params, | ||
615 | .ht_params = &iwl6000_ht_params, | 621 | .ht_params = &iwl6000_ht_params, |
616 | .need_dc_calib = true, | 622 | }; |
617 | .led_mode = IWL_LED_RF_STATE, | 623 | |
618 | .internal_wimax_coex = true, | 624 | struct iwl_cfg iwl6150_bg_cfg = { |
625 | .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BG", | ||
626 | IWL_DEVICE_6150, | ||
619 | }; | 627 | }; |
620 | 628 | ||
621 | struct iwl_cfg iwl6000_3agn_cfg = { | 629 | struct iwl_cfg iwl6000_3agn_cfg = { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 11c6c1169e78..a662adcb2adb 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -3831,11 +3831,11 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = { | |||
3831 | 3831 | ||
3832 | /* 6150 WiFi/WiMax Series */ | 3832 | /* 6150 WiFi/WiMax Series */ |
3833 | {IWL_PCI_DEVICE(0x0885, 0x1305, iwl6150_bgn_cfg)}, | 3833 | {IWL_PCI_DEVICE(0x0885, 0x1305, iwl6150_bgn_cfg)}, |
3834 | {IWL_PCI_DEVICE(0x0885, 0x1306, iwl6150_bgn_cfg)}, | 3834 | {IWL_PCI_DEVICE(0x0885, 0x1307, iwl6150_bg_cfg)}, |
3835 | {IWL_PCI_DEVICE(0x0885, 0x1325, iwl6150_bgn_cfg)}, | 3835 | {IWL_PCI_DEVICE(0x0885, 0x1325, iwl6150_bgn_cfg)}, |
3836 | {IWL_PCI_DEVICE(0x0885, 0x1326, iwl6150_bgn_cfg)}, | 3836 | {IWL_PCI_DEVICE(0x0885, 0x1327, iwl6150_bg_cfg)}, |
3837 | {IWL_PCI_DEVICE(0x0886, 0x1315, iwl6150_bgn_cfg)}, | 3837 | {IWL_PCI_DEVICE(0x0886, 0x1315, iwl6150_bgn_cfg)}, |
3838 | {IWL_PCI_DEVICE(0x0886, 0x1316, iwl6150_bgn_cfg)}, | 3838 | {IWL_PCI_DEVICE(0x0886, 0x1317, iwl6150_bg_cfg)}, |
3839 | 3839 | ||
3840 | /* 1000 Series WiFi */ | 3840 | /* 1000 Series WiFi */ |
3841 | {IWL_PCI_DEVICE(0x0083, 0x1205, iwl1000_bgn_cfg)}, | 3841 | {IWL_PCI_DEVICE(0x0083, 0x1205, iwl1000_bgn_cfg)}, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h index 2495fe7a58cb..d1716844002e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.h +++ b/drivers/net/wireless/iwlwifi/iwl-agn.h | |||
@@ -89,6 +89,7 @@ extern struct iwl_cfg iwl6000_3agn_cfg; | |||
89 | extern struct iwl_cfg iwl6050_2agn_cfg; | 89 | extern struct iwl_cfg iwl6050_2agn_cfg; |
90 | extern struct iwl_cfg iwl6050_2abg_cfg; | 90 | extern struct iwl_cfg iwl6050_2abg_cfg; |
91 | extern struct iwl_cfg iwl6150_bgn_cfg; | 91 | extern struct iwl_cfg iwl6150_bgn_cfg; |
92 | extern struct iwl_cfg iwl6150_bg_cfg; | ||
92 | extern struct iwl_cfg iwl1000_bgn_cfg; | 93 | extern struct iwl_cfg iwl1000_bgn_cfg; |
93 | extern struct iwl_cfg iwl1000_bg_cfg; | 94 | extern struct iwl_cfg iwl1000_bg_cfg; |
94 | extern struct iwl_cfg iwl100_bgn_cfg; | 95 | extern struct iwl_cfg iwl100_bgn_cfg; |
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 84566db486d2..71c8f3fccfa1 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -994,6 +994,8 @@ static void lbs_submit_command(struct lbs_private *priv, | |||
994 | cmd = cmdnode->cmdbuf; | 994 | cmd = cmdnode->cmdbuf; |
995 | 995 | ||
996 | spin_lock_irqsave(&priv->driver_lock, flags); | 996 | spin_lock_irqsave(&priv->driver_lock, flags); |
997 | priv->seqnum++; | ||
998 | cmd->seqnum = cpu_to_le16(priv->seqnum); | ||
997 | priv->cur_cmd = cmdnode; | 999 | priv->cur_cmd = cmdnode; |
998 | spin_unlock_irqrestore(&priv->driver_lock, flags); | 1000 | spin_unlock_irqrestore(&priv->driver_lock, flags); |
999 | 1001 | ||
@@ -1621,11 +1623,9 @@ struct cmd_ctrl_node *__lbs_cmd_async(struct lbs_private *priv, | |||
1621 | /* Copy the incoming command to the buffer */ | 1623 | /* Copy the incoming command to the buffer */ |
1622 | memcpy(cmdnode->cmdbuf, in_cmd, in_cmd_size); | 1624 | memcpy(cmdnode->cmdbuf, in_cmd, in_cmd_size); |
1623 | 1625 | ||
1624 | /* Set sequence number, clean result, move to buffer */ | 1626 | /* Set command, clean result, move to buffer */ |
1625 | priv->seqnum++; | ||
1626 | cmdnode->cmdbuf->command = cpu_to_le16(command); | 1627 | cmdnode->cmdbuf->command = cpu_to_le16(command); |
1627 | cmdnode->cmdbuf->size = cpu_to_le16(in_cmd_size); | 1628 | cmdnode->cmdbuf->size = cpu_to_le16(in_cmd_size); |
1628 | cmdnode->cmdbuf->seqnum = cpu_to_le16(priv->seqnum); | ||
1629 | cmdnode->cmdbuf->result = 0; | 1629 | cmdnode->cmdbuf->result = 0; |
1630 | 1630 | ||
1631 | lbs_deb_host("PREP_CMD: command 0x%04x\n", command); | 1631 | lbs_deb_host("PREP_CMD: command 0x%04x\n", command); |
diff --git a/drivers/net/wireless/mwifiex/sdio.h b/drivers/net/wireless/mwifiex/sdio.h index a0e9bc5253e0..4e97e90aa399 100644 --- a/drivers/net/wireless/mwifiex/sdio.h +++ b/drivers/net/wireless/mwifiex/sdio.h | |||
@@ -167,8 +167,8 @@ | |||
167 | /* Rx unit register */ | 167 | /* Rx unit register */ |
168 | #define CARD_RX_UNIT_REG 0x63 | 168 | #define CARD_RX_UNIT_REG 0x63 |
169 | 169 | ||
170 | /* Event header Len*/ | 170 | /* Event header len w/o 4 bytes of interface header */ |
171 | #define MWIFIEX_EVENT_HEADER_LEN 8 | 171 | #define MWIFIEX_EVENT_HEADER_LEN 4 |
172 | 172 | ||
173 | /* Max retry number of CMD53 write */ | 173 | /* Max retry number of CMD53 write */ |
174 | #define MAX_WRITE_IOMEM_RETRY 2 | 174 | #define MAX_WRITE_IOMEM_RETRY 2 |
diff --git a/drivers/net/wireless/rt2x00/Kconfig b/drivers/net/wireless/rt2x00/Kconfig index 9def1e5369a1..b2f8b8fd4d2d 100644 --- a/drivers/net/wireless/rt2x00/Kconfig +++ b/drivers/net/wireless/rt2x00/Kconfig | |||
@@ -166,7 +166,6 @@ config RT2800USB_RT35XX | |||
166 | config RT2800USB_RT53XX | 166 | config RT2800USB_RT53XX |
167 | bool "rt2800usb - Include support for rt53xx devices (EXPERIMENTAL)" | 167 | bool "rt2800usb - Include support for rt53xx devices (EXPERIMENTAL)" |
168 | depends on EXPERIMENTAL | 168 | depends on EXPERIMENTAL |
169 | default y | ||
170 | ---help--- | 169 | ---help--- |
171 | This adds support for rt53xx wireless chipset family to the | 170 | This adds support for rt53xx wireless chipset family to the |
172 | rt2800pci driver. | 171 | rt2800pci driver. |
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index a40952845436..89100e7c553b 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
@@ -669,11 +669,6 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) | |||
669 | &rx_status, | 669 | &rx_status, |
670 | (u8 *) pdesc, skb); | 670 | (u8 *) pdesc, skb); |
671 | 671 | ||
672 | pci_unmap_single(rtlpci->pdev, | ||
673 | *((dma_addr_t *) skb->cb), | ||
674 | rtlpci->rxbuffersize, | ||
675 | PCI_DMA_FROMDEVICE); | ||
676 | |||
677 | skb_put(skb, rtlpriv->cfg->ops->get_desc((u8 *) pdesc, | 672 | skb_put(skb, rtlpriv->cfg->ops->get_desc((u8 *) pdesc, |
678 | false, | 673 | false, |
679 | HW_DESC_RXPKT_LEN)); | 674 | HW_DESC_RXPKT_LEN)); |
@@ -690,6 +685,21 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) | |||
690 | hdr = rtl_get_hdr(skb); | 685 | hdr = rtl_get_hdr(skb); |
691 | fc = rtl_get_fc(skb); | 686 | fc = rtl_get_fc(skb); |
692 | 687 | ||
688 | /* try for new buffer - if allocation fails, drop | ||
689 | * frame and reuse old buffer | ||
690 | */ | ||
691 | new_skb = dev_alloc_skb(rtlpci->rxbuffersize); | ||
692 | if (unlikely(!new_skb)) { | ||
693 | RT_TRACE(rtlpriv, (COMP_INTR | COMP_RECV), | ||
694 | DBG_DMESG, | ||
695 | ("can't alloc skb for rx\n")); | ||
696 | goto done; | ||
697 | } | ||
698 | pci_unmap_single(rtlpci->pdev, | ||
699 | *((dma_addr_t *) skb->cb), | ||
700 | rtlpci->rxbuffersize, | ||
701 | PCI_DMA_FROMDEVICE); | ||
702 | |||
693 | if (!stats.crc || !stats.hwerror) { | 703 | if (!stats.crc || !stats.hwerror) { |
694 | memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, | 704 | memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, |
695 | sizeof(rx_status)); | 705 | sizeof(rx_status)); |
@@ -758,15 +768,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) | |||
758 | rtl_lps_leave(hw); | 768 | rtl_lps_leave(hw); |
759 | } | 769 | } |
760 | 770 | ||
761 | new_skb = dev_alloc_skb(rtlpci->rxbuffersize); | ||
762 | if (unlikely(!new_skb)) { | ||
763 | RT_TRACE(rtlpriv, (COMP_INTR | COMP_RECV), | ||
764 | DBG_DMESG, | ||
765 | ("can't alloc skb for rx\n")); | ||
766 | goto done; | ||
767 | } | ||
768 | skb = new_skb; | 771 | skb = new_skb; |
769 | /*skb->dev = dev; */ | ||
770 | 772 | ||
771 | rtlpci->rx_ring[rx_queue_idx].rx_buf[rtlpci-> | 773 | rtlpci->rx_ring[rx_queue_idx].rx_buf[rtlpci-> |
772 | rx_ring | 774 | rx_ring |
@@ -1113,6 +1115,13 @@ static int _rtl_pci_init_rx_ring(struct ieee80211_hw *hw) | |||
1113 | 1115 | ||
1114 | rtlpci->rx_ring[rx_queue_idx].idx = 0; | 1116 | rtlpci->rx_ring[rx_queue_idx].idx = 0; |
1115 | 1117 | ||
1118 | /* If amsdu_8k is disabled, set buffersize to 4096. This | ||
1119 | * change will reduce memory fragmentation. | ||
1120 | */ | ||
1121 | if (rtlpci->rxbuffersize > 4096 && | ||
1122 | rtlpriv->rtlhal.disable_amsdu_8k) | ||
1123 | rtlpci->rxbuffersize = 4096; | ||
1124 | |||
1116 | for (i = 0; i < rtlpci->rxringcount; i++) { | 1125 | for (i = 0; i < rtlpci->rxringcount; i++) { |
1117 | struct sk_buff *skb = | 1126 | struct sk_buff *skb = |
1118 | dev_alloc_skb(rtlpci->rxbuffersize); | 1127 | dev_alloc_skb(rtlpci->rxbuffersize); |
diff --git a/drivers/net/wireless/wl12xx/conf.h b/drivers/net/wireless/wl12xx/conf.h index 1ab6c86aac40..c83fefb6662f 100644 --- a/drivers/net/wireless/wl12xx/conf.h +++ b/drivers/net/wireless/wl12xx/conf.h | |||
@@ -1157,6 +1157,9 @@ struct conf_sched_scan_settings { | |||
1157 | /* time to wait on the channel for passive scans (in TUs) */ | 1157 | /* time to wait on the channel for passive scans (in TUs) */ |
1158 | u32 dwell_time_passive; | 1158 | u32 dwell_time_passive; |
1159 | 1159 | ||
1160 | /* time to wait on the channel for DFS scans (in TUs) */ | ||
1161 | u32 dwell_time_dfs; | ||
1162 | |||
1160 | /* number of probe requests to send on each channel in active scans */ | 1163 | /* number of probe requests to send on each channel in active scans */ |
1161 | u8 num_probe_reqs; | 1164 | u8 num_probe_reqs; |
1162 | 1165 | ||
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index bc00e52f6445..e6497dc669df 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -311,6 +311,7 @@ static struct conf_drv_settings default_conf = { | |||
311 | .min_dwell_time_active = 8, | 311 | .min_dwell_time_active = 8, |
312 | .max_dwell_time_active = 30, | 312 | .max_dwell_time_active = 30, |
313 | .dwell_time_passive = 100, | 313 | .dwell_time_passive = 100, |
314 | .dwell_time_dfs = 150, | ||
314 | .num_probe_reqs = 2, | 315 | .num_probe_reqs = 2, |
315 | .rssi_threshold = -90, | 316 | .rssi_threshold = -90, |
316 | .snr_threshold = 0, | 317 | .snr_threshold = 0, |
diff --git a/drivers/net/wireless/wl12xx/scan.c b/drivers/net/wireless/wl12xx/scan.c index f37e5a391976..56f76abc754d 100644 --- a/drivers/net/wireless/wl12xx/scan.c +++ b/drivers/net/wireless/wl12xx/scan.c | |||
@@ -331,16 +331,22 @@ wl1271_scan_get_sched_scan_channels(struct wl1271 *wl, | |||
331 | struct conf_sched_scan_settings *c = &wl->conf.sched_scan; | 331 | struct conf_sched_scan_settings *c = &wl->conf.sched_scan; |
332 | int i, j; | 332 | int i, j; |
333 | u32 flags; | 333 | u32 flags; |
334 | bool force_passive = !req->n_ssids; | ||
334 | 335 | ||
335 | for (i = 0, j = start; | 336 | for (i = 0, j = start; |
336 | i < req->n_channels && j < MAX_CHANNELS_ALL_BANDS; | 337 | i < req->n_channels && j < MAX_CHANNELS_ALL_BANDS; |
337 | i++) { | 338 | i++) { |
338 | flags = req->channels[i]->flags; | 339 | flags = req->channels[i]->flags; |
339 | 340 | ||
340 | if (!(flags & IEEE80211_CHAN_DISABLED) && | 341 | if (force_passive) |
341 | ((flags & IEEE80211_CHAN_PASSIVE_SCAN) == passive) && | 342 | flags |= IEEE80211_CHAN_PASSIVE_SCAN; |
342 | ((flags & IEEE80211_CHAN_RADAR) == radar) && | 343 | |
343 | (req->channels[i]->band == band)) { | 344 | if ((req->channels[i]->band == band) && |
345 | !(flags & IEEE80211_CHAN_DISABLED) && | ||
346 | (!!(flags & IEEE80211_CHAN_RADAR) == radar) && | ||
347 | /* if radar is set, we ignore the passive flag */ | ||
348 | (radar || | ||
349 | !!(flags & IEEE80211_CHAN_PASSIVE_SCAN) == passive)) { | ||
344 | wl1271_debug(DEBUG_SCAN, "band %d, center_freq %d ", | 350 | wl1271_debug(DEBUG_SCAN, "band %d, center_freq %d ", |
345 | req->channels[i]->band, | 351 | req->channels[i]->band, |
346 | req->channels[i]->center_freq); | 352 | req->channels[i]->center_freq); |
@@ -350,7 +356,12 @@ wl1271_scan_get_sched_scan_channels(struct wl1271 *wl, | |||
350 | wl1271_debug(DEBUG_SCAN, "max_power %d", | 356 | wl1271_debug(DEBUG_SCAN, "max_power %d", |
351 | req->channels[i]->max_power); | 357 | req->channels[i]->max_power); |
352 | 358 | ||
353 | if (flags & IEEE80211_CHAN_PASSIVE_SCAN) { | 359 | if (flags & IEEE80211_CHAN_RADAR) { |
360 | channels[j].flags |= SCAN_CHANNEL_FLAGS_DFS; | ||
361 | channels[j].passive_duration = | ||
362 | cpu_to_le16(c->dwell_time_dfs); | ||
363 | } | ||
364 | else if (flags & IEEE80211_CHAN_PASSIVE_SCAN) { | ||
354 | channels[j].passive_duration = | 365 | channels[j].passive_duration = |
355 | cpu_to_le16(c->dwell_time_passive); | 366 | cpu_to_le16(c->dwell_time_passive); |
356 | } else { | 367 | } else { |
@@ -359,7 +370,7 @@ wl1271_scan_get_sched_scan_channels(struct wl1271 *wl, | |||
359 | channels[j].max_duration = | 370 | channels[j].max_duration = |
360 | cpu_to_le16(c->max_dwell_time_active); | 371 | cpu_to_le16(c->max_dwell_time_active); |
361 | } | 372 | } |
362 | channels[j].tx_power_att = req->channels[j]->max_power; | 373 | channels[j].tx_power_att = req->channels[i]->max_power; |
363 | channels[j].channel = req->channels[i]->hw_value; | 374 | channels[j].channel = req->channels[i]->hw_value; |
364 | 375 | ||
365 | j++; | 376 | j++; |
@@ -386,7 +397,11 @@ wl1271_scan_sched_scan_channels(struct wl1271 *wl, | |||
386 | wl1271_scan_get_sched_scan_channels(wl, req, cfg->channels, | 397 | wl1271_scan_get_sched_scan_channels(wl, req, cfg->channels, |
387 | IEEE80211_BAND_2GHZ, | 398 | IEEE80211_BAND_2GHZ, |
388 | false, false, idx); | 399 | false, false, idx); |
389 | idx += cfg->active[0]; | 400 | /* |
401 | * 5GHz channels always start at position 14, not immediately | ||
402 | * after the last 2.4GHz channel | ||
403 | */ | ||
404 | idx = 14; | ||
390 | 405 | ||
391 | cfg->passive[1] = | 406 | cfg->passive[1] = |
392 | wl1271_scan_get_sched_scan_channels(wl, req, cfg->channels, | 407 | wl1271_scan_get_sched_scan_channels(wl, req, cfg->channels, |
@@ -394,22 +409,23 @@ wl1271_scan_sched_scan_channels(struct wl1271 *wl, | |||
394 | false, true, idx); | 409 | false, true, idx); |
395 | idx += cfg->passive[1]; | 410 | idx += cfg->passive[1]; |
396 | 411 | ||
397 | cfg->active[1] = | 412 | cfg->dfs = |
398 | wl1271_scan_get_sched_scan_channels(wl, req, cfg->channels, | 413 | wl1271_scan_get_sched_scan_channels(wl, req, cfg->channels, |
399 | IEEE80211_BAND_5GHZ, | 414 | IEEE80211_BAND_5GHZ, |
400 | false, false, 14); | 415 | true, true, idx); |
401 | idx += cfg->active[1]; | 416 | idx += cfg->dfs; |
402 | 417 | ||
403 | cfg->dfs = | 418 | cfg->active[1] = |
404 | wl1271_scan_get_sched_scan_channels(wl, req, cfg->channels, | 419 | wl1271_scan_get_sched_scan_channels(wl, req, cfg->channels, |
405 | IEEE80211_BAND_5GHZ, | 420 | IEEE80211_BAND_5GHZ, |
406 | true, false, idx); | 421 | false, false, idx); |
407 | idx += cfg->dfs; | 422 | idx += cfg->active[1]; |
408 | 423 | ||
409 | wl1271_debug(DEBUG_SCAN, " 2.4GHz: active %d passive %d", | 424 | wl1271_debug(DEBUG_SCAN, " 2.4GHz: active %d passive %d", |
410 | cfg->active[0], cfg->passive[0]); | 425 | cfg->active[0], cfg->passive[0]); |
411 | wl1271_debug(DEBUG_SCAN, " 5GHz: active %d passive %d", | 426 | wl1271_debug(DEBUG_SCAN, " 5GHz: active %d passive %d", |
412 | cfg->active[1], cfg->passive[1]); | 427 | cfg->active[1], cfg->passive[1]); |
428 | wl1271_debug(DEBUG_SCAN, " DFS: %d", cfg->dfs); | ||
413 | 429 | ||
414 | return idx; | 430 | return idx; |
415 | } | 431 | } |
@@ -421,6 +437,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl, | |||
421 | struct wl1271_cmd_sched_scan_config *cfg = NULL; | 437 | struct wl1271_cmd_sched_scan_config *cfg = NULL; |
422 | struct conf_sched_scan_settings *c = &wl->conf.sched_scan; | 438 | struct conf_sched_scan_settings *c = &wl->conf.sched_scan; |
423 | int i, total_channels, ret; | 439 | int i, total_channels, ret; |
440 | bool force_passive = !req->n_ssids; | ||
424 | 441 | ||
425 | wl1271_debug(DEBUG_CMD, "cmd sched_scan scan config"); | 442 | wl1271_debug(DEBUG_CMD, "cmd sched_scan scan config"); |
426 | 443 | ||
@@ -444,7 +461,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl, | |||
444 | for (i = 0; i < SCAN_MAX_CYCLE_INTERVALS; i++) | 461 | for (i = 0; i < SCAN_MAX_CYCLE_INTERVALS; i++) |
445 | cfg->intervals[i] = cpu_to_le32(req->interval); | 462 | cfg->intervals[i] = cpu_to_le32(req->interval); |
446 | 463 | ||
447 | if (req->ssids[0].ssid_len && req->ssids[0].ssid) { | 464 | if (!force_passive && req->ssids[0].ssid_len && req->ssids[0].ssid) { |
448 | cfg->filter_type = SCAN_SSID_FILTER_SPECIFIC; | 465 | cfg->filter_type = SCAN_SSID_FILTER_SPECIFIC; |
449 | cfg->ssid_len = req->ssids[0].ssid_len; | 466 | cfg->ssid_len = req->ssids[0].ssid_len; |
450 | memcpy(cfg->ssid, req->ssids[0].ssid, | 467 | memcpy(cfg->ssid, req->ssids[0].ssid, |
@@ -461,7 +478,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl, | |||
461 | goto out; | 478 | goto out; |
462 | } | 479 | } |
463 | 480 | ||
464 | if (cfg->active[0]) { | 481 | if (!force_passive && cfg->active[0]) { |
465 | ret = wl1271_cmd_build_probe_req(wl, req->ssids[0].ssid, | 482 | ret = wl1271_cmd_build_probe_req(wl, req->ssids[0].ssid, |
466 | req->ssids[0].ssid_len, | 483 | req->ssids[0].ssid_len, |
467 | ies->ie[IEEE80211_BAND_2GHZ], | 484 | ies->ie[IEEE80211_BAND_2GHZ], |
@@ -473,7 +490,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl, | |||
473 | } | 490 | } |
474 | } | 491 | } |
475 | 492 | ||
476 | if (cfg->active[1]) { | 493 | if (!force_passive && cfg->active[1]) { |
477 | ret = wl1271_cmd_build_probe_req(wl, req->ssids[0].ssid, | 494 | ret = wl1271_cmd_build_probe_req(wl, req->ssids[0].ssid, |
478 | req->ssids[0].ssid_len, | 495 | req->ssids[0].ssid_len, |
479 | ies->ie[IEEE80211_BAND_5GHZ], | 496 | ies->ie[IEEE80211_BAND_5GHZ], |
diff --git a/drivers/net/wireless/wl12xx/scan.h b/drivers/net/wireless/wl12xx/scan.h index c83319579ca3..a0b6c5d67b07 100644 --- a/drivers/net/wireless/wl12xx/scan.h +++ b/drivers/net/wireless/wl12xx/scan.h | |||
@@ -137,6 +137,9 @@ enum { | |||
137 | SCAN_BSS_TYPE_ANY, | 137 | SCAN_BSS_TYPE_ANY, |
138 | }; | 138 | }; |
139 | 139 | ||
140 | #define SCAN_CHANNEL_FLAGS_DFS BIT(0) | ||
141 | #define SCAN_CHANNEL_FLAGS_DFS_ENABLED BIT(1) | ||
142 | |||
140 | struct conn_scan_ch_params { | 143 | struct conn_scan_ch_params { |
141 | __le16 min_duration; | 144 | __le16 min_duration; |
142 | __le16 max_duration; | 145 | __le16 max_duration; |
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c index 0e819943b9e4..631194d49828 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zd1211rw/zd_usb.c | |||
@@ -1533,6 +1533,31 @@ static void __exit usb_exit(void) | |||
1533 | module_init(usb_init); | 1533 | module_init(usb_init); |
1534 | module_exit(usb_exit); | 1534 | module_exit(usb_exit); |
1535 | 1535 | ||
1536 | static int zd_ep_regs_out_msg(struct usb_device *udev, void *data, int len, | ||
1537 | int *actual_length, int timeout) | ||
1538 | { | ||
1539 | /* In USB 2.0 mode EP_REGS_OUT endpoint is interrupt type. However in | ||
1540 | * USB 1.1 mode endpoint is bulk. Select correct type URB by endpoint | ||
1541 | * descriptor. | ||
1542 | */ | ||
1543 | struct usb_host_endpoint *ep; | ||
1544 | unsigned int pipe; | ||
1545 | |||
1546 | pipe = usb_sndintpipe(udev, EP_REGS_OUT); | ||
1547 | ep = usb_pipe_endpoint(udev, pipe); | ||
1548 | if (!ep) | ||
1549 | return -EINVAL; | ||
1550 | |||
1551 | if (usb_endpoint_xfer_int(&ep->desc)) { | ||
1552 | return usb_interrupt_msg(udev, pipe, data, len, | ||
1553 | actual_length, timeout); | ||
1554 | } else { | ||
1555 | pipe = usb_sndbulkpipe(udev, EP_REGS_OUT); | ||
1556 | return usb_bulk_msg(udev, pipe, data, len, actual_length, | ||
1557 | timeout); | ||
1558 | } | ||
1559 | } | ||
1560 | |||
1536 | static int usb_int_regs_length(unsigned int count) | 1561 | static int usb_int_regs_length(unsigned int count) |
1537 | { | 1562 | { |
1538 | return sizeof(struct usb_int_regs) + count * sizeof(struct reg_data); | 1563 | return sizeof(struct usb_int_regs) + count * sizeof(struct reg_data); |
@@ -1648,15 +1673,14 @@ int zd_usb_ioread16v(struct zd_usb *usb, u16 *values, | |||
1648 | 1673 | ||
1649 | udev = zd_usb_to_usbdev(usb); | 1674 | udev = zd_usb_to_usbdev(usb); |
1650 | prepare_read_regs_int(usb); | 1675 | prepare_read_regs_int(usb); |
1651 | r = usb_interrupt_msg(udev, usb_sndintpipe(udev, EP_REGS_OUT), | 1676 | r = zd_ep_regs_out_msg(udev, req, req_len, &actual_req_len, 50 /*ms*/); |
1652 | req, req_len, &actual_req_len, 50 /* ms */); | ||
1653 | if (r) { | 1677 | if (r) { |
1654 | dev_dbg_f(zd_usb_dev(usb), | 1678 | dev_dbg_f(zd_usb_dev(usb), |
1655 | "error in usb_interrupt_msg(). Error number %d\n", r); | 1679 | "error in zd_ep_regs_out_msg(). Error number %d\n", r); |
1656 | goto error; | 1680 | goto error; |
1657 | } | 1681 | } |
1658 | if (req_len != actual_req_len) { | 1682 | if (req_len != actual_req_len) { |
1659 | dev_dbg_f(zd_usb_dev(usb), "error in usb_interrupt_msg()\n" | 1683 | dev_dbg_f(zd_usb_dev(usb), "error in zd_ep_regs_out_msg()\n" |
1660 | " req_len %d != actual_req_len %d\n", | 1684 | " req_len %d != actual_req_len %d\n", |
1661 | req_len, actual_req_len); | 1685 | req_len, actual_req_len); |
1662 | r = -EIO; | 1686 | r = -EIO; |
@@ -1818,9 +1842,17 @@ int zd_usb_iowrite16v_async(struct zd_usb *usb, const struct zd_ioreq16 *ioreqs, | |||
1818 | rw->value = cpu_to_le16(ioreqs[i].value); | 1842 | rw->value = cpu_to_le16(ioreqs[i].value); |
1819 | } | 1843 | } |
1820 | 1844 | ||
1821 | usb_fill_int_urb(urb, udev, usb_sndintpipe(udev, EP_REGS_OUT), | 1845 | /* In USB 2.0 mode endpoint is interrupt type. However in USB 1.1 mode |
1822 | req, req_len, iowrite16v_urb_complete, usb, | 1846 | * endpoint is bulk. Select correct type URB by endpoint descriptor. |
1823 | ep->desc.bInterval); | 1847 | */ |
1848 | if (usb_endpoint_xfer_int(&ep->desc)) | ||
1849 | usb_fill_int_urb(urb, udev, usb_sndintpipe(udev, EP_REGS_OUT), | ||
1850 | req, req_len, iowrite16v_urb_complete, usb, | ||
1851 | ep->desc.bInterval); | ||
1852 | else | ||
1853 | usb_fill_bulk_urb(urb, udev, usb_sndbulkpipe(udev, EP_REGS_OUT), | ||
1854 | req, req_len, iowrite16v_urb_complete, usb); | ||
1855 | |||
1824 | urb->transfer_flags |= URB_FREE_BUFFER; | 1856 | urb->transfer_flags |= URB_FREE_BUFFER; |
1825 | 1857 | ||
1826 | /* Submit previous URB */ | 1858 | /* Submit previous URB */ |
@@ -1924,15 +1956,14 @@ int zd_usb_rfwrite(struct zd_usb *usb, u32 value, u8 bits) | |||
1924 | } | 1956 | } |
1925 | 1957 | ||
1926 | udev = zd_usb_to_usbdev(usb); | 1958 | udev = zd_usb_to_usbdev(usb); |
1927 | r = usb_interrupt_msg(udev, usb_sndintpipe(udev, EP_REGS_OUT), | 1959 | r = zd_ep_regs_out_msg(udev, req, req_len, &actual_req_len, 50 /*ms*/); |
1928 | req, req_len, &actual_req_len, 50 /* ms */); | ||
1929 | if (r) { | 1960 | if (r) { |
1930 | dev_dbg_f(zd_usb_dev(usb), | 1961 | dev_dbg_f(zd_usb_dev(usb), |
1931 | "error in usb_interrupt_msg(). Error number %d\n", r); | 1962 | "error in zd_ep_regs_out_msg(). Error number %d\n", r); |
1932 | goto out; | 1963 | goto out; |
1933 | } | 1964 | } |
1934 | if (req_len != actual_req_len) { | 1965 | if (req_len != actual_req_len) { |
1935 | dev_dbg_f(zd_usb_dev(usb), "error in usb_interrupt_msg()" | 1966 | dev_dbg_f(zd_usb_dev(usb), "error in zd_ep_regs_out_msg()" |
1936 | " req_len %d != actual_req_len %d\n", | 1967 | " req_len %d != actual_req_len %d\n", |
1937 | req_len, actual_req_len); | 1968 | req_len, actual_req_len); |
1938 | r = -EIO; | 1969 | r = -EIO; |