diff options
author | Vasanthakumar Thiagarajan <vasanth@atheros.com> | 2010-04-15 17:38:42 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-04-16 15:43:25 -0400 |
commit | 3f3a1c8031fd87a7d0195d0a8e8101d04c283fcc (patch) | |
tree | 5846cd9276548dd2a6bf92e21d17b71fc1475533 | |
parent | 162c3be3780dcb241ce0c9d49626c6cfb90f9f61 (diff) |
ath9k_hw: Move code which populates ds_data to ath9k_hw
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/beacon.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/mac.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/mac.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/xmit.c | 4 |
4 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c index 22375a754718..268b598746f6 100644 --- a/drivers/net/wireless/ath/ath9k/beacon.c +++ b/drivers/net/wireless/ath/ath9k/beacon.c | |||
@@ -93,8 +93,6 @@ static void ath_beacon_setup(struct ath_softc *sc, struct ath_vif *avp, | |||
93 | antenna = ((sc->beacon.ast_be_xmit / sc->nbcnvifs) & 1 ? 2 : 1); | 93 | antenna = ((sc->beacon.ast_be_xmit / sc->nbcnvifs) & 1 ? 2 : 1); |
94 | } | 94 | } |
95 | 95 | ||
96 | ds->ds_data = bf->bf_buf_addr; | ||
97 | |||
98 | sband = &sc->sbands[common->hw->conf.channel->band]; | 96 | sband = &sc->sbands[common->hw->conf.channel->band]; |
99 | rate = sband->bitrates[rateidx].hw_value; | 97 | rate = sband->bitrates[rateidx].hw_value; |
100 | if (sc->sc_flags & SC_OP_PREAMBLE_SHORT) | 98 | if (sc->sc_flags & SC_OP_PREAMBLE_SHORT) |
@@ -109,7 +107,7 @@ static void ath_beacon_setup(struct ath_softc *sc, struct ath_vif *avp, | |||
109 | 107 | ||
110 | /* NB: beacon's BufLen must be a multiple of 4 bytes */ | 108 | /* NB: beacon's BufLen must be a multiple of 4 bytes */ |
111 | ath9k_hw_filltxdesc(ah, ds, roundup(skb->len, 4), | 109 | ath9k_hw_filltxdesc(ah, ds, roundup(skb->len, 4), |
112 | true, true, ds); | 110 | true, true, ds, bf->bf_buf_addr); |
113 | 111 | ||
114 | memset(series, 0, sizeof(struct ath9k_11n_rate_series) * 4); | 112 | memset(series, 0, sizeof(struct ath9k_11n_rate_series) * 4); |
115 | series[0].Tries = 1; | 113 | series[0].Tries = 1; |
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c index ae9d54c9c79a..0c9c378616c6 100644 --- a/drivers/net/wireless/ath/ath9k/mac.c +++ b/drivers/net/wireless/ath/ath9k/mac.c | |||
@@ -220,10 +220,13 @@ EXPORT_SYMBOL(ath9k_hw_stoptxdma); | |||
220 | 220 | ||
221 | void ath9k_hw_filltxdesc(struct ath_hw *ah, struct ath_desc *ds, | 221 | void ath9k_hw_filltxdesc(struct ath_hw *ah, struct ath_desc *ds, |
222 | u32 segLen, bool firstSeg, | 222 | u32 segLen, bool firstSeg, |
223 | bool lastSeg, const struct ath_desc *ds0) | 223 | bool lastSeg, const struct ath_desc *ds0, |
224 | dma_addr_t buf_addr) | ||
224 | { | 225 | { |
225 | struct ar5416_desc *ads = AR5416DESC(ds); | 226 | struct ar5416_desc *ads = AR5416DESC(ds); |
226 | 227 | ||
228 | ads->ds_data = buf_addr; | ||
229 | |||
227 | if (firstSeg) { | 230 | if (firstSeg) { |
228 | ads->ds_ctl1 |= segLen | (lastSeg ? 0 : AR_TxMore); | 231 | ads->ds_ctl1 |= segLen | (lastSeg ? 0 : AR_TxMore); |
229 | } else if (lastSeg) { | 232 | } else if (lastSeg) { |
diff --git a/drivers/net/wireless/ath/ath9k/mac.h b/drivers/net/wireless/ath/ath9k/mac.h index 126a4030be1d..f2f4ad253696 100644 --- a/drivers/net/wireless/ath/ath9k/mac.h +++ b/drivers/net/wireless/ath/ath9k/mac.h | |||
@@ -693,7 +693,8 @@ bool ath9k_hw_updatetxtriglevel(struct ath_hw *ah, bool bIncTrigLevel); | |||
693 | bool ath9k_hw_stoptxdma(struct ath_hw *ah, u32 q); | 693 | bool ath9k_hw_stoptxdma(struct ath_hw *ah, u32 q); |
694 | void ath9k_hw_filltxdesc(struct ath_hw *ah, struct ath_desc *ds, | 694 | void ath9k_hw_filltxdesc(struct ath_hw *ah, struct ath_desc *ds, |
695 | u32 segLen, bool firstSeg, | 695 | u32 segLen, bool firstSeg, |
696 | bool lastSeg, const struct ath_desc *ds0); | 696 | bool lastSeg, const struct ath_desc *ds0, |
697 | dma_addr_t buf_addr); | ||
697 | void ath9k_hw_cleartxdesc(struct ath_hw *ah, struct ath_desc *ds); | 698 | void ath9k_hw_cleartxdesc(struct ath_hw *ah, struct ath_desc *ds); |
698 | int ath9k_hw_txprocdesc(struct ath_hw *ah, struct ath_desc *ds, | 699 | int ath9k_hw_txprocdesc(struct ath_hw *ah, struct ath_desc *ds, |
699 | struct ath_tx_status *ts); | 700 | struct ath_tx_status *ts); |
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 02df4cbf179f..7219e2927705 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
@@ -1660,7 +1660,6 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf, | |||
1660 | 1660 | ||
1661 | ds = bf->bf_desc; | 1661 | ds = bf->bf_desc; |
1662 | ds->ds_link = 0; | 1662 | ds->ds_link = 0; |
1663 | ds->ds_data = bf->bf_buf_addr; | ||
1664 | 1663 | ||
1665 | ath9k_hw_set11n_txdesc(ah, ds, bf->bf_frmlen, frm_type, MAX_RATE_POWER, | 1664 | ath9k_hw_set11n_txdesc(ah, ds, bf->bf_frmlen, frm_type, MAX_RATE_POWER, |
1666 | bf->bf_keyix, bf->bf_keytype, bf->bf_flags); | 1665 | bf->bf_keyix, bf->bf_keytype, bf->bf_flags); |
@@ -1669,7 +1668,8 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf, | |||
1669 | skb->len, /* segment length */ | 1668 | skb->len, /* segment length */ |
1670 | true, /* first segment */ | 1669 | true, /* first segment */ |
1671 | true, /* last segment */ | 1670 | true, /* last segment */ |
1672 | ds); /* first descriptor */ | 1671 | ds, /* first descriptor */ |
1672 | bf->bf_buf_addr); | ||
1673 | 1673 | ||
1674 | spin_lock_bh(&txctl->txq->axq_lock); | 1674 | spin_lock_bh(&txctl->txq->axq_lock); |
1675 | 1675 | ||