Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

+39 -46
+2 -2
drivers/net/wireless/ath/ath9k/hif_usb.c
··· 1040 1040 } 1041 1041 1042 1042 ret = ath9k_htc_hw_init(hif_dev->htc_handle, 1043 - &hif_dev->udev->dev, hif_dev->device_id, 1043 + &interface->dev, hif_dev->device_id, 1044 1044 hif_dev->udev->product, id->driver_info); 1045 1045 if (ret) { 1046 1046 ret = -EINVAL; ··· 1158 1158 #endif 1159 1159 1160 1160 static struct usb_driver ath9k_hif_usb_driver = { 1161 - .name = "ath9k_hif_usb", 1161 + .name = KBUILD_MODNAME, 1162 1162 .probe = ath9k_hif_usb_probe, 1163 1163 .disconnect = ath9k_hif_usb_disconnect, 1164 1164 #ifdef CONFIG_PM
-9
drivers/net/wireless/ath/ath9k/hw.c
··· 1254 1254 ah->txchainmask = common->tx_chainmask; 1255 1255 ah->rxchainmask = common->rx_chainmask; 1256 1256 1257 - if ((common->bus_ops->ath_bus_type != ATH_USB) && !ah->chip_fullsleep) { 1258 - ath9k_hw_abortpcurecv(ah); 1259 - if (!ath9k_hw_stopdmarecv(ah)) { 1260 - ath_dbg(common, ATH_DBG_XMIT, 1261 - "Failed to stop receive dma\n"); 1262 - bChannelChange = false; 1263 - } 1264 - } 1265 - 1266 1257 if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE)) 1267 1258 return -EIO; 1268 1259
+22 -3
drivers/net/wireless/ath/ath9k/mac.c
··· 751 751 } 752 752 EXPORT_SYMBOL(ath9k_hw_abortpcurecv); 753 753 754 - bool ath9k_hw_stopdmarecv(struct ath_hw *ah) 754 + bool ath9k_hw_stopdmarecv(struct ath_hw *ah, bool *reset) 755 755 { 756 756 #define AH_RX_STOP_DMA_TIMEOUT 10000 /* usec */ 757 757 #define AH_RX_TIME_QUANTUM 100 /* usec */ 758 758 struct ath_common *common = ath9k_hw_common(ah); 759 + u32 mac_status, last_mac_status = 0; 759 760 int i; 761 + 762 + /* Enable access to the DMA observation bus */ 763 + REG_WRITE(ah, AR_MACMISC, 764 + ((AR_MACMISC_DMA_OBS_LINE_8 << AR_MACMISC_DMA_OBS_S) | 765 + (AR_MACMISC_MISC_OBS_BUS_1 << 766 + AR_MACMISC_MISC_OBS_BUS_MSB_S))); 760 767 761 768 REG_WRITE(ah, AR_CR, AR_CR_RXD); 762 769 ··· 771 764 for (i = AH_RX_STOP_DMA_TIMEOUT / AH_TIME_QUANTUM; i != 0; i--) { 772 765 if ((REG_READ(ah, AR_CR) & AR_CR_RXE) == 0) 773 766 break; 767 + 768 + if (!AR_SREV_9300_20_OR_LATER(ah)) { 769 + mac_status = REG_READ(ah, AR_DMADBG_7) & 0x7f0; 770 + if (mac_status == 0x1c0 && mac_status == last_mac_status) { 771 + *reset = true; 772 + break; 773 + } 774 + 775 + last_mac_status = mac_status; 776 + } 777 + 774 778 udelay(AH_TIME_QUANTUM); 775 779 } 776 780 777 781 if (i == 0) { 778 782 ath_err(common, 779 - "DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x\n", 783 + "DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x DMADBG_7=0x%08x\n", 780 784 AH_RX_STOP_DMA_TIMEOUT / 1000, 781 785 REG_READ(ah, AR_CR), 782 - REG_READ(ah, AR_DIAG_SW)); 786 + REG_READ(ah, AR_DIAG_SW), 787 + REG_READ(ah, AR_DMADBG_7)); 783 788 return false; 784 789 } else { 785 790 return true;
+1 -1
drivers/net/wireless/ath/ath9k/mac.h
··· 695 695 void ath9k_hw_putrxbuf(struct ath_hw *ah, u32 rxdp); 696 696 void ath9k_hw_startpcureceive(struct ath_hw *ah, bool is_scanning); 697 697 void ath9k_hw_abortpcurecv(struct ath_hw *ah); 698 - bool ath9k_hw_stopdmarecv(struct ath_hw *ah); 698 + bool ath9k_hw_stopdmarecv(struct ath_hw *ah, bool *reset); 699 699 int ath9k_hw_beaconq_setup(struct ath_hw *ah); 700 700 701 701 /* Interrupt Handling */
+3 -3
drivers/net/wireless/ath/ath9k/recv.c
··· 486 486 bool ath_stoprecv(struct ath_softc *sc) 487 487 { 488 488 struct ath_hw *ah = sc->sc_ah; 489 - bool stopped; 489 + bool stopped, reset = false; 490 490 491 491 spin_lock_bh(&sc->rx.rxbuflock); 492 492 ath9k_hw_abortpcurecv(ah); 493 493 ath9k_hw_setrxfilter(ah, 0); 494 - stopped = ath9k_hw_stopdmarecv(ah); 494 + stopped = ath9k_hw_stopdmarecv(ah, &reset); 495 495 496 496 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) 497 497 ath_edma_stop_recv(sc); ··· 506 506 "confusing the DMA engine when we start RX up\n"); 507 507 ATH_DBG_WARN_ON_ONCE(!stopped); 508 508 } 509 - return stopped; 509 + return stopped || reset; 510 510 } 511 511 512 512 void ath_flushrecv(struct ath_softc *sc)
-2
drivers/net/wireless/iwlegacy/iwl-3945-hw.h
··· 74 74 /* RSSI to dBm */ 75 75 #define IWL39_RSSI_OFFSET 95 76 76 77 - #define IWL_DEFAULT_TX_POWER 0x0F 78 - 79 77 /* 80 78 * EEPROM related constants, enums, and structures. 81 79 */
-3
drivers/net/wireless/iwlegacy/iwl-4965-hw.h
··· 804 804 805 805 #define IWL4965_DEFAULT_TX_RETRY 15 806 806 807 - /* Limit range of txpower output target to be between these values */ 808 - #define IWL4965_TX_POWER_TARGET_POWER_MIN (0) /* 0 dBm: 1 milliwatt */ 809 - 810 807 /* EEPROM */ 811 808 #define IWL4965_FIRST_AMPDU_QUEUE 10 812 809
+11 -6
drivers/net/wireless/iwlegacy/iwl-core.c
··· 160 160 struct ieee80211_channel *geo_ch; 161 161 struct ieee80211_rate *rates; 162 162 int i = 0; 163 + s8 max_tx_power = 0; 163 164 164 165 if (priv->bands[IEEE80211_BAND_2GHZ].n_bitrates || 165 166 priv->bands[IEEE80211_BAND_5GHZ].n_bitrates) { ··· 236 235 237 236 geo_ch->flags |= ch->ht40_extension_channel; 238 237 239 - if (ch->max_power_avg > priv->tx_power_device_lmt) 240 - priv->tx_power_device_lmt = ch->max_power_avg; 238 + if (ch->max_power_avg > max_tx_power) 239 + max_tx_power = ch->max_power_avg; 241 240 } else { 242 241 geo_ch->flags |= IEEE80211_CHAN_DISABLED; 243 242 } ··· 249 248 "restricted" : "valid", 250 249 geo_ch->flags); 251 250 } 251 + 252 + priv->tx_power_device_lmt = max_tx_power; 253 + priv->tx_power_user_lmt = max_tx_power; 254 + priv->tx_power_next = max_tx_power; 252 255 253 256 if ((priv->bands[IEEE80211_BAND_5GHZ].n_channels == 0) && 254 257 priv->cfg->sku & IWL_SKU_A) { ··· 1129 1124 if (!priv->cfg->ops->lib->send_tx_power) 1130 1125 return -EOPNOTSUPP; 1131 1126 1132 - if (tx_power < IWL4965_TX_POWER_TARGET_POWER_MIN) { 1127 + /* 0 dBm mean 1 milliwatt */ 1128 + if (tx_power < 0) { 1133 1129 IWL_WARN(priv, 1134 - "Requested user TXPOWER %d below lower limit %d.\n", 1135 - tx_power, 1136 - IWL4965_TX_POWER_TARGET_POWER_MIN); 1130 + "Requested user TXPOWER %d below 1 mW.\n", 1131 + tx_power); 1137 1132 return -EINVAL; 1138 1133 } 1139 1134
-7
drivers/net/wireless/iwlegacy/iwl-eeprom.c
··· 471 471 flags & EEPROM_CHANNEL_RADAR)) 472 472 ? "" : "not "); 473 473 474 - /* Set the tx_power_user_lmt to the highest power 475 - * supported by any channel */ 476 - if (eeprom_ch_info[ch].max_power_avg > 477 - priv->tx_power_user_lmt) 478 - priv->tx_power_user_lmt = 479 - eeprom_ch_info[ch].max_power_avg; 480 - 481 474 ch_info++; 482 475 } 483 476 }
-4
drivers/net/wireless/iwlegacy/iwl3945-base.c
··· 3825 3825 priv->force_reset[IWL_FW_RESET].reset_duration = 3826 3826 IWL_DELAY_NEXT_FORCE_FW_RELOAD; 3827 3827 3828 - 3829 - priv->tx_power_user_lmt = IWL_DEFAULT_TX_POWER; 3830 - priv->tx_power_next = IWL_DEFAULT_TX_POWER; 3831 - 3832 3828 if (eeprom->version < EEPROM_3945_EEPROM_VERSION) { 3833 3829 IWL_WARN(priv, "Unsupported EEPROM version: 0x%04X\n", 3834 3830 eeprom->version);
-6
drivers/net/wireless/iwlegacy/iwl4965-base.c
··· 3140 3140 3141 3141 iwl_legacy_init_scan_params(priv); 3142 3142 3143 - /* Set the tx_power_user_lmt to the lowest power level 3144 - * this value will get overwritten by channel max power avg 3145 - * from eeprom */ 3146 - priv->tx_power_user_lmt = IWL4965_TX_POWER_TARGET_POWER_MIN; 3147 - priv->tx_power_next = IWL4965_TX_POWER_TARGET_POWER_MIN; 3148 - 3149 3143 ret = iwl_legacy_init_channel_map(priv); 3150 3144 if (ret) { 3151 3145 IWL_ERR(priv, "initializing regulatory failed: %d\n", ret);