Changeset 2360

Show
Ignore:
Timestamp:
05/21/07 19:33:26 (2 years ago)
Author:
mentor
Message:

Merge hal-0.9.30.13 to trunk - @r2359.

I'm not to keen on the changes to the hardware headers in the rate headers.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ath/if_ath.c

    r2357 r2360  
    128128static void ath_bmiss_tasklet(TQUEUE_ARG); 
    129129static 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  
    133130static int ath_stop_locked(struct net_device *); 
    134131static int ath_stop(struct net_device *); 
     
    427424        ATH_INIT_TQUEUE(&sc->sc_rxorntq,  ath_rxorn_tasklet,    dev); 
    428425        ATH_INIT_TQUEUE(&sc->sc_fataltq,  ath_fatal_tasklet,    dev); 
    429         ATH_INIT_WORK(&sc->sc_radartask,  ath_radar_task); 
    430426 
    431427        /* 
     
    636632                goto bad2; 
    637633        } 
    638  
    639634        init_timer(&sc->sc_cal_ch); 
    640635        sc->sc_cal_ch.function = ath_calibrate; 
     
    651646        sc->sc_ledon = 0;                       /* low true */ 
    652647        sc->sc_ledidle = msecs_to_jiffies(2700);        /* 2.7 sec */ 
    653         sc->sc_dfstesttime = ATH_DFS_TEST_RETURN_PERIOD; 
    654648        init_timer(&sc->sc_ledtimer); 
    655649        init_timer(&sc->sc_dfswaittimer); 
    656         init_timer(&sc->sc_dfstesttimer); 
    657650        sc->sc_ledtimer.data = (unsigned long) sc; 
    658651        if (sc->sc_softled) { 
     
    943936 
    944937        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(); 
    948938 
    949939        sc->sc_invalid = 1; 
     
    13351325        struct ath_buf *bf; 
    13361326        struct ath_desc *ds; 
     1327        struct ath_rx_status *rs; 
    13371328        struct sk_buff *skb; 
    13381329        struct ieee80211_node *ni; 
     
    13991390                 * a self-linked list to avoid rx overruns. 
    14001391                 */ 
    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); 
    14021394                if (HAL_EINPROGRESS == retval) 
    14031395                        break; 
     
    14071399 
    14081400                /* Errors? */ 
    1409                 if (ds->ds_rxstat.rs_status) 
     1401                if (rs->rs_status) 
    14101402                        continue; 
    14111403 
     
    14161408                qwh = (struct ieee80211_qosframe *) skb->data; 
    14171409 
    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) { 
    14211413                        /*  
    14221414                         * XXX: this can occur if WEP mode is used for non-Atheros clients 
     
    17361728 
    17371729static 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 change 
    1750                  */ 
    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 void 
    1776 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 void 
    17861730ath_fatal_tasklet(TQUEUE_ARG data) 
    17871731{ 
     
    35623506                 */ 
    35633507                sc->sc_ignore_ar = 0; 
     3508#if 0 /* HAL 0.9.20.3 has no arEnable method */ 
    35643509                ath_hal_ar_enable(sc->sc_ah); 
     3510#endif 
    35653511        } 
    35663512        sc->sc_dturbo_tcount++; 
     
    36623608        struct sk_buff *skb; 
    36633609        struct ath_desc *ds; 
     3610        struct ath_tx_status *ts; 
    36643611        struct ath_hal *ah = sc->sc_ah; 
    36653612        unsigned int slot; 
     
    36803627        skb = bf->bf_skb; 
    36813628        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); 
    36843632 
    36853633} 
     
    37233671                         */ 
    37243672                        sc->sc_ignore_ar = 1; 
     3673#if 0 /* HAL 0.9.20.3 has no arDisable method */ 
    37253674                        ath_hal_ar_disable(sc->sc_ah); 
     3675#endif 
    37263676                } 
    37273677                newflags |= IEEE80211_CHAN_TURBO; 
     
    48754825        struct sk_buff *skb = NULL; 
    48764826        struct ath_desc *ds; 
     4827        struct ath_tx_status *ts; 
    48774828        HAL_STATUS status; 
    48784829        unsigned int index; 
     
    49064857                                ds = bf->bf_desc;               /* NB: last descriptor */ 
    49074858#endif 
    4908                                 status = ath_hal_txprocdesc(ah, ds); 
     4859                                ts = &ts->bf_dsstatus.ds_txstat; 
     4860                                status = ath_hal_txprocdesc(ah, ds, ts); 
    49094861                                if (status == HAL_EINPROGRESS) 
    49104862                                        break;  
     
    49644916                                                ds = prev->bf_desc;     /* NB: last descriptor */ 
    49654917#endif 
    4966                                                 status = ath_hal_txprocdesc(ah, ds); 
     4918                                                ts = &bf->bf_dsstatus.ds_txstat; 
     4919                                                status = ath_hal_txprocdesc(ah, ds, ts); 
    49674920                                                if (status == HAL_EINPROGRESS)  
    49684921                                                        txq->axq_link = &ds->ds_link; 
     
    50374990                        ds = bf->bf_desc;               /* NB: last descriptor */ 
    50384991#endif 
    5039                         status = ath_hal_txprocdesc(ah, ds); 
     4992                        ts = &bf->bf_dsstatus.ds_txstat; 
     4993                        status = ath_hal_txprocdesc(ah, ds, ts); 
    50404994                        if (status == HAL_EINPROGRESS) 
    50414995                                break; 
     
    51125066                                        ds = prev->bf_desc;     /* NB: last descriptor */ 
    51135067#endif 
    5114                                         status = ath_hal_txprocdesc(ah, ds); 
     5068                                        ts = &bf->bf_dsstatus.ds_txstat; 
     5069                                        status = ath_hal_txprocdesc(ah, ds, ts); 
    51155070                                        if (status == HAL_EINPROGRESS)  
    51165071                                                txq->axq_link = &ds->ds_link; 
     
    51765131                                        ds = bf->bf_desc;       /* NB: last descriptor */ 
    51775132#endif 
    5178                                         status = ath_hal_txprocdesc(ah, ds); 
     5133                                        ts = &bf->bf_dsstatus.ds_txstat; 
     5134                                        status = ath_hal_txprocdesc(ah, ds, ts); 
    51795135                                        if (status == HAL_EINPROGRESS) 
    51805136                                                break;  
     
    52875243        ds->ds_link = bf->bf_daddr;             /* link to self */ 
    52885244        ds->ds_data = bf->bf_skbaddr; 
    5289         ds->ds_vdata = (void *) skb->data;      /* virt addr of buffer */ 
    52905245        ath_hal_setuprxdesc(ah, ds,  
    52915246                skb_tailroom(skb),              /* buffer size */ 
     
    53175272 */ 
    53185273static void 
    5319 ath_rx_capture(struct net_device *dev, struct ath_desc *ds, struct sk_buff *skb) 
     5274ath_rx_capture(struct net_device *dev, const struct ath_buf *bf, struct sk_buff *skb) 
    53205275{ 
    53215276        struct ath_softc *sc = dev->priv; 
     5277        const struct ath_rx_status *rs = &bf->bf_dsstatus.ds_rxstat; 
    53225278        struct ieee80211com *ic = &sc->sc_ic; 
    53235279        struct ieee80211_frame *wh; 
     
    53295285         * tsf to extend this to 64 bits. 
    53305286         */ 
    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); 
    53325289 
    53335290        KASSERT(ic->ic_flags & IEEE80211_F_DATAPAD, 
     
    53445301                        skb_pull(skb1, padbytes); 
    53455302                } 
    5346                 ieee80211_input_monitor(ic, skb1, ds, 0, tsf, sc); 
     5303                ieee80211_input_monitor(ic, skb1, bf, 0, tsf, sc); 
    53475304                dev_kfree_skb(skb1); 
    53485305        } else { 
    5349                 ieee80211_input_monitor(ic, skb, ds, 0, tsf, sc); 
     5306                ieee80211_input_monitor(ic, skb, bf, 0, tsf, sc); 
    53505307        } 
    53515308} 
     
    53535310 
    53545311static void 
    5355 ath_tx_capture(struct net_device *dev, struct ath_desc *ds, struct sk_buff *skb) 
     5312ath_tx_capture(struct net_device *dev, const struct ath_buf *bf, struct sk_buff *skb) 
    53565313{ 
    53575314        struct ath_softc *sc = dev->priv; 
     5315        const struct ath_tx_status *ts = &bf->bf_dsstatus.ds_txstat; 
    53585316        struct ieee80211com *ic = &sc->sc_ic; 
    53595317        struct ieee80211_frame *wh; 
     
    53685326         */ 
    53695327        tsf = ath_hal_gettsf64(sc->sc_ah); 
    5370         tstamp = ds->ds_txstat.ts_tstamp << 10; 
     5328        tstamp = ts->ts_tstamp << 10; 
    53715329         
    53725330        if ((tsf & 0x3ffffff) < tstamp) 
     
    54075365                goto done; 
    54085366        } 
    5409         ieee80211_input_monitor(ic, skb, ds, 1, tsf, sc); 
     5367        ieee80211_input_monitor(ic, skb, bf, 1, tsf, sc); 
    54105368 done: 
    54115369        dev_kfree_skb(skb); 
     
    54955453        struct ath_hal *ah = sc->sc_ah; 
    54965454        struct ath_desc *ds; 
     5455        struct ath_rx_status *rs; 
    54975456        struct sk_buff *skb; 
    54985457        struct ieee80211_node *ni; 
     
    55385497                        ath_printrxbuf(bf, 1); 
    55395498#endif 
    5540  
    5541                 if (ds->ds_rxstat.rs_more) { 
     5499                rs = &bf->bf_dsstatus.ds_rxstat; 
     5500                if (rs->rs_more) { 
    55425501                        /* 
    55435502                         * Frame spans multiple descriptors; this 
     
    55575516#endif 
    55585517                        /* 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) 
    55615520                                sc->sc_stats.ast_rx_crcerr++; 
    5562                         if (ds->ds_rxstat.rs_status & HAL_RXERR_FIFO) 
     5521                        if (rs->rs_status & HAL_RXERR_FIFO) 
    55635522                                sc->sc_stats.ast_rx_fifoerr++; 
    5564                         if (ds->ds_rxstat.rs_status & HAL_RXERR_PHY) { 
     5523                        if (rs->rs_status & HAL_RXERR_PHY) { 
    55655524                                sc->sc_stats.ast_rx_phyerr++; 
    5566                                 phyerr = ds->ds_rxstat.rs_phyerr & 0x1f; 
     5525                                phyerr = rs->rs_phyerr & 0x1f; 
    55675526                                sc->sc_stats.ast_rx_phy[phyerr]++; 
    55685527                        } 
    5569                         if (ds->ds_rxstat.rs_status & HAL_RXERR_DECRYPT) { 
     5528                        if (rs->rs_status & HAL_RXERR_DECRYPT) { 
    55705529                                /* 
    55715530                                 * Decrypt error.  If the error occurred 
     
    55785537                                 * XXX do key cache faulting 
    55795538                                 */ 
    5580                                 if (ds->ds_rxstat.rs_keyix == HAL_RXKEYIX_INVALID) 
     5539                                if (rs->rs_keyix == HAL_RXKEYIX_INVALID) 
    55815540                                        goto rx_accept; 
    55825541                                sc->sc_stats.ast_rx_badcrypt++; 
    55835542                        } 
    5584                         if (ds->ds_rxstat.rs_status & HAL_RXERR_MIC) { 
     5543                        if (rs->rs_status & HAL_RXERR_MIC) { 
    55855544                                sc->sc_stats.ast_rx_badmic++; 
    55865545                                /* 
     
    55895548                                 */ 
    55905549                                /* XXX frag's and QoS frames */ 
    5591                                 len = ds->ds_rxstat.rs_datalen; 
     5550                                len = rs->rs_datalen; 
    55925551                                if (len >= sizeof (struct ieee80211_frame)) { 
    55935552                                        bus_dma_sync_single(sc->sc_bdev, 
     
    55995558                                            (struct ieee80211_frame *) skb->data, 
    56005559                                            sc->sc_splitmic ? 
    5601                                                 ds->ds_rxstat.rs_keyix - 32 : 
    5602                                                 ds->ds_rxstat.rs_keyix 
     5560                                                rs->rs_keyix - 32 : rs->rs_keyix 
    56035561                                        ); 
    56045562#endif 
     
    56195577                 * to receive another frame. 
    56205578                 */ 
    5621                 len = ds->ds_rxstat.rs_datalen; 
     5579                len = rs->rs_datalen; 
    56225580                bus_dma_sync_single(sc->sc_bdev, 
    56235581                        bf->bf_skbaddr, len, BUS_DMA_FROMDEVICE); 
     
    56265584                bf->bf_skb = NULL; 
    56275585 
    5628                 sc->sc_stats.ast_ant_rx[ds->ds_rxstat.rs_antenna]++; 
     5586                sc->sc_stats.ast_ant_rx[rs->rs_antenna]++; 
    56295587                sc->sc_devstats.rx_packets++; 
    56305588                sc->sc_devstats.rx_bytes += len; 
     
    56485606                        } 
    56495607#endif 
    5650                         ath_rx_capture(dev, ds, skb); 
     5608                        ath_rx_capture(dev, bf, skb); 
    56515609                        if (sc->sc_ic.ic_opmode == IEEE80211_M_MONITOR) { 
    56525610                                /* no other VAPs need the packet */ 
     
    56615619                 * error frames before passing to other vaps 
    56625620                 */ 
    5663                 if (ds->ds_rxstat.rs_status != 0) { 
     5621                if (rs->rs_status != 0) { 
    56645622                        dev_kfree_skb(skb); 
    56655623                        skb = NULL; 
     
    56895647                if (IFF_DUMPPKTS(sc, ATH_DEBUG_RECV)) { 
    56905648                        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); 
    56935651                } 
    56945652 
     
    56995657                 * frame; it'll be dropped where it's not wanted. 
    57005658                 */ 
    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) { 
    57035661                        struct ath_node *an; 
    57045662                        /* 
     
    57075665                         */ 
    57085666                        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); 
    57125669                        ieee80211_unref_node(&ni); 
    57135670                } else { 
     
    57225679                                ieee80211_keyix_t keyix; 
    57235680 
    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); 
    57295683                                /* 
    57305684                                 * If the station has a key cache slot assigned 
     
    57385692                        } else 
    57395693                                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); 
    57425695                } 
    57435696 
     
    57485701                         * times in a row. 
    57495702                         */ 
    5750                         if (sc->sc_defant != ds->ds_rxstat.rs_antenna) { 
     5703                        if (sc->sc_defant != rs->rs_antenna) { 
    57515704                                if (++sc->sc_rxotherant >= 3) 
    5752                                         ath_setdefantenna(sc, ds->ds_rxstat.rs_antenna); 
     5705                                        ath_setdefantenna(sc, rs->rs_antenna); 
    57535706                        } else 
    57545707                                sc->sc_rxotherant = 0; 
     
    57625715                         */ 
    57635716                        if (type == IEEE80211_FC0_TYPE_DATA) { 
    5764                                 sc->sc_rxrate = ds->ds_rxstat.rs_rate; 
     5717                                sc->sc_rxrate = rs->rs_rate; 
    57655718                                ath_led_event(sc, ATH_LED_RX); 
    57665719                        } else if (jiffies - sc->sc_ledevent >= sc->sc_ledidle) 
     
    57775730        /* rx signal state monitoring */ 
    57785731        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         } 
    57835732#undef PA2DESC 
    57845733} 
     
    71677116        struct ath_buf *bf = NULL; 
    71687117        struct ath_desc *ds = NULL; 
     7118        struct ath_tx_status *ts; 
    71697119        struct ieee80211_node *ni = NULL; 
    71707120        struct ath_node *an = NULL; 
     
    72067156                ds = bf->bf_desc;               /* NB: last descriptor */ 
    72077157#endif 
    7208                 status = ath_hal_txprocdesc(ah, ds); 
     7158                ts = &bf->bf_dsstatus.ds_txstat; 
     7159                status = ath_hal_txprocdesc(ah, ds, ts); 
    72097160#ifdef AR_DEBUG 
    72107161                if (sc->sc_debug & ATH_DEBUG_XMIT_DESC) 
     
    72287179                if (ni != NULL) { 
    72297180                        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; 
    72327183                                sc->sc_stats.ast_ant_tx[txant]++; 
    72337184                                sc->sc_ant_tx[txant]++; 
     
    72367187                                        ni->ni_vap->iv_stats.is_tx_ffokcnt++; 
    72377188#endif 
    7238                                 if (ds->ds_txstat.ts_rate & HAL_TXSTAT_ALTRATE) 
     7189                                if (ts->ts_rate & HAL_TXSTAT_ALTRATE) 
    72397190                                        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; 
    72427192                                ATH_RSSI_LPF(an->an_halstats.ns_avgtxrssi, 
    7243                                         ds->ds_txstat.ts_rssi); 
     7193                                        ts->ts_rssi); 
    72447194                                if (bf->bf_skb->priority == WME_AC_VO || 
    72457195                                    bf->bf_skb->priority == WME_AC_VI) 
     
    72517201                                        ni->ni_vap->iv_stats.is_tx_fferrcnt++; 
    72527202#endif 
    7253                                 if (ds->ds_txstat.ts_status & HAL_TXERR_XRETRY) { 
     7203                                if (ts->ts_status & HAL_TXERR_XRETRY) { 
    72547204                                        sc->sc_stats.ast_tx_xretries++; 
    72557205                                        if (ni->ni_flags & IEEE80211_NODE_UAPSD_TRIG) { 
     
    72607210                                        } 
    72617211                                } 
    7262                                 if (ds->ds_txstat.ts_status & HAL_TXERR_FIFO) 
     7212                                if (ts->ts_status & HAL_TXERR_FIFO) 
    72637213                                        sc->sc_stats.ast_tx_fifoerr++; 
    7264                                 if (ds->ds_txstat.ts_status & HAL_TXERR_FILT) 
     7214                                if (ts->ts_status & HAL_TXERR_FILT) 
    72657215                                        sc->sc_stats.ast_tx_filtered++; 
    72667216                        } 
    7267                         sr = ds->ds_txstat.ts_shortretry; 
    7268                         lr = ds->ds_txstat.ts_longretry; 
     7217                        sr = ts->ts_shortretry; 
     7218                        lr = ts->ts_longretry; 
    72697219                        sc->sc_stats.ast_tx_shortretry += sr; 
    72707220                        sc->sc_stats.ast_tx_longretry += lr; 
     
    72757225                         * and retry counts will be meaningless. 
    72767226                         */ 
    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); 
    72807230                        /* 
    72817231                         * Reclaim reference to node. 
     
    73117261                { 
    73127262                        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) { 
    73147264                                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); 
    73167266                        } else { 
    73177267                                DPRINTF(sc, ATH_DEBUG_TX_PROC, "%s: updating frame's sequence number from %d to %d\n", __func__,  
    73187268                                        (le16toh(*(__le16 *)&wh->i_seq[0]) & IEEE80211_SEQ_SEQ_MASK) >> IEEE80211_SEQ_SEQ_SHIFT, 
    7319                                         ds->ds_txstat.ts_seqnum); 
     7269                                        ts->ts_seqnum); 
    73207270 
    73217271                                *(__le16 *)&wh->i_seq[0] = htole16( 
    7322                                         ds->ds_txstat.ts_seqnum << IEEE80211_SEQ_SEQ_SHIFT | 
     7272                                        ts->ts_seqnum << IEEE80211_SEQ_SEQ_SHIFT | 
    73237273                                        (le16toh(*(__le16 *)&wh->i_seq[0]) & ~IEEE80211_SEQ_SEQ_MASK)); 
    73247274                        } 
     
    73267276 
    73277277                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); 
    73297279 
    73307280#ifdef ATH_SUPERG_FF 
     
    73417291                                DPRINTF(sc, ATH_DEBUG_TX_PROC, "%s: free skb %p\n", 
    73427292                                        __func__, skb); 
    7343                                 ath_tx_capture(sc->sc_dev, ds, skb); 
     7293                                ath_tx_capture(sc->sc_dev, bf, skb); 
    73447294                                skb = tskb; 
    73457295                        } 
     
    75117461#ifdef AR_DEBUG 
    75127462                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); 
    75147464#endif /* AR_DEBUG */ 
    75157465                skb = bf->bf_skb->next; 
     
    76027552                STAILQ_FOREACH(bf, &sc->sc_rxbuf, bf_list) { 
    76037553                        struct ath_desc *ds = bf->bf_desc; 
     7554                        struct ath_rx_status *rs = &bf->bf_dsstatus.ds_rxstat; 
    76047555                        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); 
    76067557                        if (status == HAL_OK || (sc->sc_debug & ATH_DEBUG_FATAL)) 
    76077558                                ath_printrxbuf(bf, status == HAL_OK); 
     
    78307781        struct ath_softc *sc = dev->priv; 
    78317782        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; */ 
    78357784        HAL_BOOL isIQdone = AH_FALSE; 
    78367785 
     
    78537802                        __func__, sc->sc_curchan.channel); 
    78547803                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