use ah_set11nTxDesc directly
[open-ath9k-htc-firmware.git] / target_firmware / wlan / if_owl.c
index 40721cde3785ae3982a5fb1e499ac44b5c4afed1..23fa9f6da3ad831b37ecf0496caaf547da4cad13 100755 (executable)
@@ -47,7 +47,6 @@
 #include <adf_net.h>
 #include <adf_net_wcmd.h>
 
-#include "if_ethersubr.h"
 #include "if_llc.h"
 
 #ifdef USE_HEADERLEN_RESV
@@ -58,7 +57,6 @@
 #include "if_athrate.h"
 #include "if_athvar.h"
 #include "ah_desc.h"
-#include "if_ath_pci.h"
 
 #define ath_tgt_free_skb  adf_nbuf_free
 
@@ -265,6 +263,7 @@ static void ath_filltxdesc(struct ath_softc_tgt *sc, struct ath_tx_buf *bf)
 static void ath_tx_tgt_setds(struct ath_softc_tgt *sc, struct ath_tx_buf *bf)
 {
        struct ath_tx_desc *ds = bf->bf_desc;
+       struct ath_hal *ah = sc->sc_ah;
 
        switch (bf->bf_protmode) {
        case IEEE80211_PROT_RTSCTS:
@@ -277,7 +276,7 @@ static void ath_tx_tgt_setds(struct ath_softc_tgt *sc, struct ath_tx_buf *bf)
                break;
        }
 
-       ath_hal_set11n_txdesc(sc->sc_ah, ds
+       ah->ah_set11nTxDesc(ah, ds
                              , bf->bf_pktlen
                              , bf->bf_atype
                              , 60
@@ -618,9 +617,10 @@ void ath_tx_status_send(struct ath_softc_tgt *sc)
 
 static void owltgt_tx_process_cabq(struct ath_softc_tgt *sc, struct ath_txq *txq)
 {
-       ath_hal_intrset(sc->sc_ah, sc->sc_imask & ~HAL_INT_SWBA);
+       struct ath_hal *ah = sc->sc_ah;
+       ah->ah_setInterrupts(ah, sc->sc_imask & ~HAL_INT_SWBA);
        owltgt_tx_processq(sc, txq, OWL_TXQ_ACTIVE);
-       ath_hal_intrset(sc->sc_ah, sc->sc_imask);
+       ah->ah_setInterrupts(ah, sc->sc_imask);
 }
 
 void owl_tgt_tx_tasklet(TQUEUE_ARG data)
@@ -890,17 +890,17 @@ static void ath_tgt_txq_add_ucast(struct ath_softc_tgt *sc, struct ath_tx_buf *b
        ATH_TXQ_INSERT_TAIL(txq, bf, bf_list);
 
        if (txq->axq_link == NULL) {
-               ath_hal_puttxbuf(ah, txq->axq_qnum, ATH_BUF_GET_DESC_PHY_ADDR(bf));
+               ah->ah_setTxDP(ah, txq->axq_qnum, ATH_BUF_GET_DESC_PHY_ADDR(bf));
        } else {
                *txq->axq_link = ATH_BUF_GET_DESC_PHY_ADDR(bf);
 
                txe_val = OS_REG_READ(ah, 0x840);
                if (!(txe_val & (1<< txq->axq_qnum)))
-                       ath_hal_puttxbuf(ah, txq->axq_qnum, ATH_BUF_GET_DESC_PHY_ADDR(bf));
+                       ah->ah_setTxDP(ah, txq->axq_qnum, ATH_BUF_GET_DESC_PHY_ADDR(bf));
        }
 
        txq->axq_link = &bf->bf_lastds->ds_link;
-       ath_hal_txstart(ah, txq->axq_qnum);
+       ah->ah_startTxDma(ah, txq->axq_qnum);
 }
 
 static a_int32_t ath_tgt_txbuf_setup(struct ath_softc_tgt *sc,
@@ -1250,13 +1250,13 @@ ath_tgt_txqaddbuf(struct ath_softc_tgt *sc,
        ATH_TXQ_INSERT_TAIL(txq, bf, bf_list);
 
        if (txq->axq_link == NULL) {
-               ath_hal_puttxbuf(ah, txq->axq_qnum, ATH_BUF_GET_DESC_PHY_ADDR(bf));
+               ah->ah_setTxDP(ah, txq->axq_qnum, ATH_BUF_GET_DESC_PHY_ADDR(bf));
        } else {
                *txq->axq_link = ATH_BUF_GET_DESC_PHY_ADDR(bf);
        }
 
        txq->axq_link = &lastds->ds_link;
-       ath_hal_txstart(ah, txq->axq_qnum);
+       ah->ah_startTxDma(ah, txq->axq_qnum);
 }
 
 void ath_tgt_handle_normal(struct ath_softc_tgt *sc, struct ath_tx_buf *bf)