Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pcu.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2004-2008 Reyk Floeter <[email protected]>
3  * Copyright (c) 2006-2008 Nick Kossifidis <[email protected]>
4  * Copyright (c) 2007-2008 Matthew W. S. Bell <[email protected]>
5  * Copyright (c) 2007-2008 Luis Rodriguez <[email protected]>
6  * Copyright (c) 2007-2008 Pavel Roskin <[email protected]>
7  * Copyright (c) 2007-2008 Jiri Slaby <[email protected]>
8  *
9  * Permission to use, copy, modify, and distribute this software for any
10  * purpose with or without fee is hereby granted, provided that the above
11  * copyright notice and this permission notice appear in all copies.
12  *
13  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
16  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20  *
21  */
22 
23 /*********************************\
24 * Protocol Control Unit Functions *
25 \*********************************/
26 
27 #include <asm/unaligned.h>
28 
29 #include "ath5k.h"
30 #include "reg.h"
31 #include "debug.h"
32 
82 static const unsigned int ack_rates_high[] =
83 /* Tx -> ACK */
84 /* 1Mb -> 1Mb */ { 0,
85 /* 2MB -> 2Mb */ 1,
86 /* 5.5Mb -> 2Mb */ 1,
87 /* 11Mb -> 2Mb */ 1,
88 /* 6Mb -> 6Mb */ 4,
89 /* 9Mb -> 6Mb */ 4,
90 /* 12Mb -> 12Mb */ 6,
91 /* 18Mb -> 12Mb */ 6,
92 /* 24Mb -> 24Mb */ 8,
93 /* 36Mb -> 24Mb */ 8,
94 /* 48Mb -> 24Mb */ 8,
95 /* 54Mb -> 24Mb */ 8 };
96 
97 /*******************\
98 * Helper functions *
99 \*******************/
100 
112 int
114  int len, struct ieee80211_rate *rate, bool shortpre)
115 {
116  int sifs, preamble, plcp_bits, sym_time;
117  int bitrate, bits, symbols, symbol_bits;
118  int dur;
119 
120  /* Fallback */
121  if (!ah->ah_bwmode) {
123  NULL, band, len, rate);
124 
125  /* subtract difference between long and short preamble */
126  dur = le16_to_cpu(raw_dur);
127  if (shortpre)
128  dur -= 96;
129 
130  return dur;
131  }
132 
133  bitrate = rate->bitrate;
134  preamble = AR5K_INIT_OFDM_PREAMPLE_TIME;
135  plcp_bits = AR5K_INIT_OFDM_PLCP_BITS;
136  sym_time = AR5K_INIT_OFDM_SYMBOL_TIME;
137 
138  switch (ah->ah_bwmode) {
139  case AR5K_BWMODE_40MHZ:
140  sifs = AR5K_INIT_SIFS_TURBO;
142  break;
143  case AR5K_BWMODE_10MHZ:
145  preamble *= 2;
146  sym_time *= 2;
147  break;
148  case AR5K_BWMODE_5MHZ:
150  preamble *= 4;
151  sym_time *= 4;
152  break;
153  default:
155  break;
156  }
157 
158  bits = plcp_bits + (len << 3);
159  /* Bit rate is in 100Kbits */
160  symbol_bits = bitrate * sym_time;
161  symbols = DIV_ROUND_UP(bits * 10, symbol_bits);
162 
163  dur = sifs + preamble + (sym_time * symbols);
164 
165  return dur;
166 }
167 
172 unsigned int
174 {
176  unsigned int slot_time;
177 
178  switch (ah->ah_bwmode) {
179  case AR5K_BWMODE_40MHZ:
180  slot_time = AR5K_INIT_SLOT_TIME_TURBO;
181  break;
182  case AR5K_BWMODE_10MHZ:
183  slot_time = AR5K_INIT_SLOT_TIME_HALF_RATE;
184  break;
185  case AR5K_BWMODE_5MHZ:
187  break;
188  case AR5K_BWMODE_DEFAULT:
189  default:
190  slot_time = AR5K_INIT_SLOT_TIME_DEFAULT;
191  if ((channel->hw_value == AR5K_MODE_11B) && !ah->ah_short_slot)
192  slot_time = AR5K_INIT_SLOT_TIME_B;
193  break;
194  }
195 
196  return slot_time;
197 }
198 
203 unsigned int
205 {
207  unsigned int sifs;
208 
209  switch (ah->ah_bwmode) {
210  case AR5K_BWMODE_40MHZ:
211  sifs = AR5K_INIT_SIFS_TURBO;
212  break;
213  case AR5K_BWMODE_10MHZ:
215  break;
216  case AR5K_BWMODE_5MHZ:
218  break;
219  case AR5K_BWMODE_DEFAULT:
221  default:
222  if (channel->band == IEEE80211_BAND_5GHZ)
224  break;
225  }
226 
227  return sifs;
228 }
229 
240 void
242 {
243  struct ath5k_statistics *stats = &ah->stats;
244 
245  /* Read-And-Clear */
246  stats->ack_fail += ath5k_hw_reg_read(ah, AR5K_ACK_FAIL);
247  stats->rts_fail += ath5k_hw_reg_read(ah, AR5K_RTS_FAIL);
248  stats->rts_ok += ath5k_hw_reg_read(ah, AR5K_RTS_OK);
249  stats->fcs_error += ath5k_hw_reg_read(ah, AR5K_FCS_FAIL);
250  stats->beacons += ath5k_hw_reg_read(ah, AR5K_BEACON_CNT);
251 }
252 
253 
254 /******************\
255 * ACK/CTS Timeouts *
256 \******************/
257 
274 static inline void
275 ath5k_hw_write_rate_duration(struct ath5k_hw *ah)
276 {
277  struct ieee80211_rate *rate;
278  unsigned int i;
279  /* 802.11g covers both OFDM and CCK */
280  u8 band = IEEE80211_BAND_2GHZ;
281 
282  /* Write rate duration table */
283  for (i = 0; i < ah->sbands[band].n_bitrates; i++) {
284  u32 reg;
285  u16 tx_time;
286 
287  if (ah->ah_ack_bitrate_high)
288  rate = &ah->sbands[band].bitrates[ack_rates_high[i]];
289  /* CCK -> 1Mb */
290  else if (i < 4)
291  rate = &ah->sbands[band].bitrates[0];
292  /* OFDM -> 6Mb */
293  else
294  rate = &ah->sbands[band].bitrates[4];
295 
296  /* Set ACK timeout */
297  reg = AR5K_RATE_DUR(rate->hw_value);
298 
299  /* An ACK frame consists of 10 bytes. If you add the FCS,
300  * which ieee80211_generic_frame_duration() adds,
301  * its 14 bytes. Note we use the control rate and not the
302  * actual rate for this rate. See mac80211 tx.c
303  * ieee80211_duration() for a brief description of
304  * what rate we should choose to TX ACKs. */
305  tx_time = ath5k_hw_get_frame_duration(ah, band, 10,
306  rate, false);
307 
308  ath5k_hw_reg_write(ah, tx_time, reg);
309 
310  if (!(rate->flags & IEEE80211_RATE_SHORT_PREAMBLE))
311  continue;
312 
313  tx_time = ath5k_hw_get_frame_duration(ah, band, 10, rate, true);
314  ath5k_hw_reg_write(ah, tx_time,
315  reg + (AR5K_SET_SHORT_PREAMBLE << 2));
316  }
317 }
318 
324 static int
325 ath5k_hw_set_ack_timeout(struct ath5k_hw *ah, unsigned int timeout)
326 {
327  if (ath5k_hw_clocktoh(ah, AR5K_REG_MS(0xffffffff, AR5K_TIME_OUT_ACK))
328  <= timeout)
329  return -EINVAL;
330 
332  ath5k_hw_htoclock(ah, timeout));
333 
334  return 0;
335 }
336 
342 static int
343 ath5k_hw_set_cts_timeout(struct ath5k_hw *ah, unsigned int timeout)
344 {
345  if (ath5k_hw_clocktoh(ah, AR5K_REG_MS(0xffffffff, AR5K_TIME_OUT_CTS))
346  <= timeout)
347  return -EINVAL;
348 
350  ath5k_hw_htoclock(ah, timeout));
351 
352  return 0;
353 }
354 
355 
356 /*******************\
357 * RX filter Control *
358 \*******************/
359 
367 int
368 ath5k_hw_set_lladdr(struct ath5k_hw *ah, const u8 *mac)
369 {
370  struct ath_common *common = ath5k_hw_common(ah);
371  u32 low_id, high_id;
372  u32 pcu_reg;
373 
374  /* Set new station ID */
375  memcpy(common->macaddr, mac, ETH_ALEN);
376 
377  pcu_reg = ath5k_hw_reg_read(ah, AR5K_STA_ID1) & 0xffff0000;
378 
379  low_id = get_unaligned_le32(mac);
380  high_id = get_unaligned_le16(mac + 4);
381 
382  ath5k_hw_reg_write(ah, low_id, AR5K_STA_ID0);
383  ath5k_hw_reg_write(ah, pcu_reg | high_id, AR5K_STA_ID1);
384 
385  return 0;
386 }
387 
395 void
397 {
398  struct ath_common *common = ath5k_hw_common(ah);
399  u16 tim_offset = 0;
400 
401  /*
402  * Set BSSID mask on 5212
403  */
404  if (ah->ah_version == AR5K_AR5212)
405  ath_hw_setbssidmask(common);
406 
407  /*
408  * Set BSSID
409  */
410  ath5k_hw_reg_write(ah,
411  get_unaligned_le32(common->curbssid),
412  AR5K_BSS_ID0);
413  ath5k_hw_reg_write(ah,
414  get_unaligned_le16(common->curbssid + 4) |
415  ((common->curaid & 0x3fff) << AR5K_BSS_ID1_AID_S),
416  AR5K_BSS_ID1);
417 
418  if (common->curaid == 0) {
420  return;
421  }
422 
424  tim_offset ? tim_offset + 4 : 0);
425 
427 }
428 
444 void
446 {
447  struct ath_common *common = ath5k_hw_common(ah);
448 
449  /* Cache bssid mask so that we can restore it
450  * on reset */
451  memcpy(common->bssidmask, mask, ETH_ALEN);
452  if (ah->ah_version == AR5K_AR5212)
453  ath_hw_setbssidmask(common);
454 }
455 
462 void
463 ath5k_hw_set_mcast_filter(struct ath5k_hw *ah, u32 filter0, u32 filter1)
464 {
465  ath5k_hw_reg_write(ah, filter0, AR5K_MCAST_FILTER0);
466  ath5k_hw_reg_write(ah, filter1, AR5K_MCAST_FILTER1);
467 }
468 
479 u32
481 {
482  u32 data, filter = 0;
483 
484  filter = ath5k_hw_reg_read(ah, AR5K_RX_FILTER);
485 
486  /*Radar detection for 5212*/
487  if (ah->ah_version == AR5K_AR5212) {
488  data = ath5k_hw_reg_read(ah, AR5K_PHY_ERR_FIL);
489 
490  if (data & AR5K_PHY_ERR_FIL_RADAR)
491  filter |= AR5K_RX_FILTER_RADARERR;
493  filter |= AR5K_RX_FILTER_PHYERR;
494  }
495 
496  return filter;
497 }
498 
508 void
510 {
511  u32 data = 0;
512 
513  /* Set PHY error filter register on 5212*/
514  if (ah->ah_version == AR5K_AR5212) {
515  if (filter & AR5K_RX_FILTER_RADARERR)
516  data |= AR5K_PHY_ERR_FIL_RADAR;
517  if (filter & AR5K_RX_FILTER_PHYERR)
519  }
520 
521  /*
522  * The AR5210 uses promiscuous mode to detect radar activity
523  */
524  if (ah->ah_version == AR5K_AR5210 &&
525  (filter & AR5K_RX_FILTER_RADARERR)) {
526  filter &= ~AR5K_RX_FILTER_RADARERR;
527  filter |= AR5K_RX_FILTER_PROM;
528  }
529 
530  /*Zero length DMA (phy error reporting) */
531  if (data)
533  else
535 
536  /*Write RX Filter register*/
537  ath5k_hw_reg_write(ah, filter & 0xff, AR5K_RX_FILTER);
538 
539  /*Write PHY error filter register on 5212*/
540  if (ah->ah_version == AR5K_AR5212)
541  ath5k_hw_reg_write(ah, data, AR5K_PHY_ERR_FIL);
542 
543 }
544 
545 
546 /****************\
547 * Beacon control *
548 \****************/
549 
550 #define ATH5K_MAX_TSF_READ 10
551 
558 u64
560 {
561  u32 tsf_lower, tsf_upper1, tsf_upper2;
562  int i;
563  unsigned long flags;
564 
565  /* This code is time critical - we don't want to be interrupted here */
566  local_irq_save(flags);
567 
568  /*
569  * While reading TSF upper and then lower part, the clock is still
570  * counting (or jumping in case of IBSS merge) so we might get
571  * inconsistent values. To avoid this, we read the upper part again
572  * and check it has not been changed. We make the hypothesis that a
573  * maximum of 3 changes can happens in a row (we use 10 as a safe
574  * value).
575  *
576  * Impact on performance is pretty small, since in most cases, only
577  * 3 register reads are needed.
578  */
579 
580  tsf_upper1 = ath5k_hw_reg_read(ah, AR5K_TSF_U32);
581  for (i = 0; i < ATH5K_MAX_TSF_READ; i++) {
582  tsf_lower = ath5k_hw_reg_read(ah, AR5K_TSF_L32);
583  tsf_upper2 = ath5k_hw_reg_read(ah, AR5K_TSF_U32);
584  if (tsf_upper2 == tsf_upper1)
585  break;
586  tsf_upper1 = tsf_upper2;
587  }
588 
589  local_irq_restore(flags);
590 
591  WARN_ON(i == ATH5K_MAX_TSF_READ);
592 
593  return ((u64)tsf_upper1 << 32) | tsf_lower;
594 }
595 
596 #undef ATH5K_MAX_TSF_READ
597 
605 void
606 ath5k_hw_set_tsf64(struct ath5k_hw *ah, u64 tsf64)
607 {
608  ath5k_hw_reg_write(ah, tsf64 & 0xffffffff, AR5K_TSF_L32);
609  ath5k_hw_reg_write(ah, (tsf64 >> 32) & 0xffffffff, AR5K_TSF_U32);
610 }
611 
618 void
620 {
621  u32 val;
622 
623  val = ath5k_hw_reg_read(ah, AR5K_BEACON) | AR5K_BEACON_RESET_TSF;
624 
625  /*
626  * Each write to the RESET_TSF bit toggles a hardware internal
627  * signal to reset TSF, but if left high it will cause a TSF reset
628  * on the next chip reset as well. Thus we always write the value
629  * twice to clear the signal.
630  */
631  ath5k_hw_reg_write(ah, val, AR5K_BEACON);
632  ath5k_hw_reg_write(ah, val, AR5K_BEACON);
633 }
634 
644 void
646 {
647  u32 timer1, timer2, timer3;
648 
649  /*
650  * Set the additional timers by mode
651  */
652  switch (ah->opmode) {
655  /* In STA mode timer1 is used as next wakeup
656  * timer and timer2 as next CFP duration start
657  * timer. Both in 1/8TUs. */
658  /* TODO: PCF handling */
659  if (ah->ah_version == AR5K_AR5210) {
660  timer1 = 0xffffffff;
661  timer2 = 0xffffffff;
662  } else {
663  timer1 = 0x0000ffff;
664  timer2 = 0x0007ffff;
665  }
666  /* Mark associated AP as PCF incapable for now */
668  break;
671  default:
672  /* On non-STA modes timer1 is used as next DMA
673  * beacon alert (DBA) timer and timer2 as next
674  * software beacon alert. Both in 1/8TUs. */
675  timer1 = (next_beacon - AR5K_TUNE_DMA_BEACON_RESP) << 3;
676  timer2 = (next_beacon - AR5K_TUNE_SW_BEACON_RESP) << 3;
677  break;
678  }
679 
680  /* Timer3 marks the end of our ATIM window
681  * a zero length window is not allowed because
682  * we 'll get no beacons */
683  timer3 = next_beacon + 1;
684 
685  /*
686  * Set the beacon register and enable all timers.
687  */
688  /* When in AP or Mesh Point mode zero timer0 to start TSF */
689  if (ah->opmode == NL80211_IFTYPE_AP ||
691  ath5k_hw_reg_write(ah, 0, AR5K_TIMER0);
692 
693  ath5k_hw_reg_write(ah, next_beacon, AR5K_TIMER0);
694  ath5k_hw_reg_write(ah, timer1, AR5K_TIMER1);
695  ath5k_hw_reg_write(ah, timer2, AR5K_TIMER2);
696  ath5k_hw_reg_write(ah, timer3, AR5K_TIMER3);
697 
698  /* Force a TSF reset if requested and enable beacons */
699  if (interval & AR5K_BEACON_RESET_TSF)
700  ath5k_hw_reset_tsf(ah);
701 
702  ath5k_hw_reg_write(ah, interval & (AR5K_BEACON_PERIOD |
704  AR5K_BEACON);
705 
706  /* Flush any pending BMISS interrupts on ISR by
707  * performing a clear-on-write operation on PISR
708  * register for the BMISS bit (writing a bit on
709  * ISR toggles a reset for that bit and leaves
710  * the remaining bits intact) */
711  if (ah->ah_version == AR5K_AR5210)
712  ath5k_hw_reg_write(ah, AR5K_ISR_BMISS, AR5K_ISR);
713  else
714  ath5k_hw_reg_write(ah, AR5K_ISR_BMISS, AR5K_PISR);
715 
716  /* TODO: Set enhanced sleep registers on AR5212
717  * based on vif->bss_conf params, until then
718  * disable power save reporting.*/
720 
721 }
722 
736 static inline bool
737 ath5k_check_timer_win(int a, int b, int window, int intval)
738 {
739  /*
740  * 1.) usually B should be A + window
741  * 2.) A already updated, B not updated yet
742  * 3.) A already updated and has wrapped around
743  * 4.) B has wrapped around
744  */
745  if ((b - a == window) || /* 1.) */
746  (a - b == intval - window) || /* 2.) */
747  ((a | 0x10000) - b == intval - window) || /* 3.) */
748  ((b | 0x10000) - a == window)) /* 4.) */
749  return true; /* O.K. */
750  return false;
751 }
752 
792 bool
793 ath5k_hw_check_beacon_timers(struct ath5k_hw *ah, int intval)
794 {
795  unsigned int nbtt, atim, dma;
796 
797  nbtt = ath5k_hw_reg_read(ah, AR5K_TIMER0);
798  atim = ath5k_hw_reg_read(ah, AR5K_TIMER3);
799  dma = ath5k_hw_reg_read(ah, AR5K_TIMER1) >> 3;
800 
801  /* NOTE: SWBA is different. Having a wrong window there does not
802  * stop us from sending data and this condition is caught by
803  * other means (SWBA interrupt) */
804 
805  if (ath5k_check_timer_win(nbtt, atim, 1, intval) &&
806  ath5k_check_timer_win(dma, nbtt, AR5K_TUNE_DMA_BEACON_RESP,
807  intval))
808  return true; /* O.K. */
809  return false;
810 }
811 
819 void
821 {
822  /* As defined by IEEE 802.11-2007 17.3.8.6 */
823  int slot_time = ath5k_hw_get_default_slottime(ah) + 3 * coverage_class;
824  int ack_timeout = ath5k_hw_get_default_sifs(ah) + slot_time;
825  int cts_timeout = ack_timeout;
826 
827  ath5k_hw_set_ifs_intervals(ah, slot_time);
828  ath5k_hw_set_ack_timeout(ah, ack_timeout);
829  ath5k_hw_set_cts_timeout(ah, cts_timeout);
830 
832 }
833 
834 /***************************\
835 * Init/Start/Stop functions *
836 \***************************/
837 
847 void
849 {
851 }
852 
859 void
861 {
863 }
864 
872 int
873 ath5k_hw_set_opmode(struct ath5k_hw *ah, enum nl80211_iftype op_mode)
874 {
875  struct ath_common *common = ath5k_hw_common(ah);
876  u32 pcu_reg, beacon_reg, low_id, high_id;
877 
878  ATH5K_DBG(ah, ATH5K_DEBUG_MODE, "mode %d\n", op_mode);
879 
880  /* Preserve rest settings */
881  pcu_reg = ath5k_hw_reg_read(ah, AR5K_STA_ID1) & 0xffff0000;
882  pcu_reg &= ~(AR5K_STA_ID1_ADHOC | AR5K_STA_ID1_AP
884  | (ah->ah_version == AR5K_AR5210 ?
886 
887  beacon_reg = 0;
888 
889  switch (op_mode) {
892  beacon_reg |= AR5K_BCR_ADHOC;
893  if (ah->ah_version == AR5K_AR5210)
894  pcu_reg |= AR5K_STA_ID1_NO_PSPOLL;
895  else
897  break;
898 
899  case NL80211_IFTYPE_AP:
902  beacon_reg |= AR5K_BCR_AP;
903  if (ah->ah_version == AR5K_AR5210)
904  pcu_reg |= AR5K_STA_ID1_NO_PSPOLL;
905  else
907  break;
908 
910  pcu_reg |= AR5K_STA_ID1_KEYSRCH_MODE
911  | (ah->ah_version == AR5K_AR5210 ?
912  AR5K_STA_ID1_PWR_SV : 0);
914  pcu_reg |= AR5K_STA_ID1_KEYSRCH_MODE
915  | (ah->ah_version == AR5K_AR5210 ?
917  break;
918 
919  default:
920  return -EINVAL;
921  }
922 
923  /*
924  * Set PCU registers
925  */
926  low_id = get_unaligned_le32(common->macaddr);
927  high_id = get_unaligned_le16(common->macaddr + 4);
928  ath5k_hw_reg_write(ah, low_id, AR5K_STA_ID0);
929  ath5k_hw_reg_write(ah, pcu_reg | high_id, AR5K_STA_ID1);
930 
931  /*
932  * Set Beacon Control Register on 5210
933  */
934  if (ah->ah_version == AR5K_AR5210)
935  ath5k_hw_reg_write(ah, beacon_reg, AR5K_BCR);
936 
937  return 0;
938 }
939 
949 void
950 ath5k_hw_pcu_init(struct ath5k_hw *ah, enum nl80211_iftype op_mode)
951 {
952  /* Set bssid and bssid mask */
953  ath5k_hw_set_bssid(ah);
954 
955  /* Set PCU config */
956  ath5k_hw_set_opmode(ah, op_mode);
957 
958  /* Write rate duration table only on AR5212 and if
959  * virtual interface has already been brought up
960  * XXX: rethink this after new mode changes to
961  * mac80211 are integrated */
962  if (ah->ah_version == AR5K_AR5212 &&
963  ah->nvifs)
964  ath5k_hw_write_rate_duration(ah);
965 
966  /* Set RSSI/BRSSI thresholds
967  *
968  * Note: If we decide to set this value
969  * dynamically, have in mind that when AR5K_RSSI_THR
970  * register is read it might return 0x40 if we haven't
971  * wrote anything to it plus BMISS RSSI threshold is zeroed.
972  * So doing a save/restore procedure here isn't the right
973  * choice. Instead store it on ath5k_hw */
974  ath5k_hw_reg_write(ah, (AR5K_TUNE_RSSI_THRES |
977  AR5K_RSSI_THR);
978 
979  /* MIC QoS support */
980  if (ah->ah_mac_srev >= AR5K_SREV_AR2413) {
981  ath5k_hw_reg_write(ah, 0x000100aa, AR5K_MIC_QOS_CTL);
982  ath5k_hw_reg_write(ah, 0x00003210, AR5K_MIC_QOS_SEL);
983  }
984 
985  /* QoS NOACK Policy */
986  if (ah->ah_version == AR5K_AR5212) {
987  ath5k_hw_reg_write(ah,
992  }
993 
994  /* Restore slot time and ACK timeouts */
995  if (ah->ah_coverage_class > 0)
997 
998  /* Set ACK bitrate mode (see ack_rates_high) */
999  if (ah->ah_version == AR5K_AR5212) {
1001  if (ah->ah_ack_bitrate_high)
1003  else
1005  }
1006  return;
1007 }