diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-03-29 23:09:27 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-03-31 14:46:41 -0400 |
commit | 8e6f5aa250d6013ec0d66f9f45f376678d3fc4ab (patch) | |
tree | be379f3c3ea007c3f239b5043242db29143937c3 /drivers/net/wireless/ath/ath9k/recv.c | |
parent | db1a052b73f7c97f9e8b21f3f19a92313ed2acb1 (diff) |
ath9k: split out access to rx status information
This patch passes in a pointer to the ath_rx_status data structure for
functions that need it, instead of letting them grab it directly from
the ath_desc struct. This is useful for making it possible to allocate
the intermediate rx status data separately.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/recv.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 1ca42e5148c8..9617887907b7 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
@@ -506,6 +506,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush) | |||
506 | 506 | ||
507 | bf = list_first_entry(&sc->rx.rxbuf, struct ath_buf, list); | 507 | bf = list_first_entry(&sc->rx.rxbuf, struct ath_buf, list); |
508 | ds = bf->bf_desc; | 508 | ds = bf->bf_desc; |
509 | rx_stats = &ds->ds_us.rx; | ||
509 | 510 | ||
510 | /* | 511 | /* |
511 | * Must provide the virtual address of the current | 512 | * Must provide the virtual address of the current |
@@ -518,10 +519,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush) | |||
518 | * on. All this is necessary because of our use of | 519 | * on. All this is necessary because of our use of |
519 | * a self-linked list to avoid rx overruns. | 520 | * a self-linked list to avoid rx overruns. |
520 | */ | 521 | */ |
521 | retval = ath9k_hw_rxprocdesc(ah, ds, | 522 | retval = ath9k_hw_rxprocdesc(ah, ds, rx_stats, 0); |
522 | bf->bf_daddr, | ||
523 | PA2DESC(sc, ds->ds_link), | ||
524 | 0); | ||
525 | if (retval == -EINPROGRESS) { | 523 | if (retval == -EINPROGRESS) { |
526 | struct ath_buf *tbf; | 524 | struct ath_buf *tbf; |
527 | struct ath_desc *tds; | 525 | struct ath_desc *tds; |
@@ -545,8 +543,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush) | |||
545 | */ | 543 | */ |
546 | 544 | ||
547 | tds = tbf->bf_desc; | 545 | tds = tbf->bf_desc; |
548 | retval = ath9k_hw_rxprocdesc(ah, tds, tbf->bf_daddr, | 546 | retval = ath9k_hw_rxprocdesc(ah, tds, &tds->ds_us.rx, 0); |
549 | PA2DESC(sc, tds->ds_link), 0); | ||
550 | if (retval == -EINPROGRESS) { | 547 | if (retval == -EINPROGRESS) { |
551 | break; | 548 | break; |
552 | } | 549 | } |
@@ -569,9 +566,8 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush) | |||
569 | rxs = IEEE80211_SKB_RXCB(skb); | 566 | rxs = IEEE80211_SKB_RXCB(skb); |
570 | 567 | ||
571 | hw = ath_get_virt_hw(sc, hdr); | 568 | hw = ath_get_virt_hw(sc, hdr); |
572 | rx_stats = &ds->ds_rxstat; | ||
573 | 569 | ||
574 | ath_debug_stat_rx(sc, bf); | 570 | ath_debug_stat_rx(sc, rx_stats); |
575 | 571 | ||
576 | /* | 572 | /* |
577 | * If we're asked to flush receive queue, directly | 573 | * If we're asked to flush receive queue, directly |
@@ -626,7 +622,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush) | |||
626 | * change the default rx antenna if rx diversity chooses the | 622 | * change the default rx antenna if rx diversity chooses the |
627 | * other antenna 3 times in a row. | 623 | * other antenna 3 times in a row. |
628 | */ | 624 | */ |
629 | if (sc->rx.defant != ds->ds_rxstat.rs_antenna) { | 625 | if (sc->rx.defant != rx_stats->rs_antenna) { |
630 | if (++sc->rx.rxotherant >= 3) | 626 | if (++sc->rx.rxotherant >= 3) |
631 | ath_setdefantenna(sc, rx_stats->rs_antenna); | 627 | ath_setdefantenna(sc, rx_stats->rs_antenna); |
632 | } else { | 628 | } else { |