Changeset 2360
- Timestamp:
- 05/21/07 19:33:26 (2 years ago)
- Files:
-
- trunk/ath/if_ath.c (modified) (63 diffs)
- trunk/ath/if_ath_pci.c (modified) (1 diff)
- trunk/ath/if_athvar.h (modified) (10 diffs)
- trunk/ath_rate/amrr/amrr.c (modified) (1 diff)
- trunk/ath_rate/minstrel/minstrel.c (modified) (5 diffs)
- trunk/ath_rate/minstrel/minstrel.h (modified) (1 diff)
- trunk/ath_rate/onoe/onoe.c (modified) (1 diff)
- trunk/ath_rate/sample/sample.c (modified) (29 diffs)
- trunk/ath_rate/sample/sample.h (modified) (1 diff)
- trunk/hal/ah.h (modified) (21 diffs)
- trunk/hal/ah_desc.h (modified) (8 diffs)
- trunk/hal/ah_devid.h (modified) (1 diff)
- trunk/hal/public/alpha-elf.hal.o.uu (modified) (previous)
- trunk/hal/public/alpha-elf.inc (modified) (1 diff)
- trunk/hal/public/alpha-elf.opt_ah.h (modified) (1 diff)
- trunk/hal/public/ap30.hal.o.uu (modified) (previous)
- trunk/hal/public/ap43.hal.o.uu (modified) (previous)
- trunk/hal/public/ap51.hal.o.uu (modified) (previous)
- trunk/hal/public/ap61.hal.o.uu (modified) (previous)
- trunk/hal/public/arm9-le-thumb-elf.hal.o.uu (modified) (previous)
- trunk/hal/public/arm9-le-thumb-elf.opt_ah.h (modified) (1 diff)
- trunk/hal/public/armv4-be-elf.hal.o.uu (modified) (previous)
- trunk/hal/public/armv4-be-elf.opt_ah.h (modified) (1 diff)
- trunk/hal/public/armv4-le-elf.hal.o.uu (modified) (previous)
- trunk/hal/public/armv4-le-elf.opt_ah.h (modified) (1 diff)
- trunk/hal/public/i386-elf.hal.o.uu (modified) (previous)
- trunk/hal/public/i386-elf.opt_ah.h (modified) (1 diff)
- trunk/hal/public/mips-be-elf.hal.o.uu (modified) (previous)
- trunk/hal/public/mips-be-elf.opt_ah.h (modified) (1 diff)
- trunk/hal/public/mips-le-elf.hal.o.uu (modified) (previous)
- trunk/hal/public/mips-le-elf.opt_ah.h (modified) (1 diff)
- trunk/hal/public/mips1-be-elf.hal.o.uu (modified) (previous)
- trunk/hal/public/mips1-be-elf.opt_ah.h (modified) (1 diff)
- trunk/hal/public/mips1-le-elf.hal.o.uu (modified) (previous)
- trunk/hal/public/mips1-le-elf.opt_ah.h (modified) (1 diff)
- trunk/hal/public/mipsisa32-be-elf.hal.o.uu (modified) (previous)
- trunk/hal/public/mipsisa32-be-elf.opt_ah.h (modified) (1 diff)
- trunk/hal/public/mipsisa32-le-elf.hal.o.uu (modified) (previous)
- trunk/hal/public/mipsisa32-le-elf.opt_ah.h (modified) (1 diff)
- trunk/hal/public/powerpc-be-eabi.hal.o.uu (modified) (previous)
- trunk/hal/public/powerpc-be-eabi.opt_ah.h (modified) (1 diff)
- trunk/hal/public/powerpc-be-elf.hal.o.uu (modified) (previous)
- trunk/hal/public/powerpc-be-elf.opt_ah.h (modified) (1 diff)
- trunk/hal/public/powerpc-le-eabi.hal.o.uu (modified) (previous)
- trunk/hal/public/powerpc-le-eabi.opt_ah.h (modified) (1 diff)
- trunk/hal/public/sh4-le-elf.hal.o.uu (modified) (previous)
- trunk/hal/public/sh4-le-elf.opt_ah.h (modified) (1 diff)
- trunk/hal/public/sparc-be-elf.hal.o.uu (modified) (previous)
- trunk/hal/public/sparc-be-elf.opt_ah.h (modified) (1 diff)
- trunk/hal/public/sparc64-be-elf.hal.o.uu (modified) (previous)
- trunk/hal/public/sparc64-be-elf.opt_ah.h (modified) (1 diff)
- trunk/hal/public/x86_64-elf.hal.o.uu (modified) (previous)
- trunk/hal/public/x86_64-elf.opt_ah.h (modified) (1 diff)
- trunk/hal/public/xscale-be-elf.hal.o.uu (modified) (previous)
- trunk/hal/public/xscale-be-elf.opt_ah.h (modified) (1 diff)
- trunk/hal/public/xscale-le-elf.hal.o.uu (modified) (previous)
- trunk/hal/public/xscale-le-elf.opt_ah.h (modified) (1 diff)
- trunk/hal/version.h (modified) (1 diff)
- trunk/net80211/ieee80211_monitor.c (modified) (6 diffs)
- trunk/net80211/ieee80211_monitor.h (modified) (1 diff)
- trunk/net80211/ieee80211_rate.h (modified) (2 diffs)
- trunk/net80211/ieee80211_var.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ath/if_ath.c
r2357 r2360 128 128 static void ath_bmiss_tasklet(TQUEUE_ARG); 129 129 static void ath_bstuck_tasklet(TQUEUE_ARG); 130 static void ath_radar_task(struct work_struct *);131 static void ath_dfs_test_return(unsigned long);132 133 130 static int ath_stop_locked(struct net_device *); 134 131 static int ath_stop(struct net_device *); … … 427 424 ATH_INIT_TQUEUE(&sc->sc_rxorntq, ath_rxorn_tasklet, dev); 428 425 ATH_INIT_TQUEUE(&sc->sc_fataltq, ath_fatal_tasklet, dev); 429 ATH_INIT_WORK(&sc->sc_radartask, ath_radar_task);430 426 431 427 /* … … 636 632 goto bad2; 637 633 } 638 639 634 init_timer(&sc->sc_cal_ch); 640 635 sc->sc_cal_ch.function = ath_calibrate; … … 651 646 sc->sc_ledon = 0; /* low true */ 652 647 sc->sc_ledidle = msecs_to_jiffies(2700); /* 2.7 sec */ 653 sc->sc_dfstesttime = ATH_DFS_TEST_RETURN_PERIOD;654 648 init_timer(&sc->sc_ledtimer); 655 649 init_timer(&sc->sc_dfswaittimer); 656 init_timer(&sc->sc_dfstesttimer);657 650 sc->sc_ledtimer.data = (unsigned long) sc; 658 651 if (sc->sc_softled) { … … 943 936 944 937 ath_hal_setpower(sc->sc_ah, HAL_PM_AWAKE); 945 /* Flush the radar task if it's scheduled */946 if (sc->sc_rtasksched == 1)947 flush_scheduled_work();948 938 949 939 sc->sc_invalid = 1; … … 1335 1325 struct ath_buf *bf; 1336 1326 struct ath_desc *ds; 1327 struct ath_rx_status *rs; 1337 1328 struct sk_buff *skb; 1338 1329 struct ieee80211_node *ni; … … 1399 1390 * a self-linked list to avoid rx overruns. 1400 1391 */ 1401 retval = ath_hal_rxprocdesc(ah, ds, bf->bf_daddr, PA2DESC(sc, ds->ds_link), tsf); 1392 rs = &bf->bf_dsstatus.ds_rxstat; 1393 retval = ath_hal_rxprocdesc(ah, ds, bf->bf_daddr, PA2DESC(sc, ds->ds_link), tsf, rs); 1402 1394 if (HAL_EINPROGRESS == retval) 1403 1395 break; … … 1407 1399 1408 1400 /* Errors? */ 1409 if ( ds->ds_rxstat.rs_status)1401 if (rs->rs_status) 1410 1402 continue; 1411 1403 … … 1416 1408 qwh = (struct ieee80211_qosframe *) skb->data; 1417 1409 1418 /* Find the node. It MUST be in the keycache. */1419 if ( (ds->ds_rxstat.rs_keyix == HAL_RXKEYIX_INVALID)||1420 ( (ni = sc->sc_keyixmap[ds->ds_rxstat.rs_keyix]) == NULL)) {1410 /* Find the node. it MUST be in the keycache. */ 1411 if (rs->rs_keyix == HAL_RXKEYIX_INVALID || 1412 (ni = sc->sc_keyixmap[rs->rs_keyix]) == NULL) { 1421 1413 /* 1422 1414 * XXX: this can occur if WEP mode is used for non-Atheros clients … … 1736 1728 1737 1729 static void 1738 ath_radar_task(struct work_struct *thr)1739 {1740 struct ath_softc *sc = container_of(thr, struct ath_softc, sc_radartask);1741 struct ath_hal *ah = sc->sc_ah;1742 struct ieee80211com *ic = &sc->sc_ic;1743 struct ieee80211_channel ichan;1744 HAL_CHANNEL hchan;1745 1746 sc->sc_rtasksched = 0;1747 if (ath_hal_procdfs(ah, &hchan)) {1748 /*1749 * DFS was found, initiate channel change1750 */1751 ichan.ic_ieee = ath_hal_mhz2ieee(ah, hchan.channel, hchan.channelFlags);1752 ichan.ic_freq = hchan.channel;1753 ichan.ic_flags = hchan.channelFlags;1754 1755 if ((sc->sc_curchan.channel == hchan.channel) &&1756 (sc->sc_curchan.channelFlags == hchan.channel)) {1757 if (hchan.privFlags & CHANNEL_INTERFERENCE)1758 sc->sc_curchan.privFlags |= CHANNEL_INTERFERENCE;1759 }1760 ieee80211_mark_dfs(ic, &ichan);1761 if (((ic->ic_flags_ext & IEEE80211_FEXT_MARKDFS) == 0) &&1762 (ic->ic_opmode == IEEE80211_M_HOSTAP)) {1763 sc->sc_dfstest_ieeechan = ic->ic_curchan->ic_ieee;1764 sc->sc_dfstesttimer.function = ath_dfs_test_return;1765 sc->sc_dfstesttimer.expires = jiffies + (sc->sc_dfstesttime * HZ);1766 sc->sc_dfstesttimer.data = (unsigned long)sc;1767 if (sc->sc_dfstest == 0) {1768 sc->sc_dfstest = 1;1769 add_timer(&sc->sc_dfstesttimer);1770 }1771 }1772 }1773 }1774 1775 static void1776 ath_dfs_test_return(unsigned long data)1777 {1778 struct ath_softc *sc = (struct ath_softc *)data;1779 struct ieee80211com *ic = &sc->sc_ic;1780 1781 sc->sc_dfstest = 0;1782 ieee80211_dfs_test_return(ic, sc->sc_dfstest_ieeechan);1783 }1784 1785 static void1786 1730 ath_fatal_tasklet(TQUEUE_ARG data) 1787 1731 { … … 3562 3506 */ 3563 3507 sc->sc_ignore_ar = 0; 3508 #if 0 /* HAL 0.9.20.3 has no arEnable method */ 3564 3509 ath_hal_ar_enable(sc->sc_ah); 3510 #endif 3565 3511 } 3566 3512 sc->sc_dturbo_tcount++; … … 3662 3608 struct sk_buff *skb; 3663 3609 struct ath_desc *ds; 3610 struct ath_tx_status *ts; 3664 3611 struct ath_hal *ah = sc->sc_ah; 3665 3612 unsigned int slot; … … 3680 3627 skb = bf->bf_skb; 3681 3628 ds = bf->bf_desc; 3682 3683 return (ath_hal_txprocdesc(ah, ds) != HAL_EINPROGRESS); 3629 ts = &bf->bf_dsstatus.ds_txstat; 3630 3631 return (ath_hal_txprocdesc(ah, ds, ts) != HAL_EINPROGRESS); 3684 3632 3685 3633 } … … 3723 3671 */ 3724 3672 sc->sc_ignore_ar = 1; 3673 #if 0 /* HAL 0.9.20.3 has no arDisable method */ 3725 3674 ath_hal_ar_disable(sc->sc_ah); 3675 #endif 3726 3676 } 3727 3677 newflags |= IEEE80211_CHAN_TURBO; … … 4875 4825 struct sk_buff *skb = NULL; 4876 4826 struct ath_desc *ds; 4827 struct ath_tx_status *ts; 4877 4828 HAL_STATUS status; 4878 4829 unsigned int index; … … 4906 4857 ds = bf->bf_desc; /* NB: last descriptor */ 4907 4858 #endif 4908 status = ath_hal_txprocdesc(ah, ds); 4859 ts = &ts->bf_dsstatus.ds_txstat; 4860 status = ath_hal_txprocdesc(ah, ds, ts); 4909 4861 if (status == HAL_EINPROGRESS) 4910 4862 break; … … 4964 4916 ds = prev->bf_desc; /* NB: last descriptor */ 4965 4917 #endif 4966 status = ath_hal_txprocdesc(ah, ds); 4918 ts = &bf->bf_dsstatus.ds_txstat; 4919 status = ath_hal_txprocdesc(ah, ds, ts); 4967 4920 if (status == HAL_EINPROGRESS) 4968 4921 txq->axq_link = &ds->ds_link; … … 5037 4990 ds = bf->bf_desc; /* NB: last descriptor */ 5038 4991 #endif 5039 status = ath_hal_txprocdesc(ah, ds); 4992 ts = &bf->bf_dsstatus.ds_txstat; 4993 status = ath_hal_txprocdesc(ah, ds, ts); 5040 4994 if (status == HAL_EINPROGRESS) 5041 4995 break; … … 5112 5066 ds = prev->bf_desc; /* NB: last descriptor */ 5113 5067 #endif 5114 status = ath_hal_txprocdesc(ah, ds); 5068 ts = &bf->bf_dsstatus.ds_txstat; 5069 status = ath_hal_txprocdesc(ah, ds, ts); 5115 5070 if (status == HAL_EINPROGRESS) 5116 5071 txq->axq_link = &ds->ds_link; … … 5176 5131 ds = bf->bf_desc; /* NB: last descriptor */ 5177 5132 #endif 5178 status = ath_hal_txprocdesc(ah, ds); 5133 ts = &bf->bf_dsstatus.ds_txstat; 5134 status = ath_hal_txprocdesc(ah, ds, ts); 5179 5135 if (status == HAL_EINPROGRESS) 5180 5136 break; … … 5287 5243 ds->ds_link = bf->bf_daddr; /* link to self */ 5288 5244 ds->ds_data = bf->bf_skbaddr; 5289 ds->ds_vdata = (void *) skb->data; /* virt addr of buffer */5290 5245 ath_hal_setuprxdesc(ah, ds, 5291 5246 skb_tailroom(skb), /* buffer size */ … … 5317 5272 */ 5318 5273 static void 5319 ath_rx_capture(struct net_device *dev, struct ath_desc *ds, struct sk_buff *skb)5274 ath_rx_capture(struct net_device *dev, const struct ath_buf *bf, struct sk_buff *skb) 5320 5275 { 5321 5276 struct ath_softc *sc = dev->priv; 5277 const struct ath_rx_status *rs = &bf->bf_dsstatus.ds_rxstat; 5322 5278 struct ieee80211com *ic = &sc->sc_ic; 5323 5279 struct ieee80211_frame *wh; … … 5329 5285 * tsf to extend this to 64 bits. 5330 5286 */ 5331 tsf = ath_extend_tsf(sc->sc_ah, ds->ds_rxstat.rs_tstamp); 5287 /* NB: Not all chipsets return the same precision rstamp */ 5288 tsf = ath_extend_tsf(sc->sc_ah, rs->rs_tstamp); 5332 5289 5333 5290 KASSERT(ic->ic_flags & IEEE80211_F_DATAPAD, … … 5344 5301 skb_pull(skb1, padbytes); 5345 5302 } 5346 ieee80211_input_monitor(ic, skb1, ds, 0, tsf, sc);5303 ieee80211_input_monitor(ic, skb1, bf, 0, tsf, sc); 5347 5304 dev_kfree_skb(skb1); 5348 5305 } else { 5349 ieee80211_input_monitor(ic, skb, ds, 0, tsf, sc);5306 ieee80211_input_monitor(ic, skb, bf, 0, tsf, sc); 5350 5307 } 5351 5308 } … … 5353 5310 5354 5311 static void 5355 ath_tx_capture(struct net_device *dev, struct ath_desc *ds,struct sk_buff *skb)5312 ath_tx_capture(struct net_device *dev, const struct ath_buf *bf, struct sk_buff *skb) 5356 5313 { 5357 5314 struct ath_softc *sc = dev->priv; 5315 const struct ath_tx_status *ts = &bf->bf_dsstatus.ds_txstat; 5358 5316 struct ieee80211com *ic = &sc->sc_ic; 5359 5317 struct ieee80211_frame *wh; … … 5368 5326 */ 5369 5327 tsf = ath_hal_gettsf64(sc->sc_ah); 5370 tstamp = ds->ds_txstat.ts_tstamp << 10;5328 tstamp = ts->ts_tstamp << 10; 5371 5329 5372 5330 if ((tsf & 0x3ffffff) < tstamp) … … 5407 5365 goto done; 5408 5366 } 5409 ieee80211_input_monitor(ic, skb, ds, 1, tsf, sc);5367 ieee80211_input_monitor(ic, skb, bf, 1, tsf, sc); 5410 5368 done: 5411 5369 dev_kfree_skb(skb); … … 5495 5453 struct ath_hal *ah = sc->sc_ah; 5496 5454 struct ath_desc *ds; 5455 struct ath_rx_status *rs; 5497 5456 struct sk_buff *skb; 5498 5457 struct ieee80211_node *ni; … … 5538 5497 ath_printrxbuf(bf, 1); 5539 5498 #endif 5540 5541 if ( ds->ds_rxstat.rs_more) {5499 rs = &bf->bf_dsstatus.ds_rxstat; 5500 if (rs->rs_more) { 5542 5501 /* 5543 5502 * Frame spans multiple descriptors; this … … 5557 5516 #endif 5558 5517 /* fall thru for monitor mode handling... */ 5559 } else if ( ds->ds_rxstat.rs_status != 0) {5560 if ( ds->ds_rxstat.rs_status & HAL_RXERR_CRC)5518 } else if (rs->rs_status != 0) { 5519 if (rs->rs_status & HAL_RXERR_CRC) 5561 5520 sc->sc_stats.ast_rx_crcerr++; 5562 if ( ds->ds_rxstat.rs_status & HAL_RXERR_FIFO)5521 if (rs->rs_status & HAL_RXERR_FIFO) 5563 5522 sc->sc_stats.ast_rx_fifoerr++; 5564 if ( ds->ds_rxstat.rs_status & HAL_RXERR_PHY) {5523 if (rs->rs_status & HAL_RXERR_PHY) { 5565 5524 sc->sc_stats.ast_rx_phyerr++; 5566 phyerr = ds->ds_rxstat.rs_phyerr & 0x1f;5525 phyerr = rs->rs_phyerr & 0x1f; 5567 5526 sc->sc_stats.ast_rx_phy[phyerr]++; 5568 5527 } 5569 if ( ds->ds_rxstat.rs_status & HAL_RXERR_DECRYPT) {5528 if (rs->rs_status & HAL_RXERR_DECRYPT) { 5570 5529 /* 5571 5530 * Decrypt error. If the error occurred … … 5578 5537 * XXX do key cache faulting 5579 5538 */ 5580 if ( ds->ds_rxstat.rs_keyix == HAL_RXKEYIX_INVALID)5539 if (rs->rs_keyix == HAL_RXKEYIX_INVALID) 5581 5540 goto rx_accept; 5582 5541 sc->sc_stats.ast_rx_badcrypt++; 5583 5542 } 5584 if ( ds->ds_rxstat.rs_status & HAL_RXERR_MIC) {5543 if (rs->rs_status & HAL_RXERR_MIC) { 5585 5544 sc->sc_stats.ast_rx_badmic++; 5586 5545 /* … … 5589 5548 */ 5590 5549 /* XXX frag's and QoS frames */ 5591 len = ds->ds_rxstat.rs_datalen;5550 len = rs->rs_datalen; 5592 5551 if (len >= sizeof (struct ieee80211_frame)) { 5593 5552 bus_dma_sync_single(sc->sc_bdev, … … 5599 5558 (struct ieee80211_frame *) skb->data, 5600 5559 sc->sc_splitmic ? 5601 ds->ds_rxstat.rs_keyix - 32 : 5602 ds->ds_rxstat.rs_keyix 5560 rs->rs_keyix - 32 : rs->rs_keyix 5603 5561 ); 5604 5562 #endif … … 5619 5577 * to receive another frame. 5620 5578 */ 5621 len = ds->ds_rxstat.rs_datalen;5579 len = rs->rs_datalen; 5622 5580 bus_dma_sync_single(sc->sc_bdev, 5623 5581 bf->bf_skbaddr, len, BUS_DMA_FROMDEVICE); … … 5626 5584 bf->bf_skb = NULL; 5627 5585 5628 sc->sc_stats.ast_ant_rx[ ds->ds_rxstat.rs_antenna]++;5586 sc->sc_stats.ast_ant_rx[rs->rs_antenna]++; 5629 5587 sc->sc_devstats.rx_packets++; 5630 5588 sc->sc_devstats.rx_bytes += len; … … 5648 5606 } 5649 5607 #endif 5650 ath_rx_capture(dev, ds, skb);5608 ath_rx_capture(dev, bf, skb); 5651 5609 if (sc->sc_ic.ic_opmode == IEEE80211_M_MONITOR) { 5652 5610 /* no other VAPs need the packet */ … … 5661 5619 * error frames before passing to other vaps 5662 5620 */ 5663 if ( ds->ds_rxstat.rs_status != 0) {5621 if (rs->rs_status != 0) { 5664 5622 dev_kfree_skb(skb); 5665 5623 skb = NULL; … … 5689 5647 if (IFF_DUMPPKTS(sc, ATH_DEBUG_RECV)) { 5690 5648 ieee80211_dump_pkt(ic, skb->data, skb->len, 5691 sc->sc_hwmap[ ds->ds_rxstat.rs_rate].ieeerate,5692 ds->ds_rxstat.rs_rssi);5649 sc->sc_hwmap[rs->rs_rate].ieeerate, 5650 rs->rs_rssi); 5693 5651 } 5694 5652 … … 5699 5657 * frame; it'll be dropped where it's not wanted. 5700 5658 */ 5701 if ( ds->ds_rxstat.rs_keyix != HAL_RXKEYIX_INVALID &&5702 (ni = sc->sc_keyixmap[ ds->ds_rxstat.rs_keyix]) != NULL) {5659 if (rs->rs_keyix != HAL_RXKEYIX_INVALID && 5660 (ni = sc->sc_keyixmap[rs->rs_keyix]) != NULL) { 5703 5661 struct ath_node *an; 5704 5662 /* … … 5707 5665 */ 5708 5666 an = ATH_NODE(ieee80211_ref_node(ni)); 5709 ATH_RSSI_LPF(an->an_avgrssi, ds->ds_rxstat.rs_rssi); 5710 type = ieee80211_input(ni, skb, 5711 ds->ds_rxstat.rs_rssi, ds->ds_rxstat.rs_tstamp); 5667 ATH_RSSI_LPF(an->an_avgrssi, rs->rs_rssi); 5668 type = ieee80211_input(ni, skb, rs->rs_rssi, rs->rs_tstamp); 5712 5669 ieee80211_unref_node(&ni); 5713 5670 } else { … … 5722 5679 ieee80211_keyix_t keyix; 5723 5680 5724 ATH_RSSI_LPF(an->an_avgrssi, 5725 ds->ds_rxstat.rs_rssi); 5726 type = ieee80211_input(ni, skb, 5727 ds->ds_rxstat.rs_rssi, 5728 ds->ds_rxstat.rs_tstamp); 5681 ATH_RSSI_LPF(an->an_avgrssi, rs->rs_rssi); 5682 type = ieee80211_input(ni, skb, rs->rs_rssi,rs->rs_tstamp); 5729 5683 /* 5730 5684 * If the station has a key cache slot assigned … … 5738 5692 } else 5739 5693 type = ieee80211_input_all(ic, skb, 5740 ds->ds_rxstat.rs_rssi, 5741 ds->ds_rxstat.rs_tstamp); 5694 rs->rs_rssi, rs->rs_tstamp); 5742 5695 } 5743 5696 … … 5748 5701 * times in a row. 5749 5702 */ 5750 if (sc->sc_defant != ds->ds_rxstat.rs_antenna) {5703 if (sc->sc_defant != rs->rs_antenna) { 5751 5704 if (++sc->sc_rxotherant >= 3) 5752 ath_setdefantenna(sc, ds->ds_rxstat.rs_antenna);5705 ath_setdefantenna(sc, rs->rs_antenna); 5753 5706 } else 5754 5707 sc->sc_rxotherant = 0; … … 5762 5715 */ 5763 5716 if (type == IEEE80211_FC0_TYPE_DATA) { 5764 sc->sc_rxrate = ds->ds_rxstat.rs_rate;5717 sc->sc_rxrate = rs->rs_rate; 5765 5718 ath_led_event(sc, ATH_LED_RX); 5766 5719 } else if (jiffies - sc->sc_ledevent >= sc->sc_ledidle) … … 5777 5730 /* rx signal state monitoring */ 5778 5731 ath_hal_rxmonitor(ah, &sc->sc_halstats, &sc->sc_curchan); 5779 if (ath_hal_radar_event(ah)) {5780 sc->sc_rtasksched = 1;5781 schedule_work(&sc->sc_radartask);5782 }5783 5732 #undef PA2DESC 5784 5733 } … … 7167 7116 struct ath_buf *bf = NULL; 7168 7117 struct ath_desc *ds = NULL; 7118 struct ath_tx_status *ts; 7169 7119 struct ieee80211_node *ni = NULL; 7170 7120 struct ath_node *an = NULL; … … 7206 7156 ds = bf->bf_desc; /* NB: last descriptor */ 7207 7157 #endif 7208 status = ath_hal_txprocdesc(ah, ds); 7158 ts = &bf->bf_dsstatus.ds_txstat; 7159 status = ath_hal_txprocdesc(ah, ds, ts); 7209 7160 #ifdef AR_DEBUG 7210 7161 if (sc->sc_debug & ATH_DEBUG_XMIT_DESC) … … 7228 7179 if (ni != NULL) { 7229 7180 an = ATH_NODE(ni); 7230 if ( ds->ds_txstat.ts_status == 0) {7231 u_int8_t txant = ds->ds_txstat.ts_antenna;7181 if (ts->ts_status == 0) { 7182 u_int8_t txant = ts->ts_antenna; 7232 7183 sc->sc_stats.ast_ant_tx[txant]++; 7233 7184 sc->sc_ant_tx[txant]++; … … 7236 7187 ni->ni_vap->iv_stats.is_tx_ffokcnt++; 7237 7188 #endif 7238 if ( ds->ds_txstat.ts_rate & HAL_TXSTAT_ALTRATE)7189 if (ts->ts_rate & HAL_TXSTAT_ALTRATE) 7239 7190 sc->sc_stats.ast_tx_altrate++; 7240 sc->sc_stats.ast_tx_rssi = 7241 ds->ds_txstat.ts_rssi; 7191 sc->sc_stats.ast_tx_rssi = ts->ts_rssi; 7242 7192 ATH_RSSI_LPF(an->an_halstats.ns_avgtxrssi, 7243 ds->ds_txstat.ts_rssi);7193 ts->ts_rssi); 7244 7194 if (bf->bf_skb->priority == WME_AC_VO || 7245 7195 bf->bf_skb->priority == WME_AC_VI) … … 7251 7201 ni->ni_vap->iv_stats.is_tx_fferrcnt++; 7252 7202 #endif 7253 if ( ds->ds_txstat.ts_status & HAL_TXERR_XRETRY) {7203 if (ts->ts_status & HAL_TXERR_XRETRY) { 7254 7204 sc->sc_stats.ast_tx_xretries++; 7255 7205 if (ni->ni_flags & IEEE80211_NODE_UAPSD_TRIG) { … … 7260 7210 } 7261 7211 } 7262 if ( ds->ds_txstat.ts_status & HAL_TXERR_FIFO)7212 if (ts->ts_status & HAL_TXERR_FIFO) 7263 7213 sc->sc_stats.ast_tx_fifoerr++; 7264 if ( ds->ds_txstat.ts_status & HAL_TXERR_FILT)7214 if (ts->ts_status & HAL_TXERR_FILT) 7265 7215 sc->sc_stats.ast_tx_filtered++; 7266 7216 } 7267 sr = ds->ds_txstat.ts_shortretry;7268 lr = ds->ds_txstat.ts_longretry;7217 sr = ts->ts_shortretry; 7218 lr = ts->ts_longretry; 7269 7219 sc->sc_stats.ast_tx_shortretry += sr; 7270 7220 sc->sc_stats.ast_tx_longretry += lr; … … 7275 7225 * and retry counts will be meaningless. 7276 7226 */ 7277 if (( ds->ds_txstat.ts_status & HAL_TXERR_FILT) == 0 &&7278 (bf->bf_flags & HAL_TXDESC_NOACK) == 0) 7279 sc->sc_rc->ops->tx_complete(sc, an, ds);7227 if ((ts->ts_status & HAL_TXERR_FILT) == 0 && 7228 (bf->bf_flags & HAL_TXDESC_NOACK) == 0) 7229 sc->sc_rc->ops->tx_complete(sc, an, bf); 7280 7230 /* 7281 7231 * Reclaim reference to node. … … 7311 7261 { 7312 7262 struct ieee80211_frame *wh = (struct ieee80211_frame *)bf->bf_skb->data; 7313 if (( ds->ds_txstat.ts_seqnum << IEEE80211_SEQ_SEQ_SHIFT) & ~IEEE80211_SEQ_SEQ_MASK) {7263 if ((ts->ts_seqnum << IEEE80211_SEQ_SEQ_SHIFT) & ~IEEE80211_SEQ_SEQ_MASK) { 7314 7264 DPRINTF(sc, ATH_DEBUG_TX_PROC, "%s: h/w assigned sequence number is not sane (%d), ignoring it\n", __func__, 7315 ds->ds_txstat.ts_seqnum);7265 ts->ts_seqnum); 7316 7266 } else { 7317 7267 DPRINTF(sc, ATH_DEBUG_TX_PROC, "%s: updating frame's sequence number from %d to %d\n", __func__, 7318 7268 (le16toh(*(__le16 *)&wh->i_seq[0]) & IEEE80211_SEQ_SEQ_MASK) >> IEEE80211_SEQ_SEQ_SHIFT, 7319 ds->ds_txstat.ts_seqnum);7269 ts->ts_seqnum); 7320 7270 7321 7271 *(__le16 *)&wh->i_seq[0] = htole16( 7322 ds->ds_txstat.ts_seqnum << IEEE80211_SEQ_SEQ_SHIFT |7272 ts->ts_seqnum << IEEE80211_SEQ_SEQ_SHIFT | 7323 7273 (le16toh(*(__le16 *)&wh->i_seq[0]) & ~IEEE80211_SEQ_SEQ_MASK)); 7324 7274 } … … 7326 7276 7327 7277 DPRINTF(sc, ATH_DEBUG_TX_PROC, "%s: free skb %p\n", __func__, bf->bf_skb); 7328 ath_tx_capture(sc->sc_dev, ds, bf->bf_skb);7278 ath_tx_capture(sc->sc_dev, bf, bf->bf_skb); 7329 7279 7330 7280 #ifdef ATH_SUPERG_FF … … 7341 7291 DPRINTF(sc, ATH_DEBUG_TX_PROC, "%s: free skb %p\n", 7342 7292 __func__, skb); 7343 ath_tx_capture(sc->sc_dev, ds, skb);7293 ath_tx_capture(sc->sc_dev, bf, skb); 7344 7294 skb = tskb; 7345 7295 } … … 7511 7461 #ifdef AR_DEBUG 7512 7462 if (sc->sc_debug & ATH_DEBUG_RESET) 7513 ath_printtxbuf(bf, ath_hal_txprocdesc(ah, bf->bf_desc ) == HAL_OK);7463 ath_printtxbuf(bf, ath_hal_txprocdesc(ah, bf->bf_desc, &bf->bf_dsstatus.ds_txstat) == HAL_OK); 7514 7464 #endif /* AR_DEBUG */ 7515 7465 skb = bf->bf_skb->next; … … 7602 7552 STAILQ_FOREACH(bf, &sc->sc_rxbuf, bf_list) { 7603 7553 struct ath_desc *ds = bf->bf_desc; 7554 struct ath_rx_status *rs = &bf->bf_dsstatus.ds_rxstat; 7604 7555 HAL_STATUS status = ath_hal_rxprocdesc(ah, ds, 7605 bf->bf_daddr, PA2DESC(sc, ds->ds_link), tsf );7556 bf->bf_daddr, PA2DESC(sc, ds->ds_link), tsf, rs); 7606 7557 if (status == HAL_OK || (sc->sc_debug & ATH_DEBUG_FATAL)) 7607 7558 ath_printrxbuf(bf, status == HAL_OK); … … 7830 7781 struct ath_softc *sc = dev->priv; 7831 7782 struct ath_hal *ah = sc->sc_ah; 7832 struct ieee80211com *ic = &sc->sc_ic; 7833 HAL_CHANNEL *chans; 7834 u_int32_t nchans; 7783 /* u_int32_t nchans; */ 7835 7784 HAL_BOOL isIQdone = AH_FALSE; 7836 7785 … … 7853 7802 __func__, sc->sc_curchan.channel); 7854 7803 sc->sc_stats.ast_per_calfail++; 7855 }7856 if (ic->ic_opmode == IEEE80211_M_HOSTAP) {7857 chans = kmalloc(IEEE80211_CHAN_MAX * sizeof(HAL_CHANNEL), GFP_ATOMIC);7858 if (chans == NULL) {7859 printk("%s: unable to allocate channel table\n", dev->name);7860 return;7861 }7862 nchans = ath_hal_checknol(ah, chans, IEEE80211_CHAN_MAX);7863 if (nchans > 0) {7864 u_int32_t i, j;7865 struct ieee80211_channel *ichan;7866 7867 for (i = 0; i < nchans; i++) {7868 for (j = 0; j < ic->ic_nchans; j++) {7869 ichan = &ic->ic_channels[j];7870  
