aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2011-04-26 04:22:15 -0400
committerJiri Kosina <jkosina@suse.cz>2011-04-26 04:22:59 -0400
commit07f9479a40cc778bc1462ada11f95b01360ae4ff (patch)
tree0676cf38df3844004bb3ebfd99dfa67a4a8998f5 /drivers/net/wireless
parent9d5e6bdb3013acfb311ab407eeca0b6a6a3dedbf (diff)
parentcd2e49e90f1cae7726c9a2c54488d881d7f1cd1c (diff)
Merge branch 'master' into for-next
Fast-forwarded to current state of Linus' tree as there are patches to be applied for files that didn't exist on the old branch.
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/airo.c14
-rw-r--r--drivers/net/wireless/ath/ar9170/main.c2
-rw-r--r--drivers/net/wireless/ath/ar9170/phy.c2
-rw-r--r--drivers/net/wireless/ath/ath5k/ani.h2
-rw-r--r--drivers/net/wireless/ath/ath5k/base.c6
-rw-r--r--drivers/net/wireless/ath/ath5k/desc.c14
-rw-r--r--drivers/net/wireless/ath/ath5k/eeprom.c4
-rw-r--r--drivers/net/wireless/ath/ath5k/pci.c2
-rw-r--r--drivers/net/wireless/ath/ath5k/pcu.c6
-rw-r--r--drivers/net/wireless/ath/ath5k/phy.c22
-rw-r--r--drivers/net/wireless/ath/ath5k/reg.h12
-rw-r--r--drivers/net/wireless/ath/ath9k/ar5008_phy.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_eeprom.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/hif_usb.c4
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_hst.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c10
-rw-r--r--drivers/net/wireless/ath/ath9k/mac.c25
-rw-r--r--drivers/net/wireless/ath/ath9k/mac.h2
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c18
-rw-r--r--drivers/net/wireless/ath/ath9k/pci.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/rc.c4
-rw-r--r--drivers/net/wireless/ath/ath9k/recv.c6
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c8
-rw-r--r--drivers/net/wireless/ath/carl9170/carl9170.h3
-rw-r--r--drivers/net/wireless/ath/carl9170/main.c1
-rw-r--r--drivers/net/wireless/ath/carl9170/phy.c2
-rw-r--r--drivers/net/wireless/ath/carl9170/rx.c2
-rw-r--r--drivers/net/wireless/ath/carl9170/tx.c7
-rw-r--r--drivers/net/wireless/ath/carl9170/usb.c2
-rw-r--r--drivers/net/wireless/ath/hw.c2
-rw-r--r--drivers/net/wireless/ath/regd.c4
-rw-r--r--drivers/net/wireless/ath/regd_common.h1
-rw-r--r--drivers/net/wireless/atmel.c4
-rw-r--r--drivers/net/wireless/atmel_cs.c2
-rw-r--r--drivers/net/wireless/b43/b43.h2
-rw-r--r--drivers/net/wireless/b43/dma.c2
-rw-r--r--drivers/net/wireless/b43/dma.h2
-rw-r--r--drivers/net/wireless/b43/main.c2
-rw-r--r--drivers/net/wireless/b43/phy_g.h2
-rw-r--r--drivers/net/wireless/b43/phy_n.h2
-rw-r--r--drivers/net/wireless/b43legacy/b43legacy.h2
-rw-r--r--drivers/net/wireless/hostap/hostap_ap.c2
-rw-r--r--drivers/net/wireless/hostap/hostap_ap.h2
-rw-r--r--drivers/net/wireless/hostap/hostap_config.h4
-rw-r--r--drivers/net/wireless/hostap/hostap_ioctl.c4
-rw-r--r--drivers/net/wireless/hostap/hostap_wlan.h2
-rw-r--r--drivers/net/wireless/ipw2x00/ipw2100.c2
-rw-r--r--drivers/net/wireless/ipw2x00/ipw2200.c18
-rw-r--r--drivers/net/wireless/ipw2x00/libipw_rx.c2
-rw-r--r--drivers/net/wireless/iwlegacy/Kconfig9
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-3945-hw.h2
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-4965-hw.h3
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-core.c29
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-eeprom.c7
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-fh.h2
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-scan.c2
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-sta.c2
-rw-r--r--drivers/net/wireless/iwlegacy/iwl3945-base.c11
-rw-r--r--drivers/net/wireless/iwlegacy/iwl4965-base.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-ict.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-lib.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c7
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-eeprom.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-fh.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-scan.c2
-rw-r--r--drivers/net/wireless/iwmc3200wifi/hal.c4
-rw-r--r--drivers/net/wireless/iwmc3200wifi/tx.c2
-rw-r--r--drivers/net/wireless/libertas/README4
-rw-r--r--drivers/net/wireless/libertas/cfg.c2
-rw-r--r--drivers/net/wireless/libertas/if_cs.c2
-rw-r--r--drivers/net/wireless/libertas/if_spi.h2
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c2
-rw-r--r--drivers/net/wireless/mwl8k.c9
-rw-r--r--drivers/net/wireless/orinoco/cfg.c3
-rw-r--r--drivers/net/wireless/orinoco/hw.c2
-rw-r--r--drivers/net/wireless/orinoco/main.c2
-rw-r--r--drivers/net/wireless/p54/main.c2
-rw-r--r--drivers/net/wireless/p54/p54spi.c5
-rw-r--r--drivers/net/wireless/p54/p54usb.c2
-rw-r--r--drivers/net/wireless/p54/txrx.c2
-rw-r--r--drivers/net/wireless/prism54/islpci_eth.c4
-rw-r--r--drivers/net/wireless/rayctl.h2
-rw-r--r--drivers/net/wireless/rt2x00/rt2800.h2
-rw-r--r--drivers/net/wireless/rt2x00/rt2800lib.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2800usb.c13
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h8
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00config.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00crypto.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c6
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dump.h2
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00link.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.c6
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.h12
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00usb.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00usb.h2
-rw-r--r--drivers/net/wireless/rtlwifi/base.c2
-rw-r--r--drivers/net/wireless/rtlwifi/efuse.c33
-rw-r--r--drivers/net/wireless/rtlwifi/pci.c2
-rw-r--r--drivers/net/wireless/rtlwifi/regd.c2
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c2
-rw-r--r--drivers/net/wireless/rtlwifi/usb.c2
-rw-r--r--drivers/net/wireless/rtlwifi/wifi.h2
-rw-r--r--drivers/net/wireless/wl1251/cmd.c2
-rw-r--r--drivers/net/wireless/wl1251/rx.c2
-rw-r--r--drivers/net/wireless/wl1251/sdio.c2
-rw-r--r--drivers/net/wireless/wl1251/spi.c2
-rw-r--r--drivers/net/wireless/wl12xx/cmd.c2
-rw-r--r--drivers/net/wireless/wl12xx/conf.h8
-rw-r--r--drivers/net/wireless/wl12xx/io.h2
-rw-r--r--drivers/net/wireless/wl12xx/sdio.c2
-rw-r--r--drivers/net/wireless/wl12xx/spi.c2
-rw-r--r--drivers/net/wireless/wl12xx/testmode.c5
-rw-r--r--drivers/net/wireless/wl3501_cs.c4
-rw-r--r--drivers/net/wireless/zd1211rw/Makefile4
-rw-r--r--drivers/net/wireless/zd1211rw/zd_rf_rf2959.c2
-rw-r--r--drivers/net/wireless/zd1211rw/zd_rf_uw2453.c2
-rw-r--r--drivers/net/wireless/zd1211rw/zd_usb.c21
-rw-r--r--drivers/net/wireless/zd1211rw/zd_usb.h1
120 files changed, 320 insertions, 246 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 57a79b0475f6..4e5c7a11f04a 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -1884,7 +1884,7 @@ static int airo_open(struct net_device *dev) {
1884 /* Make sure the card is configured. 1884 /* Make sure the card is configured.
1885 * Wireless Extensions may postpone config changes until the card 1885 * Wireless Extensions may postpone config changes until the card
1886 * is open (to pipeline changes and speed-up card setup). If 1886 * is open (to pipeline changes and speed-up card setup). If
1887 * those changes are not yet commited, do it now - Jean II */ 1887 * those changes are not yet committed, do it now - Jean II */
1888 if (test_bit(FLAG_COMMIT, &ai->flags)) { 1888 if (test_bit(FLAG_COMMIT, &ai->flags)) {
1889 disable_MAC(ai, 1); 1889 disable_MAC(ai, 1);
1890 writeConfigRid(ai, 1); 1890 writeConfigRid(ai, 1);
@@ -1992,7 +1992,7 @@ static int mpi_send_packet (struct net_device *dev)
1992/* 1992/*
1993 * Magic, the cards firmware needs a length count (2 bytes) in the host buffer 1993 * Magic, the cards firmware needs a length count (2 bytes) in the host buffer
1994 * right after TXFID_HDR.The TXFID_HDR contains the status short so payloadlen 1994 * right after TXFID_HDR.The TXFID_HDR contains the status short so payloadlen
1995 * is immediatly after it. ------------------------------------------------ 1995 * is immediately after it. ------------------------------------------------
1996 * |TXFIDHDR+STATUS|PAYLOADLEN|802.3HDR|PACKETDATA| 1996 * |TXFIDHDR+STATUS|PAYLOADLEN|802.3HDR|PACKETDATA|
1997 * ------------------------------------------------ 1997 * ------------------------------------------------
1998 */ 1998 */
@@ -2006,7 +2006,7 @@ static int mpi_send_packet (struct net_device *dev)
2006 sizeof(wifictlhdr8023) + 2 ; 2006 sizeof(wifictlhdr8023) + 2 ;
2007 2007
2008 /* 2008 /*
2009 * Firmware automaticly puts 802 header on so 2009 * Firmware automatically puts 802 header on so
2010 * we don't need to account for it in the length 2010 * we don't need to account for it in the length
2011 */ 2011 */
2012 if (test_bit(FLAG_MIC_CAPABLE, &ai->flags) && ai->micstats.enabled && 2012 if (test_bit(FLAG_MIC_CAPABLE, &ai->flags) && ai->micstats.enabled &&
@@ -2531,7 +2531,7 @@ static int mpi_init_descriptors (struct airo_info *ai)
2531/* 2531/*
2532 * We are setting up three things here: 2532 * We are setting up three things here:
2533 * 1) Map AUX memory for descriptors: Rid, TxFid, or RxFid. 2533 * 1) Map AUX memory for descriptors: Rid, TxFid, or RxFid.
2534 * 2) Map PCI memory for issueing commands. 2534 * 2) Map PCI memory for issuing commands.
2535 * 3) Allocate memory (shared) to send and receive ethernet frames. 2535 * 3) Allocate memory (shared) to send and receive ethernet frames.
2536 */ 2536 */
2537static int mpi_map_card(struct airo_info *ai, struct pci_dev *pci) 2537static int mpi_map_card(struct airo_info *ai, struct pci_dev *pci)
@@ -3947,7 +3947,7 @@ static u16 issuecommand(struct airo_info *ai, Cmd *pCmd, Resp *pRsp) {
3947 3947
3948 if ( max_tries == -1 ) { 3948 if ( max_tries == -1 ) {
3949 airo_print_err(ai->dev->name, 3949 airo_print_err(ai->dev->name,
3950 "Max tries exceeded when issueing command"); 3950 "Max tries exceeded when issuing command");
3951 if (IN4500(ai, COMMAND) & COMMAND_BUSY) 3951 if (IN4500(ai, COMMAND) & COMMAND_BUSY)
3952 OUT4500(ai, EVACK, EV_CLEARCOMMANDBUSY); 3952 OUT4500(ai, EVACK, EV_CLEARCOMMANDBUSY);
3953 return ERROR; 3953 return ERROR;
@@ -4173,7 +4173,7 @@ done:
4173} 4173}
4174 4174
4175/* Note, that we are using BAP1 which is also used by transmit, so 4175/* Note, that we are using BAP1 which is also used by transmit, so
4176 * make sure this isnt called when a transmit is happening */ 4176 * make sure this isn't called when a transmit is happening */
4177static int PC4500_writerid(struct airo_info *ai, u16 rid, 4177static int PC4500_writerid(struct airo_info *ai, u16 rid,
4178 const void *pBuf, int len, int lock) 4178 const void *pBuf, int len, int lock)
4179{ 4179{
@@ -4776,7 +4776,7 @@ static int proc_stats_rid_open( struct inode *inode,
4776 if (!statsLabels[i]) continue; 4776 if (!statsLabels[i]) continue;
4777 if (j+strlen(statsLabels[i])+16>4096) { 4777 if (j+strlen(statsLabels[i])+16>4096) {
4778 airo_print_warn(apriv->dev->name, 4778 airo_print_warn(apriv->dev->name,
4779 "Potentially disasterous buffer overflow averted!"); 4779 "Potentially disastrous buffer overflow averted!");
4780 break; 4780 break;
4781 } 4781 }
4782 j+=sprintf(data->rbuffer+j, "%s: %u\n", statsLabels[i], 4782 j+=sprintf(data->rbuffer+j, "%s: %u\n", statsLabels[i],
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c
index b761fec0d721..ccc2edaaeda0 100644
--- a/drivers/net/wireless/ath/ar9170/main.c
+++ b/drivers/net/wireless/ath/ar9170/main.c
@@ -974,7 +974,7 @@ void ar9170_rx(struct ar9170 *ar, struct sk_buff *skb)
974 if (ar->rx_failover_missing <= 0) { 974 if (ar->rx_failover_missing <= 0) {
975 /* 975 /*
976 * nested ar9170_rx call! 976 * nested ar9170_rx call!
977 * termination is guranteed, even when the 977 * termination is guaranteed, even when the
978 * combined frame also have a element with 978 * combined frame also have a element with
979 * a bad tag. 979 * a bad tag.
980 */ 980 */
diff --git a/drivers/net/wireless/ath/ar9170/phy.c b/drivers/net/wireless/ath/ar9170/phy.c
index 0dbfcf79ac96..aa8d06ba1ee4 100644
--- a/drivers/net/wireless/ath/ar9170/phy.c
+++ b/drivers/net/wireless/ath/ar9170/phy.c
@@ -424,7 +424,7 @@ static u32 ar9170_get_default_phy_reg_val(u32 reg, bool is_2ghz, bool is_40mhz)
424 424
425/* 425/*
426 * initialize some phy regs from eeprom values in modal_header[] 426 * initialize some phy regs from eeprom values in modal_header[]
427 * acc. to band and bandwith 427 * acc. to band and bandwidth
428 */ 428 */
429static int ar9170_init_phy_from_eeprom(struct ar9170 *ar, 429static int ar9170_init_phy_from_eeprom(struct ar9170 *ar,
430 bool is_2ghz, bool is_40mhz) 430 bool is_2ghz, bool is_40mhz)
diff --git a/drivers/net/wireless/ath/ath5k/ani.h b/drivers/net/wireless/ath/ath5k/ani.h
index d0a664039c87..034015397093 100644
--- a/drivers/net/wireless/ath/ath5k/ani.h
+++ b/drivers/net/wireless/ath/ath5k/ani.h
@@ -27,7 +27,7 @@
27#define ATH5K_ANI_RSSI_THR_HIGH 40 27#define ATH5K_ANI_RSSI_THR_HIGH 40
28#define ATH5K_ANI_RSSI_THR_LOW 7 28#define ATH5K_ANI_RSSI_THR_LOW 7
29 29
30/* maximum availabe levels */ 30/* maximum available levels */
31#define ATH5K_ANI_MAX_FIRSTEP_LVL 2 31#define ATH5K_ANI_MAX_FIRSTEP_LVL 2
32#define ATH5K_ANI_MAX_NOISE_IMM_LVL 1 32#define ATH5K_ANI_MAX_NOISE_IMM_LVL 1
33 33
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 4d7f21ee111c..349a5963931b 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -1953,7 +1953,7 @@ ath5k_beacon_update_timers(struct ath5k_softc *sc, u64 bc_tsf)
1953 1953
1954#define FUDGE AR5K_TUNE_SW_BEACON_RESP + 3 1954#define FUDGE AR5K_TUNE_SW_BEACON_RESP + 3
1955 /* We use FUDGE to make sure the next TBTT is ahead of the current TU. 1955 /* We use FUDGE to make sure the next TBTT is ahead of the current TU.
1956 * Since we later substract AR5K_TUNE_SW_BEACON_RESP (10) in the timer 1956 * Since we later subtract AR5K_TUNE_SW_BEACON_RESP (10) in the timer
1957 * configuration we need to make sure it is bigger than that. */ 1957 * configuration we need to make sure it is bigger than that. */
1958 1958
1959 if (bc_tsf == -1) { 1959 if (bc_tsf == -1) {
@@ -1971,7 +1971,7 @@ ath5k_beacon_update_timers(struct ath5k_softc *sc, u64 bc_tsf)
1971 intval |= AR5K_BEACON_RESET_TSF; 1971 intval |= AR5K_BEACON_RESET_TSF;
1972 } else if (bc_tsf > hw_tsf) { 1972 } else if (bc_tsf > hw_tsf) {
1973 /* 1973 /*
1974 * beacon received, SW merge happend but HW TSF not yet updated. 1974 * beacon received, SW merge happened but HW TSF not yet updated.
1975 * not possible to reconfigure timers yet, but next time we 1975 * not possible to reconfigure timers yet, but next time we
1976 * receive a beacon with the same BSSID, the hardware will 1976 * receive a beacon with the same BSSID, the hardware will
1977 * automatically update the TSF and then we need to reconfigure 1977 * automatically update the TSF and then we need to reconfigure
@@ -2651,7 +2651,7 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
2651 synchronize_irq(sc->irq); 2651 synchronize_irq(sc->irq);
2652 stop_tasklets(sc); 2652 stop_tasklets(sc);
2653 2653
2654 /* Save ani mode and disable ANI durring 2654 /* Save ani mode and disable ANI during
2655 * reset. If we don't we might get false 2655 * reset. If we don't we might get false
2656 * PHY error interrupts. */ 2656 * PHY error interrupts. */
2657 ani_mode = ah->ah_sc->ani_state.ani_mode; 2657 ani_mode = ah->ah_sc->ani_state.ani_mode;
diff --git a/drivers/net/wireless/ath/ath5k/desc.c b/drivers/net/wireless/ath/ath5k/desc.c
index 16b44ff7dd3e..a8fcc94269f7 100644
--- a/drivers/net/wireless/ath/ath5k/desc.c
+++ b/drivers/net/wireless/ath/ath5k/desc.c
@@ -51,7 +51,7 @@ ath5k_hw_setup_2word_tx_desc(struct ath5k_hw *ah, struct ath5k_desc *desc,
51 /* 51 /*
52 * Validate input 52 * Validate input
53 * - Zero retries don't make sense. 53 * - Zero retries don't make sense.
54 * - A zero rate will put the HW into a mode where it continously sends 54 * - A zero rate will put the HW into a mode where it continuously sends
55 * noise on the channel, so it is important to avoid this. 55 * noise on the channel, so it is important to avoid this.
56 */ 56 */
57 if (unlikely(tx_tries0 == 0)) { 57 if (unlikely(tx_tries0 == 0)) {
@@ -190,7 +190,7 @@ static int ath5k_hw_setup_4word_tx_desc(struct ath5k_hw *ah,
190 /* 190 /*
191 * Validate input 191 * Validate input
192 * - Zero retries don't make sense. 192 * - Zero retries don't make sense.
193 * - A zero rate will put the HW into a mode where it continously sends 193 * - A zero rate will put the HW into a mode where it continuously sends
194 * noise on the channel, so it is important to avoid this. 194 * noise on the channel, so it is important to avoid this.
195 */ 195 */
196 if (unlikely(tx_tries0 == 0)) { 196 if (unlikely(tx_tries0 == 0)) {
@@ -300,7 +300,7 @@ ath5k_hw_setup_mrr_tx_desc(struct ath5k_hw *ah, struct ath5k_desc *desc,
300 /* 300 /*
301 * Rates can be 0 as long as the retry count is 0 too. 301 * Rates can be 0 as long as the retry count is 0 too.
302 * A zero rate and nonzero retry count will put the HW into a mode where 302 * A zero rate and nonzero retry count will put the HW into a mode where
303 * it continously sends noise on the channel, so it is important to 303 * it continuously sends noise on the channel, so it is important to
304 * avoid this. 304 * avoid this.
305 */ 305 */
306 if (unlikely((tx_rate1 == 0 && tx_tries1 != 0) || 306 if (unlikely((tx_rate1 == 0 && tx_tries1 != 0) ||
@@ -342,7 +342,7 @@ ath5k_hw_setup_mrr_tx_desc(struct ath5k_hw *ah, struct ath5k_desc *desc,
342\***********************/ 342\***********************/
343 343
344/* 344/*
345 * Proccess the tx status descriptor on 5210/5211 345 * Process the tx status descriptor on 5210/5211
346 */ 346 */
347static int ath5k_hw_proc_2word_tx_status(struct ath5k_hw *ah, 347static int ath5k_hw_proc_2word_tx_status(struct ath5k_hw *ah,
348 struct ath5k_desc *desc, struct ath5k_tx_status *ts) 348 struct ath5k_desc *desc, struct ath5k_tx_status *ts)
@@ -394,7 +394,7 @@ static int ath5k_hw_proc_2word_tx_status(struct ath5k_hw *ah,
394} 394}
395 395
396/* 396/*
397 * Proccess a tx status descriptor on 5212 397 * Process a tx status descriptor on 5212
398 */ 398 */
399static int ath5k_hw_proc_4word_tx_status(struct ath5k_hw *ah, 399static int ath5k_hw_proc_4word_tx_status(struct ath5k_hw *ah,
400 struct ath5k_desc *desc, struct ath5k_tx_status *ts) 400 struct ath5k_desc *desc, struct ath5k_tx_status *ts)
@@ -519,7 +519,7 @@ int ath5k_hw_setup_rx_desc(struct ath5k_hw *ah, struct ath5k_desc *desc,
519} 519}
520 520
521/* 521/*
522 * Proccess the rx status descriptor on 5210/5211 522 * Process the rx status descriptor on 5210/5211
523 */ 523 */
524static int ath5k_hw_proc_5210_rx_status(struct ath5k_hw *ah, 524static int ath5k_hw_proc_5210_rx_status(struct ath5k_hw *ah,
525 struct ath5k_desc *desc, struct ath5k_rx_status *rs) 525 struct ath5k_desc *desc, struct ath5k_rx_status *rs)
@@ -602,7 +602,7 @@ static int ath5k_hw_proc_5210_rx_status(struct ath5k_hw *ah,
602} 602}
603 603
604/* 604/*
605 * Proccess the rx status descriptor on 5212 605 * Process the rx status descriptor on 5212
606 */ 606 */
607static int ath5k_hw_proc_5212_rx_status(struct ath5k_hw *ah, 607static int ath5k_hw_proc_5212_rx_status(struct ath5k_hw *ah,
608 struct ath5k_desc *desc, 608 struct ath5k_desc *desc,
diff --git a/drivers/net/wireless/ath/ath5k/eeprom.c b/drivers/net/wireless/ath/ath5k/eeprom.c
index b6561f785c6e..efb672cb31e4 100644
--- a/drivers/net/wireless/ath/ath5k/eeprom.c
+++ b/drivers/net/wireless/ath/ath5k/eeprom.c
@@ -1080,7 +1080,7 @@ ath5k_eeprom_read_pcal_info_5112(struct ath5k_hw *ah, int mode)
1080 * 1080 *
1081 * To recreate the curves we read here the points and interpolate 1081 * To recreate the curves we read here the points and interpolate
1082 * later. Note that in most cases only 2 (higher and lower) curves are 1082 * later. Note that in most cases only 2 (higher and lower) curves are
1083 * used (like RF5112) but vendors have the oportunity to include all 1083 * used (like RF5112) but vendors have the opportunity to include all
1084 * 4 curves on eeprom. The final curve (higher power) has an extra 1084 * 4 curves on eeprom. The final curve (higher power) has an extra
1085 * point for better accuracy like RF5112. 1085 * point for better accuracy like RF5112.
1086 */ 1086 */
@@ -1302,7 +1302,7 @@ ath5k_eeprom_read_pcal_info_2413(struct ath5k_hw *ah, int mode)
1302 /* 1302 /*
1303 * Pd gain 0 is not the last pd gain 1303 * Pd gain 0 is not the last pd gain
1304 * so it only has 2 pd points. 1304 * so it only has 2 pd points.
1305 * Continue wih pd gain 1. 1305 * Continue with pd gain 1.
1306 */ 1306 */
1307 pcinfo->pwr_i[1] = (val >> 10) & 0x1f; 1307 pcinfo->pwr_i[1] = (val >> 10) & 0x1f;
1308 1308
diff --git a/drivers/net/wireless/ath/ath5k/pci.c b/drivers/net/wireless/ath/ath5k/pci.c
index 66598a0d1df0..3c44689a700b 100644
--- a/drivers/net/wireless/ath/ath5k/pci.c
+++ b/drivers/net/wireless/ath/ath5k/pci.c
@@ -57,7 +57,7 @@ static void ath5k_pci_read_cachesize(struct ath_common *common, int *csz)
57 *csz = (int)u8tmp; 57 *csz = (int)u8tmp;
58 58
59 /* 59 /*
60 * This check was put in to avoid "unplesant" consequences if 60 * This check was put in to avoid "unpleasant" consequences if
61 * the bootrom has not fully initialized all PCI devices. 61 * the bootrom has not fully initialized all PCI devices.
62 * Sometimes the cache line size register is not set 62 * Sometimes the cache line size register is not set
63 */ 63 */
diff --git a/drivers/net/wireless/ath/ath5k/pcu.c b/drivers/net/wireless/ath/ath5k/pcu.c
index a702817daf72..d9b3f828455a 100644
--- a/drivers/net/wireless/ath/ath5k/pcu.c
+++ b/drivers/net/wireless/ath/ath5k/pcu.c
@@ -472,7 +472,7 @@ void ath5k_hw_set_rx_filter(struct ath5k_hw *ah, u32 filter)
472 } 472 }
473 473
474 /* 474 /*
475 * The AR5210 uses promiscous mode to detect radar activity 475 * The AR5210 uses promiscuous mode to detect radar activity
476 */ 476 */
477 if (ah->ah_version == AR5K_AR5210 && 477 if (ah->ah_version == AR5K_AR5210 &&
478 (filter & AR5K_RX_FILTER_RADARERR)) { 478 (filter & AR5K_RX_FILTER_RADARERR)) {
@@ -706,8 +706,8 @@ ath5k_check_timer_win(int a, int b, int window, int intval)
706 * The need for this function arises from the fact that we have 4 separate 706 * The need for this function arises from the fact that we have 4 separate
707 * HW timer registers (TIMER0 - TIMER3), which are closely related to the 707 * HW timer registers (TIMER0 - TIMER3), which are closely related to the
708 * next beacon target time (NBTT), and that the HW updates these timers 708 * next beacon target time (NBTT), and that the HW updates these timers
709 * seperately based on the current TSF value. The hardware increments each 709 * separately based on the current TSF value. The hardware increments each
710 * timer by the beacon interval, when the local TSF coverted to TU is equal 710 * timer by the beacon interval, when the local TSF converted to TU is equal
711 * to the value stored in the timer. 711 * to the value stored in the timer.
712 * 712 *
713 * The reception of a beacon with the same BSSID can update the local HW TSF 713 * The reception of a beacon with the same BSSID can update the local HW TSF
diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c
index 62ce2f4e8605..55441913344d 100644
--- a/drivers/net/wireless/ath/ath5k/phy.c
+++ b/drivers/net/wireless/ath/ath5k/phy.c
@@ -335,11 +335,11 @@ static void ath5k_hw_wait_for_synth(struct ath5k_hw *ah,
335 * http://madwifi-project.org/ticket/1659 335 * http://madwifi-project.org/ticket/1659
336 * with various measurements and diagrams 336 * with various measurements and diagrams
337 * 337 *
338 * TODO: Deal with power drops due to probes by setting an apropriate 338 * TODO: Deal with power drops due to probes by setting an appropriate
339 * tx power on the probe packets ! Make this part of the calibration process. 339 * tx power on the probe packets ! Make this part of the calibration process.
340 */ 340 */
341 341
342/* Initialize ah_gain durring attach */ 342/* Initialize ah_gain during attach */
343int ath5k_hw_rfgain_opt_init(struct ath5k_hw *ah) 343int ath5k_hw_rfgain_opt_init(struct ath5k_hw *ah)
344{ 344{
345 /* Initialize the gain optimization values */ 345 /* Initialize the gain optimization values */
@@ -1049,7 +1049,7 @@ static int ath5k_hw_rfregs_init(struct ath5k_hw *ah,
1049\**************************/ 1049\**************************/
1050 1050
1051/* 1051/*
1052 * Convertion needed for RF5110 1052 * Conversion needed for RF5110
1053 */ 1053 */
1054static u32 ath5k_hw_rf5110_chan2athchan(struct ieee80211_channel *channel) 1054static u32 ath5k_hw_rf5110_chan2athchan(struct ieee80211_channel *channel)
1055{ 1055{
@@ -1088,7 +1088,7 @@ static int ath5k_hw_rf5110_channel(struct ath5k_hw *ah,
1088} 1088}
1089 1089
1090/* 1090/*
1091 * Convertion needed for 5111 1091 * Conversion needed for 5111
1092 */ 1092 */
1093static int ath5k_hw_rf5111_chan2athchan(unsigned int ieee, 1093static int ath5k_hw_rf5111_chan2athchan(unsigned int ieee,
1094 struct ath5k_athchan_2ghz *athchan) 1094 struct ath5k_athchan_2ghz *athchan)
@@ -2201,7 +2201,7 @@ ath5k_create_power_curve(s16 pmin, s16 pmax,
2201/* 2201/*
2202 * Get the surrounding per-channel power calibration piers 2202 * Get the surrounding per-channel power calibration piers
2203 * for a given frequency so that we can interpolate between 2203 * for a given frequency so that we can interpolate between
2204 * them and come up with an apropriate dataset for our current 2204 * them and come up with an appropriate dataset for our current
2205 * channel. 2205 * channel.
2206 */ 2206 */
2207static void 2207static void
@@ -2618,7 +2618,7 @@ ath5k_write_pcdac_table(struct ath5k_hw *ah)
2618/* 2618/*
2619 * Set the gain boundaries and create final Power to PDADC table 2619 * Set the gain boundaries and create final Power to PDADC table
2620 * 2620 *
2621 * We can have up to 4 pd curves, we need to do a simmilar process 2621 * We can have up to 4 pd curves, we need to do a similar process
2622 * as we do for RF5112. This time we don't have an edge_flag but we 2622 * as we do for RF5112. This time we don't have an edge_flag but we
2623 * set the gain boundaries on a separate register. 2623 * set the gain boundaries on a separate register.
2624 */ 2624 */
@@ -2826,13 +2826,13 @@ ath5k_setup_channel_powertable(struct ath5k_hw *ah,
2826 u32 target = channel->center_freq; 2826 u32 target = channel->center_freq;
2827 int pdg, i; 2827 int pdg, i;
2828 2828
2829 /* Get surounding freq piers for this channel */ 2829 /* Get surrounding freq piers for this channel */
2830 ath5k_get_chan_pcal_surrounding_piers(ah, channel, 2830 ath5k_get_chan_pcal_surrounding_piers(ah, channel,
2831 &pcinfo_L, 2831 &pcinfo_L,
2832 &pcinfo_R); 2832 &pcinfo_R);
2833 2833
2834 /* Loop over pd gain curves on 2834 /* Loop over pd gain curves on
2835 * surounding freq piers by index */ 2835 * surrounding freq piers by index */
2836 for (pdg = 0; pdg < ee->ee_pd_gains[ee_mode]; pdg++) { 2836 for (pdg = 0; pdg < ee->ee_pd_gains[ee_mode]; pdg++) {
2837 2837
2838 /* Fill curves in reverse order 2838 /* Fill curves in reverse order
@@ -2923,7 +2923,7 @@ ath5k_setup_channel_powertable(struct ath5k_hw *ah,
2923 } 2923 }
2924 2924
2925 /* Interpolate between curves 2925 /* Interpolate between curves
2926 * of surounding freq piers to 2926 * of surrounding freq piers to
2927 * get the final curve for this 2927 * get the final curve for this
2928 * pd gain. Re-use tmpL for interpolation 2928 * pd gain. Re-use tmpL for interpolation
2929 * output */ 2929 * output */
@@ -2947,7 +2947,7 @@ ath5k_setup_channel_powertable(struct ath5k_hw *ah,
2947 2947
2948 /* Fill min and max power levels for this 2948 /* Fill min and max power levels for this
2949 * channel by interpolating the values on 2949 * channel by interpolating the values on
2950 * surounding channels to complete the dataset */ 2950 * surrounding channels to complete the dataset */
2951 ah->ah_txpower.txp_min_pwr = ath5k_get_interpolated_value(target, 2951 ah->ah_txpower.txp_min_pwr = ath5k_get_interpolated_value(target,
2952 (s16) pcinfo_L->freq, 2952 (s16) pcinfo_L->freq,
2953 (s16) pcinfo_R->freq, 2953 (s16) pcinfo_R->freq,
@@ -3179,7 +3179,7 @@ ath5k_hw_txpower(struct ath5k_hw *ah, struct ieee80211_channel *channel,
3179 3179
3180 /* FIXME: TPC scale reduction */ 3180 /* FIXME: TPC scale reduction */
3181 3181
3182 /* Get surounding channels for per-rate power table 3182 /* Get surrounding channels for per-rate power table
3183 * calibration */ 3183 * calibration */
3184 ath5k_get_rate_pcal_data(ah, channel, &rate_info); 3184 ath5k_get_rate_pcal_data(ah, channel, &rate_info);
3185 3185
diff --git a/drivers/net/wireless/ath/ath5k/reg.h b/drivers/net/wireless/ath/ath5k/reg.h
index e1c9abd8c879..d12b827033c1 100644
--- a/drivers/net/wireless/ath/ath5k/reg.h
+++ b/drivers/net/wireless/ath/ath5k/reg.h
@@ -132,8 +132,8 @@
132 * As i can see in ar5k_ar5210_tx_start Reyk uses some of the values of BCR 132 * As i can see in ar5k_ar5210_tx_start Reyk uses some of the values of BCR
133 * for this register, so i guess TQ1V,TQ1FV and BDMAE have the same meaning 133 * for this register, so i guess TQ1V,TQ1FV and BDMAE have the same meaning
134 * here and SNP/SNAP means "snapshot" (so this register gets synced with BCR). 134 * here and SNP/SNAP means "snapshot" (so this register gets synced with BCR).
135 * So SNAPPEDBCRVALID sould also stand for "snapped BCR -values- valid", so i 135 * So SNAPPEDBCRVALID should also stand for "snapped BCR -values- valid", so i
136 * renamed it to SNAPSHOTSVALID to make more sense. I realy have no idea what 136 * renamed it to SNAPSHOTSVALID to make more sense. I really have no idea what
137 * else can it be. I also renamed SNPBCMD to SNPADHOC to match BCR. 137 * else can it be. I also renamed SNPBCMD to SNPADHOC to match BCR.
138 */ 138 */
139#define AR5K_BSR 0x002c /* Register Address */ 139#define AR5K_BSR 0x002c /* Register Address */
@@ -283,7 +283,7 @@
283 */ 283 */
284#define AR5K_ISR 0x001c /* Register Address [5210] */ 284#define AR5K_ISR 0x001c /* Register Address [5210] */
285#define AR5K_PISR 0x0080 /* Register Address [5211+] */ 285#define AR5K_PISR 0x0080 /* Register Address [5211+] */
286#define AR5K_ISR_RXOK 0x00000001 /* Frame successfuly recieved */ 286#define AR5K_ISR_RXOK 0x00000001 /* Frame successfuly received */
287#define AR5K_ISR_RXDESC 0x00000002 /* RX descriptor request */ 287#define AR5K_ISR_RXDESC 0x00000002 /* RX descriptor request */
288#define AR5K_ISR_RXERR 0x00000004 /* Receive error */ 288#define AR5K_ISR_RXERR 0x00000004 /* Receive error */
289#define AR5K_ISR_RXNOFRM 0x00000008 /* No frame received (receive timeout) */ 289#define AR5K_ISR_RXNOFRM 0x00000008 /* No frame received (receive timeout) */
@@ -372,12 +372,12 @@
372/* 372/*
373 * Interrupt Mask Registers 373 * Interrupt Mask Registers
374 * 374 *
375 * As whith ISRs 5210 has one IMR (AR5K_IMR) and 5211/5212 has one primary 375 * As with ISRs 5210 has one IMR (AR5K_IMR) and 5211/5212 has one primary
376 * (AR5K_PIMR) and 4 secondary IMRs (AR5K_SIMRx). Note that ISR/IMR flags match. 376 * (AR5K_PIMR) and 4 secondary IMRs (AR5K_SIMRx). Note that ISR/IMR flags match.
377 */ 377 */
378#define AR5K_IMR 0x0020 /* Register Address [5210] */ 378#define AR5K_IMR 0x0020 /* Register Address [5210] */
379#define AR5K_PIMR 0x00a0 /* Register Address [5211+] */ 379#define AR5K_PIMR 0x00a0 /* Register Address [5211+] */
380#define AR5K_IMR_RXOK 0x00000001 /* Frame successfuly recieved*/ 380#define AR5K_IMR_RXOK 0x00000001 /* Frame successfuly received*/
381#define AR5K_IMR_RXDESC 0x00000002 /* RX descriptor request*/ 381#define AR5K_IMR_RXDESC 0x00000002 /* RX descriptor request*/
382#define AR5K_IMR_RXERR 0x00000004 /* Receive error*/ 382#define AR5K_IMR_RXERR 0x00000004 /* Receive error*/
383#define AR5K_IMR_RXNOFRM 0x00000008 /* No frame received (receive timeout)*/ 383#define AR5K_IMR_RXNOFRM 0x00000008 /* No frame received (receive timeout)*/
@@ -895,7 +895,7 @@
895#define AR5K_PCICFG_SL_INTEN 0x00000800 /* Enable interrupts when asleep */ 895#define AR5K_PCICFG_SL_INTEN 0x00000800 /* Enable interrupts when asleep */
896#define AR5K_PCICFG_LED_BCTL 0x00001000 /* Led blink (?) [5210] */ 896#define AR5K_PCICFG_LED_BCTL 0x00001000 /* Led blink (?) [5210] */
897#define AR5K_PCICFG_RETRY_FIX 0x00001000 /* Enable pci core retry fix */ 897#define AR5K_PCICFG_RETRY_FIX 0x00001000 /* Enable pci core retry fix */
898#define AR5K_PCICFG_SL_INPEN 0x00002000 /* Sleep even whith pending interrupts*/ 898#define AR5K_PCICFG_SL_INPEN 0x00002000 /* Sleep even with pending interrupts*/
899#define AR5K_PCICFG_SPWR_DN 0x00010000 /* Mask for power status */ 899#define AR5K_PCICFG_SPWR_DN 0x00010000 /* Mask for power status */
900#define AR5K_PCICFG_LEDMODE 0x000e0000 /* Ledmode [5211+] */ 900#define AR5K_PCICFG_LEDMODE 0x000e0000 /* Ledmode [5211+] */
901#define AR5K_PCICFG_LEDMODE_PROP 0x00000000 /* Blink on standard traffic [5211+] */ 901#define AR5K_PCICFG_LEDMODE_PROP 0x00000000 /* Blink on standard traffic [5211+] */
diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
index ffcf44a4058b..106c0b06cf55 100644
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
@@ -142,7 +142,7 @@ static void ar5008_hw_force_bias(struct ath_hw *ah, u16 synth_freq)
142 142
143/** 143/**
144 * ar5008_hw_set_channel - tune to a channel on the external AR2133/AR5133 radios 144 * ar5008_hw_set_channel - tune to a channel on the external AR2133/AR5133 radios
145 * @ah: atheros hardware stucture 145 * @ah: atheros hardware structure
146 * @chan: 146 * @chan:
147 * 147 *
148 * For the external AR2133/AR5133 radios, takes the MHz channel value and set 148 * For the external AR2133/AR5133 radios, takes the MHz channel value and set
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index 4a9271802991..6eadf975ae48 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -3240,7 +3240,7 @@ static int ar9300_compress_decision(struct ath_hw *ah,
3240 eep = ar9003_eeprom_struct_find_by_id(reference); 3240 eep = ar9003_eeprom_struct_find_by_id(reference);
3241 if (eep == NULL) { 3241 if (eep == NULL) {
3242 ath_dbg(common, ATH_DBG_EEPROM, 3242 ath_dbg(common, ATH_DBG_EEPROM,
3243 "cant find reference eeprom struct %d\n", 3243 "can't find reference eeprom struct %d\n",
3244 reference); 3244 reference);
3245 return -1; 3245 return -1;
3246 } 3246 }
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index f1b8af64569c..2d10239ce829 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -1040,7 +1040,7 @@ static int ath9k_hif_usb_probe(struct usb_interface *interface,
1040 } 1040 }
1041 1041
1042 ret = ath9k_htc_hw_init(hif_dev->htc_handle, 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 hif_dev->udev->product, id->driver_info); 1044 hif_dev->udev->product, id->driver_info);
1045 if (ret) { 1045 if (ret) {
1046 ret = -EINVAL; 1046 ret = -EINVAL;
@@ -1158,7 +1158,7 @@ fail_resume:
1158#endif 1158#endif
1159 1159
1160static struct usb_driver ath9k_hif_usb_driver = { 1160static struct usb_driver ath9k_hif_usb_driver = {
1161 .name = "ath9k_hif_usb", 1161 .name = KBUILD_MODNAME,
1162 .probe = ath9k_hif_usb_probe, 1162 .probe = ath9k_hif_usb_probe,
1163 .disconnect = ath9k_hif_usb_disconnect, 1163 .disconnect = ath9k_hif_usb_disconnect,
1164#ifdef CONFIG_PM 1164#ifdef CONFIG_PM
diff --git a/drivers/net/wireless/ath/ath9k/htc_hst.c b/drivers/net/wireless/ath/ath9k/htc_hst.c
index c41ab8c30161..62e139a30a74 100644
--- a/drivers/net/wireless/ath/ath9k/htc_hst.c
+++ b/drivers/net/wireless/ath/ath9k/htc_hst.c
@@ -360,7 +360,7 @@ ret:
360 * HTC Messages are handled directly here and the obtained SKB 360 * HTC Messages are handled directly here and the obtained SKB
361 * is freed. 361 * is freed.
362 * 362 *
363 * Sevice messages (Data, WMI) passed to the corresponding 363 * Service messages (Data, WMI) passed to the corresponding
364 * endpoint RX handlers, which have to free the SKB. 364 * endpoint RX handlers, which have to free the SKB.
365 */ 365 */
366void ath9k_htc_rx_msg(struct htc_target *htc_handle, 366void ath9k_htc_rx_msg(struct htc_target *htc_handle,
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 338b07502f1a..c95bc5cc1a1f 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1254,15 +1254,6 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
1254 ah->txchainmask = common->tx_chainmask; 1254 ah->txchainmask = common->tx_chainmask;
1255 ah->rxchainmask = common->rx_chainmask; 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 if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE)) 1257 if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE))
1267 return -EIO; 1258 return -EIO;
1268 1259
@@ -2546,6 +2537,7 @@ static struct {
2546 { AR_SREV_VERSION_9287, "9287" }, 2537 { AR_SREV_VERSION_9287, "9287" },
2547 { AR_SREV_VERSION_9271, "9271" }, 2538 { AR_SREV_VERSION_9271, "9271" },
2548 { AR_SREV_VERSION_9300, "9300" }, 2539 { AR_SREV_VERSION_9300, "9300" },
2540 { AR_SREV_VERSION_9485, "9485" },
2549}; 2541};
2550 2542
2551/* For devices with external radios */ 2543/* For devices with external radios */
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c
index 562257ac52cf..edc1cbbfecaf 100644
--- a/drivers/net/wireless/ath/ath9k/mac.c
+++ b/drivers/net/wireless/ath/ath9k/mac.c
@@ -751,28 +751,47 @@ void ath9k_hw_abortpcurecv(struct ath_hw *ah)
751} 751}
752EXPORT_SYMBOL(ath9k_hw_abortpcurecv); 752EXPORT_SYMBOL(ath9k_hw_abortpcurecv);
753 753
754bool ath9k_hw_stopdmarecv(struct ath_hw *ah) 754bool ath9k_hw_stopdmarecv(struct ath_hw *ah, bool *reset)
755{ 755{
756#define AH_RX_STOP_DMA_TIMEOUT 10000 /* usec */ 756#define AH_RX_STOP_DMA_TIMEOUT 10000 /* usec */
757#define AH_RX_TIME_QUANTUM 100 /* usec */ 757#define AH_RX_TIME_QUANTUM 100 /* usec */
758 struct ath_common *common = ath9k_hw_common(ah); 758 struct ath_common *common = ath9k_hw_common(ah);
759 u32 mac_status, last_mac_status = 0;
759 int i; 760 int i;
760 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)));
767
761 REG_WRITE(ah, AR_CR, AR_CR_RXD); 768 REG_WRITE(ah, AR_CR, AR_CR_RXD);
762 769
763 /* Wait for rx enable bit to go low */ 770 /* Wait for rx enable bit to go low */
764 for (i = AH_RX_STOP_DMA_TIMEOUT / AH_TIME_QUANTUM; i != 0; i--) { 771 for (i = AH_RX_STOP_DMA_TIMEOUT / AH_TIME_QUANTUM; i != 0; i--) {
765 if ((REG_READ(ah, AR_CR) & AR_CR_RXE) == 0) 772 if ((REG_READ(ah, AR_CR) & AR_CR_RXE) == 0)
766 break; 773 break;
774
775 if (!AR_SREV_9300_20_OR_LATER(ah)) {
776 mac_status = REG_READ(ah, AR_DMADBG_7) & 0x7f0;
777 if (mac_status == 0x1c0 && mac_status == last_mac_status) {
778 *reset = true;
779 break;
780 }
781
782 last_mac_status = mac_status;
783 }
784
767 udelay(AH_TIME_QUANTUM); 785 udelay(AH_TIME_QUANTUM);
768 } 786 }
769 787
770 if (i == 0) { 788 if (i == 0) {
771 ath_err(common, 789 ath_err(common,
772 "DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x\n", 790 "DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x DMADBG_7=0x%08x\n",
773 AH_RX_STOP_DMA_TIMEOUT / 1000, 791 AH_RX_STOP_DMA_TIMEOUT / 1000,
774 REG_READ(ah, AR_CR), 792 REG_READ(ah, AR_CR),
775 REG_READ(ah, AR_DIAG_SW)); 793 REG_READ(ah, AR_DIAG_SW),
794 REG_READ(ah, AR_DMADBG_7));
776 return false; 795 return false;
777 } else { 796 } else {
778 return true; 797 return true;
diff --git a/drivers/net/wireless/ath/ath9k/mac.h b/drivers/net/wireless/ath/ath9k/mac.h
index b2b2ff852c32..c2a59386fb9c 100644
--- a/drivers/net/wireless/ath/ath9k/mac.h
+++ b/drivers/net/wireless/ath/ath9k/mac.h
@@ -695,7 +695,7 @@ bool ath9k_hw_setrxabort(struct ath_hw *ah, bool set);
695void ath9k_hw_putrxbuf(struct ath_hw *ah, u32 rxdp); 695void ath9k_hw_putrxbuf(struct ath_hw *ah, u32 rxdp);
696void ath9k_hw_startpcureceive(struct ath_hw *ah, bool is_scanning); 696void ath9k_hw_startpcureceive(struct ath_hw *ah, bool is_scanning);
697void ath9k_hw_abortpcurecv(struct ath_hw *ah); 697void ath9k_hw_abortpcurecv(struct ath_hw *ah);
698bool ath9k_hw_stopdmarecv(struct ath_hw *ah); 698bool ath9k_hw_stopdmarecv(struct ath_hw *ah, bool *reset);
699int ath9k_hw_beaconq_setup(struct ath_hw *ah); 699int ath9k_hw_beaconq_setup(struct ath_hw *ah);
700 700
701/* Interrupt Handling */ 701/* Interrupt Handling */
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 115f162c617a..17d04ff8d678 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1048,6 +1048,8 @@ static int ath9k_start(struct ieee80211_hw *hw)
1048 "Starting driver with initial channel: %d MHz\n", 1048 "Starting driver with initial channel: %d MHz\n",
1049 curchan->center_freq); 1049 curchan->center_freq);
1050 1050
1051 ath9k_ps_wakeup(sc);
1052
1051 mutex_lock(&sc->mutex); 1053 mutex_lock(&sc->mutex);
1052 1054
1053 /* setup initial channel */ 1055 /* setup initial channel */
@@ -1143,6 +1145,8 @@ static int ath9k_start(struct ieee80211_hw *hw)
1143mutex_unlock: 1145mutex_unlock:
1144 mutex_unlock(&sc->mutex); 1146 mutex_unlock(&sc->mutex);
1145 1147
1148 ath9k_ps_restore(sc);
1149
1146 return r; 1150 return r;
1147} 1151}
1148 1152
@@ -1372,7 +1376,6 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw,
1372 1376
1373 ath9k_calculate_iter_data(hw, vif, &iter_data); 1377 ath9k_calculate_iter_data(hw, vif, &iter_data);
1374 1378
1375 ath9k_ps_wakeup(sc);
1376 /* Set BSSID mask. */ 1379 /* Set BSSID mask. */
1377 memcpy(common->bssidmask, iter_data.mask, ETH_ALEN); 1380 memcpy(common->bssidmask, iter_data.mask, ETH_ALEN);
1378 ath_hw_setbssidmask(common); 1381 ath_hw_setbssidmask(common);
@@ -1407,7 +1410,6 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw,
1407 } 1410 }
1408 1411
1409 ath9k_hw_set_interrupts(ah, ah->imask); 1412 ath9k_hw_set_interrupts(ah, ah->imask);
1410 ath9k_ps_restore(sc);
1411 1413
1412 /* Set up ANI */ 1414 /* Set up ANI */
1413 if ((iter_data.naps + iter_data.nadhocs) > 0) { 1415 if ((iter_data.naps + iter_data.nadhocs) > 0) {
@@ -1453,6 +1455,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
1453 struct ath_vif *avp = (void *)vif->drv_priv; 1455 struct ath_vif *avp = (void *)vif->drv_priv;
1454 int ret = 0; 1456 int ret = 0;
1455 1457
1458 ath9k_ps_wakeup(sc);
1456 mutex_lock(&sc->mutex); 1459 mutex_lock(&sc->mutex);
1457 1460
1458 switch (vif->type) { 1461 switch (vif->type) {
@@ -1499,6 +1502,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
1499 ath9k_do_vif_add_setup(hw, vif); 1502 ath9k_do_vif_add_setup(hw, vif);
1500out: 1503out:
1501 mutex_unlock(&sc->mutex); 1504 mutex_unlock(&sc->mutex);
1505 ath9k_ps_restore(sc);
1502 return ret; 1506 return ret;
1503} 1507}
1504 1508
@@ -1513,6 +1517,7 @@ static int ath9k_change_interface(struct ieee80211_hw *hw,
1513 1517
1514 ath_dbg(common, ATH_DBG_CONFIG, "Change Interface\n"); 1518 ath_dbg(common, ATH_DBG_CONFIG, "Change Interface\n");
1515 mutex_lock(&sc->mutex); 1519 mutex_lock(&sc->mutex);
1520 ath9k_ps_wakeup(sc);
1516 1521
1517 /* See if new interface type is valid. */ 1522 /* See if new interface type is valid. */
1518 if ((new_type == NL80211_IFTYPE_ADHOC) && 1523 if ((new_type == NL80211_IFTYPE_ADHOC) &&
@@ -1542,6 +1547,7 @@ static int ath9k_change_interface(struct ieee80211_hw *hw,
1542 1547
1543 ath9k_do_vif_add_setup(hw, vif); 1548 ath9k_do_vif_add_setup(hw, vif);
1544out: 1549out:
1550 ath9k_ps_restore(sc);
1545 mutex_unlock(&sc->mutex); 1551 mutex_unlock(&sc->mutex);
1546 return ret; 1552 return ret;
1547} 1553}
@@ -1554,6 +1560,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,
1554 1560
1555 ath_dbg(common, ATH_DBG_CONFIG, "Detach Interface\n"); 1561 ath_dbg(common, ATH_DBG_CONFIG, "Detach Interface\n");
1556 1562
1563 ath9k_ps_wakeup(sc);
1557 mutex_lock(&sc->mutex); 1564 mutex_lock(&sc->mutex);
1558 1565
1559 sc->nvifs--; 1566 sc->nvifs--;
@@ -1565,6 +1572,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,
1565 ath9k_calculate_summary_state(hw, NULL); 1572 ath9k_calculate_summary_state(hw, NULL);
1566 1573
1567 mutex_unlock(&sc->mutex); 1574 mutex_unlock(&sc->mutex);
1575 ath9k_ps_restore(sc);
1568} 1576}
1569 1577
1570static void ath9k_enable_ps(struct ath_softc *sc) 1578static void ath9k_enable_ps(struct ath_softc *sc)
@@ -1805,6 +1813,7 @@ static int ath9k_conf_tx(struct ieee80211_hw *hw, u16 queue,
1805 1813
1806 txq = sc->tx.txq_map[queue]; 1814 txq = sc->tx.txq_map[queue];
1807 1815
1816 ath9k_ps_wakeup(sc);
1808 mutex_lock(&sc->mutex); 1817 mutex_lock(&sc->mutex);
1809 1818
1810 memset(&qi, 0, sizeof(struct ath9k_tx_queue_info)); 1819 memset(&qi, 0, sizeof(struct ath9k_tx_queue_info));
@@ -1828,6 +1837,7 @@ static int ath9k_conf_tx(struct ieee80211_hw *hw, u16 queue,
1828 ath_beaconq_config(sc); 1837 ath_beaconq_config(sc);
1829 1838
1830 mutex_unlock(&sc->mutex); 1839 mutex_unlock(&sc->mutex);
1840 ath9k_ps_restore(sc);
1831 1841
1832 return ret; 1842 return ret;
1833} 1843}
@@ -1890,6 +1900,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
1890 int slottime; 1900 int slottime;
1891 int error; 1901 int error;
1892 1902
1903 ath9k_ps_wakeup(sc);
1893 mutex_lock(&sc->mutex); 1904 mutex_lock(&sc->mutex);
1894 1905
1895 if (changed & BSS_CHANGED_BSSID) { 1906 if (changed & BSS_CHANGED_BSSID) {
@@ -1990,6 +2001,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
1990 } 2001 }
1991 2002
1992 mutex_unlock(&sc->mutex); 2003 mutex_unlock(&sc->mutex);
2004 ath9k_ps_restore(sc);
1993} 2005}
1994 2006
1995static u64 ath9k_get_tsf(struct ieee80211_hw *hw) 2007static u64 ath9k_get_tsf(struct ieee80211_hw *hw)
@@ -2160,6 +2172,8 @@ static void ath9k_flush(struct ieee80211_hw *hw, bool drop)
2160 if (!ath_drain_all_txq(sc, false)) 2172 if (!ath_drain_all_txq(sc, false))
2161 ath_reset(sc, false); 2173 ath_reset(sc, false);
2162 2174
2175 ieee80211_wake_queues(hw);
2176
2163out: 2177out:
2164 ieee80211_queue_delayed_work(hw, &sc->tx_complete_work, 0); 2178 ieee80211_queue_delayed_work(hw, &sc->tx_complete_work, 0);
2165 mutex_unlock(&sc->mutex); 2179 mutex_unlock(&sc->mutex);
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
index e83128c50f7b..9c65459be100 100644
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -44,7 +44,7 @@ static void ath_pci_read_cachesize(struct ath_common *common, int *csz)
44 *csz = (int)u8tmp; 44 *csz = (int)u8tmp;
45 45
46 /* 46 /*
47 * This check was put in to avoid "unplesant" consequences if 47 * This check was put in to avoid "unpleasant" consequences if
48 * the bootrom has not fully initialized all PCI devices. 48 * the bootrom has not fully initialized all PCI devices.
49 * Sometimes the cache line size register is not set 49 * Sometimes the cache line size register is not set
50 */ 50 */
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c
index 960d717ca7c2..4c0d36a6980f 100644
--- a/drivers/net/wireless/ath/ath9k/rc.c
+++ b/drivers/net/wireless/ath/ath9k/rc.c
@@ -792,7 +792,7 @@ static void ath_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,
792 792
793 tx_info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE; 793 tx_info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE;
794 } else { 794 } else {
795 /* Set the choosen rate. No RTS for first series entry. */ 795 /* Set the chosen rate. No RTS for first series entry. */
796 ath_rc_rate_set_series(rate_table, &rates[i++], txrc, 796 ath_rc_rate_set_series(rate_table, &rates[i++], txrc,
797 try_per_rate, rix, 0); 797 try_per_rate, rix, 0);
798 } 798 }
@@ -1328,7 +1328,7 @@ static void ath_tx_status(void *priv, struct ieee80211_supported_band *sband,
1328 1328
1329 hdr = (struct ieee80211_hdr *)skb->data; 1329 hdr = (struct ieee80211_hdr *)skb->data;
1330 fc = hdr->frame_control; 1330 fc = hdr->frame_control;
1331 for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { 1331 for (i = 0; i < sc->hw->max_rates; i++) {
1332 struct ieee80211_tx_rate *rate = &tx_info->status.rates[i]; 1332 struct ieee80211_tx_rate *rate = &tx_info->status.rates[i];
1333 if (!rate->count) 1333 if (!rate->count)
1334 break; 1334 break;
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index a9c3f4672aa0..dcd19bc337d1 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -486,12 +486,12 @@ start_recv:
486bool ath_stoprecv(struct ath_softc *sc) 486bool ath_stoprecv(struct ath_softc *sc)
487{ 487{
488 struct ath_hw *ah = sc->sc_ah; 488 struct ath_hw *ah = sc->sc_ah;
489 bool stopped; 489 bool stopped, reset = false;
490 490
491 spin_lock_bh(&sc->rx.rxbuflock); 491 spin_lock_bh(&sc->rx.rxbuflock);
492 ath9k_hw_abortpcurecv(ah); 492 ath9k_hw_abortpcurecv(ah);
493 ath9k_hw_setrxfilter(ah, 0); 493 ath9k_hw_setrxfilter(ah, 0);
494 stopped = ath9k_hw_stopdmarecv(ah); 494 stopped = ath9k_hw_stopdmarecv(ah, &reset);
495 495
496 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) 496 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA)
497 ath_edma_stop_recv(sc); 497 ath_edma_stop_recv(sc);
@@ -506,7 +506,7 @@ bool ath_stoprecv(struct ath_softc *sc)
506 "confusing the DMA engine when we start RX up\n"); 506 "confusing the DMA engine when we start RX up\n");
507 ATH_DBG_WARN_ON_ONCE(!stopped); 507 ATH_DBG_WARN_ON_ONCE(!stopped);
508 } 508 }
509 return stopped; 509 return stopped || reset;
510} 510}
511 511
512void ath_flushrecv(struct ath_softc *sc) 512void ath_flushrecv(struct ath_softc *sc)
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index ef22096d40c9..88fa7fdffd05 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -628,8 +628,8 @@ static u32 ath_lookup_rate(struct ath_softc *sc, struct ath_buf *bf,
628 (u32)ATH_AMPDU_LIMIT_MAX); 628 (u32)ATH_AMPDU_LIMIT_MAX);
629 629
630 /* 630 /*
631 * h/w can accept aggregates upto 16 bit lengths (65535). 631 * h/w can accept aggregates up to 16 bit lengths (65535).
632 * The IE, however can hold upto 65536, which shows up here 632 * The IE, however can hold up to 65536, which shows up here
633 * as zero. Ignore 65536 since we are constrained by hw. 633 * as zero. Ignore 65536 since we are constrained by hw.
634 */ 634 */
635 if (tid->an->maxampdu) 635 if (tid->an->maxampdu)
@@ -1725,8 +1725,8 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf,
1725 u8 tidno; 1725 u8 tidno;
1726 1726
1727 spin_lock_bh(&txctl->txq->axq_lock); 1727 spin_lock_bh(&txctl->txq->axq_lock);
1728 1728 if ((sc->sc_flags & SC_OP_TXAGGR) && txctl->an &&
1729 if (ieee80211_is_data_qos(hdr->frame_control) && txctl->an) { 1729 ieee80211_is_data_qos(hdr->frame_control)) {
1730 tidno = ieee80211_get_qos_ctl(hdr)[0] & 1730 tidno = ieee80211_get_qos_ctl(hdr)[0] &
1731 IEEE80211_QOS_CTL_TID_MASK; 1731 IEEE80211_QOS_CTL_TID_MASK;
1732 tid = ATH_AN_2_TID(txctl->an, tidno); 1732 tid = ATH_AN_2_TID(txctl->an, tidno);
diff --git a/drivers/net/wireless/ath/carl9170/carl9170.h b/drivers/net/wireless/ath/carl9170/carl9170.h
index c6a5fae634a0..3d4ed5863732 100644
--- a/drivers/net/wireless/ath/carl9170/carl9170.h
+++ b/drivers/net/wireless/ath/carl9170/carl9170.h
@@ -161,7 +161,7 @@ struct carl9170_sta_tid {
161 * Naturally: The higher the limit, the faster the device CAN send. 161 * Naturally: The higher the limit, the faster the device CAN send.
162 * However, even a slight over-commitment at the wrong time and the 162 * However, even a slight over-commitment at the wrong time and the
163 * hardware is doomed to send all already-queued frames at suboptimal 163 * hardware is doomed to send all already-queued frames at suboptimal
164 * rates. This in turn leads to an enourmous amount of unsuccessful 164 * rates. This in turn leads to an enormous amount of unsuccessful
165 * retries => Latency goes up, whereas the throughput goes down. CRASH! 165 * retries => Latency goes up, whereas the throughput goes down. CRASH!
166 */ 166 */
167#define CARL9170_NUM_TX_LIMIT_HARD ((AR9170_TXQ_DEPTH * 3) / 2) 167#define CARL9170_NUM_TX_LIMIT_HARD ((AR9170_TXQ_DEPTH * 3) / 2)
@@ -443,6 +443,7 @@ struct carl9170_ba_stats {
443 u8 ampdu_len; 443 u8 ampdu_len;
444 u8 ampdu_ack_len; 444 u8 ampdu_ack_len;
445 bool clear; 445 bool clear;
446 bool req;
446}; 447};
447 448
448struct carl9170_sta_info { 449struct carl9170_sta_info {
diff --git a/drivers/net/wireless/ath/carl9170/main.c b/drivers/net/wireless/ath/carl9170/main.c
index ede3d7e5a048..89fe60accf85 100644
--- a/drivers/net/wireless/ath/carl9170/main.c
+++ b/drivers/net/wireless/ath/carl9170/main.c
@@ -1355,6 +1355,7 @@ static int carl9170_op_ampdu_action(struct ieee80211_hw *hw,
1355 tid_info = rcu_dereference(sta_info->agg[tid]); 1355 tid_info = rcu_dereference(sta_info->agg[tid]);
1356 1356
1357 sta_info->stats[tid].clear = true; 1357 sta_info->stats[tid].clear = true;
1358 sta_info->stats[tid].req = false;
1358 1359
1359 if (tid_info) { 1360 if (tid_info) {
1360 bitmap_zero(tid_info->bitmap, CARL9170_BAW_SIZE); 1361 bitmap_zero(tid_info->bitmap, CARL9170_BAW_SIZE);
diff --git a/drivers/net/wireless/ath/carl9170/phy.c b/drivers/net/wireless/ath/carl9170/phy.c
index b6b0de600506..b6ae0e179c8d 100644
--- a/drivers/net/wireless/ath/carl9170/phy.c
+++ b/drivers/net/wireless/ath/carl9170/phy.c
@@ -427,7 +427,7 @@ static u32 carl9170_def_val(u32 reg, bool is_2ghz, bool is_40mhz)
427 427
428/* 428/*
429 * initialize some phy regs from eeprom values in modal_header[] 429 * initialize some phy regs from eeprom values in modal_header[]
430 * acc. to band and bandwith 430 * acc. to band and bandwidth
431 */ 431 */
432static int carl9170_init_phy_from_eeprom(struct ar9170 *ar, 432static int carl9170_init_phy_from_eeprom(struct ar9170 *ar,
433 bool is_2ghz, bool is_40mhz) 433 bool is_2ghz, bool is_40mhz)
diff --git a/drivers/net/wireless/ath/carl9170/rx.c b/drivers/net/wireless/ath/carl9170/rx.c
index 84866a4b8350..ec21ea9fd8d5 100644
--- a/drivers/net/wireless/ath/carl9170/rx.c
+++ b/drivers/net/wireless/ath/carl9170/rx.c
@@ -849,7 +849,7 @@ static void carl9170_rx_stream(struct ar9170 *ar, void *buf, unsigned int len)
849 /* 849 /*
850 * nested carl9170_rx_stream call! 850 * nested carl9170_rx_stream call!
851 * 851 *
852 * termination is guranteed, even when the 852 * termination is guaranteed, even when the
853 * combined frame also have an element with 853 * combined frame also have an element with
854 * a bad tag. 854 * a bad tag.
855 */ 855 */
diff --git a/drivers/net/wireless/ath/carl9170/tx.c b/drivers/net/wireless/ath/carl9170/tx.c
index 0ef70b6fc512..cb70ed7ec5cc 100644
--- a/drivers/net/wireless/ath/carl9170/tx.c
+++ b/drivers/net/wireless/ath/carl9170/tx.c
@@ -383,6 +383,7 @@ static void carl9170_tx_status_process_ampdu(struct ar9170 *ar,
383 383
384 if (sta_info->stats[tid].clear) { 384 if (sta_info->stats[tid].clear) {
385 sta_info->stats[tid].clear = false; 385 sta_info->stats[tid].clear = false;
386 sta_info->stats[tid].req = false;
386 sta_info->stats[tid].ampdu_len = 0; 387 sta_info->stats[tid].ampdu_len = 0;
387 sta_info->stats[tid].ampdu_ack_len = 0; 388 sta_info->stats[tid].ampdu_ack_len = 0;
388 } 389 }
@@ -391,10 +392,16 @@ static void carl9170_tx_status_process_ampdu(struct ar9170 *ar,
391 if (txinfo->status.rates[0].count == 1) 392 if (txinfo->status.rates[0].count == 1)
392 sta_info->stats[tid].ampdu_ack_len++; 393 sta_info->stats[tid].ampdu_ack_len++;
393 394
395 if (!(txinfo->flags & IEEE80211_TX_STAT_ACK))
396 sta_info->stats[tid].req = true;
397
394 if (super->f.mac_control & cpu_to_le16(AR9170_TX_MAC_IMM_BA)) { 398 if (super->f.mac_control & cpu_to_le16(AR9170_TX_MAC_IMM_BA)) {
395 super->s.rix = sta_info->stats[tid].ampdu_len; 399 super->s.rix = sta_info->stats[tid].ampdu_len;
396 super->s.cnt = sta_info->stats[tid].ampdu_ack_len; 400 super->s.cnt = sta_info->stats[tid].ampdu_ack_len;
397 txinfo->flags |= IEEE80211_TX_STAT_AMPDU; 401 txinfo->flags |= IEEE80211_TX_STAT_AMPDU;
402 if (sta_info->stats[tid].req)
403 txinfo->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK;
404
398 sta_info->stats[tid].clear = true; 405 sta_info->stats[tid].clear = true;
399 } 406 }
400 spin_unlock_bh(&tid_info->lock); 407 spin_unlock_bh(&tid_info->lock);
diff --git a/drivers/net/wireless/ath/carl9170/usb.c b/drivers/net/wireless/ath/carl9170/usb.c
index f82c400be288..2fb53d067512 100644
--- a/drivers/net/wireless/ath/carl9170/usb.c
+++ b/drivers/net/wireless/ath/carl9170/usb.c
@@ -430,7 +430,7 @@ static void carl9170_usb_rx_complete(struct urb *urb)
430 * The system is too slow to cope with 430 * The system is too slow to cope with
431 * the enormous workload. We have simply 431 * the enormous workload. We have simply
432 * run out of active rx urbs and this 432 * run out of active rx urbs and this
433 * unfortunatly leads to an unpredictable 433 * unfortunately leads to an unpredictable
434 * device. 434 * device.
435 */ 435 */
436 436
diff --git a/drivers/net/wireless/ath/hw.c b/drivers/net/wireless/ath/hw.c
index 183c28281385..cc11d66f15bc 100644
--- a/drivers/net/wireless/ath/hw.c
+++ b/drivers/net/wireless/ath/hw.c
@@ -86,7 +86,7 @@
86 * IFRAME-01: 0110 86 * IFRAME-01: 0110
87 * 87 *
88 * An easy eye-inspeciton of this already should tell you that this frame 88 * An easy eye-inspeciton of this already should tell you that this frame
89 * will not pass our check. This is beacuse the bssid_mask tells the 89 * will not pass our check. This is because the bssid_mask tells the
90 * hardware to only look at the second least significant bit and the 90 * hardware to only look at the second least significant bit and the
91 * common bit amongst the MAC and BSSIDs is 0, this frame has the 2nd LSB 91 * common bit amongst the MAC and BSSIDs is 0, this frame has the 2nd LSB
92 * as 1, which does not match 0. 92 * as 1, which does not match 0.
diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c
index f828f294ba89..0e1b8793c864 100644
--- a/drivers/net/wireless/ath/regd.c
+++ b/drivers/net/wireless/ath/regd.c
@@ -268,7 +268,7 @@ ath_reg_apply_active_scan_flags(struct wiphy *wiphy,
268 } 268 }
269 269
270 /* 270 /*
271 * If a country IE has been recieved check its rule for this 271 * If a country IE has been received check its rule for this
272 * channel first before enabling active scan. The passive scan 272 * channel first before enabling active scan. The passive scan
273 * would have been enforced by the initial processing of our 273 * would have been enforced by the initial processing of our
274 * custom regulatory domain. 274 * custom regulatory domain.
@@ -476,7 +476,7 @@ ath_regd_init_wiphy(struct ath_regulatory *reg,
476 wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY; 476 wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY;
477 } else { 477 } else {
478 /* 478 /*
479 * This gets applied in the case of the absense of CRDA, 479 * This gets applied in the case of the absence of CRDA,
480 * it's our own custom world regulatory domain, similar to 480 * it's our own custom world regulatory domain, similar to
481 * cfg80211's but we enable passive scanning. 481 * cfg80211's but we enable passive scanning.
482 */ 482 */
diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 248c670fdfbe..5c2cfe694152 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -195,6 +195,7 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = {
195 {APL9_WORLD, CTL_ETSI, CTL_ETSI}, 195 {APL9_WORLD, CTL_ETSI, CTL_ETSI},
196 196
197 {APL3_FCCA, CTL_FCC, CTL_FCC}, 197 {APL3_FCCA, CTL_FCC, CTL_FCC},
198 {APL7_FCCA, CTL_FCC, CTL_FCC},
198 {APL1_ETSIC, CTL_FCC, CTL_ETSI}, 199 {APL1_ETSIC, CTL_FCC, CTL_ETSI},
199 {APL2_ETSIC, CTL_FCC, CTL_ETSI}, 200 {APL2_ETSIC, CTL_FCC, CTL_ETSI},
200 {APL2_APLD, CTL_FCC, NO_CTL}, 201 {APL2_APLD, CTL_FCC, NO_CTL},
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c
index 46e382ed46aa..39a11e8af4fa 100644
--- a/drivers/net/wireless/atmel.c
+++ b/drivers/net/wireless/atmel.c
@@ -439,7 +439,7 @@ static u8 mac_reader[] = {
439}; 439};
440 440
441struct atmel_private { 441struct atmel_private {
442 void *card; /* Bus dependent stucture varies for PCcard */ 442 void *card; /* Bus dependent structure varies for PCcard */
443 int (*present_callback)(void *); /* And callback which uses it */ 443 int (*present_callback)(void *); /* And callback which uses it */
444 char firmware_id[32]; 444 char firmware_id[32];
445 AtmelFWType firmware_type; 445 AtmelFWType firmware_type;
@@ -3895,7 +3895,7 @@ static int reset_atmel_card(struct net_device *dev)
3895 3895
3896 This routine is also responsible for initialising some 3896 This routine is also responsible for initialising some
3897 hardware-specific fields in the atmel_private structure, 3897 hardware-specific fields in the atmel_private structure,
3898 including a copy of the firmware's hostinfo stucture 3898 including a copy of the firmware's hostinfo structure
3899 which is the route into the rest of the firmware datastructures. */ 3899 which is the route into the rest of the firmware datastructures. */
3900 3900
3901 struct atmel_private *priv = netdev_priv(dev); 3901 struct atmel_private *priv = netdev_priv(dev);
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c
index c96e19da2949..05263516c113 100644
--- a/drivers/net/wireless/atmel_cs.c
+++ b/drivers/net/wireless/atmel_cs.c
@@ -99,7 +99,7 @@ static void atmel_detach(struct pcmcia_device *link)
99} 99}
100 100
101/* Call-back function to interrogate PCMCIA-specific information 101/* Call-back function to interrogate PCMCIA-specific information
102 about the current existance of the card */ 102 about the current existence of the card */
103static int card_present(void *arg) 103static int card_present(void *arg)
104{ 104{
105 struct pcmcia_device *link = (struct pcmcia_device *)arg; 105 struct pcmcia_device *link = (struct pcmcia_device *)arg;
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
index bd4cb75b6ca3..229f4388f790 100644
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
@@ -648,7 +648,7 @@ struct b43_request_fw_context {
648 char errors[B43_NR_FWTYPES][128]; 648 char errors[B43_NR_FWTYPES][128];
649 /* Temporary buffer for storing the firmware name. */ 649 /* Temporary buffer for storing the firmware name. */
650 char fwname[64]; 650 char fwname[64];
651 /* A fatal error occured while requesting. Firmware reqest 651 /* A fatal error occurred while requesting. Firmware reqest
652 * can not continue, as any other reqest will also fail. */ 652 * can not continue, as any other reqest will also fail. */
653 int fatal_failure; 653 int fatal_failure;
654}; 654};
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c
index 3d5566e7af0a..ff0f5ba14b2c 100644
--- a/drivers/net/wireless/b43/dma.c
+++ b/drivers/net/wireless/b43/dma.c
@@ -1536,7 +1536,7 @@ static void dma_rx(struct b43_dmaring *ring, int *slot)
1536 dmaaddr = meta->dmaaddr; 1536 dmaaddr = meta->dmaaddr;
1537 goto drop_recycle_buffer; 1537 goto drop_recycle_buffer;
1538 } 1538 }
1539 if (unlikely(len > ring->rx_buffersize)) { 1539 if (unlikely(len + ring->frameoffset > ring->rx_buffersize)) {
1540 /* The data did not fit into one descriptor buffer 1540 /* The data did not fit into one descriptor buffer
1541 * and is split over multiple buffers. 1541 * and is split over multiple buffers.
1542 * This should never happen, as we try to allocate buffers 1542 * This should never happen, as we try to allocate buffers
diff --git a/drivers/net/wireless/b43/dma.h b/drivers/net/wireless/b43/dma.h
index a01c2100f166..e8a80a1251bf 100644
--- a/drivers/net/wireless/b43/dma.h
+++ b/drivers/net/wireless/b43/dma.h
@@ -163,7 +163,7 @@ struct b43_dmadesc_generic {
163/* DMA engine tuning knobs */ 163/* DMA engine tuning knobs */
164#define B43_TXRING_SLOTS 256 164#define B43_TXRING_SLOTS 256
165#define B43_RXRING_SLOTS 64 165#define B43_RXRING_SLOTS 64
166#define B43_DMA0_RX_BUFFERSIZE IEEE80211_MAX_FRAME_LEN 166#define B43_DMA0_RX_BUFFERSIZE (B43_DMA0_RX_FRAMEOFFSET + IEEE80211_MAX_FRAME_LEN)
167 167
168/* Pointer poison */ 168/* Pointer poison */
169#define B43_DMA_PTR_POISON ((void *)ERR_PTR(-ENOMEM)) 169#define B43_DMA_PTR_POISON ((void *)ERR_PTR(-ENOMEM))
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 57eb5b649730..d59b0168c14a 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4010,7 +4010,7 @@ static int b43_wireless_core_start(struct b43_wldev *dev)
4010 b43_mac_enable(dev); 4010 b43_mac_enable(dev);
4011 b43_write32(dev, B43_MMIO_GEN_IRQ_MASK, dev->irq_mask); 4011 b43_write32(dev, B43_MMIO_GEN_IRQ_MASK, dev->irq_mask);
4012 4012
4013 /* Start maintainance work */ 4013 /* Start maintenance work */
4014 b43_periodic_tasks_setup(dev); 4014 b43_periodic_tasks_setup(dev);
4015 4015
4016 b43_leds_init(dev); 4016 b43_leds_init(dev);
diff --git a/drivers/net/wireless/b43/phy_g.h b/drivers/net/wireless/b43/phy_g.h
index 8569fdd4c6be..5413c906a3e7 100644
--- a/drivers/net/wireless/b43/phy_g.h
+++ b/drivers/net/wireless/b43/phy_g.h
@@ -164,7 +164,7 @@ struct b43_phy_g {
164 /* Current Interference Mitigation mode */ 164 /* Current Interference Mitigation mode */
165 int interfmode; 165 int interfmode;
166 /* Stack of saved values from the Interference Mitigation code. 166 /* Stack of saved values from the Interference Mitigation code.
167 * Each value in the stack is layed out as follows: 167 * Each value in the stack is laid out as follows:
168 * bit 0-11: offset 168 * bit 0-11: offset
169 * bit 12-15: register ID 169 * bit 12-15: register ID
170 * bit 16-32: value 170 * bit 16-32: value
diff --git a/drivers/net/wireless/b43/phy_n.h b/drivers/net/wireless/b43/phy_n.h
index 001e841f118c..e789a89f1047 100644
--- a/drivers/net/wireless/b43/phy_n.h
+++ b/drivers/net/wireless/b43/phy_n.h
@@ -703,7 +703,7 @@
703#define B43_NPHY_CHAN_ESTHANG B43_PHY_N(0x21D) /* Channel estimate hang */ 703#define B43_NPHY_CHAN_ESTHANG B43_PHY_N(0x21D) /* Channel estimate hang */
704#define B43_NPHY_FINERX2_CGC B43_PHY_N(0x221) /* Fine RX 2 clock gate control */ 704#define B43_NPHY_FINERX2_CGC B43_PHY_N(0x221) /* Fine RX 2 clock gate control */
705#define B43_NPHY_FINERX2_CGC_DECGC 0x0008 /* Decode gated clocks */ 705#define B43_NPHY_FINERX2_CGC_DECGC 0x0008 /* Decode gated clocks */
706#define B43_NPHY_TXPCTL_INIT B43_PHY_N(0x222) /* TX power controll init */ 706#define B43_NPHY_TXPCTL_INIT B43_PHY_N(0x222) /* TX power control init */
707#define B43_NPHY_TXPCTL_INIT_PIDXI1 0x00FF /* Power index init 1 */ 707#define B43_NPHY_TXPCTL_INIT_PIDXI1 0x00FF /* Power index init 1 */
708#define B43_NPHY_TXPCTL_INIT_PIDXI1_SHIFT 0 708#define B43_NPHY_TXPCTL_INIT_PIDXI1_SHIFT 0
709#define B43_NPHY_PAPD_EN0 B43_PHY_N(0x297) /* PAPD Enable0 TBD */ 709#define B43_NPHY_PAPD_EN0 B43_PHY_N(0x297) /* PAPD Enable0 TBD */
diff --git a/drivers/net/wireless/b43legacy/b43legacy.h b/drivers/net/wireless/b43legacy/b43legacy.h
index c81b2f53b0c5..23583be1ee0b 100644
--- a/drivers/net/wireless/b43legacy/b43legacy.h
+++ b/drivers/net/wireless/b43legacy/b43legacy.h
@@ -488,7 +488,7 @@ struct b43legacy_phy {
488 /* Current Interference Mitigation mode */ 488 /* Current Interference Mitigation mode */
489 int interfmode; 489 int interfmode;
490 /* Stack of saved values from the Interference Mitigation code. 490 /* Stack of saved values from the Interference Mitigation code.
491 * Each value in the stack is layed out as follows: 491 * Each value in the stack is laid out as follows:
492 * bit 0-11: offset 492 * bit 0-11: offset
493 * bit 12-15: register ID 493 * bit 12-15: register ID
494 * bit 16-32: value 494 * bit 16-32: value
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c
index 18d63f57777d..3d05dc15c6b8 100644
--- a/drivers/net/wireless/hostap/hostap_ap.c
+++ b/drivers/net/wireless/hostap/hostap_ap.c
@@ -2359,7 +2359,7 @@ int prism2_ap_get_sta_qual(local_info_t *local, struct sockaddr addr[],
2359} 2359}
2360 2360
2361 2361
2362/* Translate our list of Access Points & Stations to a card independant 2362/* Translate our list of Access Points & Stations to a card independent
2363 * format that the Wireless Tools will understand - Jean II */ 2363 * format that the Wireless Tools will understand - Jean II */
2364int prism2_ap_translate_scan(struct net_device *dev, 2364int prism2_ap_translate_scan(struct net_device *dev,
2365 struct iw_request_info *info, char *buffer) 2365 struct iw_request_info *info, char *buffer)
diff --git a/drivers/net/wireless/hostap/hostap_ap.h b/drivers/net/wireless/hostap/hostap_ap.h
index 655ceeba9612..334e2d0b8e11 100644
--- a/drivers/net/wireless/hostap/hostap_ap.h
+++ b/drivers/net/wireless/hostap/hostap_ap.h
@@ -114,7 +114,7 @@ struct sta_info {
114 * has passed since last received frame from the station, a nullfunc data 114 * has passed since last received frame from the station, a nullfunc data
115 * frame is sent to the station. If this frame is not acknowledged and no other 115 * frame is sent to the station. If this frame is not acknowledged and no other
116 * frames have been received, the station will be disassociated after 116 * frames have been received, the station will be disassociated after
117 * AP_DISASSOC_DELAY. Similarily, a the station will be deauthenticated after 117 * AP_DISASSOC_DELAY. Similarly, a the station will be deauthenticated after
118 * AP_DEAUTH_DELAY. AP_TIMEOUT_RESOLUTION is the resolution that is used with 118 * AP_DEAUTH_DELAY. AP_TIMEOUT_RESOLUTION is the resolution that is used with
119 * max inactivity timer. */ 119 * max inactivity timer. */
120#define AP_MAX_INACTIVITY_SEC (5 * 60) 120#define AP_MAX_INACTIVITY_SEC (5 * 60)
diff --git a/drivers/net/wireless/hostap/hostap_config.h b/drivers/net/wireless/hostap/hostap_config.h
index 30acd39d76a2..2c8f71f0ed45 100644
--- a/drivers/net/wireless/hostap/hostap_config.h
+++ b/drivers/net/wireless/hostap/hostap_config.h
@@ -30,9 +30,9 @@
30 30
31/* Following defines can be used to remove unneeded parts of the driver, e.g., 31/* Following defines can be used to remove unneeded parts of the driver, e.g.,
32 * to limit the size of the kernel module. Definitions can be added here in 32 * to limit the size of the kernel module. Definitions can be added here in
33 * hostap_config.h or they can be added to make command with EXTRA_CFLAGS, 33 * hostap_config.h or they can be added to make command with ccflags-y,
34 * e.g., 34 * e.g.,
35 * 'make pccard EXTRA_CFLAGS="-DPRISM2_NO_DEBUG -DPRISM2_NO_PROCFS_DEBUG"' 35 * 'make pccard ccflags-y="-DPRISM2_NO_DEBUG -DPRISM2_NO_PROCFS_DEBUG"'
36 */ 36 */
37 37
38/* Do not include debug messages into the driver */ 38/* Do not include debug messages into the driver */
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
index 6038633ef361..12de46407c71 100644
--- a/drivers/net/wireless/hostap/hostap_ioctl.c
+++ b/drivers/net/wireless/hostap/hostap_ioctl.c
@@ -1945,7 +1945,7 @@ static char * __prism2_translate_scan(local_info_t *local,
1945} 1945}
1946 1946
1947 1947
1948/* Translate scan data returned from the card to a card independant 1948/* Translate scan data returned from the card to a card independent
1949 * format that the Wireless Tools will understand - Jean II */ 1949 * format that the Wireless Tools will understand - Jean II */
1950static inline int prism2_translate_scan(local_info_t *local, 1950static inline int prism2_translate_scan(local_info_t *local,
1951 struct iw_request_info *info, 1951 struct iw_request_info *info,
@@ -2043,7 +2043,7 @@ static inline int prism2_ioctl_giwscan_sta(struct net_device *dev,
2043 * until results are ready for various reasons. 2043 * until results are ready for various reasons.
2044 * First, managing wait queues is complex and racy 2044 * First, managing wait queues is complex and racy
2045 * (there may be multiple simultaneous callers). 2045 * (there may be multiple simultaneous callers).
2046 * Second, we grab some rtnetlink lock before comming 2046 * Second, we grab some rtnetlink lock before coming
2047 * here (in dev_ioctl()). 2047 * here (in dev_ioctl()).
2048 * Third, the caller can wait on the Wireless Event 2048 * Third, the caller can wait on the Wireless Event
2049 * - Jean II */ 2049 * - Jean II */
diff --git a/drivers/net/wireless/hostap/hostap_wlan.h b/drivers/net/wireless/hostap/hostap_wlan.h
index 1c66b3c1030d..88dc6a52bdf1 100644
--- a/drivers/net/wireless/hostap/hostap_wlan.h
+++ b/drivers/net/wireless/hostap/hostap_wlan.h
@@ -853,7 +853,7 @@ struct local_info {
853 struct work_struct comms_qual_update; 853 struct work_struct comms_qual_update;
854 854
855 /* RSSI to dBm adjustment (for RX descriptor fields) */ 855 /* RSSI to dBm adjustment (for RX descriptor fields) */
856 int rssi_to_dBm; /* substract from RSSI to get approximate dBm value */ 856 int rssi_to_dBm; /* subtract from RSSI to get approximate dBm value */
857 857
858 /* BSS list / protected by local->lock */ 858 /* BSS list / protected by local->lock */
859 struct list_head bss_list; 859 struct list_head bss_list;
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c
index 4b97f918daff..44307753587d 100644
--- a/drivers/net/wireless/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c
@@ -63,7 +63,7 @@ When data is sent to the firmware, the first TBD is used to indicate to the
63firmware if a Command or Data is being sent. If it is Command, all of the 63firmware if a Command or Data is being sent. If it is Command, all of the
64command information is contained within the physical address referred to by the 64command information is contained within the physical address referred to by the
65TBD. If it is Data, the first TBD indicates the type of data packet, number 65TBD. If it is Data, the first TBD indicates the type of data packet, number
66of fragments, etc. The next TBD then referrs to the actual packet location. 66of fragments, etc. The next TBD then refers to the actual packet location.
67 67
68The Tx flow cycle is as follows: 68The Tx flow cycle is as follows:
69 69
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c
index 160881f234cc..42c3fe37af64 100644
--- a/drivers/net/wireless/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/ipw2x00/ipw2200.c
@@ -1181,7 +1181,7 @@ static void ipw_led_shutdown(struct ipw_priv *priv)
1181/* 1181/*
1182 * The following adds a new attribute to the sysfs representation 1182 * The following adds a new attribute to the sysfs representation
1183 * of this device driver (i.e. a new file in /sys/bus/pci/drivers/ipw/) 1183 * of this device driver (i.e. a new file in /sys/bus/pci/drivers/ipw/)
1184 * used for controling the debug level. 1184 * used for controlling the debug level.
1185 * 1185 *
1186 * See the level definitions in ipw for details. 1186 * See the level definitions in ipw for details.
1187 */ 1187 */
@@ -3763,7 +3763,7 @@ static int ipw_queue_tx_init(struct ipw_priv *priv,
3763 3763
3764 q->txb = kmalloc(sizeof(q->txb[0]) * count, GFP_KERNEL); 3764 q->txb = kmalloc(sizeof(q->txb[0]) * count, GFP_KERNEL);
3765 if (!q->txb) { 3765 if (!q->txb) {
3766 IPW_ERROR("vmalloc for auxilary BD structures failed\n"); 3766 IPW_ERROR("vmalloc for auxiliary BD structures failed\n");
3767 return -ENOMEM; 3767 return -ENOMEM;
3768 } 3768 }
3769 3769
@@ -5581,7 +5581,7 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5581 return 0; 5581 return 0;
5582 } 5582 }
5583 5583
5584 /* Verify privacy compatability */ 5584 /* Verify privacy compatibility */
5585 if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) != 5585 if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) !=
5586 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) { 5586 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) {
5587 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded " 5587 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
@@ -5808,7 +5808,7 @@ static int ipw_best_network(struct ipw_priv *priv,
5808 return 0; 5808 return 0;
5809 } 5809 }
5810 5810
5811 /* Verify privacy compatability */ 5811 /* Verify privacy compatibility */
5812 if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) != 5812 if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) !=
5813 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) { 5813 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) {
5814 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded " 5814 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
@@ -8184,7 +8184,7 @@ static void ipw_handle_promiscuous_rx(struct ipw_priv *priv,
8184static int is_network_packet(struct ipw_priv *priv, 8184static int is_network_packet(struct ipw_priv *priv,
8185 struct libipw_hdr_4addr *header) 8185 struct libipw_hdr_4addr *header)
8186{ 8186{
8187 /* Filter incoming packets to determine if they are targetted toward 8187 /* Filter incoming packets to determine if they are targeted toward
8188 * this network, discarding packets coming from ourselves */ 8188 * this network, discarding packets coming from ourselves */
8189 switch (priv->ieee->iw_mode) { 8189 switch (priv->ieee->iw_mode) {
8190 case IW_MODE_ADHOC: /* Header: Dest. | Source | BSSID */ 8190 case IW_MODE_ADHOC: /* Header: Dest. | Source | BSSID */
@@ -8340,9 +8340,9 @@ static void ipw_handle_mgmt_packet(struct ipw_priv *priv,
8340} 8340}
8341 8341
8342/* 8342/*
8343 * Main entry function for recieving a packet with 80211 headers. This 8343 * Main entry function for receiving a packet with 80211 headers. This
8344 * should be called when ever the FW has notified us that there is a new 8344 * should be called when ever the FW has notified us that there is a new
8345 * skb in the recieve queue. 8345 * skb in the receive queue.
8346 */ 8346 */
8347static void ipw_rx(struct ipw_priv *priv) 8347static void ipw_rx(struct ipw_priv *priv)
8348{ 8348{
@@ -8683,7 +8683,7 @@ static int ipw_sw_reset(struct ipw_priv *priv, int option)
8683 * functions defined in ipw_main to provide the HW interaction. 8683 * functions defined in ipw_main to provide the HW interaction.
8684 * 8684 *
8685 * The exception to this is the use of the ipw_get_ordinal() 8685 * The exception to this is the use of the ipw_get_ordinal()
8686 * function used to poll the hardware vs. making unecessary calls. 8686 * function used to poll the hardware vs. making unnecessary calls.
8687 * 8687 *
8688 */ 8688 */
8689 8689
@@ -10419,7 +10419,7 @@ static void ipw_handle_promiscuous_tx(struct ipw_priv *priv,
10419 10419
10420 memset(&dummystats, 0, sizeof(dummystats)); 10420 memset(&dummystats, 0, sizeof(dummystats));
10421 10421
10422 /* Filtering of fragment chains is done agains the first fragment */ 10422 /* Filtering of fragment chains is done against the first fragment */
10423 hdr = (void *)txb->fragments[0]->data; 10423 hdr = (void *)txb->fragments[0]->data;
10424 if (libipw_is_management(le16_to_cpu(hdr->frame_control))) { 10424 if (libipw_is_management(le16_to_cpu(hdr->frame_control))) {
10425 if (filter & IPW_PROM_NO_MGMT) 10425 if (filter & IPW_PROM_NO_MGMT)
diff --git a/drivers/net/wireless/ipw2x00/libipw_rx.c b/drivers/net/wireless/ipw2x00/libipw_rx.c
index 0de1b1893220..e5ad76cd77da 100644
--- a/drivers/net/wireless/ipw2x00/libipw_rx.c
+++ b/drivers/net/wireless/ipw2x00/libipw_rx.c
@@ -925,7 +925,7 @@ drop_free:
925static u8 qos_oui[QOS_OUI_LEN] = { 0x00, 0x50, 0xF2 }; 925static u8 qos_oui[QOS_OUI_LEN] = { 0x00, 0x50, 0xF2 };
926 926
927/* 927/*
928* Make ther structure we read from the beacon packet has 928* Make the structure we read from the beacon packet to have
929* the right values 929* the right values
930*/ 930*/
931static int libipw_verify_qos_info(struct libipw_qos_information_element 931static int libipw_verify_qos_info(struct libipw_qos_information_element
diff --git a/drivers/net/wireless/iwlegacy/Kconfig b/drivers/net/wireless/iwlegacy/Kconfig
index 2a45dd44cc12..aef65cd47661 100644
--- a/drivers/net/wireless/iwlegacy/Kconfig
+++ b/drivers/net/wireless/iwlegacy/Kconfig
@@ -1,6 +1,5 @@
1config IWLWIFI_LEGACY 1config IWLWIFI_LEGACY
2 tristate "Intel Wireless Wifi legacy devices" 2 tristate
3 depends on PCI && MAC80211
4 select FW_LOADER 3 select FW_LOADER
5 select NEW_LEDS 4 select NEW_LEDS
6 select LEDS_CLASS 5 select LEDS_CLASS
@@ -65,7 +64,8 @@ endmenu
65 64
66config IWL4965 65config IWL4965
67 tristate "Intel Wireless WiFi 4965AGN (iwl4965)" 66 tristate "Intel Wireless WiFi 4965AGN (iwl4965)"
68 depends on IWLWIFI_LEGACY 67 depends on PCI && MAC80211
68 select IWLWIFI_LEGACY
69 ---help--- 69 ---help---
70 This option enables support for 70 This option enables support for
71 71
@@ -92,7 +92,8 @@ config IWL4965
92 92
93config IWL3945 93config IWL3945
94 tristate "Intel PRO/Wireless 3945ABG/BG Network Connection (iwl3945)" 94 tristate "Intel PRO/Wireless 3945ABG/BG Network Connection (iwl3945)"
95 depends on IWLWIFI_LEGACY 95 depends on PCI && MAC80211
96 select IWLWIFI_LEGACY
96 ---help--- 97 ---help---
97 Select to build the driver supporting the: 98 Select to build the driver supporting the:
98 99
diff --git a/drivers/net/wireless/iwlegacy/iwl-3945-hw.h b/drivers/net/wireless/iwlegacy/iwl-3945-hw.h
index 779d3cb86e2c..5c3a68d3af12 100644
--- a/drivers/net/wireless/iwlegacy/iwl-3945-hw.h
+++ b/drivers/net/wireless/iwlegacy/iwl-3945-hw.h
@@ -74,8 +74,6 @@
74/* RSSI to dBm */ 74/* RSSI to dBm */
75#define IWL39_RSSI_OFFSET 95 75#define IWL39_RSSI_OFFSET 95
76 76
77#define IWL_DEFAULT_TX_POWER 0x0F
78
79/* 77/*
80 * EEPROM related constants, enums, and structures. 78 * EEPROM related constants, enums, and structures.
81 */ 79 */
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-hw.h b/drivers/net/wireless/iwlegacy/iwl-4965-hw.h
index 08b189c8472d..fc6fa2886d9c 100644
--- a/drivers/net/wireless/iwlegacy/iwl-4965-hw.h
+++ b/drivers/net/wireless/iwlegacy/iwl-4965-hw.h
@@ -804,9 +804,6 @@ struct iwl4965_scd_bc_tbl {
804 804
805#define IWL4965_DEFAULT_TX_RETRY 15 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/* EEPROM */ 807/* EEPROM */
811#define IWL4965_FIRST_AMPDU_QUEUE 10 808#define IWL4965_FIRST_AMPDU_QUEUE 10
812 809
diff --git a/drivers/net/wireless/iwlegacy/iwl-core.c b/drivers/net/wireless/iwlegacy/iwl-core.c
index d418b647be80..c1511b14b239 100644
--- a/drivers/net/wireless/iwlegacy/iwl-core.c
+++ b/drivers/net/wireless/iwlegacy/iwl-core.c
@@ -160,6 +160,7 @@ int iwl_legacy_init_geos(struct iwl_priv *priv)
160 struct ieee80211_channel *geo_ch; 160 struct ieee80211_channel *geo_ch;
161 struct ieee80211_rate *rates; 161 struct ieee80211_rate *rates;
162 int i = 0; 162 int i = 0;
163 s8 max_tx_power = 0;
163 164
164 if (priv->bands[IEEE80211_BAND_2GHZ].n_bitrates || 165 if (priv->bands[IEEE80211_BAND_2GHZ].n_bitrates ||
165 priv->bands[IEEE80211_BAND_5GHZ].n_bitrates) { 166 priv->bands[IEEE80211_BAND_5GHZ].n_bitrates) {
@@ -235,8 +236,8 @@ int iwl_legacy_init_geos(struct iwl_priv *priv)
235 236
236 geo_ch->flags |= ch->ht40_extension_channel; 237 geo_ch->flags |= ch->ht40_extension_channel;
237 238
238 if (ch->max_power_avg > priv->tx_power_device_lmt) 239 if (ch->max_power_avg > max_tx_power)
239 priv->tx_power_device_lmt = ch->max_power_avg; 240 max_tx_power = ch->max_power_avg;
240 } else { 241 } else {
241 geo_ch->flags |= IEEE80211_CHAN_DISABLED; 242 geo_ch->flags |= IEEE80211_CHAN_DISABLED;
242 } 243 }
@@ -249,6 +250,10 @@ int iwl_legacy_init_geos(struct iwl_priv *priv)
249 geo_ch->flags); 250 geo_ch->flags);
250 } 251 }
251 252
253 priv->tx_power_device_lmt = max_tx_power;
254 priv->tx_power_user_lmt = max_tx_power;
255 priv->tx_power_next = max_tx_power;
256
252 if ((priv->bands[IEEE80211_BAND_5GHZ].n_channels == 0) && 257 if ((priv->bands[IEEE80211_BAND_5GHZ].n_channels == 0) &&
253 priv->cfg->sku & IWL_SKU_A) { 258 priv->cfg->sku & IWL_SKU_A) {
254 IWL_INFO(priv, "Incorrectly detected BG card as ABG. " 259 IWL_INFO(priv, "Incorrectly detected BG card as ABG. "
@@ -1030,7 +1035,7 @@ int iwl_legacy_apm_init(struct iwl_priv *priv)
1030 /* 1035 /*
1031 * Enable HAP INTA (interrupt from management bus) to 1036 * Enable HAP INTA (interrupt from management bus) to
1032 * wake device's PCI Express link L1a -> L0s 1037 * wake device's PCI Express link L1a -> L0s
1033 * NOTE: This is no-op for 3945 (non-existant bit) 1038 * NOTE: This is no-op for 3945 (non-existent bit)
1034 */ 1039 */
1035 iwl_legacy_set_bit(priv, CSR_HW_IF_CONFIG_REG, 1040 iwl_legacy_set_bit(priv, CSR_HW_IF_CONFIG_REG,
1036 CSR_HW_IF_CONFIG_REG_BIT_HAP_WAKE_L1A); 1041 CSR_HW_IF_CONFIG_REG_BIT_HAP_WAKE_L1A);
@@ -1124,11 +1129,11 @@ int iwl_legacy_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force)
1124 if (!priv->cfg->ops->lib->send_tx_power) 1129 if (!priv->cfg->ops->lib->send_tx_power)
1125 return -EOPNOTSUPP; 1130 return -EOPNOTSUPP;
1126 1131
1127 if (tx_power < IWL4965_TX_POWER_TARGET_POWER_MIN) { 1132 /* 0 dBm mean 1 milliwatt */
1133 if (tx_power < 0) {
1128 IWL_WARN(priv, 1134 IWL_WARN(priv,
1129 "Requested user TXPOWER %d below lower limit %d.\n", 1135 "Requested user TXPOWER %d below 1 mW.\n",
1130 tx_power, 1136 tx_power);
1131 IWL4965_TX_POWER_TARGET_POWER_MIN);
1132 return -EINVAL; 1137 return -EINVAL;
1133 } 1138 }
1134 1139
@@ -1805,6 +1810,15 @@ iwl_legacy_mac_change_interface(struct ieee80211_hw *hw,
1805 1810
1806 mutex_lock(&priv->mutex); 1811 mutex_lock(&priv->mutex);
1807 1812
1813 if (!ctx->vif || !iwl_legacy_is_ready_rf(priv)) {
1814 /*
1815 * Huh? But wait ... this can maybe happen when
1816 * we're in the middle of a firmware restart!
1817 */
1818 err = -EBUSY;
1819 goto out;
1820 }
1821
1808 interface_modes = ctx->interface_modes | ctx->exclusive_interface_modes; 1822 interface_modes = ctx->interface_modes | ctx->exclusive_interface_modes;
1809 1823
1810 if (!(interface_modes & BIT(newtype))) { 1824 if (!(interface_modes & BIT(newtype))) {
@@ -1832,6 +1846,7 @@ iwl_legacy_mac_change_interface(struct ieee80211_hw *hw,
1832 /* success */ 1846 /* success */
1833 iwl_legacy_teardown_interface(priv, vif, true); 1847 iwl_legacy_teardown_interface(priv, vif, true);
1834 vif->type = newtype; 1848 vif->type = newtype;
1849 vif->p2p = newp2p;
1835 err = iwl_legacy_setup_interface(priv, ctx); 1850 err = iwl_legacy_setup_interface(priv, ctx);
1836 WARN_ON(err); 1851 WARN_ON(err);
1837 /* 1852 /*
diff --git a/drivers/net/wireless/iwlegacy/iwl-eeprom.c b/drivers/net/wireless/iwlegacy/iwl-eeprom.c
index 04c5648027df..cb346d1a9ffa 100644
--- a/drivers/net/wireless/iwlegacy/iwl-eeprom.c
+++ b/drivers/net/wireless/iwlegacy/iwl-eeprom.c
@@ -471,13 +471,6 @@ int iwl_legacy_init_channel_map(struct iwl_priv *priv)
471 flags & EEPROM_CHANNEL_RADAR)) 471 flags & EEPROM_CHANNEL_RADAR))
472 ? "" : "not "); 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 ch_info++; 474 ch_info++;
482 } 475 }
483 } 476 }
diff --git a/drivers/net/wireless/iwlegacy/iwl-fh.h b/drivers/net/wireless/iwlegacy/iwl-fh.h
index 4e20c7e5c883..6e6091816e36 100644
--- a/drivers/net/wireless/iwlegacy/iwl-fh.h
+++ b/drivers/net/wireless/iwlegacy/iwl-fh.h
@@ -436,7 +436,7 @@
436 * @finished_rb_num [0:11] - Indicates the index of the current RB 436 * @finished_rb_num [0:11] - Indicates the index of the current RB
437 * in which the last frame was written to 437 * in which the last frame was written to
438 * @finished_fr_num [0:11] - Indicates the index of the RX Frame 438 * @finished_fr_num [0:11] - Indicates the index of the RX Frame
439 * which was transfered 439 * which was transferred
440 */ 440 */
441struct iwl_rb_status { 441struct iwl_rb_status {
442 __le16 closed_rb_num; 442 __le16 closed_rb_num;
diff --git a/drivers/net/wireless/iwlegacy/iwl-scan.c b/drivers/net/wireless/iwlegacy/iwl-scan.c
index 60f597f796ca..353234a02c6d 100644
--- a/drivers/net/wireless/iwlegacy/iwl-scan.c
+++ b/drivers/net/wireless/iwlegacy/iwl-scan.c
@@ -143,7 +143,7 @@ static void iwl_legacy_do_scan_abort(struct iwl_priv *priv)
143 IWL_DEBUG_SCAN(priv, "Send scan abort failed %d\n", ret); 143 IWL_DEBUG_SCAN(priv, "Send scan abort failed %d\n", ret);
144 iwl_legacy_force_scan_end(priv); 144 iwl_legacy_force_scan_end(priv);
145 } else 145 } else
146 IWL_DEBUG_SCAN(priv, "Sucessfully send scan abort\n"); 146 IWL_DEBUG_SCAN(priv, "Successfully send scan abort\n");
147} 147}
148 148
149/** 149/**
diff --git a/drivers/net/wireless/iwlegacy/iwl-sta.c b/drivers/net/wireless/iwlegacy/iwl-sta.c
index 47c9da3834ea..66f0fb2bbe00 100644
--- a/drivers/net/wireless/iwlegacy/iwl-sta.c
+++ b/drivers/net/wireless/iwlegacy/iwl-sta.c
@@ -110,7 +110,7 @@ static int iwl_legacy_process_add_sta_resp(struct iwl_priv *priv,
110 /* 110 /*
111 * XXX: The MAC address in the command buffer is often changed from 111 * XXX: The MAC address in the command buffer is often changed from
112 * the original sent to the device. That is, the MAC address 112 * the original sent to the device. That is, the MAC address
113 * written to the command buffer often is not the same MAC adress 113 * written to the command buffer often is not the same MAC address
114 * read from the command buffer when the command returns. This 114 * read from the command buffer when the command returns. This
115 * issue has not yet been resolved and this debugging is left to 115 * issue has not yet been resolved and this debugging is left to
116 * observe the problem. 116 * observe the problem.
diff --git a/drivers/net/wireless/iwlegacy/iwl3945-base.c b/drivers/net/wireless/iwlegacy/iwl3945-base.c
index ab87e1b73529..cc7ebcee60e5 100644
--- a/drivers/net/wireless/iwlegacy/iwl3945-base.c
+++ b/drivers/net/wireless/iwlegacy/iwl3945-base.c
@@ -93,6 +93,7 @@ MODULE_LICENSE("GPL");
93struct iwl_mod_params iwl3945_mod_params = { 93struct iwl_mod_params iwl3945_mod_params = {
94 .sw_crypto = 1, 94 .sw_crypto = 1,
95 .restart_fw = 1, 95 .restart_fw = 1,
96 .disable_hw_scan = 1,
96 /* the rest are 0 by default */ 97 /* the rest are 0 by default */
97}; 98};
98 99
@@ -3824,10 +3825,6 @@ static int iwl3945_init_drv(struct iwl_priv *priv)
3824 priv->force_reset[IWL_FW_RESET].reset_duration = 3825 priv->force_reset[IWL_FW_RESET].reset_duration =
3825 IWL_DELAY_NEXT_FORCE_FW_RELOAD; 3826 IWL_DELAY_NEXT_FORCE_FW_RELOAD;
3826 3827
3827
3828 priv->tx_power_user_lmt = IWL_DEFAULT_TX_POWER;
3829 priv->tx_power_next = IWL_DEFAULT_TX_POWER;
3830
3831 if (eeprom->version < EEPROM_3945_EEPROM_VERSION) { 3828 if (eeprom->version < EEPROM_3945_EEPROM_VERSION) {
3832 IWL_WARN(priv, "Unsupported EEPROM version: 0x%04X\n", 3829 IWL_WARN(priv, "Unsupported EEPROM version: 0x%04X\n",
3833 eeprom->version); 3830 eeprom->version);
@@ -3960,8 +3957,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
3960 * "the hard way", rather than using device's scan. 3957 * "the hard way", rather than using device's scan.
3961 */ 3958 */
3962 if (iwl3945_mod_params.disable_hw_scan) { 3959 if (iwl3945_mod_params.disable_hw_scan) {
3963 dev_printk(KERN_DEBUG, &(pdev->dev), 3960 IWL_DEBUG_INFO(priv, "Disabling hw_scan\n");
3964 "sw scan support is deprecated\n");
3965 iwl3945_hw_ops.hw_scan = NULL; 3961 iwl3945_hw_ops.hw_scan = NULL;
3966 } 3962 }
3967 3963
@@ -4280,8 +4276,7 @@ MODULE_PARM_DESC(swcrypto,
4280 "using software crypto (default 1 [software])"); 4276 "using software crypto (default 1 [software])");
4281module_param_named(disable_hw_scan, iwl3945_mod_params.disable_hw_scan, 4277module_param_named(disable_hw_scan, iwl3945_mod_params.disable_hw_scan,
4282 int, S_IRUGO); 4278 int, S_IRUGO);
4283MODULE_PARM_DESC(disable_hw_scan, 4279MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 1)");
4284 "disable hardware scanning (default 0) (deprecated)");
4285#ifdef CONFIG_IWLWIFI_LEGACY_DEBUG 4280#ifdef CONFIG_IWLWIFI_LEGACY_DEBUG
4286module_param_named(debug, iwlegacy_debug_level, uint, S_IRUGO | S_IWUSR); 4281module_param_named(debug, iwlegacy_debug_level, uint, S_IRUGO | S_IWUSR);
4287MODULE_PARM_DESC(debug, "debug output mask"); 4282MODULE_PARM_DESC(debug, "debug output mask");
diff --git a/drivers/net/wireless/iwlegacy/iwl4965-base.c b/drivers/net/wireless/iwlegacy/iwl4965-base.c
index 91b3d8b9d7a5..d484c3678163 100644
--- a/drivers/net/wireless/iwlegacy/iwl4965-base.c
+++ b/drivers/net/wireless/iwlegacy/iwl4965-base.c
@@ -3140,12 +3140,6 @@ static int iwl4965_init_drv(struct iwl_priv *priv)
3140 3140
3141 iwl_legacy_init_scan_params(priv); 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 ret = iwl_legacy_init_channel_map(priv); 3143 ret = iwl_legacy_init_channel_map(priv);
3150 if (ret) { 3144 if (ret) {
3151 IWL_ERR(priv, "initializing regulatory failed: %d\n", ret); 3145 IWL_ERR(priv, "initializing regulatory failed: %d\n", ret);
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 3ea31b659d1a..22e045b5bcee 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -530,6 +530,9 @@ static struct iwl_ht_params iwl5000_ht_params = {
530struct iwl_cfg iwl5300_agn_cfg = { 530struct iwl_cfg iwl5300_agn_cfg = {
531 .name = "Intel(R) Ultimate N WiFi Link 5300 AGN", 531 .name = "Intel(R) Ultimate N WiFi Link 5300 AGN",
532 IWL_DEVICE_5000, 532 IWL_DEVICE_5000,
533 /* at least EEPROM 0x11A has wrong info */
534 .valid_tx_ant = ANT_ABC, /* .cfg overwrite */
535 .valid_rx_ant = ANT_ABC, /* .cfg overwrite */
533 .ht_params = &iwl5000_ht_params, 536 .ht_params = &iwl5000_ht_params,
534}; 537};
535 538
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-ict.c b/drivers/net/wireless/iwlwifi/iwl-agn-ict.c
index b5cb3be0eb4b..ed0148d714de 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-ict.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-ict.c
@@ -69,7 +69,7 @@ int iwl_alloc_isr_ict(struct iwl_priv *priv)
69 if (!priv->_agn.ict_tbl_vir) 69 if (!priv->_agn.ict_tbl_vir)
70 return -ENOMEM; 70 return -ENOMEM;
71 71
72 /* align table to PAGE_SIZE boundry */ 72 /* align table to PAGE_SIZE boundary */
73 priv->_agn.aligned_ict_tbl_dma = ALIGN(priv->_agn.ict_tbl_dma, PAGE_SIZE); 73 priv->_agn.aligned_ict_tbl_dma = ALIGN(priv->_agn.ict_tbl_dma, PAGE_SIZE);
74 74
75 IWL_DEBUG_ISR(priv, "ict dma addr %Lx dma aligned %Lx diff %d\n", 75 IWL_DEBUG_ISR(priv, "ict dma addr %Lx dma aligned %Lx diff %d\n",
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index 2003c1d4295f..08ccb9496f76 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -2265,7 +2265,7 @@ signed long iwlagn_wait_notification(struct iwl_priv *priv,
2265 int ret; 2265 int ret;
2266 2266
2267 ret = wait_event_timeout(priv->_agn.notif_waitq, 2267 ret = wait_event_timeout(priv->_agn.notif_waitq,
2268 &wait_entry->triggered, 2268 wait_entry->triggered,
2269 timeout); 2269 timeout);
2270 2270
2271 spin_lock_bh(&priv->_agn.notif_wait_lock); 2271 spin_lock_bh(&priv->_agn.notif_wait_lock);
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 31233a330372..d1e2eb9d76bc 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3009,14 +3009,17 @@ static int iwl_mac_offchannel_tx_cancel_wait(struct ieee80211_hw *hw)
3009 3009
3010 mutex_lock(&priv->mutex); 3010 mutex_lock(&priv->mutex);
3011 3011
3012 if (!priv->_agn.offchan_tx_skb) 3012 if (!priv->_agn.offchan_tx_skb) {
3013 return -EINVAL; 3013 ret = -EINVAL;
3014 goto unlock;
3015 }
3014 3016
3015 priv->_agn.offchan_tx_skb = NULL; 3017 priv->_agn.offchan_tx_skb = NULL;
3016 3018
3017 ret = iwl_scan_cancel_timeout(priv, 200); 3019 ret = iwl_scan_cancel_timeout(priv, 200);
3018 if (ret) 3020 if (ret)
3019 ret = -EIO; 3021 ret = -EIO;
3022unlock:
3020 mutex_unlock(&priv->mutex); 3023 mutex_unlock(&priv->mutex);
3021 3024
3022 return ret; 3025 return ret;
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 6c30fa652e27..bafbe57c9602 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1040,7 +1040,7 @@ int iwl_apm_init(struct iwl_priv *priv)
1040 /* 1040 /*
1041 * Enable HAP INTA (interrupt from management bus) to 1041 * Enable HAP INTA (interrupt from management bus) to
1042 * wake device's PCI Express link L1a -> L0s 1042 * wake device's PCI Express link L1a -> L0s
1043 * NOTE: This is no-op for 3945 (non-existant bit) 1043 * NOTE: This is no-op for 3945 (non-existent bit)
1044 */ 1044 */
1045 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, 1045 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
1046 CSR_HW_IF_CONFIG_REG_BIT_HAP_WAKE_L1A); 1046 CSR_HW_IF_CONFIG_REG_BIT_HAP_WAKE_L1A);
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.h b/drivers/net/wireless/iwlwifi/iwl-eeprom.h
index 98aa8af01192..20b66469d68f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-eeprom.h
+++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.h
@@ -241,7 +241,7 @@ struct iwl_eeprom_enhanced_txpwr {
241 241
242/* 6x00 Specific */ 242/* 6x00 Specific */
243#define EEPROM_6000_TX_POWER_VERSION (4) 243#define EEPROM_6000_TX_POWER_VERSION (4)
244#define EEPROM_6000_EEPROM_VERSION (0x434) 244#define EEPROM_6000_EEPROM_VERSION (0x423)
245 245
246/* 6x50 Specific */ 246/* 6x50 Specific */
247#define EEPROM_6050_TX_POWER_VERSION (4) 247#define EEPROM_6050_TX_POWER_VERSION (4)
diff --git a/drivers/net/wireless/iwlwifi/iwl-fh.h b/drivers/net/wireless/iwlwifi/iwl-fh.h
index 55b8370bc6d4..474009a244d4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-fh.h
+++ b/drivers/net/wireless/iwlwifi/iwl-fh.h
@@ -436,7 +436,7 @@
436 * @finished_rb_num [0:11] - Indicates the index of the current RB 436 * @finished_rb_num [0:11] - Indicates the index of the current RB
437 * in which the last frame was written to 437 * in which the last frame was written to
438 * @finished_fr_num [0:11] - Indicates the index of the RX Frame 438 * @finished_fr_num [0:11] - Indicates the index of the RX Frame
439 * which was transfered 439 * which was transferred
440 */ 440 */
441struct iwl_rb_status { 441struct iwl_rb_status {
442 __le16 closed_rb_num; 442 __le16 closed_rb_num;
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
index 3a4d9e6b0421..914c77e44588 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -143,7 +143,7 @@ static void iwl_do_scan_abort(struct iwl_priv *priv)
143 IWL_DEBUG_SCAN(priv, "Send scan abort failed %d\n", ret); 143 IWL_DEBUG_SCAN(priv, "Send scan abort failed %d\n", ret);
144 iwl_force_scan_end(priv); 144 iwl_force_scan_end(priv);
145 } else 145 } else
146 IWL_DEBUG_SCAN(priv, "Sucessfully send scan abort\n"); 146 IWL_DEBUG_SCAN(priv, "Successfully send scan abort\n");
147} 147}
148 148
149/** 149/**
diff --git a/drivers/net/wireless/iwmc3200wifi/hal.c b/drivers/net/wireless/iwmc3200wifi/hal.c
index 907ac890997c..1cabcb39643f 100644
--- a/drivers/net/wireless/iwmc3200wifi/hal.c
+++ b/drivers/net/wireless/iwmc3200wifi/hal.c
@@ -57,7 +57,7 @@
57 * This is due to the fact the host talks exclusively 57 * This is due to the fact the host talks exclusively
58 * to the UMAC and so there needs to be a special UMAC 58 * to the UMAC and so there needs to be a special UMAC
59 * command for talking to the LMAC. 59 * command for talking to the LMAC.
60 * This is how a wifi command is layed out: 60 * This is how a wifi command is laid out:
61 * ------------------------ 61 * ------------------------
62 * | iwm_udma_out_wifi_hdr | 62 * | iwm_udma_out_wifi_hdr |
63 * ------------------------ 63 * ------------------------
@@ -72,7 +72,7 @@
72 * Those commands are handled by the device's bootrom, 72 * Those commands are handled by the device's bootrom,
73 * and are typically sent when the UMAC and the LMAC 73 * and are typically sent when the UMAC and the LMAC
74 * are not yet available. 74 * are not yet available.
75 * * This is how a non-wifi command is layed out: 75 * * This is how a non-wifi command is laid out:
76 * --------------------------- 76 * ---------------------------
77 * | iwm_udma_out_nonwifi_hdr | 77 * | iwm_udma_out_nonwifi_hdr |
78 * --------------------------- 78 * ---------------------------
diff --git a/drivers/net/wireless/iwmc3200wifi/tx.c b/drivers/net/wireless/iwmc3200wifi/tx.c
index 3216621fc55a..be98074c0608 100644
--- a/drivers/net/wireless/iwmc3200wifi/tx.c
+++ b/drivers/net/wireless/iwmc3200wifi/tx.c
@@ -197,7 +197,7 @@ int iwm_tx_credit_alloc(struct iwm_priv *iwm, int id, int nb)
197 spin_lock(&iwm->tx_credit.lock); 197 spin_lock(&iwm->tx_credit.lock);
198 198
199 if (!iwm_tx_credit_ok(iwm, id, nb)) { 199 if (!iwm_tx_credit_ok(iwm, id, nb)) {
200 IWM_DBG_TX(iwm, DBG, "No credit avaliable for pool[%d]\n", id); 200 IWM_DBG_TX(iwm, DBG, "No credit available for pool[%d]\n", id);
201 ret = -ENOSPC; 201 ret = -ENOSPC;
202 goto out; 202 goto out;
203 } 203 }
diff --git a/drivers/net/wireless/libertas/README b/drivers/net/wireless/libertas/README
index 60fd1afe89ac..1453eec82a99 100644
--- a/drivers/net/wireless/libertas/README
+++ b/drivers/net/wireless/libertas/README
@@ -70,7 +70,7 @@ rdrf
70 These commands are used to read the MAC, BBP and RF registers from the 70 These commands are used to read the MAC, BBP and RF registers from the
71 card. These commands take one parameter that specifies the offset 71 card. These commands take one parameter that specifies the offset
72 location that is to be read. This parameter must be specified in 72 location that is to be read. This parameter must be specified in
73 hexadecimal (its possible to preceed preceding the number with a "0x"). 73 hexadecimal (its possible to precede preceding the number with a "0x").
74 74
75 Path: /sys/kernel/debug/libertas_wireless/ethX/registers/ 75 Path: /sys/kernel/debug/libertas_wireless/ethX/registers/
76 76
@@ -84,7 +84,7 @@ wrrf
84 These commands are used to write the MAC, BBP and RF registers in the 84 These commands are used to write the MAC, BBP and RF registers in the
85 card. These commands take two parameters that specify the offset 85 card. These commands take two parameters that specify the offset
86 location and the value that is to be written. This parameters must 86 location and the value that is to be written. This parameters must
87 be specified in hexadecimal (its possible to preceed the number 87 be specified in hexadecimal (its possible to precede the number
88 with a "0x"). 88 with a "0x").
89 89
90 Usage: 90 Usage:
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
index 30ef0351bfc4..5caa2ac14d61 100644
--- a/drivers/net/wireless/libertas/cfg.c
+++ b/drivers/net/wireless/libertas/cfg.c
@@ -1350,7 +1350,7 @@ static int lbs_cfg_connect(struct wiphy *wiphy, struct net_device *dev,
1350 * we remove all keys like in the WPA/WPA2 setup, 1350 * we remove all keys like in the WPA/WPA2 setup,
1351 * we just don't set RSN. 1351 * we just don't set RSN.
1352 * 1352 *
1353 * Therefore: fall-throught 1353 * Therefore: fall-through
1354 */ 1354 */
1355 case WLAN_CIPHER_SUITE_TKIP: 1355 case WLAN_CIPHER_SUITE_TKIP:
1356 case WLAN_CIPHER_SUITE_CCMP: 1356 case WLAN_CIPHER_SUITE_CCMP:
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c
index fc8121190d38..8712cb213f2f 100644
--- a/drivers/net/wireless/libertas/if_cs.c
+++ b/drivers/net/wireless/libertas/if_cs.c
@@ -913,7 +913,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
913 goto out3; 913 goto out3;
914 } 914 }
915 915
916 /* Clear any interrupt cause that happend while sending 916 /* Clear any interrupt cause that happened while sending
917 * firmware/initializing card */ 917 * firmware/initializing card */
918 if_cs_write16(card, IF_CS_CARD_INT_CAUSE, IF_CS_BIT_MASK); 918 if_cs_write16(card, IF_CS_CARD_INT_CAUSE, IF_CS_BIT_MASK);
919 if_cs_enable_ints(card); 919 if_cs_enable_ints(card);
diff --git a/drivers/net/wireless/libertas/if_spi.h b/drivers/net/wireless/libertas/if_spi.h
index 8b1417d3b71b..d2ac1dcd7e2e 100644
--- a/drivers/net/wireless/libertas/if_spi.h
+++ b/drivers/net/wireless/libertas/if_spi.h
@@ -66,7 +66,7 @@
66#define IF_SPI_HOST_INT_CTRL_REG 0x40 /* Host interrupt controller reg */ 66#define IF_SPI_HOST_INT_CTRL_REG 0x40 /* Host interrupt controller reg */
67 67
68#define IF_SPI_CARD_INT_CAUSE_REG 0x44 /* Card interrupt cause reg */ 68#define IF_SPI_CARD_INT_CAUSE_REG 0x44 /* Card interrupt cause reg */
69#define IF_SPI_CARD_INT_STATUS_REG 0x48 /* Card interupt status reg */ 69#define IF_SPI_CARD_INT_STATUS_REG 0x48 /* Card interrupt status reg */
70#define IF_SPI_CARD_INT_EVENT_MASK_REG 0x4C /* Card interrupt event mask */ 70#define IF_SPI_CARD_INT_EVENT_MASK_REG 0x4C /* Card interrupt event mask */
71#define IF_SPI_CARD_INT_STATUS_MASK_REG 0x50 /* Card interrupt status mask */ 71#define IF_SPI_CARD_INT_STATUS_MASK_REG 0x50 /* Card interrupt status mask */
72 72
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 56f439d58013..f4f4257a9d67 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -62,7 +62,7 @@ MODULE_PARM_DESC(fake_hw_scan, "Install fake (no-op) hw-scan handler");
62 * an intersection to occur but each device will still use their 62 * an intersection to occur but each device will still use their
63 * respective regulatory requested domains. Subsequent radios will 63 * respective regulatory requested domains. Subsequent radios will
64 * use the resulting intersection. 64 * use the resulting intersection.
65 * @HWSIM_REGTEST_WORLD_ROAM: Used for testing the world roaming. We acomplish 65 * @HWSIM_REGTEST_WORLD_ROAM: Used for testing the world roaming. We accomplish
66 * this by using a custom beacon-capable regulatory domain for the first 66 * this by using a custom beacon-capable regulatory domain for the first
67 * radio. All other device world roam. 67 * radio. All other device world roam.
68 * @HWSIM_REGTEST_CUSTOM_WORLD: Used for testing the custom world regulatory 68 * @HWSIM_REGTEST_CUSTOM_WORLD: Used for testing the custom world regulatory
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 36952274950e..c1ceb4b23971 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -137,6 +137,7 @@ struct mwl8k_tx_queue {
137struct mwl8k_priv { 137struct mwl8k_priv {
138 struct ieee80211_hw *hw; 138 struct ieee80211_hw *hw;
139 struct pci_dev *pdev; 139 struct pci_dev *pdev;
140 int irq;
140 141
141 struct mwl8k_device_info *device_info; 142 struct mwl8k_device_info *device_info;
142 143
@@ -3761,9 +3762,11 @@ static int mwl8k_start(struct ieee80211_hw *hw)
3761 rc = request_irq(priv->pdev->irq, mwl8k_interrupt, 3762 rc = request_irq(priv->pdev->irq, mwl8k_interrupt,
3762 IRQF_SHARED, MWL8K_NAME, hw); 3763 IRQF_SHARED, MWL8K_NAME, hw);
3763 if (rc) { 3764 if (rc) {
3765 priv->irq = -1;
3764 wiphy_err(hw->wiphy, "failed to register IRQ handler\n"); 3766 wiphy_err(hw->wiphy, "failed to register IRQ handler\n");
3765 return -EIO; 3767 return -EIO;
3766 } 3768 }
3769 priv->irq = priv->pdev->irq;
3767 3770
3768 /* Enable TX reclaim and RX tasklets. */ 3771 /* Enable TX reclaim and RX tasklets. */
3769 tasklet_enable(&priv->poll_tx_task); 3772 tasklet_enable(&priv->poll_tx_task);
@@ -3800,6 +3803,7 @@ static int mwl8k_start(struct ieee80211_hw *hw)
3800 if (rc) { 3803 if (rc) {
3801 iowrite32(0, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK); 3804 iowrite32(0, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK);
3802 free_irq(priv->pdev->irq, hw); 3805 free_irq(priv->pdev->irq, hw);
3806 priv->irq = -1;
3803 tasklet_disable(&priv->poll_tx_task); 3807 tasklet_disable(&priv->poll_tx_task);
3804 tasklet_disable(&priv->poll_rx_task); 3808 tasklet_disable(&priv->poll_rx_task);
3805 } 3809 }
@@ -3818,7 +3822,10 @@ static void mwl8k_stop(struct ieee80211_hw *hw)
3818 3822
3819 /* Disable interrupts */ 3823 /* Disable interrupts */
3820 iowrite32(0, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK); 3824 iowrite32(0, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK);
3821 free_irq(priv->pdev->irq, hw); 3825 if (priv->irq != -1) {
3826 free_irq(priv->pdev->irq, hw);
3827 priv->irq = -1;
3828 }
3822 3829
3823 /* Stop finalize join worker */ 3830 /* Stop finalize join worker */
3824 cancel_work_sync(&priv->finalize_join_worker); 3831 cancel_work_sync(&priv->finalize_join_worker);
diff --git a/drivers/net/wireless/orinoco/cfg.c b/drivers/net/wireless/orinoco/cfg.c
index 09fae2f0ea08..736bbb9bd1d0 100644
--- a/drivers/net/wireless/orinoco/cfg.c
+++ b/drivers/net/wireless/orinoco/cfg.c
@@ -153,6 +153,9 @@ static int orinoco_scan(struct wiphy *wiphy, struct net_device *dev,
153 priv->scan_request = request; 153 priv->scan_request = request;
154 154
155 err = orinoco_hw_trigger_scan(priv, request->ssids); 155 err = orinoco_hw_trigger_scan(priv, request->ssids);
156 /* On error the we aren't processing the request */
157 if (err)
158 priv->scan_request = NULL;
156 159
157 return err; 160 return err;
158} 161}
diff --git a/drivers/net/wireless/orinoco/hw.c b/drivers/net/wireless/orinoco/hw.c
index b4772c1c6135..3c7877a7c31c 100644
--- a/drivers/net/wireless/orinoco/hw.c
+++ b/drivers/net/wireless/orinoco/hw.c
@@ -1031,7 +1031,7 @@ int __orinoco_hw_set_tkip_key(struct orinoco_private *priv, int key_idx,
1031 else 1031 else
1032 buf.tsc[4] = 0x10; 1032 buf.tsc[4] = 0x10;
1033 1033
1034 /* Wait upto 100ms for tx queue to empty */ 1034 /* Wait up to 100ms for tx queue to empty */
1035 for (k = 100; k > 0; k--) { 1035 for (k = 100; k > 0; k--) {
1036 udelay(1000); 1036 udelay(1000);
1037 ret = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_TXQUEUEEMPTY, 1037 ret = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_TXQUEUEEMPTY,
diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c
index f3d396e7544b..62c6b2b37dbe 100644
--- a/drivers/net/wireless/orinoco/main.c
+++ b/drivers/net/wireless/orinoco/main.c
@@ -1376,13 +1376,13 @@ static void orinoco_process_scan_results(struct work_struct *work)
1376 1376
1377 spin_lock_irqsave(&priv->scan_lock, flags); 1377 spin_lock_irqsave(&priv->scan_lock, flags);
1378 list_for_each_entry_safe(sd, temp, &priv->scan_list, list) { 1378 list_for_each_entry_safe(sd, temp, &priv->scan_list, list) {
1379 spin_unlock_irqrestore(&priv->scan_lock, flags);
1380 1379
1381 buf = sd->buf; 1380 buf = sd->buf;
1382 len = sd->len; 1381 len = sd->len;
1383 type = sd->type; 1382 type = sd->type;
1384 1383
1385 list_del(&sd->list); 1384 list_del(&sd->list);
1385 spin_unlock_irqrestore(&priv->scan_lock, flags);
1386 kfree(sd); 1386 kfree(sd);
1387 1387
1388 if (len > 0) { 1388 if (len > 0) {
diff --git a/drivers/net/wireless/p54/main.c b/drivers/net/wireless/p54/main.c
index 356e6bb443a6..a946991989c6 100644
--- a/drivers/net/wireless/p54/main.c
+++ b/drivers/net/wireless/p54/main.c
@@ -465,7 +465,7 @@ static int p54_set_key(struct ieee80211_hw *dev, enum set_key_cmd cmd,
465 465
466 if (slot < 0) { 466 if (slot < 0) {
467 /* 467 /*
468 * The device supports the choosen algorithm, but the 468 * The device supports the chosen algorithm, but the
469 * firmware does not provide enough key slots to store 469 * firmware does not provide enough key slots to store
470 * all of them. 470 * all of them.
471 * But encryption offload for outgoing frames is always 471 * But encryption offload for outgoing frames is always
diff --git a/drivers/net/wireless/p54/p54spi.c b/drivers/net/wireless/p54/p54spi.c
index 18d24b7b1e34..6d9204fef90b 100644
--- a/drivers/net/wireless/p54/p54spi.c
+++ b/drivers/net/wireless/p54/p54spi.c
@@ -287,7 +287,7 @@ static void p54spi_power_on(struct p54s_priv *priv)
287 enable_irq(gpio_to_irq(p54spi_gpio_irq)); 287 enable_irq(gpio_to_irq(p54spi_gpio_irq));
288 288
289 /* 289 /*
290 * need to wait a while before device can be accessed, the lenght 290 * need to wait a while before device can be accessed, the length
291 * is just a guess 291 * is just a guess
292 */ 292 */
293 msleep(10); 293 msleep(10);
@@ -649,8 +649,7 @@ static int __devinit p54spi_probe(struct spi_device *spi)
649 goto err_free_common; 649 goto err_free_common;
650 } 650 }
651 651
652 set_irq_type(gpio_to_irq(p54spi_gpio_irq), 652 irq_set_irq_type(gpio_to_irq(p54spi_gpio_irq), IRQ_TYPE_EDGE_RISING);
653 IRQ_TYPE_EDGE_RISING);
654 653
655 disable_irq(gpio_to_irq(p54spi_gpio_irq)); 654 disable_irq(gpio_to_irq(p54spi_gpio_irq));
656 655
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c
index 9b344a921e74..e18358725b69 100644
--- a/drivers/net/wireless/p54/p54usb.c
+++ b/drivers/net/wireless/p54/p54usb.c
@@ -56,6 +56,7 @@ static struct usb_device_id p54u_table[] __devinitdata = {
56 {USB_DEVICE(0x0846, 0x4210)}, /* Netgear WG121 the second ? */ 56 {USB_DEVICE(0x0846, 0x4210)}, /* Netgear WG121 the second ? */
57 {USB_DEVICE(0x0846, 0x4220)}, /* Netgear WG111 */ 57 {USB_DEVICE(0x0846, 0x4220)}, /* Netgear WG111 */
58 {USB_DEVICE(0x09aa, 0x1000)}, /* Spinnaker Proto board */ 58 {USB_DEVICE(0x09aa, 0x1000)}, /* Spinnaker Proto board */
59 {USB_DEVICE(0x0bf8, 0x1007)}, /* Fujitsu E-5400 USB */
59 {USB_DEVICE(0x0cde, 0x0006)}, /* Medion 40900, Roper Europe */ 60 {USB_DEVICE(0x0cde, 0x0006)}, /* Medion 40900, Roper Europe */
60 {USB_DEVICE(0x0db0, 0x6826)}, /* MSI UB54G (MS-6826) */ 61 {USB_DEVICE(0x0db0, 0x6826)}, /* MSI UB54G (MS-6826) */
61 {USB_DEVICE(0x107b, 0x55f2)}, /* Gateway WGU-210 (Gemtek) */ 62 {USB_DEVICE(0x107b, 0x55f2)}, /* Gateway WGU-210 (Gemtek) */
@@ -68,6 +69,7 @@ static struct usb_device_id p54u_table[] __devinitdata = {
68 {USB_DEVICE(0x1915, 0x2235)}, /* Linksys WUSB54G Portable OEM */ 69 {USB_DEVICE(0x1915, 0x2235)}, /* Linksys WUSB54G Portable OEM */
69 {USB_DEVICE(0x2001, 0x3701)}, /* DLink DWL-G120 Spinnaker */ 70 {USB_DEVICE(0x2001, 0x3701)}, /* DLink DWL-G120 Spinnaker */
70 {USB_DEVICE(0x2001, 0x3703)}, /* DLink DWL-G122 */ 71 {USB_DEVICE(0x2001, 0x3703)}, /* DLink DWL-G122 */
72 {USB_DEVICE(0x2001, 0x3762)}, /* Conceptronic C54U */
71 {USB_DEVICE(0x5041, 0x2234)}, /* Linksys WUSB54G */ 73 {USB_DEVICE(0x5041, 0x2234)}, /* Linksys WUSB54G */
72 {USB_DEVICE(0x5041, 0x2235)}, /* Linksys WUSB54G Portable */ 74 {USB_DEVICE(0x5041, 0x2235)}, /* Linksys WUSB54G Portable */
73 75
diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c
index 7834c26c2954..042842e704de 100644
--- a/drivers/net/wireless/p54/txrx.c
+++ b/drivers/net/wireless/p54/txrx.c
@@ -703,7 +703,7 @@ void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb)
703 struct p54_tx_info *p54info; 703 struct p54_tx_info *p54info;
704 struct p54_hdr *hdr; 704 struct p54_hdr *hdr;
705 struct p54_tx_data *txhdr; 705 struct p54_tx_data *txhdr;
706 unsigned int padding, len, extra_len; 706 unsigned int padding, len, extra_len = 0;
707 int i, j, ridx; 707 int i, j, ridx;
708 u16 hdr_flags = 0, aid = 0; 708 u16 hdr_flags = 0, aid = 0;
709 u8 rate, queue = 0, crypt_offset = 0; 709 u8 rate, queue = 0, crypt_offset = 0;
diff --git a/drivers/net/wireless/prism54/islpci_eth.c b/drivers/net/wireless/prism54/islpci_eth.c
index d44f8e20cce0..266d45bf86f5 100644
--- a/drivers/net/wireless/prism54/islpci_eth.c
+++ b/drivers/net/wireless/prism54/islpci_eth.c
@@ -113,7 +113,7 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev)
113 * be aligned on a 4-byte boundary. If WDS is enabled add another 6 bytes 113 * be aligned on a 4-byte boundary. If WDS is enabled add another 6 bytes
114 * and add WDS address information */ 114 * and add WDS address information */
115 if (likely(((long) skb->data & 0x03) | init_wds)) { 115 if (likely(((long) skb->data & 0x03) | init_wds)) {
116 /* get the number of bytes to add and re-allign */ 116 /* get the number of bytes to add and re-align */
117 offset = (4 - (long) skb->data) & 0x03; 117 offset = (4 - (long) skb->data) & 0x03;
118 offset += init_wds ? 6 : 0; 118 offset += init_wds ? 6 : 0;
119 119
@@ -342,7 +342,7 @@ islpci_eth_receive(islpci_private *priv)
342 priv->pci_map_rx_address[index], 342 priv->pci_map_rx_address[index],
343 MAX_FRAGMENT_SIZE_RX + 2, PCI_DMA_FROMDEVICE); 343 MAX_FRAGMENT_SIZE_RX + 2, PCI_DMA_FROMDEVICE);
344 344
345 /* update the skb structure and allign the buffer */ 345 /* update the skb structure and align the buffer */
346 skb_put(skb, size); 346 skb_put(skb, size);
347 if (offset) { 347 if (offset) {
348 /* shift the buffer allocation offset bytes to get the right frame */ 348 /* shift the buffer allocation offset bytes to get the right frame */
diff --git a/drivers/net/wireless/rayctl.h b/drivers/net/wireless/rayctl.h
index 49d9b267bc0f..d7646f299bd3 100644
--- a/drivers/net/wireless/rayctl.h
+++ b/drivers/net/wireless/rayctl.h
@@ -578,7 +578,7 @@ struct tx_msg {
578 UCHAR var[1]; 578 UCHAR var[1];
579}; 579};
580 580
581/****** ECF Receive Control Stucture (RCS) Area at Shared RAM offset 0x0800 */ 581/****** ECF Receive Control Structure (RCS) Area at Shared RAM offset 0x0800 */
582/* Structures for command specific parameters (rcs.var) */ 582/* Structures for command specific parameters (rcs.var) */
583struct rx_packet_cmd { 583struct rx_packet_cmd {
584 UCHAR rx_data_ptr[2]; 584 UCHAR rx_data_ptr[2];
diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
index 70b9abbdeb9e..8fbc5fa965e0 100644
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -616,7 +616,7 @@
616 * READ_CONTROL: 0 write BBP, 1 read BBP 616 * READ_CONTROL: 0 write BBP, 1 read BBP
617 * BUSY: ASIC is busy executing BBP commands 617 * BUSY: ASIC is busy executing BBP commands
618 * BBP_PAR_DUR: 0 4 MAC clocks, 1 8 MAC clocks 618 * BBP_PAR_DUR: 0 4 MAC clocks, 1 8 MAC clocks
619 * BBP_RW_MODE: 0 serial, 1 paralell 619 * BBP_RW_MODE: 0 serial, 1 parallel
620 */ 620 */
621#define BBP_CSR_CFG 0x101c 621#define BBP_CSR_CFG 0x101c
622#define BBP_CSR_CFG_VALUE FIELD32(0x000000ff) 622#define BBP_CSR_CFG_VALUE FIELD32(0x000000ff)
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 2ee6cebb9b25..dbf74d07d947 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -1518,7 +1518,7 @@ static void rt2800_config_channel_rf2xxx(struct rt2x00_dev *rt2x00dev,
1518 if (rf->channel > 14) { 1518 if (rf->channel > 14) {
1519 /* 1519 /*
1520 * When TX power is below 0, we should increase it by 7 to 1520 * When TX power is below 0, we should increase it by 7 to
1521 * make it a positive value (Minumum value is -7). 1521 * make it a positive value (Minimum value is -7).
1522 * However this means that values between 0 and 7 have 1522 * However this means that values between 0 and 7 have
1523 * double meaning, and we should set a 7DBm boost flag. 1523 * double meaning, and we should set a 7DBm boost flag.
1524 */ 1524 */
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index f1a92144996f..37509d019910 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -719,6 +719,7 @@ static struct usb_device_id rt2800usb_device_table[] = {
719 { USB_DEVICE(0x0b05, 0x1732), USB_DEVICE_DATA(&rt2800usb_ops) }, 719 { USB_DEVICE(0x0b05, 0x1732), USB_DEVICE_DATA(&rt2800usb_ops) },
720 { USB_DEVICE(0x0b05, 0x1742), USB_DEVICE_DATA(&rt2800usb_ops) }, 720 { USB_DEVICE(0x0b05, 0x1742), USB_DEVICE_DATA(&rt2800usb_ops) },
721 { USB_DEVICE(0x0b05, 0x1784), USB_DEVICE_DATA(&rt2800usb_ops) }, 721 { USB_DEVICE(0x0b05, 0x1784), USB_DEVICE_DATA(&rt2800usb_ops) },
722 { USB_DEVICE(0x1761, 0x0b05), USB_DEVICE_DATA(&rt2800usb_ops) },
722 /* AzureWave */ 723 /* AzureWave */
723 { USB_DEVICE(0x13d3, 0x3247), USB_DEVICE_DATA(&rt2800usb_ops) }, 724 { USB_DEVICE(0x13d3, 0x3247), USB_DEVICE_DATA(&rt2800usb_ops) },
724 { USB_DEVICE(0x13d3, 0x3273), USB_DEVICE_DATA(&rt2800usb_ops) }, 725 { USB_DEVICE(0x13d3, 0x3273), USB_DEVICE_DATA(&rt2800usb_ops) },
@@ -729,8 +730,12 @@ static struct usb_device_id rt2800usb_device_table[] = {
729 { USB_DEVICE(0x050d, 0x8053), USB_DEVICE_DATA(&rt2800usb_ops) }, 730 { USB_DEVICE(0x050d, 0x8053), USB_DEVICE_DATA(&rt2800usb_ops) },
730 { USB_DEVICE(0x050d, 0x805c), USB_DEVICE_DATA(&rt2800usb_ops) }, 731 { USB_DEVICE(0x050d, 0x805c), USB_DEVICE_DATA(&rt2800usb_ops) },
731 { USB_DEVICE(0x050d, 0x815c), USB_DEVICE_DATA(&rt2800usb_ops) }, 732 { USB_DEVICE(0x050d, 0x815c), USB_DEVICE_DATA(&rt2800usb_ops) },
733 { USB_DEVICE(0x050d, 0x825b), USB_DEVICE_DATA(&rt2800usb_ops) },
734 { USB_DEVICE(0x050d, 0x935a), USB_DEVICE_DATA(&rt2800usb_ops) },
735 { USB_DEVICE(0x050d, 0x935b), USB_DEVICE_DATA(&rt2800usb_ops) },
732 /* Buffalo */ 736 /* Buffalo */
733 { USB_DEVICE(0x0411, 0x00e8), USB_DEVICE_DATA(&rt2800usb_ops) }, 737 { USB_DEVICE(0x0411, 0x00e8), USB_DEVICE_DATA(&rt2800usb_ops) },
738 { USB_DEVICE(0x0411, 0x016f), USB_DEVICE_DATA(&rt2800usb_ops) },
734 /* Conceptronic */ 739 /* Conceptronic */
735 { USB_DEVICE(0x14b2, 0x3c06), USB_DEVICE_DATA(&rt2800usb_ops) }, 740 { USB_DEVICE(0x14b2, 0x3c06), USB_DEVICE_DATA(&rt2800usb_ops) },
736 { USB_DEVICE(0x14b2, 0x3c07), USB_DEVICE_DATA(&rt2800usb_ops) }, 741 { USB_DEVICE(0x14b2, 0x3c07), USB_DEVICE_DATA(&rt2800usb_ops) },
@@ -817,6 +822,7 @@ static struct usb_device_id rt2800usb_device_table[] = {
817 /* Pegatron */ 822 /* Pegatron */
818 { USB_DEVICE(0x1d4d, 0x000c), USB_DEVICE_DATA(&rt2800usb_ops) }, 823 { USB_DEVICE(0x1d4d, 0x000c), USB_DEVICE_DATA(&rt2800usb_ops) },
819 { USB_DEVICE(0x1d4d, 0x000e), USB_DEVICE_DATA(&rt2800usb_ops) }, 824 { USB_DEVICE(0x1d4d, 0x000e), USB_DEVICE_DATA(&rt2800usb_ops) },
825 { USB_DEVICE(0x1d4d, 0x0011), USB_DEVICE_DATA(&rt2800usb_ops) },
820 /* Philips */ 826 /* Philips */
821 { USB_DEVICE(0x0471, 0x200f), USB_DEVICE_DATA(&rt2800usb_ops) }, 827 { USB_DEVICE(0x0471, 0x200f), USB_DEVICE_DATA(&rt2800usb_ops) },
822 /* Planex */ 828 /* Planex */
@@ -898,6 +904,8 @@ static struct usb_device_id rt2800usb_device_table[] = {
898 { USB_DEVICE(0x148f, 0x3572), USB_DEVICE_DATA(&rt2800usb_ops) }, 904 { USB_DEVICE(0x148f, 0x3572), USB_DEVICE_DATA(&rt2800usb_ops) },
899 /* Sitecom */ 905 /* Sitecom */
900 { USB_DEVICE(0x0df6, 0x0041), USB_DEVICE_DATA(&rt2800usb_ops) }, 906 { USB_DEVICE(0x0df6, 0x0041), USB_DEVICE_DATA(&rt2800usb_ops) },
907 /* Toshiba */
908 { USB_DEVICE(0x0930, 0x0a07), USB_DEVICE_DATA(&rt2800usb_ops) },
901 /* Zinwell */ 909 /* Zinwell */
902 { USB_DEVICE(0x5a57, 0x0284), USB_DEVICE_DATA(&rt2800usb_ops) }, 910 { USB_DEVICE(0x5a57, 0x0284), USB_DEVICE_DATA(&rt2800usb_ops) },
903#endif 911#endif
@@ -913,7 +921,6 @@ static struct usb_device_id rt2800usb_device_table[] = {
913 { USB_DEVICE(0x0b05, 0x1760), USB_DEVICE_DATA(&rt2800usb_ops) }, 921 { USB_DEVICE(0x0b05, 0x1760), USB_DEVICE_DATA(&rt2800usb_ops) },
914 { USB_DEVICE(0x0b05, 0x1761), USB_DEVICE_DATA(&rt2800usb_ops) }, 922 { USB_DEVICE(0x0b05, 0x1761), USB_DEVICE_DATA(&rt2800usb_ops) },
915 { USB_DEVICE(0x0b05, 0x1790), USB_DEVICE_DATA(&rt2800usb_ops) }, 923 { USB_DEVICE(0x0b05, 0x1790), USB_DEVICE_DATA(&rt2800usb_ops) },
916 { USB_DEVICE(0x1761, 0x0b05), USB_DEVICE_DATA(&rt2800usb_ops) },
917 /* AzureWave */ 924 /* AzureWave */
918 { USB_DEVICE(0x13d3, 0x3262), USB_DEVICE_DATA(&rt2800usb_ops) }, 925 { USB_DEVICE(0x13d3, 0x3262), USB_DEVICE_DATA(&rt2800usb_ops) },
919 { USB_DEVICE(0x13d3, 0x3284), USB_DEVICE_DATA(&rt2800usb_ops) }, 926 { USB_DEVICE(0x13d3, 0x3284), USB_DEVICE_DATA(&rt2800usb_ops) },
@@ -937,6 +944,8 @@ static struct usb_device_id rt2800usb_device_table[] = {
937 { USB_DEVICE(0x07d1, 0x3c13), USB_DEVICE_DATA(&rt2800usb_ops) }, 944 { USB_DEVICE(0x07d1, 0x3c13), USB_DEVICE_DATA(&rt2800usb_ops) },
938 { USB_DEVICE(0x07d1, 0x3c15), USB_DEVICE_DATA(&rt2800usb_ops) }, 945 { USB_DEVICE(0x07d1, 0x3c15), USB_DEVICE_DATA(&rt2800usb_ops) },
939 { USB_DEVICE(0x07d1, 0x3c17), USB_DEVICE_DATA(&rt2800usb_ops) }, 946 { USB_DEVICE(0x07d1, 0x3c17), USB_DEVICE_DATA(&rt2800usb_ops) },
947 /* Edimax */
948 { USB_DEVICE(0x7392, 0x4085), USB_DEVICE_DATA(&rt2800usb_ops) },
940 /* Encore */ 949 /* Encore */
941 { USB_DEVICE(0x203d, 0x14a1), USB_DEVICE_DATA(&rt2800usb_ops) }, 950 { USB_DEVICE(0x203d, 0x14a1), USB_DEVICE_DATA(&rt2800usb_ops) },
942 /* Gemtek */ 951 /* Gemtek */
@@ -959,8 +968,8 @@ static struct usb_device_id rt2800usb_device_table[] = {
959 { USB_DEVICE(0x05a6, 0x0101), USB_DEVICE_DATA(&rt2800usb_ops) }, 968 { USB_DEVICE(0x05a6, 0x0101), USB_DEVICE_DATA(&rt2800usb_ops) },
960 { USB_DEVICE(0x1d4d, 0x0002), USB_DEVICE_DATA(&rt2800usb_ops) }, 969 { USB_DEVICE(0x1d4d, 0x0002), USB_DEVICE_DATA(&rt2800usb_ops) },
961 { USB_DEVICE(0x1d4d, 0x0010), USB_DEVICE_DATA(&rt2800usb_ops) }, 970 { USB_DEVICE(0x1d4d, 0x0010), USB_DEVICE_DATA(&rt2800usb_ops) },
962 { USB_DEVICE(0x1d4d, 0x0011), USB_DEVICE_DATA(&rt2800usb_ops) },
963 /* Planex */ 971 /* Planex */
972 { USB_DEVICE(0x2019, 0x5201), USB_DEVICE_DATA(&rt2800usb_ops) },
964 { USB_DEVICE(0x2019, 0xab24), USB_DEVICE_DATA(&rt2800usb_ops) }, 973 { USB_DEVICE(0x2019, 0xab24), USB_DEVICE_DATA(&rt2800usb_ops) },
965 /* Qcom */ 974 /* Qcom */
966 { USB_DEVICE(0x18e8, 0x6259), USB_DEVICE_DATA(&rt2800usb_ops) }, 975 { USB_DEVICE(0x18e8, 0x6259), USB_DEVICE_DATA(&rt2800usb_ops) },
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index a3940d7300a4..7f10239f56a8 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -484,13 +484,13 @@ struct rt2x00intf_conf {
484 enum nl80211_iftype type; 484 enum nl80211_iftype type;
485 485
486 /* 486 /*
487 * TSF sync value, this is dependant on the operation type. 487 * TSF sync value, this is dependent on the operation type.
488 */ 488 */
489 enum tsf_sync sync; 489 enum tsf_sync sync;
490 490
491 /* 491 /*
492 * The MAC and BSSID addressess are simple array of bytes, 492 * The MAC and BSSID addresses are simple array of bytes,
493 * these arrays are little endian, so when sending the addressess 493 * these arrays are little endian, so when sending the addresses
494 * to the drivers, copy the it into a endian-signed variable. 494 * to the drivers, copy the it into a endian-signed variable.
495 * 495 *
496 * Note that all devices (except rt2500usb) have 32 bits 496 * Note that all devices (except rt2500usb) have 32 bits
@@ -1131,7 +1131,7 @@ void rt2x00queue_stop_queue(struct data_queue *queue);
1131 * @drop: True to drop all pending frames. 1131 * @drop: True to drop all pending frames.
1132 * 1132 *
1133 * This function will flush the queue. After this call 1133 * This function will flush the queue. After this call
1134 * the queue is guarenteed to be empty. 1134 * the queue is guaranteed to be empty.
1135 */ 1135 */
1136void rt2x00queue_flush_queue(struct data_queue *queue, bool drop); 1136void rt2x00queue_flush_queue(struct data_queue *queue, bool drop);
1137 1137
diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c
index e7f67d5eda52..9416e36de29e 100644
--- a/drivers/net/wireless/rt2x00/rt2x00config.c
+++ b/drivers/net/wireless/rt2x00/rt2x00config.c
@@ -60,7 +60,7 @@ void rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev,
60 * Note that when NULL is passed as address we will send 60 * Note that when NULL is passed as address we will send
61 * 00:00:00:00:00 to the device to clear the address. 61 * 00:00:00:00:00 to the device to clear the address.
62 * This will prevent the device being confused when it wants 62 * This will prevent the device being confused when it wants
63 * to ACK frames or consideres itself associated. 63 * to ACK frames or considers itself associated.
64 */ 64 */
65 memset(conf.mac, 0, sizeof(conf.mac)); 65 memset(conf.mac, 0, sizeof(conf.mac));
66 if (mac) 66 if (mac)
diff --git a/drivers/net/wireless/rt2x00/rt2x00crypto.c b/drivers/net/wireless/rt2x00/rt2x00crypto.c
index 5e9074bf2b8e..3f5688fbf3f7 100644
--- a/drivers/net/wireless/rt2x00/rt2x00crypto.c
+++ b/drivers/net/wireless/rt2x00/rt2x00crypto.c
@@ -237,7 +237,7 @@ void rt2x00crypto_rx_insert_iv(struct sk_buff *skb,
237 } 237 }
238 238
239 /* 239 /*
240 * NOTE: Always count the payload as transfered, 240 * NOTE: Always count the payload as transferred,
241 * even when alignment was set to zero. This is required 241 * even when alignment was set to zero. This is required
242 * for determining the correct offset for the ICV data. 242 * for determining the correct offset for the ICV data.
243 */ 243 */
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 9de9dbe94399..84eb6ad36377 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -1062,8 +1062,10 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
1062 * Stop all work. 1062 * Stop all work.
1063 */ 1063 */
1064 cancel_work_sync(&rt2x00dev->intf_work); 1064 cancel_work_sync(&rt2x00dev->intf_work);
1065 cancel_work_sync(&rt2x00dev->rxdone_work); 1065 if (rt2x00_is_usb(rt2x00dev)) {
1066 cancel_work_sync(&rt2x00dev->txdone_work); 1066 cancel_work_sync(&rt2x00dev->rxdone_work);
1067 cancel_work_sync(&rt2x00dev->txdone_work);
1068 }
1067 destroy_workqueue(rt2x00dev->workqueue); 1069 destroy_workqueue(rt2x00dev->workqueue);
1068 1070
1069 /* 1071 /*
diff --git a/drivers/net/wireless/rt2x00/rt2x00dump.h b/drivers/net/wireless/rt2x00/rt2x00dump.h
index 5d6e0b83151f..063ebcce97f8 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dump.h
+++ b/drivers/net/wireless/rt2x00/rt2x00dump.h
@@ -51,7 +51,7 @@
51 * [rt2x00dump header][hardware descriptor][ieee802.11 frame] 51 * [rt2x00dump header][hardware descriptor][ieee802.11 frame]
52 * 52 *
53 * rt2x00dump header: The description of the dumped frame, as well as 53 * rt2x00dump header: The description of the dumped frame, as well as
54 * additional information usefull for debugging. See &rt2x00dump_hdr. 54 * additional information useful for debugging. See &rt2x00dump_hdr.
55 * hardware descriptor: Descriptor that was used to receive or transmit 55 * hardware descriptor: Descriptor that was used to receive or transmit
56 * the frame. 56 * the frame.
57 * ieee802.11 frame: The actual frame that was received or transmitted. 57 * ieee802.11 frame: The actual frame that was received or transmitted.
diff --git a/drivers/net/wireless/rt2x00/rt2x00link.c b/drivers/net/wireless/rt2x00/rt2x00link.c
index c975b0a12e95..29abfdeb0b65 100644
--- a/drivers/net/wireless/rt2x00/rt2x00link.c
+++ b/drivers/net/wireless/rt2x00/rt2x00link.c
@@ -283,7 +283,7 @@ void rt2x00link_start_tuner(struct rt2x00_dev *rt2x00dev)
283 /** 283 /**
284 * While scanning, link tuning is disabled. By default 284 * While scanning, link tuning is disabled. By default
285 * the most sensitive settings will be used to make sure 285 * the most sensitive settings will be used to make sure
286 * that all beacons and probe responses will be recieved 286 * that all beacons and probe responses will be received
287 * during the scan. 287 * during the scan.
288 */ 288 */
289 if (test_bit(DEVICE_STATE_SCANNING, &rt2x00dev->flags)) 289 if (test_bit(DEVICE_STATE_SCANNING, &rt2x00dev->flags))
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index 4b3c70eeef1f..4358051bfe1a 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -546,7 +546,7 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb,
546 } 546 }
547 547
548 /* 548 /*
549 * When DMA allocation is required we should guarentee to the 549 * When DMA allocation is required we should guarantee to the
550 * driver that the DMA is aligned to a 4-byte boundary. 550 * driver that the DMA is aligned to a 4-byte boundary.
551 * However some drivers require L2 padding to pad the payload 551 * However some drivers require L2 padding to pad the payload
552 * rather then the header. This could be a requirement for 552 * rather then the header. This could be a requirement for
@@ -689,7 +689,7 @@ void rt2x00queue_for_each_entry(struct data_queue *queue,
689 spin_unlock_irqrestore(&queue->index_lock, irqflags); 689 spin_unlock_irqrestore(&queue->index_lock, irqflags);
690 690
691 /* 691 /*
692 * Start from the TX done pointer, this guarentees that we will 692 * Start from the TX done pointer, this guarantees that we will
693 * send out all frames in the correct order. 693 * send out all frames in the correct order.
694 */ 694 */
695 if (index_start < index_end) { 695 if (index_start < index_end) {
@@ -883,7 +883,7 @@ void rt2x00queue_flush_queue(struct data_queue *queue, bool drop)
883 } 883 }
884 884
885 /* 885 /*
886 * Check if driver supports flushing, we can only guarentee 886 * Check if driver supports flushing, we can only guarantee
887 * full support for flushing if the driver is able 887 * full support for flushing if the driver is able
888 * to cancel all pending frames (drop = true). 888 * to cancel all pending frames (drop = true).
889 */ 889 */
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h
index 0c8b0c699679..217861f8d95f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.h
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.h
@@ -344,8 +344,8 @@ struct txentry_desc {
344 * only be touched after the device has signaled it is done with it. 344 * only be touched after the device has signaled it is done with it.
345 * @ENTRY_DATA_PENDING: This entry contains a valid frame and is waiting 345 * @ENTRY_DATA_PENDING: This entry contains a valid frame and is waiting
346 * for the signal to start sending. 346 * for the signal to start sending.
347 * @ENTRY_DATA_IO_FAILED: Hardware indicated that an IO error occured 347 * @ENTRY_DATA_IO_FAILED: Hardware indicated that an IO error occurred
348 * while transfering the data to the hardware. No TX status report will 348 * while transferring the data to the hardware. No TX status report will
349 * be expected from the hardware. 349 * be expected from the hardware.
350 * @ENTRY_DATA_STATUS_PENDING: The entry has been send to the device and 350 * @ENTRY_DATA_STATUS_PENDING: The entry has been send to the device and
351 * returned. It is now waiting for the status reporting before the 351 * returned. It is now waiting for the status reporting before the
@@ -365,7 +365,7 @@ enum queue_entry_flags {
365 * @flags: Entry flags, see &enum queue_entry_flags. 365 * @flags: Entry flags, see &enum queue_entry_flags.
366 * @queue: The data queue (&struct data_queue) to which this entry belongs. 366 * @queue: The data queue (&struct data_queue) to which this entry belongs.
367 * @skb: The buffer which is currently being transmitted (for TX queue), 367 * @skb: The buffer which is currently being transmitted (for TX queue),
368 * or used to directly recieve data in (for RX queue). 368 * or used to directly receive data in (for RX queue).
369 * @entry_idx: The entry index number. 369 * @entry_idx: The entry index number.
370 * @priv_data: Private data belonging to this queue entry. The pointer 370 * @priv_data: Private data belonging to this queue entry. The pointer
371 * points to data specific to a particular driver and queue type. 371 * points to data specific to a particular driver and queue type.
@@ -388,7 +388,7 @@ struct queue_entry {
388 * @Q_INDEX: Index pointer to the current entry in the queue, if this entry is 388 * @Q_INDEX: Index pointer to the current entry in the queue, if this entry is
389 * owned by the hardware then the queue is considered to be full. 389 * owned by the hardware then the queue is considered to be full.
390 * @Q_INDEX_DMA_DONE: Index pointer for the next entry which will have been 390 * @Q_INDEX_DMA_DONE: Index pointer for the next entry which will have been
391 * transfered to the hardware. 391 * transferred to the hardware.
392 * @Q_INDEX_DONE: Index pointer to the next entry which will be completed by 392 * @Q_INDEX_DONE: Index pointer to the next entry which will be completed by
393 * the hardware and for which we need to run the txdone handler. If this 393 * the hardware and for which we need to run the txdone handler. If this
394 * entry is not owned by the hardware the queue is considered to be empty. 394 * entry is not owned by the hardware the queue is considered to be empty.
@@ -627,7 +627,7 @@ static inline int rt2x00queue_threshold(struct data_queue *queue)
627} 627}
628 628
629/** 629/**
630 * rt2x00queue_status_timeout - Check if a timeout occured for STATUS reports 630 * rt2x00queue_status_timeout - Check if a timeout occurred for STATUS reports
631 * @queue: Queue to check. 631 * @queue: Queue to check.
632 */ 632 */
633static inline int rt2x00queue_status_timeout(struct data_queue *queue) 633static inline int rt2x00queue_status_timeout(struct data_queue *queue)
@@ -637,7 +637,7 @@ static inline int rt2x00queue_status_timeout(struct data_queue *queue)
637} 637}
638 638
639/** 639/**
640 * rt2x00queue_timeout - Check if a timeout occured for DMA transfers 640 * rt2x00queue_timeout - Check if a timeout occurred for DMA transfers
641 * @queue: Queue to check. 641 * @queue: Queue to check.
642 */ 642 */
643static inline int rt2x00queue_dma_timeout(struct data_queue *queue) 643static inline int rt2x00queue_dma_timeout(struct data_queue *queue)
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c
index fbe735f5b352..36f388f97d65 100644
--- a/drivers/net/wireless/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/rt2x00/rt2x00usb.c
@@ -173,7 +173,7 @@ static void rt2x00usb_work_txdone_entry(struct queue_entry *entry)
173 /* 173 /*
174 * If the transfer to hardware succeeded, it does not mean the 174 * If the transfer to hardware succeeded, it does not mean the
175 * frame was send out correctly. It only means the frame 175 * frame was send out correctly. It only means the frame
176 * was succesfully pushed to the hardware, we have no 176 * was successfully pushed to the hardware, we have no
177 * way to determine the transmission status right now. 177 * way to determine the transmission status right now.
178 * (Only indirectly by looking at the failed TX counters 178 * (Only indirectly by looking at the failed TX counters
179 * in the register). 179 * in the register).
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.h b/drivers/net/wireless/rt2x00/rt2x00usb.h
index 6aaf51fc7ad8..e11c759ac9ed 100644
--- a/drivers/net/wireless/rt2x00/rt2x00usb.h
+++ b/drivers/net/wireless/rt2x00/rt2x00usb.h
@@ -400,7 +400,7 @@ void rt2x00usb_flush_queue(struct data_queue *queue);
400 * @rt2x00dev: Pointer to &struct rt2x00_dev 400 * @rt2x00dev: Pointer to &struct rt2x00_dev
401 * 401 *
402 * Check the health of the USB communication and determine 402 * Check the health of the USB communication and determine
403 * if timeouts have occured. If this is the case, this function 403 * if timeouts have occurred. If this is the case, this function
404 * will reset all communication to restore functionality again. 404 * will reset all communication to restore functionality again.
405 */ 405 */
406void rt2x00usb_watchdog(struct rt2x00_dev *rt2x00dev); 406void rt2x00usb_watchdog(struct rt2x00_dev *rt2x00dev);
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
index bb0c781f4a1b..0d7d93e1d398 100644
--- a/drivers/net/wireless/rtlwifi/base.c
+++ b/drivers/net/wireless/rtlwifi/base.c
@@ -520,7 +520,7 @@ void rtl_get_tcb_desc(struct ieee80211_hw *hw,
520 *because hw will nerver use hw_rate 520 *because hw will nerver use hw_rate
521 *when tcb_desc->use_driver_rate = false 521 *when tcb_desc->use_driver_rate = false
522 *so we never set highest N rate here, 522 *so we never set highest N rate here,
523 *and N rate will all be controled by FW 523 *and N rate will all be controlled by FW
524 *when tcb_desc->use_driver_rate = false 524 *when tcb_desc->use_driver_rate = false
525 */ 525 */
526 if (rtlmac->ht_enable) { 526 if (rtlmac->ht_enable) {
diff --git a/drivers/net/wireless/rtlwifi/efuse.c b/drivers/net/wireless/rtlwifi/efuse.c
index 4f92cba6810a..590f14f45a89 100644
--- a/drivers/net/wireless/rtlwifi/efuse.c
+++ b/drivers/net/wireless/rtlwifi/efuse.c
@@ -410,8 +410,8 @@ bool efuse_shadow_update(struct ieee80211_hw *hw)
410 410
411 if (!efuse_shadow_update_chk(hw)) { 411 if (!efuse_shadow_update_chk(hw)) {
412 efuse_read_all_map(hw, &rtlefuse->efuse_map[EFUSE_INIT_MAP][0]); 412 efuse_read_all_map(hw, &rtlefuse->efuse_map[EFUSE_INIT_MAP][0]);
413 memcpy((void *)&rtlefuse->efuse_map[EFUSE_MODIFY_MAP][0], 413 memcpy(&rtlefuse->efuse_map[EFUSE_MODIFY_MAP][0],
414 (void *)&rtlefuse->efuse_map[EFUSE_INIT_MAP][0], 414 &rtlefuse->efuse_map[EFUSE_INIT_MAP][0],
415 rtlpriv->cfg->maps[EFUSE_HWSET_MAX_SIZE]); 415 rtlpriv->cfg->maps[EFUSE_HWSET_MAX_SIZE]);
416 416
417 RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD, 417 RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD,
@@ -446,9 +446,9 @@ bool efuse_shadow_update(struct ieee80211_hw *hw)
446 446
447 if (word_en != 0x0F) { 447 if (word_en != 0x0F) {
448 u8 tmpdata[8]; 448 u8 tmpdata[8];
449 memcpy((void *)tmpdata, 449 memcpy(tmpdata,
450 (void *)(&rtlefuse-> 450 &rtlefuse->efuse_map[EFUSE_MODIFY_MAP][base],
451 efuse_map[EFUSE_MODIFY_MAP][base]), 8); 451 8);
452 RT_PRINT_DATA(rtlpriv, COMP_INIT, DBG_LOUD, 452 RT_PRINT_DATA(rtlpriv, COMP_INIT, DBG_LOUD,
453 ("U-efuse\n"), tmpdata, 8); 453 ("U-efuse\n"), tmpdata, 8);
454 454
@@ -465,8 +465,8 @@ bool efuse_shadow_update(struct ieee80211_hw *hw)
465 efuse_power_switch(hw, true, false); 465 efuse_power_switch(hw, true, false);
466 efuse_read_all_map(hw, &rtlefuse->efuse_map[EFUSE_INIT_MAP][0]); 466 efuse_read_all_map(hw, &rtlefuse->efuse_map[EFUSE_INIT_MAP][0]);
467 467
468 memcpy((void *)&rtlefuse->efuse_map[EFUSE_MODIFY_MAP][0], 468 memcpy(&rtlefuse->efuse_map[EFUSE_MODIFY_MAP][0],
469 (void *)&rtlefuse->efuse_map[EFUSE_INIT_MAP][0], 469 &rtlefuse->efuse_map[EFUSE_INIT_MAP][0],
470 rtlpriv->cfg->maps[EFUSE_HWSET_MAX_SIZE]); 470 rtlpriv->cfg->maps[EFUSE_HWSET_MAX_SIZE]);
471 471
472 RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD, ("<---\n")); 472 RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD, ("<---\n"));
@@ -479,13 +479,12 @@ void rtl_efuse_shadow_map_update(struct ieee80211_hw *hw)
479 struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); 479 struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw));
480 480
481 if (rtlefuse->autoload_failflag == true) { 481 if (rtlefuse->autoload_failflag == true) {
482 memset((void *)(&rtlefuse->efuse_map[EFUSE_INIT_MAP][0]), 128, 482 memset(&rtlefuse->efuse_map[EFUSE_INIT_MAP][0], 0xFF, 128);
483 0xFF);
484 } else 483 } else
485 efuse_read_all_map(hw, &rtlefuse->efuse_map[EFUSE_INIT_MAP][0]); 484 efuse_read_all_map(hw, &rtlefuse->efuse_map[EFUSE_INIT_MAP][0]);
486 485
487 memcpy((void *)&rtlefuse->efuse_map[EFUSE_MODIFY_MAP][0], 486 memcpy(&rtlefuse->efuse_map[EFUSE_MODIFY_MAP][0],
488 (void *)&rtlefuse->efuse_map[EFUSE_INIT_MAP][0], 487 &rtlefuse->efuse_map[EFUSE_INIT_MAP][0],
489 rtlpriv->cfg->maps[EFUSE_HWSET_MAX_SIZE]); 488 rtlpriv->cfg->maps[EFUSE_HWSET_MAX_SIZE]);
490 489
491} 490}
@@ -686,7 +685,7 @@ static int efuse_pg_packet_read(struct ieee80211_hw *hw, u8 offset, u8 *data)
686 685
687 u8 efuse_data, word_cnts = 0; 686 u8 efuse_data, word_cnts = 0;
688 u16 efuse_addr = 0; 687 u16 efuse_addr = 0;
689 u8 hworden; 688 u8 hworden = 0;
690 u8 tmpdata[8]; 689 u8 tmpdata[8];
691 690
692 if (data == NULL) 691 if (data == NULL)
@@ -694,8 +693,8 @@ static int efuse_pg_packet_read(struct ieee80211_hw *hw, u8 offset, u8 *data)
694 if (offset > 15) 693 if (offset > 15)
695 return false; 694 return false;
696 695
697 memset((void *)data, PGPKT_DATA_SIZE * sizeof(u8), 0xff); 696 memset(data, 0xff, PGPKT_DATA_SIZE * sizeof(u8));
698 memset((void *)tmpdata, PGPKT_DATA_SIZE * sizeof(u8), 0xff); 697 memset(tmpdata, 0xff, PGPKT_DATA_SIZE * sizeof(u8));
699 698
700 while (bcontinual && (efuse_addr < EFUSE_MAX_SIZE)) { 699 while (bcontinual && (efuse_addr < EFUSE_MAX_SIZE)) {
701 if (readstate & PG_STATE_HEADER) { 700 if (readstate & PG_STATE_HEADER) {
@@ -862,7 +861,7 @@ static void efuse_write_data_case2(struct ieee80211_hw *hw, u16 *efuse_addr,
862 861
863 tmp_word_cnts = efuse_calculate_word_cnts(tmp_pkt.word_en); 862 tmp_word_cnts = efuse_calculate_word_cnts(tmp_pkt.word_en);
864 863
865 memset((void *)originaldata, 8 * sizeof(u8), 0xff); 864 memset(originaldata, 0xff, 8 * sizeof(u8));
866 865
867 if (efuse_pg_packet_read(hw, tmp_pkt.offset, originaldata)) { 866 if (efuse_pg_packet_read(hw, tmp_pkt.offset, originaldata)) {
868 badworden = efuse_word_enable_data_write(hw, 867 badworden = efuse_word_enable_data_write(hw,
@@ -917,7 +916,7 @@ static int efuse_pg_packet_write(struct ieee80211_hw *hw,
917 target_pkt.offset = offset; 916 target_pkt.offset = offset;
918 target_pkt.word_en = word_en; 917 target_pkt.word_en = word_en;
919 918
920 memset((void *)target_pkt.data, 8 * sizeof(u8), 0xFF); 919 memset(target_pkt.data, 0xFF, 8 * sizeof(u8));
921 920
922 efuse_word_enable_data_read(word_en, data, target_pkt.data); 921 efuse_word_enable_data_read(word_en, data, target_pkt.data);
923 target_word_cnts = efuse_calculate_word_cnts(target_pkt.word_en); 922 target_word_cnts = efuse_calculate_word_cnts(target_pkt.word_en);
@@ -1022,7 +1021,7 @@ static u8 efuse_word_enable_data_write(struct ieee80211_hw *hw,
1022 u8 badworden = 0x0F; 1021 u8 badworden = 0x0F;
1023 u8 tmpdata[8]; 1022 u8 tmpdata[8];
1024 1023
1025 memset((void *)tmpdata, PGPKT_DATA_SIZE, 0xff); 1024 memset(tmpdata, 0xff, PGPKT_DATA_SIZE);
1026 RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD, 1025 RT_TRACE(rtlpriv, COMP_EFUSE, DBG_LOUD,
1027 ("word_en = %x efuse_addr=%x\n", word_en, efuse_addr)); 1026 ("word_en = %x efuse_addr=%x\n", word_en, efuse_addr));
1028 1027
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
index baa2efeeedf6..c3a8c0965c07 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -395,7 +395,7 @@ static void rtl_pci_init_aspm(struct ieee80211_hw *hw)
395 * 0 - Disable ASPM, 395 * 0 - Disable ASPM,
396 * 1 - Enable ASPM without Clock Req, 396 * 1 - Enable ASPM without Clock Req,
397 * 2 - Enable ASPM with Clock Req, 397 * 2 - Enable ASPM with Clock Req,
398 * 3 - Alwyas Enable ASPM with Clock Req, 398 * 3 - Always Enable ASPM with Clock Req,
399 * 4 - Always Enable ASPM without Clock Req. 399 * 4 - Always Enable ASPM without Clock Req.
400 * set defult to RTL8192CE:3 RTL8192E:2 400 * set defult to RTL8192CE:3 RTL8192E:2
401 * */ 401 * */
diff --git a/drivers/net/wireless/rtlwifi/regd.c b/drivers/net/wireless/rtlwifi/regd.c
index 3336ca999dfd..d26f957981ad 100644
--- a/drivers/net/wireless/rtlwifi/regd.c
+++ b/drivers/net/wireless/rtlwifi/regd.c
@@ -179,7 +179,7 @@ static void _rtl_reg_apply_active_scan_flags(struct wiphy *wiphy,
179 } 179 }
180 180
181 /* 181 /*
182 *If a country IE has been recieved check its rule for this 182 *If a country IE has been received check its rule for this
183 *channel first before enabling active scan. The passive scan 183 *channel first before enabling active scan. The passive scan
184 *would have been enforced by the initial processing of our 184 *would have been enforced by the initial processing of our
185 *custom regulatory domain. 185 *custom regulatory domain.
diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c
index 5ef91374b230..28a6ce3bc239 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c
@@ -303,7 +303,7 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw,
303 u16 box_reg, box_extreg; 303 u16 box_reg, box_extreg;
304 u8 u1b_tmp; 304 u8 u1b_tmp;
305 bool isfw_read = false; 305 bool isfw_read = false;
306 u8 buf_index; 306 u8 buf_index = 0;
307 bool bwrite_sucess = false; 307 bool bwrite_sucess = false;
308 u8 wait_h2c_limmit = 100; 308 u8 wait_h2c_limmit = 100;
309 u8 wait_writeh2c_limmit = 100; 309 u8 wait_writeh2c_limmit = 100;
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
index a4b2613d6a8c..f5d85735d642 100644
--- a/drivers/net/wireless/rtlwifi/usb.c
+++ b/drivers/net/wireless/rtlwifi/usb.c
@@ -246,7 +246,7 @@ static void _rtl_usb_io_handler_init(struct device *dev,
246 246
247static void _rtl_usb_io_handler_release(struct ieee80211_hw *hw) 247static void _rtl_usb_io_handler_release(struct ieee80211_hw *hw)
248{ 248{
249 struct rtl_priv *rtlpriv = rtl_priv(hw); 249 struct rtl_priv __maybe_unused *rtlpriv = rtl_priv(hw);
250 250
251 mutex_destroy(&rtlpriv->io.bb_mutex); 251 mutex_destroy(&rtlpriv->io.bb_mutex);
252} 252}
diff --git a/drivers/net/wireless/rtlwifi/wifi.h b/drivers/net/wireless/rtlwifi/wifi.h
index 01226f8e70f9..07db95ff9bc5 100644
--- a/drivers/net/wireless/rtlwifi/wifi.h
+++ b/drivers/net/wireless/rtlwifi/wifi.h
@@ -1555,7 +1555,7 @@ struct rtl_priv {
1555 1555
1556 1556
1557/*************************************** 1557/***************************************
1558 Bluetooth Co-existance Related 1558 Bluetooth Co-existence Related
1559****************************************/ 1559****************************************/
1560 1560
1561enum bt_ant_num { 1561enum bt_ant_num {
diff --git a/drivers/net/wireless/wl1251/cmd.c b/drivers/net/wireless/wl1251/cmd.c
index 0ade4bd617c0..81f164bc4888 100644
--- a/drivers/net/wireless/wl1251/cmd.c
+++ b/drivers/net/wireless/wl1251/cmd.c
@@ -104,7 +104,7 @@ int wl1251_cmd_test(struct wl1251 *wl, void *buf, size_t buf_len, u8 answer)
104 * @wl: wl struct 104 * @wl: wl struct
105 * @id: acx id 105 * @id: acx id
106 * @buf: buffer for the response, including all headers, must work with dma 106 * @buf: buffer for the response, including all headers, must work with dma
107 * @len: lenght of buf 107 * @len: length of buf
108 */ 108 */
109int wl1251_cmd_interrogate(struct wl1251 *wl, u16 id, void *buf, size_t len) 109int wl1251_cmd_interrogate(struct wl1251 *wl, u16 id, void *buf, size_t len)
110{ 110{
diff --git a/drivers/net/wireless/wl1251/rx.c b/drivers/net/wireless/wl1251/rx.c
index c1b3b3f03da2..6af35265c900 100644
--- a/drivers/net/wireless/wl1251/rx.c
+++ b/drivers/net/wireless/wl1251/rx.c
@@ -179,7 +179,7 @@ static void wl1251_rx_body(struct wl1251 *wl,
179 rx_buffer = skb_put(skb, length); 179 rx_buffer = skb_put(skb, length);
180 wl1251_mem_read(wl, rx_packet_ring_addr, rx_buffer, length); 180 wl1251_mem_read(wl, rx_packet_ring_addr, rx_buffer, length);
181 181
182 /* The actual lenght doesn't include the target's alignment */ 182 /* The actual length doesn't include the target's alignment */
183 skb->len = desc->length - PLCP_HEADER_LENGTH; 183 skb->len = desc->length - PLCP_HEADER_LENGTH;
184 184
185 fc = (u16 *)skb->data; 185 fc = (u16 *)skb->data;
diff --git a/drivers/net/wireless/wl1251/sdio.c b/drivers/net/wireless/wl1251/sdio.c
index d550b5e68d3c..f51a0241a440 100644
--- a/drivers/net/wireless/wl1251/sdio.c
+++ b/drivers/net/wireless/wl1251/sdio.c
@@ -265,7 +265,7 @@ static int wl1251_sdio_probe(struct sdio_func *func,
265 goto disable; 265 goto disable;
266 } 266 }
267 267
268 set_irq_type(wl->irq, IRQ_TYPE_EDGE_RISING); 268 irq_set_irq_type(wl->irq, IRQ_TYPE_EDGE_RISING);
269 disable_irq(wl->irq); 269 disable_irq(wl->irq);
270 270
271 wl1251_sdio_ops.enable_irq = wl1251_enable_line_irq; 271 wl1251_sdio_ops.enable_irq = wl1251_enable_line_irq;
diff --git a/drivers/net/wireless/wl1251/spi.c b/drivers/net/wireless/wl1251/spi.c
index ac872b38960f..af6448c4d3e2 100644
--- a/drivers/net/wireless/wl1251/spi.c
+++ b/drivers/net/wireless/wl1251/spi.c
@@ -286,7 +286,7 @@ static int __devinit wl1251_spi_probe(struct spi_device *spi)
286 goto out_free; 286 goto out_free;
287 } 287 }
288 288
289 set_irq_type(wl->irq, IRQ_TYPE_EDGE_RISING); 289 irq_set_irq_type(wl->irq, IRQ_TYPE_EDGE_RISING);
290 290
291 disable_irq(wl->irq); 291 disable_irq(wl->irq);
292 292
diff --git a/drivers/net/wireless/wl12xx/cmd.c b/drivers/net/wireless/wl12xx/cmd.c
index f0aa7ab97bf7..96324336f936 100644
--- a/drivers/net/wireless/wl12xx/cmd.c
+++ b/drivers/net/wireless/wl12xx/cmd.c
@@ -359,7 +359,7 @@ int wl1271_cmd_test(struct wl1271 *wl, void *buf, size_t buf_len, u8 answer)
359 * @wl: wl struct 359 * @wl: wl struct
360 * @id: acx id 360 * @id: acx id
361 * @buf: buffer for the response, including all headers, must work with dma 361 * @buf: buffer for the response, including all headers, must work with dma
362 * @len: lenght of buf 362 * @len: length of buf
363 */ 363 */
364int wl1271_cmd_interrogate(struct wl1271 *wl, u16 id, void *buf, size_t len) 364int wl1271_cmd_interrogate(struct wl1271 *wl, u16 id, void *buf, size_t len)
365{ 365{
diff --git a/drivers/net/wireless/wl12xx/conf.h b/drivers/net/wireless/wl12xx/conf.h
index 856a8a2fff4f..8a8323896eec 100644
--- a/drivers/net/wireless/wl12xx/conf.h
+++ b/drivers/net/wireless/wl12xx/conf.h
@@ -497,7 +497,7 @@ struct conf_rx_settings {
497#define CONF_TX_RATE_RETRY_LIMIT 10 497#define CONF_TX_RATE_RETRY_LIMIT 10
498 498
499/* 499/*
500 * Rates supported for data packets when operating as AP. Note the absense 500 * Rates supported for data packets when operating as AP. Note the absence
501 * of the 22Mbps rate. There is a FW limitation on 12 rates so we must drop 501 * of the 22Mbps rate. There is a FW limitation on 12 rates so we must drop
502 * one. The rate dropped is not mandatory under any operating mode. 502 * one. The rate dropped is not mandatory under any operating mode.
503 */ 503 */
@@ -572,7 +572,7 @@ enum conf_tx_ac {
572 CONF_TX_AC_BK = 1, /* background */ 572 CONF_TX_AC_BK = 1, /* background */
573 CONF_TX_AC_VI = 2, /* video */ 573 CONF_TX_AC_VI = 2, /* video */
574 CONF_TX_AC_VO = 3, /* voice */ 574 CONF_TX_AC_VO = 3, /* voice */
575 CONF_TX_AC_CTS2SELF = 4, /* fictious AC, follows AC_VO */ 575 CONF_TX_AC_CTS2SELF = 4, /* fictitious AC, follows AC_VO */
576 CONF_TX_AC_ANY_TID = 0x1f 576 CONF_TX_AC_ANY_TID = 0x1f
577}; 577};
578 578
@@ -1169,7 +1169,7 @@ struct conf_memory_settings {
1169 1169
1170 /* 1170 /*
1171 * Minimum required free tx memory blocks in order to assure optimum 1171 * Minimum required free tx memory blocks in order to assure optimum
1172 * performence 1172 * performance
1173 * 1173 *
1174 * Range: 0-120 1174 * Range: 0-120
1175 */ 1175 */
@@ -1177,7 +1177,7 @@ struct conf_memory_settings {
1177 1177
1178 /* 1178 /*
1179 * Minimum required free rx memory blocks in order to assure optimum 1179 * Minimum required free rx memory blocks in order to assure optimum
1180 * performence 1180 * performance
1181 * 1181 *
1182 * Range: 0-120 1182 * Range: 0-120
1183 */ 1183 */
diff --git a/drivers/net/wireless/wl12xx/io.h b/drivers/net/wireless/wl12xx/io.h
index c1aac8292089..00c771ea70bf 100644
--- a/drivers/net/wireless/wl12xx/io.h
+++ b/drivers/net/wireless/wl12xx/io.h
@@ -94,7 +94,7 @@ static inline int wl1271_translate_addr(struct wl1271 *wl, int addr)
94 * translated region. 94 * translated region.
95 * 95 *
96 * The translated regions occur next to each other in physical device 96 * The translated regions occur next to each other in physical device
97 * memory, so just add the sizes of the preceeding address regions to 97 * memory, so just add the sizes of the preceding address regions to
98 * get the offset to the new region. 98 * get the offset to the new region.
99 * 99 *
100 * Currently, only the two first regions are addressed, and the 100 * Currently, only the two first regions are addressed, and the
diff --git a/drivers/net/wireless/wl12xx/sdio.c b/drivers/net/wireless/wl12xx/sdio.c
index 5b9dbeafec06..b1c7d031c391 100644
--- a/drivers/net/wireless/wl12xx/sdio.c
+++ b/drivers/net/wireless/wl12xx/sdio.c
@@ -340,7 +340,7 @@ module_init(wl1271_init);
340module_exit(wl1271_exit); 340module_exit(wl1271_exit);
341 341
342MODULE_LICENSE("GPL"); 342MODULE_LICENSE("GPL");
343MODULE_AUTHOR("Luciano Coelho <luciano.coelho@nokia.com>"); 343MODULE_AUTHOR("Luciano Coelho <coelho@ti.com>");
344MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>"); 344MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>");
345MODULE_FIRMWARE(WL1271_FW_NAME); 345MODULE_FIRMWARE(WL1271_FW_NAME);
346MODULE_FIRMWARE(WL1271_AP_FW_NAME); 346MODULE_FIRMWARE(WL1271_AP_FW_NAME);
diff --git a/drivers/net/wireless/wl12xx/spi.c b/drivers/net/wireless/wl12xx/spi.c
index 18cf01719ae0..ffc745b17f4d 100644
--- a/drivers/net/wireless/wl12xx/spi.c
+++ b/drivers/net/wireless/wl12xx/spi.c
@@ -487,7 +487,7 @@ module_init(wl1271_init);
487module_exit(wl1271_exit); 487module_exit(wl1271_exit);
488 488
489MODULE_LICENSE("GPL"); 489MODULE_LICENSE("GPL");
490MODULE_AUTHOR("Luciano Coelho <luciano.coelho@nokia.com>"); 490MODULE_AUTHOR("Luciano Coelho <coelho@ti.com>");
491MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>"); 491MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>");
492MODULE_FIRMWARE(WL1271_FW_NAME); 492MODULE_FIRMWARE(WL1271_FW_NAME);
493MODULE_FIRMWARE(WL1271_AP_FW_NAME); 493MODULE_FIRMWARE(WL1271_AP_FW_NAME);
diff --git a/drivers/net/wireless/wl12xx/testmode.c b/drivers/net/wireless/wl12xx/testmode.c
index e64403b6896d..6ec06a4a4c6d 100644
--- a/drivers/net/wireless/wl12xx/testmode.c
+++ b/drivers/net/wireless/wl12xx/testmode.c
@@ -204,7 +204,10 @@ static int wl1271_tm_cmd_nvs_push(struct wl1271 *wl, struct nlattr *tb[])
204 204
205 kfree(wl->nvs); 205 kfree(wl->nvs);
206 206
207 wl->nvs = kzalloc(sizeof(struct wl1271_nvs_file), GFP_KERNEL); 207 if (len != sizeof(struct wl1271_nvs_file))
208 return -EINVAL;
209
210 wl->nvs = kzalloc(len, GFP_KERNEL);
208 if (!wl->nvs) { 211 if (!wl->nvs) {
209 wl1271_error("could not allocate memory for the nvs file"); 212 wl1271_error("could not allocate memory for the nvs file");
210 ret = -ENOMEM; 213 ret = -ENOMEM;
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index 3e5befe4d03b..fc08f36fe1f5 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -290,7 +290,7 @@ static void wl3501_get_from_wla(struct wl3501_card *this, u16 src, void *dest,
290 * \ \- IEEE 802.11 -/ \-------------- len --------------/ 290 * \ \- IEEE 802.11 -/ \-------------- len --------------/
291 * \-struct wl3501_80211_tx_hdr--/ \-------- Ethernet Frame -------/ 291 * \-struct wl3501_80211_tx_hdr--/ \-------- Ethernet Frame -------/
292 * 292 *
293 * Return = Postion in Card 293 * Return = Position in Card
294 */ 294 */
295static u16 wl3501_get_tx_buffer(struct wl3501_card *this, u16 len) 295static u16 wl3501_get_tx_buffer(struct wl3501_card *this, u16 len)
296{ 296{
@@ -1932,7 +1932,7 @@ static int wl3501_config(struct pcmcia_device *link)
1932 this->base_addr = dev->base_addr; 1932 this->base_addr = dev->base_addr;
1933 1933
1934 if (!wl3501_get_flash_mac_addr(this)) { 1934 if (!wl3501_get_flash_mac_addr(this)) {
1935 printk(KERN_WARNING "%s: Cant read MAC addr in flash ROM?\n", 1935 printk(KERN_WARNING "%s: Can't read MAC addr in flash ROM?\n",
1936 dev->name); 1936 dev->name);
1937 unregister_netdev(dev); 1937 unregister_netdev(dev);
1938 goto failed; 1938 goto failed;
diff --git a/drivers/net/wireless/zd1211rw/Makefile b/drivers/net/wireless/zd1211rw/Makefile
index 1907eafb9b16..5728a918e508 100644
--- a/drivers/net/wireless/zd1211rw/Makefile
+++ b/drivers/net/wireless/zd1211rw/Makefile
@@ -5,7 +5,5 @@ zd1211rw-objs := zd_chip.o zd_mac.o \
5 zd_rf_al7230b.o zd_rf_uw2453.o \ 5 zd_rf_al7230b.o zd_rf_uw2453.o \
6 zd_rf.o zd_usb.o 6 zd_rf.o zd_usb.o
7 7
8ifeq ($(CONFIG_ZD1211RW_DEBUG),y) 8ccflags-$(CONFIG_ZD1211RW_DEBUG) := -DDEBUG
9EXTRA_CFLAGS += -DDEBUG
10endif
11 9
diff --git a/drivers/net/wireless/zd1211rw/zd_rf_rf2959.c b/drivers/net/wireless/zd1211rw/zd_rf_rf2959.c
index 0597d862fbd2..e36117486c91 100644
--- a/drivers/net/wireless/zd1211rw/zd_rf_rf2959.c
+++ b/drivers/net/wireless/zd1211rw/zd_rf_rf2959.c
@@ -169,7 +169,7 @@ static int rf2959_init_hw(struct zd_rf *rf)
169 { CR85, 0x00 }, { CR86, 0x10 }, { CR87, 0x2A }, 169 { CR85, 0x00 }, { CR86, 0x10 }, { CR87, 0x2A },
170 { CR88, 0x10 }, { CR89, 0x24 }, { CR90, 0x18 }, 170 { CR88, 0x10 }, { CR89, 0x24 }, { CR90, 0x18 },
171 /* { CR91, 0x18 }, */ 171 /* { CR91, 0x18 }, */
172 /* should solve continous CTS frame problems */ 172 /* should solve continuous CTS frame problems */
173 { CR91, 0x00 }, 173 { CR91, 0x00 },
174 { CR92, 0x0a }, { CR93, 0x00 }, { CR94, 0x01 }, 174 { CR92, 0x0a }, { CR93, 0x00 }, { CR94, 0x01 },
175 { CR95, 0x00 }, { CR96, 0x40 }, { CR97, 0x37 }, 175 { CR95, 0x00 }, { CR96, 0x40 }, { CR97, 0x37 },
diff --git a/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c b/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c
index 9e74eb1b67d5..ba0a0ccb1fa0 100644
--- a/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c
+++ b/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c
@@ -353,7 +353,7 @@ static int uw2453_init_hw(struct zd_rf *rf)
353 }; 353 };
354 354
355 static const u32 rv[] = { 355 static const u32 rv[] = {
356 UW2453_REGWRITE(4, 0x2b), /* configure reciever gain */ 356 UW2453_REGWRITE(4, 0x2b), /* configure receiver gain */
357 UW2453_REGWRITE(5, 0x19e4f), /* configure transmitter gain */ 357 UW2453_REGWRITE(5, 0x19e4f), /* configure transmitter gain */
358 UW2453_REGWRITE(6, 0xf81ad), /* enable RX/TX filter tuning */ 358 UW2453_REGWRITE(6, 0xf81ad), /* enable RX/TX filter tuning */
359 UW2453_REGWRITE(7, 0x3fffe), /* disable TX gain in test mode */ 359 UW2453_REGWRITE(7, 0x3fffe), /* disable TX gain in test mode */
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c
index 81e80489a052..ab607bbd6291 100644
--- a/drivers/net/wireless/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/zd1211rw/zd_usb.c
@@ -60,6 +60,7 @@ static struct usb_device_id usb_ids[] = {
60 { USB_DEVICE(0x157e, 0x300a), .driver_info = DEVICE_ZD1211 }, 60 { USB_DEVICE(0x157e, 0x300a), .driver_info = DEVICE_ZD1211 },
61 { USB_DEVICE(0x157e, 0x300b), .driver_info = DEVICE_ZD1211 }, 61 { USB_DEVICE(0x157e, 0x300b), .driver_info = DEVICE_ZD1211 },
62 { USB_DEVICE(0x157e, 0x3204), .driver_info = DEVICE_ZD1211 }, 62 { USB_DEVICE(0x157e, 0x3204), .driver_info = DEVICE_ZD1211 },
63 { USB_DEVICE(0x157e, 0x3207), .driver_info = DEVICE_ZD1211 },
63 { USB_DEVICE(0x1740, 0x2000), .driver_info = DEVICE_ZD1211 }, 64 { USB_DEVICE(0x1740, 0x2000), .driver_info = DEVICE_ZD1211 },
64 { USB_DEVICE(0x6891, 0xa727), .driver_info = DEVICE_ZD1211 }, 65 { USB_DEVICE(0x6891, 0xa727), .driver_info = DEVICE_ZD1211 },
65 /* ZD1211B */ 66 /* ZD1211B */
@@ -642,7 +643,7 @@ static void rx_urb_complete(struct urb *urb)
642 usb = urb->context; 643 usb = urb->context;
643 rx = &usb->rx; 644 rx = &usb->rx;
644 645
645 zd_usb_reset_rx_idle_timer(usb); 646 tasklet_schedule(&rx->reset_timer_tasklet);
646 647
647 if (length%rx->usb_packet_size > rx->usb_packet_size-4) { 648 if (length%rx->usb_packet_size > rx->usb_packet_size-4) {
648 /* If there is an old first fragment, we don't care. */ 649 /* If there is an old first fragment, we don't care. */
@@ -811,6 +812,7 @@ void zd_usb_disable_rx(struct zd_usb *usb)
811 __zd_usb_disable_rx(usb); 812 __zd_usb_disable_rx(usb);
812 mutex_unlock(&rx->setup_mutex); 813 mutex_unlock(&rx->setup_mutex);
813 814
815 tasklet_kill(&rx->reset_timer_tasklet);
814 cancel_delayed_work_sync(&rx->idle_work); 816 cancel_delayed_work_sync(&rx->idle_work);
815} 817}
816 818
@@ -1105,6 +1107,13 @@ static void zd_rx_idle_timer_handler(struct work_struct *work)
1105 zd_usb_reset_rx(usb); 1107 zd_usb_reset_rx(usb);
1106} 1108}
1107 1109
1110static void zd_usb_reset_rx_idle_timer_tasklet(unsigned long param)
1111{
1112 struct zd_usb *usb = (struct zd_usb *)param;
1113
1114 zd_usb_reset_rx_idle_timer(usb);
1115}
1116
1108void zd_usb_reset_rx_idle_timer(struct zd_usb *usb) 1117void zd_usb_reset_rx_idle_timer(struct zd_usb *usb)
1109{ 1118{
1110 struct zd_usb_rx *rx = &usb->rx; 1119 struct zd_usb_rx *rx = &usb->rx;
@@ -1126,6 +1135,7 @@ static inline void init_usb_interrupt(struct zd_usb *usb)
1126static inline void init_usb_rx(struct zd_usb *usb) 1135static inline void init_usb_rx(struct zd_usb *usb)
1127{ 1136{
1128 struct zd_usb_rx *rx = &usb->rx; 1137 struct zd_usb_rx *rx = &usb->rx;
1138
1129 spin_lock_init(&rx->lock); 1139 spin_lock_init(&rx->lock);
1130 mutex_init(&rx->setup_mutex); 1140 mutex_init(&rx->setup_mutex);
1131 if (interface_to_usbdev(usb->intf)->speed == USB_SPEED_HIGH) { 1141 if (interface_to_usbdev(usb->intf)->speed == USB_SPEED_HIGH) {
@@ -1135,11 +1145,14 @@ static inline void init_usb_rx(struct zd_usb *usb)
1135 } 1145 }
1136 ZD_ASSERT(rx->fragment_length == 0); 1146 ZD_ASSERT(rx->fragment_length == 0);
1137 INIT_DELAYED_WORK(&rx->idle_work, zd_rx_idle_timer_handler); 1147 INIT_DELAYED_WORK(&rx->idle_work, zd_rx_idle_timer_handler);
1148 rx->reset_timer_tasklet.func = zd_usb_reset_rx_idle_timer_tasklet;
1149 rx->reset_timer_tasklet.data = (unsigned long)usb;
1138} 1150}
1139 1151
1140static inline void init_usb_tx(struct zd_usb *usb) 1152static inline void init_usb_tx(struct zd_usb *usb)
1141{ 1153{
1142 struct zd_usb_tx *tx = &usb->tx; 1154 struct zd_usb_tx *tx = &usb->tx;
1155
1143 spin_lock_init(&tx->lock); 1156 spin_lock_init(&tx->lock);
1144 atomic_set(&tx->enabled, 0); 1157 atomic_set(&tx->enabled, 0);
1145 tx->stopped = 0; 1158 tx->stopped = 0;
@@ -1670,6 +1683,10 @@ static void iowrite16v_urb_complete(struct urb *urb)
1670 1683
1671 if (urb->status && !usb->cmd_error) 1684 if (urb->status && !usb->cmd_error)
1672 usb->cmd_error = urb->status; 1685 usb->cmd_error = urb->status;
1686
1687 if (!usb->cmd_error &&
1688 urb->actual_length != urb->transfer_buffer_length)
1689 usb->cmd_error = -EIO;
1673} 1690}
1674 1691
1675static int zd_submit_waiting_urb(struct zd_usb *usb, bool last) 1692static int zd_submit_waiting_urb(struct zd_usb *usb, bool last)
@@ -1804,7 +1821,7 @@ int zd_usb_iowrite16v_async(struct zd_usb *usb, const struct zd_ioreq16 *ioreqs,
1804 usb_fill_int_urb(urb, udev, usb_sndintpipe(udev, EP_REGS_OUT), 1821 usb_fill_int_urb(urb, udev, usb_sndintpipe(udev, EP_REGS_OUT),
1805 req, req_len, iowrite16v_urb_complete, usb, 1822 req, req_len, iowrite16v_urb_complete, usb,
1806 ep->desc.bInterval); 1823 ep->desc.bInterval);
1807 urb->transfer_flags |= URB_FREE_BUFFER | URB_SHORT_NOT_OK; 1824 urb->transfer_flags |= URB_FREE_BUFFER;
1808 1825
1809 /* Submit previous URB */ 1826 /* Submit previous URB */
1810 r = zd_submit_waiting_urb(usb, false); 1827 r = zd_submit_waiting_urb(usb, false);
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.h b/drivers/net/wireless/zd1211rw/zd_usb.h
index b3df2c8116cc..325d0f989257 100644
--- a/drivers/net/wireless/zd1211rw/zd_usb.h
+++ b/drivers/net/wireless/zd1211rw/zd_usb.h
@@ -183,6 +183,7 @@ struct zd_usb_rx {
183 spinlock_t lock; 183 spinlock_t lock;
184 struct mutex setup_mutex; 184 struct mutex setup_mutex;
185 struct delayed_work idle_work; 185 struct delayed_work idle_work;
186 struct tasklet_struct reset_timer_tasklet;
186 u8 fragment[2 * USB_MAX_RX_SIZE]; 187 u8 fragment[2 * USB_MAX_RX_SIZE];
187 unsigned int fragment_length; 188 unsigned int fragment_length;
188 unsigned int usb_packet_size; 189 unsigned int usb_packet_size;