diff options
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9002_hw.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_hw.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/init.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/pci.c | 27 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-3945.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-4965.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-pci.c | 18 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-power.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800lib.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00lib.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/pci.c | 20 |
16 files changed, 84 insertions, 40 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_hw.c b/drivers/net/wireless/ath/ath9k/ar9002_hw.c index 9ff7c30573b8..44d9d8d56490 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_hw.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_hw.c | |||
@@ -309,11 +309,7 @@ static void ar9002_hw_configpcipowersave(struct ath_hw *ah, | |||
309 | u8 i; | 309 | u8 i; |
310 | u32 val; | 310 | u32 val; |
311 | 311 | ||
312 | if (ah->is_pciexpress != true) | 312 | if (ah->is_pciexpress != true || ah->aspm_enabled != true) |
313 | return; | ||
314 | |||
315 | /* Do not touch SerDes registers */ | ||
316 | if (ah->config.pcie_powersave_enable == 2) | ||
317 | return; | 313 | return; |
318 | 314 | ||
319 | /* Nothing to do on restore for 11N */ | 315 | /* Nothing to do on restore for 11N */ |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_hw.c b/drivers/net/wireless/ath/ath9k/ar9003_hw.c index 8efdec247c02..ad2bb2bf4e8a 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c | |||
@@ -519,11 +519,7 @@ static void ar9003_hw_configpcipowersave(struct ath_hw *ah, | |||
519 | int restore, | 519 | int restore, |
520 | int power_off) | 520 | int power_off) |
521 | { | 521 | { |
522 | if (ah->is_pciexpress != true) | 522 | if (ah->is_pciexpress != true || ah->aspm_enabled != true) |
523 | return; | ||
524 | |||
525 | /* Do not touch SerDes registers */ | ||
526 | if (ah->config.pcie_powersave_enable == 2) | ||
527 | return; | 523 | return; |
528 | 524 | ||
529 | /* Nothing to do on restore for 11N */ | 525 | /* Nothing to do on restore for 11N */ |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 8006ce0c7357..8dcefe74f4c3 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -318,6 +318,14 @@ static void ath9k_hw_disablepcie(struct ath_hw *ah) | |||
318 | REG_WRITE(ah, AR_PCIE_SERDES2, 0x00000000); | 318 | REG_WRITE(ah, AR_PCIE_SERDES2, 0x00000000); |
319 | } | 319 | } |
320 | 320 | ||
321 | static void ath9k_hw_aspm_init(struct ath_hw *ah) | ||
322 | { | ||
323 | struct ath_common *common = ath9k_hw_common(ah); | ||
324 | |||
325 | if (common->bus_ops->aspm_init) | ||
326 | common->bus_ops->aspm_init(common); | ||
327 | } | ||
328 | |||
321 | /* This should work for all families including legacy */ | 329 | /* This should work for all families including legacy */ |
322 | static bool ath9k_hw_chip_test(struct ath_hw *ah) | 330 | static bool ath9k_hw_chip_test(struct ath_hw *ah) |
323 | { | 331 | { |
@@ -378,7 +386,6 @@ static void ath9k_hw_init_config(struct ath_hw *ah) | |||
378 | ah->config.additional_swba_backoff = 0; | 386 | ah->config.additional_swba_backoff = 0; |
379 | ah->config.ack_6mb = 0x0; | 387 | ah->config.ack_6mb = 0x0; |
380 | ah->config.cwm_ignore_extcca = 0; | 388 | ah->config.cwm_ignore_extcca = 0; |
381 | ah->config.pcie_powersave_enable = 0; | ||
382 | ah->config.pcie_clock_req = 0; | 389 | ah->config.pcie_clock_req = 0; |
383 | ah->config.pcie_waen = 0; | 390 | ah->config.pcie_waen = 0; |
384 | ah->config.analog_shiftreg = 1; | 391 | ah->config.analog_shiftreg = 1; |
@@ -598,7 +605,7 @@ static int __ath9k_hw_init(struct ath_hw *ah) | |||
598 | 605 | ||
599 | 606 | ||
600 | if (ah->is_pciexpress) | 607 | if (ah->is_pciexpress) |
601 | ath9k_hw_configpcipowersave(ah, 0, 0); | 608 | ath9k_hw_aspm_init(ah); |
602 | else | 609 | else |
603 | ath9k_hw_disablepcie(ah); | 610 | ath9k_hw_disablepcie(ah); |
604 | 611 | ||
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index 6acd0f975ae1..c79889036ec4 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -219,7 +219,6 @@ struct ath9k_ops_config { | |||
219 | int additional_swba_backoff; | 219 | int additional_swba_backoff; |
220 | int ack_6mb; | 220 | int ack_6mb; |
221 | u32 cwm_ignore_extcca; | 221 | u32 cwm_ignore_extcca; |
222 | u8 pcie_powersave_enable; | ||
223 | bool pcieSerDesWrite; | 222 | bool pcieSerDesWrite; |
224 | u8 pcie_clock_req; | 223 | u8 pcie_clock_req; |
225 | u32 pcie_waen; | 224 | u32 pcie_waen; |
@@ -673,6 +672,7 @@ struct ath_hw { | |||
673 | 672 | ||
674 | bool sw_mgmt_crypto; | 673 | bool sw_mgmt_crypto; |
675 | bool is_pciexpress; | 674 | bool is_pciexpress; |
675 | bool aspm_enabled; | ||
676 | bool is_monitoring; | 676 | bool is_monitoring; |
677 | bool need_an_top2_fixup; | 677 | bool need_an_top2_fixup; |
678 | u16 tx_trig_level; | 678 | u16 tx_trig_level; |
@@ -874,6 +874,7 @@ struct ath_bus_ops { | |||
874 | bool (*eeprom_read)(struct ath_common *common, u32 off, u16 *data); | 874 | bool (*eeprom_read)(struct ath_common *common, u32 off, u16 *data); |
875 | void (*bt_coex_prep)(struct ath_common *common); | 875 | void (*bt_coex_prep)(struct ath_common *common); |
876 | void (*extn_synch_en)(struct ath_common *common); | 876 | void (*extn_synch_en)(struct ath_common *common); |
877 | void (*aspm_init)(struct ath_common *common); | ||
877 | }; | 878 | }; |
878 | 879 | ||
879 | static inline struct ath_common *ath9k_hw_common(struct ath_hw *ah) | 880 | static inline struct ath_common *ath9k_hw_common(struct ath_hw *ah) |
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index ac5107172f94..aa0ff7e2c922 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -670,8 +670,10 @@ static void ath9k_init_band_txpower(struct ath_softc *sc, int band) | |||
670 | static void ath9k_init_txpower_limits(struct ath_softc *sc) | 670 | static void ath9k_init_txpower_limits(struct ath_softc *sc) |
671 | { | 671 | { |
672 | struct ath_hw *ah = sc->sc_ah; | 672 | struct ath_hw *ah = sc->sc_ah; |
673 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | ||
673 | struct ath9k_channel *curchan = ah->curchan; | 674 | struct ath9k_channel *curchan = ah->curchan; |
674 | 675 | ||
676 | ah->txchainmask = common->tx_chainmask; | ||
675 | if (ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ) | 677 | if (ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ) |
676 | ath9k_init_band_txpower(sc, IEEE80211_BAND_2GHZ); | 678 | ath9k_init_band_txpower(sc, IEEE80211_BAND_2GHZ); |
677 | if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ) | 679 | if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ) |
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index 3bad0b2cf9a3..be4ea1329813 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/nl80211.h> | 17 | #include <linux/nl80211.h> |
18 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
19 | #include <linux/pci-aspm.h> | ||
19 | #include <linux/ath9k_platform.h> | 20 | #include <linux/ath9k_platform.h> |
20 | #include "ath9k.h" | 21 | #include "ath9k.h" |
21 | 22 | ||
@@ -115,12 +116,38 @@ static void ath_pci_extn_synch_enable(struct ath_common *common) | |||
115 | pci_write_config_byte(pdev, sc->sc_ah->caps.pcie_lcr_offset, lnkctl); | 116 | pci_write_config_byte(pdev, sc->sc_ah->caps.pcie_lcr_offset, lnkctl); |
116 | } | 117 | } |
117 | 118 | ||
119 | static void ath_pci_aspm_init(struct ath_common *common) | ||
120 | { | ||
121 | struct ath_softc *sc = (struct ath_softc *) common->priv; | ||
122 | struct ath_hw *ah = sc->sc_ah; | ||
123 | struct pci_dev *pdev = to_pci_dev(sc->dev); | ||
124 | struct pci_dev *parent; | ||
125 | int pos; | ||
126 | u8 aspm; | ||
127 | |||
128 | if (!pci_is_pcie(pdev)) | ||
129 | return; | ||
130 | |||
131 | parent = pdev->bus->self; | ||
132 | if (WARN_ON(!parent)) | ||
133 | return; | ||
134 | |||
135 | pos = pci_pcie_cap(parent); | ||
136 | pci_read_config_byte(parent, pos + PCI_EXP_LNKCTL, &aspm); | ||
137 | if (aspm & (PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1)) { | ||
138 | ah->aspm_enabled = true; | ||
139 | /* Initialize PCIe PM and SERDES registers. */ | ||
140 | ath9k_hw_configpcipowersave(ah, 0, 0); | ||
141 | } | ||
142 | } | ||
143 | |||
118 | static const struct ath_bus_ops ath_pci_bus_ops = { | 144 | static const struct ath_bus_ops ath_pci_bus_ops = { |
119 | .ath_bus_type = ATH_PCI, | 145 | .ath_bus_type = ATH_PCI, |
120 | .read_cachesize = ath_pci_read_cachesize, | 146 | .read_cachesize = ath_pci_read_cachesize, |
121 | .eeprom_read = ath_pci_eeprom_read, | 147 | .eeprom_read = ath_pci_eeprom_read, |
122 | .bt_coex_prep = ath_pci_bt_coex_prep, | 148 | .bt_coex_prep = ath_pci_bt_coex_prep, |
123 | .extn_synch_en = ath_pci_extn_synch_enable, | 149 | .extn_synch_en = ath_pci_extn_synch_enable, |
150 | .aspm_init = ath_pci_aspm_init, | ||
124 | }; | 151 | }; |
125 | 152 | ||
126 | static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) | 153 | static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) |
diff --git a/drivers/net/wireless/iwlegacy/iwl-3945.c b/drivers/net/wireless/iwlegacy/iwl-3945.c index dab67a12d73b..73fe3cdf796b 100644 --- a/drivers/net/wireless/iwlegacy/iwl-3945.c +++ b/drivers/net/wireless/iwlegacy/iwl-3945.c | |||
@@ -1746,7 +1746,11 @@ int iwl3945_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx) | |||
1746 | } | 1746 | } |
1747 | 1747 | ||
1748 | memcpy(active_rxon, staging_rxon, sizeof(*active_rxon)); | 1748 | memcpy(active_rxon, staging_rxon, sizeof(*active_rxon)); |
1749 | 1749 | /* | |
1750 | * We do not commit tx power settings while channel changing, | ||
1751 | * do it now if tx power changed. | ||
1752 | */ | ||
1753 | iwl_legacy_set_tx_power(priv, priv->tx_power_next, false); | ||
1750 | return 0; | 1754 | return 0; |
1751 | } | 1755 | } |
1752 | 1756 | ||
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965.c b/drivers/net/wireless/iwlegacy/iwl-4965.c index bd4b000733f7..ecdc6e557428 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965.c +++ b/drivers/net/wireless/iwlegacy/iwl-4965.c | |||
@@ -1235,7 +1235,12 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *c | |||
1235 | 1235 | ||
1236 | memcpy(active_rxon, &ctx->staging, sizeof(*active_rxon)); | 1236 | memcpy(active_rxon, &ctx->staging, sizeof(*active_rxon)); |
1237 | iwl_legacy_print_rx_config_cmd(priv, ctx); | 1237 | iwl_legacy_print_rx_config_cmd(priv, ctx); |
1238 | goto set_tx_power; | 1238 | /* |
1239 | * We do not commit tx power settings while channel changing, | ||
1240 | * do it now if tx power changed. | ||
1241 | */ | ||
1242 | iwl_legacy_set_tx_power(priv, priv->tx_power_next, false); | ||
1243 | return 0; | ||
1239 | } | 1244 | } |
1240 | 1245 | ||
1241 | /* If we are currently associated and the new config requires | 1246 | /* If we are currently associated and the new config requires |
@@ -1315,7 +1320,6 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *c | |||
1315 | 1320 | ||
1316 | iwl4965_init_sensitivity(priv); | 1321 | iwl4965_init_sensitivity(priv); |
1317 | 1322 | ||
1318 | set_tx_power: | ||
1319 | /* If we issue a new RXON command which required a tune then we must | 1323 | /* If we issue a new RXON command which required a tune then we must |
1320 | * send a new TXPOWER command or we won't be able to Tx any frames */ | 1324 | * send a new TXPOWER command or we won't be able to Tx any frames */ |
1321 | ret = iwl_legacy_set_tx_power(priv, priv->tx_power_next, true); | 1325 | ret = iwl_legacy_set_tx_power(priv, priv->tx_power_next, true); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 3eeb12ebe6e9..c95cefd529dc 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -365,6 +365,7 @@ static struct iwl_base_params iwl5000_base_params = { | |||
365 | .chain_noise_scale = 1000, | 365 | .chain_noise_scale = 1000, |
366 | .wd_timeout = IWL_LONG_WD_TIMEOUT, | 366 | .wd_timeout = IWL_LONG_WD_TIMEOUT, |
367 | .max_event_log_size = 512, | 367 | .max_event_log_size = 512, |
368 | .no_idle_support = true, | ||
368 | }; | 369 | }; |
369 | static struct iwl_ht_params iwl5000_ht_params = { | 370 | static struct iwl_ht_params iwl5000_ht_params = { |
370 | .ht_greenfield_support = true, | 371 | .ht_greenfield_support = true, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 3e6bb734dcb7..02817a438550 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -135,6 +135,7 @@ struct iwl_mod_params { | |||
135 | * @temperature_kelvin: temperature report by uCode in kelvin | 135 | * @temperature_kelvin: temperature report by uCode in kelvin |
136 | * @max_event_log_size: size of event log buffer size for ucode event logging | 136 | * @max_event_log_size: size of event log buffer size for ucode event logging |
137 | * @shadow_reg_enable: HW shadhow register bit | 137 | * @shadow_reg_enable: HW shadhow register bit |
138 | * @no_idle_support: do not support idle mode | ||
138 | */ | 139 | */ |
139 | struct iwl_base_params { | 140 | struct iwl_base_params { |
140 | int eeprom_size; | 141 | int eeprom_size; |
@@ -156,6 +157,7 @@ struct iwl_base_params { | |||
156 | bool temperature_kelvin; | 157 | bool temperature_kelvin; |
157 | u32 max_event_log_size; | 158 | u32 max_event_log_size; |
158 | const bool shadow_reg_enable; | 159 | const bool shadow_reg_enable; |
160 | const bool no_idle_support; | ||
159 | }; | 161 | }; |
160 | /* | 162 | /* |
161 | * @advanced_bt_coexist: support advanced bt coexist | 163 | * @advanced_bt_coexist: support advanced bt coexist |
diff --git a/drivers/net/wireless/iwlwifi/iwl-pci.c b/drivers/net/wireless/iwlwifi/iwl-pci.c index fb7e436b40c7..69d4ec467dca 100644 --- a/drivers/net/wireless/iwlwifi/iwl-pci.c +++ b/drivers/net/wireless/iwlwifi/iwl-pci.c | |||
@@ -134,6 +134,7 @@ static void iwl_pci_apm_config(struct iwl_bus *bus) | |||
134 | static void iwl_pci_set_drv_data(struct iwl_bus *bus, void *drv_data) | 134 | static void iwl_pci_set_drv_data(struct iwl_bus *bus, void *drv_data) |
135 | { | 135 | { |
136 | bus->drv_data = drv_data; | 136 | bus->drv_data = drv_data; |
137 | pci_set_drvdata(IWL_BUS_GET_PCI_DEV(bus), drv_data); | ||
137 | } | 138 | } |
138 | 139 | ||
139 | static void iwl_pci_get_hw_id(struct iwl_bus *bus, char buf[], | 140 | static void iwl_pci_get_hw_id(struct iwl_bus *bus, char buf[], |
@@ -454,8 +455,6 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
454 | pci_write_config_word(pdev, PCI_COMMAND, pci_cmd); | 455 | pci_write_config_word(pdev, PCI_COMMAND, pci_cmd); |
455 | } | 456 | } |
456 | 457 | ||
457 | pci_set_drvdata(pdev, bus); | ||
458 | |||
459 | bus->dev = &pdev->dev; | 458 | bus->dev = &pdev->dev; |
460 | bus->irq = pdev->irq; | 459 | bus->irq = pdev->irq; |
461 | bus->ops = &pci_ops; | 460 | bus->ops = &pci_ops; |
@@ -494,11 +493,12 @@ static void iwl_pci_down(struct iwl_bus *bus) | |||
494 | 493 | ||
495 | static void __devexit iwl_pci_remove(struct pci_dev *pdev) | 494 | static void __devexit iwl_pci_remove(struct pci_dev *pdev) |
496 | { | 495 | { |
497 | struct iwl_bus *bus = pci_get_drvdata(pdev); | 496 | struct iwl_priv *priv = pci_get_drvdata(pdev); |
497 | void *bus_specific = priv->bus->bus_specific; | ||
498 | 498 | ||
499 | iwl_remove(bus->drv_data); | 499 | iwl_remove(priv); |
500 | 500 | ||
501 | iwl_pci_down(bus); | 501 | iwl_pci_down(bus_specific); |
502 | } | 502 | } |
503 | 503 | ||
504 | #ifdef CONFIG_PM | 504 | #ifdef CONFIG_PM |
@@ -506,20 +506,20 @@ static void __devexit iwl_pci_remove(struct pci_dev *pdev) | |||
506 | static int iwl_pci_suspend(struct device *device) | 506 | static int iwl_pci_suspend(struct device *device) |
507 | { | 507 | { |
508 | struct pci_dev *pdev = to_pci_dev(device); | 508 | struct pci_dev *pdev = to_pci_dev(device); |
509 | struct iwl_bus *bus = pci_get_drvdata(pdev); | 509 | struct iwl_priv *priv = pci_get_drvdata(pdev); |
510 | 510 | ||
511 | /* Before you put code here, think about WoWLAN. You cannot check here | 511 | /* Before you put code here, think about WoWLAN. You cannot check here |
512 | * whether WoWLAN is enabled or not, and your code will run even if | 512 | * whether WoWLAN is enabled or not, and your code will run even if |
513 | * WoWLAN is enabled - don't kill the NIC, someone may need it in Sx. | 513 | * WoWLAN is enabled - don't kill the NIC, someone may need it in Sx. |
514 | */ | 514 | */ |
515 | 515 | ||
516 | return iwl_suspend(bus->drv_data); | 516 | return iwl_suspend(priv); |
517 | } | 517 | } |
518 | 518 | ||
519 | static int iwl_pci_resume(struct device *device) | 519 | static int iwl_pci_resume(struct device *device) |
520 | { | 520 | { |
521 | struct pci_dev *pdev = to_pci_dev(device); | 521 | struct pci_dev *pdev = to_pci_dev(device); |
522 | struct iwl_bus *bus = pci_get_drvdata(pdev); | 522 | struct iwl_priv *priv = pci_get_drvdata(pdev); |
523 | 523 | ||
524 | /* Before you put code here, think about WoWLAN. You cannot check here | 524 | /* Before you put code here, think about WoWLAN. You cannot check here |
525 | * whether WoWLAN is enabled or not, and your code will run even if | 525 | * whether WoWLAN is enabled or not, and your code will run even if |
@@ -532,7 +532,7 @@ static int iwl_pci_resume(struct device *device) | |||
532 | */ | 532 | */ |
533 | pci_write_config_byte(pdev, PCI_CFG_RETRY_TIMEOUT, 0x00); | 533 | pci_write_config_byte(pdev, PCI_CFG_RETRY_TIMEOUT, 0x00); |
534 | 534 | ||
535 | return iwl_resume(bus->drv_data); | 535 | return iwl_resume(priv); |
536 | } | 536 | } |
537 | 537 | ||
538 | static SIMPLE_DEV_PM_OPS(iwl_dev_pm_ops, iwl_pci_suspend, iwl_pci_resume); | 538 | static SIMPLE_DEV_PM_OPS(iwl_dev_pm_ops, iwl_pci_suspend, iwl_pci_resume); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c index 3ec619c6881c..cd64df05f9ed 100644 --- a/drivers/net/wireless/iwlwifi/iwl-power.c +++ b/drivers/net/wireless/iwlwifi/iwl-power.c | |||
@@ -349,7 +349,8 @@ static void iwl_power_build_cmd(struct iwl_priv *priv, | |||
349 | 349 | ||
350 | if (priv->wowlan) | 350 | if (priv->wowlan) |
351 | iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, dtimper); | 351 | iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, dtimper); |
352 | else if (priv->hw->conf.flags & IEEE80211_CONF_IDLE) | 352 | else if (!priv->cfg->base_params->no_idle_support && |
353 | priv->hw->conf.flags & IEEE80211_CONF_IDLE) | ||
353 | iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, 20); | 354 | iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, 20); |
354 | else if (iwl_tt_is_low_power_state(priv)) { | 355 | else if (iwl_tt_is_low_power_state(priv)) { |
355 | /* in thermal throttling low power state */ | 356 | /* in thermal throttling low power state */ |
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index 84ab7d1acb6a..ef67f6786a84 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c | |||
@@ -703,8 +703,7 @@ void rt2800_write_beacon(struct queue_entry *entry, struct txentry_desc *txdesc) | |||
703 | /* | 703 | /* |
704 | * Add space for the TXWI in front of the skb. | 704 | * Add space for the TXWI in front of the skb. |
705 | */ | 705 | */ |
706 | skb_push(entry->skb, TXWI_DESC_SIZE); | 706 | memset(skb_push(entry->skb, TXWI_DESC_SIZE), 0, TXWI_DESC_SIZE); |
707 | memset(entry->skb, 0, TXWI_DESC_SIZE); | ||
708 | 707 | ||
709 | /* | 708 | /* |
710 | * Register descriptor details in skb frame descriptor. | 709 | * Register descriptor details in skb frame descriptor. |
diff --git a/drivers/net/wireless/rt2x00/rt2x00lib.h b/drivers/net/wireless/rt2x00/rt2x00lib.h index 15cdc7e57fc4..4cdf247a870d 100644 --- a/drivers/net/wireless/rt2x00/rt2x00lib.h +++ b/drivers/net/wireless/rt2x00/rt2x00lib.h | |||
@@ -355,7 +355,8 @@ static inline enum cipher rt2x00crypto_key_to_cipher(struct ieee80211_key_conf * | |||
355 | return CIPHER_NONE; | 355 | return CIPHER_NONE; |
356 | } | 356 | } |
357 | 357 | ||
358 | static inline void rt2x00crypto_create_tx_descriptor(struct queue_entry *entry, | 358 | static inline void rt2x00crypto_create_tx_descriptor(struct rt2x00_dev *rt2x00dev, |
359 | struct sk_buff *skb, | ||
359 | struct txentry_desc *txdesc) | 360 | struct txentry_desc *txdesc) |
360 | { | 361 | { |
361 | } | 362 | } |
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 8efab3983528..4ccf23805973 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -113,7 +113,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
113 | * due to possible race conditions in mac80211. | 113 | * due to possible race conditions in mac80211. |
114 | */ | 114 | */ |
115 | if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) | 115 | if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) |
116 | goto exit_fail; | 116 | goto exit_free_skb; |
117 | 117 | ||
118 | /* | 118 | /* |
119 | * Use the ATIM queue if appropriate and present. | 119 | * Use the ATIM queue if appropriate and present. |
@@ -127,7 +127,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
127 | ERROR(rt2x00dev, | 127 | ERROR(rt2x00dev, |
128 | "Attempt to send packet over invalid queue %d.\n" | 128 | "Attempt to send packet over invalid queue %d.\n" |
129 | "Please file bug report to %s.\n", qid, DRV_PROJECT); | 129 | "Please file bug report to %s.\n", qid, DRV_PROJECT); |
130 | goto exit_fail; | 130 | goto exit_free_skb; |
131 | } | 131 | } |
132 | 132 | ||
133 | /* | 133 | /* |
@@ -159,6 +159,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
159 | 159 | ||
160 | exit_fail: | 160 | exit_fail: |
161 | rt2x00queue_pause_queue(queue); | 161 | rt2x00queue_pause_queue(queue); |
162 | exit_free_skb: | ||
162 | dev_kfree_skb_any(skb); | 163 | dev_kfree_skb_any(skb); |
163 | } | 164 | } |
164 | EXPORT_SYMBOL_GPL(rt2x00mac_tx); | 165 | EXPORT_SYMBOL_GPL(rt2x00mac_tx); |
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index 5efd57833489..56f12358389d 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
@@ -1696,15 +1696,17 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev, | |||
1696 | pcipriv->ndis_adapter.devnumber = PCI_SLOT(pdev->devfn); | 1696 | pcipriv->ndis_adapter.devnumber = PCI_SLOT(pdev->devfn); |
1697 | pcipriv->ndis_adapter.funcnumber = PCI_FUNC(pdev->devfn); | 1697 | pcipriv->ndis_adapter.funcnumber = PCI_FUNC(pdev->devfn); |
1698 | 1698 | ||
1699 | /*find bridge info */ | 1699 | if (bridge_pdev) { |
1700 | pcipriv->ndis_adapter.pcibridge_vendorid = bridge_pdev->vendor; | 1700 | /*find bridge info if available */ |
1701 | for (tmp = 0; tmp < PCI_BRIDGE_VENDOR_MAX; tmp++) { | 1701 | pcipriv->ndis_adapter.pcibridge_vendorid = bridge_pdev->vendor; |
1702 | if (bridge_pdev->vendor == pcibridge_vendors[tmp]) { | 1702 | for (tmp = 0; tmp < PCI_BRIDGE_VENDOR_MAX; tmp++) { |
1703 | pcipriv->ndis_adapter.pcibridge_vendor = tmp; | 1703 | if (bridge_pdev->vendor == pcibridge_vendors[tmp]) { |
1704 | RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, | 1704 | pcipriv->ndis_adapter.pcibridge_vendor = tmp; |
1705 | ("Pci Bridge Vendor is found index: %d\n", | 1705 | RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, |
1706 | tmp)); | 1706 | ("Pci Bridge Vendor is found index:" |
1707 | break; | 1707 | " %d\n", tmp)); |
1708 | break; | ||
1709 | } | ||
1708 | } | 1710 | } |
1709 | } | 1711 | } |
1710 | 1712 | ||