X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=target_firmware%2Fwlan%2Fif_owl.c;h=40bf6637e68becc257771a2969338fe46f80ac0d;hb=c8d9ec95d2eb08d68acc0c0042baa3f94b483339;hp=375c38cc17b855beab57550ce6b1df2aebdfe3c6;hpb=85dbf89ae978d3bd38eac9e20d57bcad035756ca;p=open-ath9k-htc-firmware.git diff --git a/target_firmware/wlan/if_owl.c b/target_firmware/wlan/if_owl.c index 375c38c..40bf663 100755 --- a/target_firmware/wlan/if_owl.c +++ b/target_firmware/wlan/if_owl.c @@ -97,7 +97,7 @@ static a_uint16_t bits_per_symbol[][2] = { void owltgt_tx_processq(struct ath_softc_tgt *sc, struct ath_txq *txq, owl_txq_state_t txqstate); static void ath_tgt_txqaddbuf(struct ath_softc_tgt *sc, struct ath_txq *txq, - struct ath_buf *bf, struct ath_desc *lastds); + struct ath_tx_buf *bf, struct ath_tx_desc *lastds); void ath_rate_findrate_11n_Hardcoded(struct ath_softc_tgt *sc, struct ath_rc_series series[]); void ath_buf_set_rate_Hardcoded(struct ath_softc_tgt *sc, @@ -106,12 +106,10 @@ static a_int32_t ath_tgt_txbuf_setup(struct ath_softc_tgt *sc, struct ath_tx_buf *bf, ath_data_hdr_t *dh); static void ath_tx_freebuf(struct ath_softc_tgt *sc, struct ath_tx_buf *bf); static void ath_tx_uc_comp(struct ath_softc_tgt *sc, struct ath_tx_buf *bf); -static void ath_update_stats(struct ath_softc_tgt *sc, struct ath_buf *bf); +static void ath_update_stats(struct ath_softc_tgt *sc, struct ath_tx_buf *bf); void adf_print_buf(adf_nbuf_t buf); static void ath_tgt_tx_enqueue(struct ath_txq *txq, struct ath_atx_tid *tid); -struct ath_buf * ath_tgt_tx_prepare(struct ath_softc_tgt *sc, - adf_nbuf_t skb, ath_data_hdr_t *dh); void ath_tgt_tx_comp_aggr(struct ath_softc_tgt *sc, struct ath_tx_buf *bf); struct ieee80211_frame *ATH_SKB_2_WH(adf_nbuf_t skb); @@ -121,8 +119,8 @@ static void ath_tgt_tx_sched_normal(struct ath_softc_tgt *sc, ath_atx_tid_t *tid static void ath_tgt_tx_sched_aggr(struct ath_softc_tgt *sc, ath_atx_tid_t *tid); extern a_int32_t ath_chainmask_sel_logic(void *); -static a_int32_t ath_get_pktlen(struct ath_buf *bf, a_int32_t hdrlen); -static void ath_tgt_txq_schedule(struct ath_softc *sc, struct ath_txq *txq); +static a_int32_t ath_get_pktlen(struct ath_tx_buf *bf, a_int32_t hdrlen); +static void ath_tgt_txq_schedule(struct ath_softc_tgt *sc, struct ath_txq *txq); typedef void (*ath_ft_set_atype_t)(struct ath_softc_tgt *sc, struct ath_buf *bf); @@ -135,7 +133,7 @@ static void ath_tx_update_baw(ath_atx_tid_t *tid, int seqno); static void ath_tx_retry_subframe(struct ath_softc_tgt *sc, struct ath_tx_buf *bf, - ath_bufhead *bf_q, struct ath_tx_buf **bar); + ath_tx_bufhead *bf_q, struct ath_tx_buf **bar); static void ath_tx_comp_aggr_error(struct ath_softc_tgt *sc, struct ath_tx_buf *bf, ath_atx_tid_t *tid); @@ -222,7 +220,7 @@ static a_uint32_t ath_pkt_duration(struct ath_softc_tgt *sc, return duration; } -static void ath_dma_map(struct ath_softc_tgt *sc, struct ath_buf *bf) +static void ath_dma_map(struct ath_softc_tgt *sc, struct ath_tx_buf *bf) { adf_nbuf_t skb = bf->bf_skb; @@ -230,7 +228,7 @@ static void ath_dma_map(struct ath_softc_tgt *sc, struct ath_buf *bf) adf_nbuf_map(sc->sc_dev, bf->bf_dmamap, skb, ADF_OS_DMA_TO_DEVICE); } -static void ath_dma_unmap(struct ath_softc_tgt *sc, struct ath_buf *bf) +static void ath_dma_unmap(struct ath_softc_tgt *sc, struct ath_tx_buf *bf) { adf_nbuf_t skb = bf->bf_skb; @@ -240,7 +238,7 @@ static void ath_dma_unmap(struct ath_softc_tgt *sc, struct ath_buf *bf) static void ath_filltxdesc(struct ath_softc_tgt *sc, struct ath_tx_buf *bf) { - struct ath_desc *ds0, *ds = bf->bf_desc; + struct ath_tx_desc *ds0, *ds = bf->bf_desc; a_uint8_t i; ds0 = ds; @@ -290,7 +288,7 @@ static void ath_tx_tgt_setds(struct ath_softc_tgt *sc, struct ath_tx_buf *bf) ath_filltxdesc(sc, bf); } -static struct ath_buf *ath_buf_toggle(struct ath_softc_tgt *sc, +static struct ath_tx_buf *ath_buf_toggle(struct ath_softc_tgt *sc, struct ath_tx_buf *bf, a_uint8_t retry) { @@ -532,7 +530,7 @@ void ath_tx_status_clear(struct ath_softc_tgt *sc) } } -struct WMI_TXSTATUS_EVENT* ath_tx_status_get(struct ath_softc_tgt *sc) +static WMI_TXSTATUS_EVENT *ath_tx_status_get(struct ath_softc_tgt *sc) { WMI_TXSTATUS_EVENT *txs = NULL; int i; @@ -760,7 +758,7 @@ static struct ieee80211_node_target * ath_tgt_find_node(struct ath_softc_tgt *sc return NULL; } -static struct ath_buf* ath_buf_alloc(struct ath_softc_tgt *sc) +static struct ath_tx_buf* ath_tx_buf_alloc(struct ath_softc_tgt *sc) { struct ath_tx_buf *bf = NULL; @@ -775,7 +773,7 @@ static struct ath_buf* ath_buf_alloc(struct ath_softc_tgt *sc) return bf; } -struct ath_buf* ath_tgt_tx_prepare(struct ath_softc_tgt *sc, +struct ath_tx_buf* ath_tgt_tx_prepare(struct ath_softc_tgt *sc, adf_nbuf_t skb, ath_data_hdr_t *dh) { struct ath_tx_buf *bf; @@ -792,7 +790,7 @@ struct ath_buf* ath_tgt_tx_prepare(struct ath_softc_tgt *sc, return NULL; } - bf = ath_buf_alloc(sc); + bf = ath_tx_buf_alloc(sc); if (!bf) { __stats(sc, tx_nobufs); return NULL; @@ -803,7 +801,7 @@ struct ath_buf* ath_tgt_tx_prepare(struct ath_softc_tgt *sc, bf->bf_keytype = dh->keytype; bf->bf_keyix = dh->keyix; bf->bf_protmode = dh->flags & (IEEE80211_PROT_RTSCTS | IEEE80211_PROT_CTSONLY); - bf->bf_node = (struct ath_node_target *)ni; + bf->bf_node = ni; adf_nbuf_queue_add(&bf->bf_skbhead, skb); skb = adf_nbuf_queue_first(&(bf->bf_skbhead)); @@ -910,12 +908,8 @@ static a_int32_t ath_tgt_txbuf_setup(struct ath_softc_tgt *sc, ath_data_hdr_t *dh) { - struct ath_node_target *an = ATH_NODE_TARGET(bf->bf_node); struct ieee80211_frame *wh = ATH_SKB2_WH(bf->bf_skb); - struct ieee80211_node_target *ni = (struct ieee80211_node_target *)an; - struct ieee80211vap_target *vap = ni->ni_vap; - struct ieee80211com_target *ic = &sc->sc_ic; - a_int32_t retval, fragno = 0; + a_int32_t retval; a_uint32_t flags = adf_os_ntohl(dh->flags); ath_tgt_tx_seqno_normal(bf); @@ -940,7 +934,7 @@ static a_int32_t ath_tgt_txbuf_setup(struct ath_softc_tgt *sc, } static a_int32_t -ath_get_pktlen(struct ath_buf *bf, a_int32_t hdrlen) +ath_get_pktlen(struct ath_tx_buf *bf, a_int32_t hdrlen) { adf_nbuf_t skb = bf->bf_skb; a_int32_t pktlen; @@ -957,7 +951,7 @@ ath_get_pktlen(struct ath_buf *bf, a_int32_t hdrlen) void ath_tgt_tx_send_normal(struct ath_softc_tgt *sc, struct ath_tx_buf *bf) { - struct ath_node_target *an = bf->bf_node; + struct ath_node_target *an = ATH_NODE_TARGET(bf->bf_node); struct ath_rc_series rcs[4]; struct ath_rc_series mrcs[4]; a_int32_t shortPreamble = 0; @@ -970,14 +964,14 @@ ath_tgt_tx_send_normal(struct ath_softc_tgt *sc, struct ath_tx_buf *bf) ath_tgt_rate_findrate(sc, an, shortPreamble, 0, 0, 0, 0, 0, rcs, &isProbe); - memcpy(bf->bf_rcs, rcs, sizeof(rcs)); + ath_hal_memcpy(bf->bf_rcs, rcs, sizeof(rcs)); } else { mrcs[1].tries = mrcs[2].tries = mrcs[3].tries = 0; mrcs[1].rix = mrcs[2].rix = mrcs[3].rix = 0; mrcs[0].rix = 0; mrcs[0].tries = 1; mrcs[0].flags = 0; - memcpy(bf->bf_rcs, mrcs, sizeof(mrcs)); + ath_hal_memcpy(bf->bf_rcs, mrcs, sizeof(mrcs)); } ath_buf_set_rate(sc, bf); @@ -1022,7 +1016,7 @@ ath_tx_uc_comp(struct ath_softc_tgt *sc, struct ath_tx_buf *bf) } static void -ath_update_stats(struct ath_softc_tgt *sc, struct ath_buf *bf) +ath_update_stats(struct ath_softc_tgt *sc, struct ath_tx_buf *bf) { struct ath_tx_desc *ds = bf->bf_desc; u_int32_t sr, lr; @@ -1248,8 +1242,8 @@ fail: static void ath_tgt_txqaddbuf(struct ath_softc_tgt *sc, - struct ath_txq *txq, struct ath_buf *bf, - struct ath_desc *lastds) + struct ath_txq *txq, struct ath_tx_buf *bf, + struct ath_tx_desc *lastds) { struct ath_hal *ah = sc->sc_ah; @@ -1295,7 +1289,7 @@ ath_tgt_tx_enqueue(struct ath_txq *txq, struct ath_atx_tid *tid) } static void -ath_tgt_txq_schedule(struct ath_softc *sc, struct ath_txq *txq) +ath_tgt_txq_schedule(struct ath_softc_tgt *sc, struct ath_txq *txq) { struct ath_atx_tid *tid; u_int8_t bdone; @@ -1382,7 +1376,7 @@ ath_tgt_tx_sched_aggr(struct ath_softc_tgt *sc, ath_atx_tid_t *tid) { struct ath_tx_buf *bf, *bf_last; ATH_AGGR_STATUS status; - ath_bufhead bf_q; + ath_tx_bufhead bf_q; struct ath_txq *txq = TID_TO_ACTXQ(tid->tidno); struct ath_desc *ds = NULL; int i; @@ -1403,7 +1397,7 @@ ath_tgt_tx_sched_aggr(struct ath_softc_tgt *sc, ath_atx_tid_t *tid) break; bf = asf_tailq_first(&bf_q); - bf_last = asf_tailq_last(&bf_q, ath_bufhead_s); + bf_last = asf_tailq_last(&bf_q, ath_tx_bufhead_s); if (bf->bf_nframes == 1) { @@ -1801,7 +1795,7 @@ ath_tx_comp_cleanup(struct ath_softc_tgt *sc, struct ath_tx_buf *bf) static void ath_tx_retry_subframe(struct ath_softc_tgt *sc, struct ath_tx_buf *bf, - ath_bufhead *bf_q, struct ath_tx_buf **bar) + ath_tx_bufhead *bf_q, struct ath_tx_buf **bar) { struct ath_node_target *an = ATH_NODE_TARGET(bf->bf_node);