X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=target_firmware%2Fwlan%2Fif_owl.c;h=407f9f64011de413a80e0457532ec38fd86dbc95;hb=828f0394150b00cc354a6c6cbe7e89b7193b6eec;hp=b24e7d75e5415e2790daa7775de3003d5a991468;hpb=fb87b1a01451dc5b21b9f8944e5eca223fe22b96;p=open-ath9k-htc-firmware.git diff --git a/target_firmware/wlan/if_owl.c b/target_firmware/wlan/if_owl.c index b24e7d7..407f9f6 100755 --- a/target_firmware/wlan/if_owl.c +++ b/target_firmware/wlan/if_owl.c @@ -110,8 +110,6 @@ static void ath_update_stats(struct ath_softc_tgt *sc, struct ath_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); @@ -122,7 +120,7 @@ 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 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); @@ -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) { @@ -374,7 +372,6 @@ static void ath_buf_set_rate(struct ath_softc_tgt *sc, struct ath_tx_buf *bf) HAL_11N_RATE_SERIES series[4]; a_int32_t i, flags; a_uint8_t rix, cix, rtsctsrate; - a_uint32_t aggr_limit_with_rts; a_uint32_t ctsduration = 0; a_int32_t prot_mode = AH_FALSE; @@ -402,13 +399,6 @@ static void ath_buf_set_rate(struct ath_softc_tgt *sc, struct ath_tx_buf *bf) } } - ath_hal_getrtsaggrlimit(sc->sc_ah, &aggr_limit_with_rts); - - if (bf->bf_isaggr && aggr_limit_with_rts && - bf->bf_al > aggr_limit_with_rts) { - flags &= ~(HAL_TXDESC_RTSENA); - } - adf_os_mem_set(series, 0, sizeof(HAL_11N_RATE_SERIES) * 4); for (i = 0; i < 4; i++) { @@ -540,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; @@ -768,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; @@ -783,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; @@ -800,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; @@ -978,14 +968,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); @@ -1303,7 +1293,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;