aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath')
-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/htc_hst.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c1
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c4
-rw-r--r--drivers/net/wireless/ath/ath9k/pci.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/rc.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c4
-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
26 files changed, 64 insertions, 50 deletions
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/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..1ec9bcd6b281 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2546,6 +2546,7 @@ static struct {
2546 { AR_SREV_VERSION_9287, "9287" }, 2546 { AR_SREV_VERSION_9287, "9287" },
2547 { AR_SREV_VERSION_9271, "9271" }, 2547 { AR_SREV_VERSION_9271, "9271" },
2548 { AR_SREV_VERSION_9300, "9300" }, 2548 { AR_SREV_VERSION_9300, "9300" },
2549 { AR_SREV_VERSION_9485, "9485" },
2549}; 2550};
2550 2551
2551/* For devices with external radios */ 2552/* For devices with external radios */
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 524825720a09..dddb85de622d 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
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 a3241cd089b1..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 }
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 26734e53b37f..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)
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 */