···309309 u8 i;310310 u32 val;311311312312- if (ah->is_pciexpress != true)313313- return;314314-315315- /* Do not touch SerDes registers */316316- if (ah->config.pcie_powersave_enable == 2)312312+ if (ah->is_pciexpress != true || ah->aspm_enabled != true)317313 return;318314319315 /* Nothing to do on restore for 11N */
+1-5
drivers/net/wireless/ath/ath9k/ar9003_hw.c
···519519 int restore,520520 int power_off)521521{522522- if (ah->is_pciexpress != true)523523- return;524524-525525- /* Do not touch SerDes registers */526526- if (ah->config.pcie_powersave_enable == 2)522522+ if (ah->is_pciexpress != true || ah->aspm_enabled != true)527523 return;528524529525 /* Nothing to do on restore for 11N */
+9-2
drivers/net/wireless/ath/ath9k/hw.c
···318318 REG_WRITE(ah, AR_PCIE_SERDES2, 0x00000000);319319}320320321321+static void ath9k_hw_aspm_init(struct ath_hw *ah)322322+{323323+ struct ath_common *common = ath9k_hw_common(ah);324324+325325+ if (common->bus_ops->aspm_init)326326+ common->bus_ops->aspm_init(common);327327+}328328+321329/* This should work for all families including legacy */322330static bool ath9k_hw_chip_test(struct ath_hw *ah)323331{···386378 ah->config.additional_swba_backoff = 0;387379 ah->config.ack_6mb = 0x0;388380 ah->config.cwm_ignore_extcca = 0;389389- ah->config.pcie_powersave_enable = 0;390381 ah->config.pcie_clock_req = 0;391382 ah->config.pcie_waen = 0;392383 ah->config.analog_shiftreg = 1;···605598606599607600 if (ah->is_pciexpress)608608- ath9k_hw_configpcipowersave(ah, 0, 0);601601+ ath9k_hw_aspm_init(ah);609602 else610603 ath9k_hw_disablepcie(ah);611604
···17461746 }1747174717481748 memcpy(active_rxon, staging_rxon, sizeof(*active_rxon));17491749-17491749+ /*17501750+ * We do not commit tx power settings while channel changing,17511751+ * do it now if tx power changed.17521752+ */17531753+ iwl_legacy_set_tx_power(priv, priv->tx_power_next, false);17501754 return 0;17511755 }17521756
+6-2
drivers/net/wireless/iwlegacy/iwl-4965.c
···1235123512361236 memcpy(active_rxon, &ctx->staging, sizeof(*active_rxon));12371237 iwl_legacy_print_rx_config_cmd(priv, ctx);12381238- goto set_tx_power;12381238+ /*12391239+ * We do not commit tx power settings while channel changing,12401240+ * do it now if tx power changed.12411241+ */12421242+ iwl_legacy_set_tx_power(priv, priv->tx_power_next, false);12431243+ return 0;12391244 }1240124512411246 /* If we are currently associated and the new config requires···1320131513211316 iwl4965_init_sensitivity(priv);1322131713231323-set_tx_power:13241318 /* If we issue a new RXON command which required a tune then we must13251319 * send a new TXPOWER command or we won't be able to Tx any frames */13261320 ret = iwl_legacy_set_tx_power(priv, priv->tx_power_next, true);
···135135 * @temperature_kelvin: temperature report by uCode in kelvin136136 * @max_event_log_size: size of event log buffer size for ucode event logging137137 * @shadow_reg_enable: HW shadhow register bit138138+ * @no_idle_support: do not support idle mode138139 */139140struct iwl_base_params {140141 int eeprom_size;···157156 bool temperature_kelvin;158157 u32 max_event_log_size;159158 const bool shadow_reg_enable;159159+ const bool no_idle_support;160160};161161/*162162 * @advanced_bt_coexist: support advanced bt coexist
+9-9
drivers/net/wireless/iwlwifi/iwl-pci.c
···134134static void iwl_pci_set_drv_data(struct iwl_bus *bus, void *drv_data)135135{136136 bus->drv_data = drv_data;137137+ pci_set_drvdata(IWL_BUS_GET_PCI_DEV(bus), drv_data);137138}138139139140static void iwl_pci_get_hw_id(struct iwl_bus *bus, char buf[],···455454 pci_write_config_word(pdev, PCI_COMMAND, pci_cmd);456455 }457456458458- pci_set_drvdata(pdev, bus);459459-460457 bus->dev = &pdev->dev;461458 bus->irq = pdev->irq;462459 bus->ops = &pci_ops;···493494494495static void __devexit iwl_pci_remove(struct pci_dev *pdev)495496{496496- struct iwl_bus *bus = pci_get_drvdata(pdev);497497+ struct iwl_priv *priv = pci_get_drvdata(pdev);498498+ void *bus_specific = priv->bus->bus_specific;497499498498- iwl_remove(bus->drv_data);500500+ iwl_remove(priv);499501500500- iwl_pci_down(bus);502502+ iwl_pci_down(bus_specific);501503}502504503505#ifdef CONFIG_PM···506506static int iwl_pci_suspend(struct device *device)507507{508508 struct pci_dev *pdev = to_pci_dev(device);509509- struct iwl_bus *bus = pci_get_drvdata(pdev);509509+ struct iwl_priv *priv = pci_get_drvdata(pdev);510510511511 /* Before you put code here, think about WoWLAN. You cannot check here512512 * whether WoWLAN is enabled or not, and your code will run even if513513 * WoWLAN is enabled - don't kill the NIC, someone may need it in Sx.514514 */515515516516- return iwl_suspend(bus->drv_data);516516+ return iwl_suspend(priv);517517}518518519519static int iwl_pci_resume(struct device *device)520520{521521 struct pci_dev *pdev = to_pci_dev(device);522522- struct iwl_bus *bus = pci_get_drvdata(pdev);522522+ struct iwl_priv *priv = pci_get_drvdata(pdev);523523524524 /* Before you put code here, think about WoWLAN. You cannot check here525525 * whether WoWLAN is enabled or not, and your code will run even if···532532 */533533 pci_write_config_byte(pdev, PCI_CFG_RETRY_TIMEOUT, 0x00);534534535535- return iwl_resume(bus->drv_data);535535+ return iwl_resume(priv);536536}537537538538static SIMPLE_DEV_PM_OPS(iwl_dev_pm_ops, iwl_pci_suspend, iwl_pci_resume);
+2-1
drivers/net/wireless/iwlwifi/iwl-power.c
···349349350350 if (priv->wowlan)351351 iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, dtimper);352352- else if (priv->hw->conf.flags & IEEE80211_CONF_IDLE)352352+ else if (!priv->cfg->base_params->no_idle_support &&353353+ priv->hw->conf.flags & IEEE80211_CONF_IDLE)353354 iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, 20);354355 else if (iwl_tt_is_low_power_state(priv)) {355356 /* in thermal throttling low power state */
+1-2
drivers/net/wireless/rt2x00/rt2800lib.c
···703703 /*704704 * Add space for the TXWI in front of the skb.705705 */706706- skb_push(entry->skb, TXWI_DESC_SIZE);707707- memset(entry->skb, 0, TXWI_DESC_SIZE);706706+ memset(skb_push(entry->skb, TXWI_DESC_SIZE), 0, TXWI_DESC_SIZE);708707709708 /*710709 * Register descriptor details in skb frame descriptor.
···113113 * due to possible race conditions in mac80211.114114 */115115 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))116116- goto exit_fail;116116+ goto exit_free_skb;117117118118 /*119119 * Use the ATIM queue if appropriate and present.···127127 ERROR(rt2x00dev,128128 "Attempt to send packet over invalid queue %d.\n"129129 "Please file bug report to %s.\n", qid, DRV_PROJECT);130130- goto exit_fail;130130+ goto exit_free_skb;131131 }132132133133 /*···159159160160 exit_fail:161161 rt2x00queue_pause_queue(queue);162162+ exit_free_skb:162163 dev_kfree_skb_any(skb);163164}164165EXPORT_SYMBOL_GPL(rt2x00mac_tx);
+11-9
drivers/net/wireless/rtlwifi/pci.c
···16961696 pcipriv->ndis_adapter.devnumber = PCI_SLOT(pdev->devfn);16971697 pcipriv->ndis_adapter.funcnumber = PCI_FUNC(pdev->devfn);1698169816991699- /*find bridge info */17001700- pcipriv->ndis_adapter.pcibridge_vendorid = bridge_pdev->vendor;17011701- for (tmp = 0; tmp < PCI_BRIDGE_VENDOR_MAX; tmp++) {17021702- if (bridge_pdev->vendor == pcibridge_vendors[tmp]) {17031703- pcipriv->ndis_adapter.pcibridge_vendor = tmp;17041704- RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,17051705- ("Pci Bridge Vendor is found index: %d\n",17061706- tmp));17071707- break;16991699+ if (bridge_pdev) {17001700+ /*find bridge info if available */17011701+ pcipriv->ndis_adapter.pcibridge_vendorid = bridge_pdev->vendor;17021702+ for (tmp = 0; tmp < PCI_BRIDGE_VENDOR_MAX; tmp++) {17031703+ if (bridge_pdev->vendor == pcibridge_vendors[tmp]) {17041704+ pcipriv->ndis_adapter.pcibridge_vendor = tmp;17051705+ RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,17061706+ ("Pci Bridge Vendor is found index:"17071707+ " %d\n", tmp));17081708+ break;17091709+ }17081710 }17091711 }17101712
+1-1
net/wireless/nl80211.c
···34643464 tmp) {34653465 enum ieee80211_band band = nla_type(attr);3466346634673467- if (band < 0 || band > IEEE80211_NUM_BANDS) {34673467+ if (band < 0 || band >= IEEE80211_NUM_BANDS) {34683468 err = -EINVAL;34693469 goto out_free;34703470 }