Lines Matching +full:edma +full:- +full:tx

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
44 * by the driver - eg, calls to ath_hal_gettsf32().
114 struct ath_hal *ah = sc->sc_ah; in ath_beaconq_setup()
123 if (sc->sc_isedma) in ath_beaconq_setup()
136 #define ATH_EXPONENT_TO_VALUE(v) ((1<<(v))-1) in ath_beaconq_config()
137 struct ieee80211com *ic = &sc->sc_ic; in ath_beaconq_config()
138 struct ath_hal *ah = sc->sc_ah; in ath_beaconq_config()
141 ath_hal_gettxqueueprops(ah, sc->sc_bhalq, &qi); in ath_beaconq_config()
142 if (ic->ic_opmode == IEEE80211_M_HOSTAP || in ath_beaconq_config()
143 ic->ic_opmode == IEEE80211_M_MBSS) { in ath_beaconq_config()
160 qi.tqi_aifs = wmep->wmep_aifsn; in ath_beaconq_config()
161 qi.tqi_cwmin = 2*ATH_EXPONENT_TO_VALUE(wmep->wmep_logcwmin); in ath_beaconq_config()
162 qi.tqi_cwmax = ATH_EXPONENT_TO_VALUE(wmep->wmep_logcwmax); in ath_beaconq_config()
165 if (!ath_hal_settxqueueprops(ah, sc->sc_bhalq, &qi)) { in ath_beaconq_config()
166 device_printf(sc->sc_dev, "unable to update parameters for " in ath_beaconq_config()
170 ath_hal_resettxqueue(ah, sc->sc_bhalq); /* push to h/w */ in ath_beaconq_config()
182 struct ieee80211vap *vap = ni->ni_vap; in ath_beacon_alloc()
188 bf = avp->av_bcbuf; in ath_beacon_alloc()
190 __func__, bf->bf_m, bf->bf_node); in ath_beacon_alloc()
191 if (bf->bf_m != NULL) { in ath_beacon_alloc()
192 bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); in ath_beacon_alloc()
193 m_freem(bf->bf_m); in ath_beacon_alloc()
194 bf->bf_m = NULL; in ath_beacon_alloc()
196 if (bf->bf_node != NULL) { in ath_beacon_alloc()
197 ieee80211_free_node(bf->bf_node); in ath_beacon_alloc()
198 bf->bf_node = NULL; in ath_beacon_alloc()
202 * NB: the beacon data buffer must be 32-bit aligned; in ath_beacon_alloc()
208 device_printf(sc->sc_dev, "%s: cannot get mbuf\n", __func__); in ath_beacon_alloc()
209 sc->sc_stats.ast_be_nombuf++; in ath_beacon_alloc()
212 error = bus_dmamap_load_mbuf_sg(sc->sc_dmat, bf->bf_dmamap, m, in ath_beacon_alloc()
213 bf->bf_segs, &bf->bf_nseg, in ath_beacon_alloc()
216 device_printf(sc->sc_dev, in ath_beacon_alloc()
229 if (sc->sc_stagbeacons && avp->av_bslot > 0) { in ath_beacon_alloc()
243 tsfadjust = ni->ni_intval * in ath_beacon_alloc()
244 (ATH_BCBUF - avp->av_bslot) / ATH_BCBUF; in ath_beacon_alloc()
245 tsfadjust = htole64(tsfadjust << 10); /* TU -> TSF */ in ath_beacon_alloc()
249 __func__, sc->sc_stagbeacons ? "stagger" : "burst", in ath_beacon_alloc()
250 avp->av_bslot, ni->ni_intval, in ath_beacon_alloc()
256 bf->bf_m = m; in ath_beacon_alloc()
257 bf->bf_node = ieee80211_ref_node(ni); in ath_beacon_alloc()
269 (((_ic)->ic_flags & (IEEE80211_F_SHPREAMBLE | IEEE80211_F_USEBARKER))\ in ath_beacon_setup()
271 struct ieee80211_node *ni = bf->bf_node; in ath_beacon_setup()
272 struct ieee80211com *ic = ni->ni_ic; in ath_beacon_setup()
273 struct mbuf *m = bf->bf_m; in ath_beacon_setup()
274 struct ath_hal *ah = sc->sc_ah; in ath_beacon_setup()
284 __func__, m, m->m_len); in ath_beacon_setup()
287 ds = bf->bf_desc; in ath_beacon_setup()
288 bf->bf_last = bf; in ath_beacon_setup()
289 bf->bf_lastds = ds; in ath_beacon_setup()
292 if (ic->ic_opmode == IEEE80211_M_IBSS && sc->sc_hasveol) { in ath_beacon_setup()
293 /* self-linked descriptor */ in ath_beacon_setup()
294 ath_hal_settxdesclink(sc->sc_ah, ds, bf->bf_daddr); in ath_beacon_setup()
299 antenna = sc->sc_txantenna; in ath_beacon_setup()
301 ath_hal_settxdesclink(sc->sc_ah, ds, 0); in ath_beacon_setup()
306 if (sc->sc_txantenna != 0) in ath_beacon_setup()
307 antenna = sc->sc_txantenna; in ath_beacon_setup()
308 else if (sc->sc_stagbeacons && sc->sc_nbcnvaps != 0) in ath_beacon_setup()
309 antenna = ((sc->sc_stats.ast_be_xmit / sc->sc_nbcnvaps) & 4 ? 2 : 1); in ath_beacon_setup()
311 antenna = (sc->sc_stats.ast_be_xmit & 4 ? 2 : 1); in ath_beacon_setup()
314 KASSERT(bf->bf_nseg == 1, in ath_beacon_setup()
315 ("multi-segment beacon frame; nseg %u", bf->bf_nseg)); in ath_beacon_setup()
322 rt = sc->sc_currates; in ath_beacon_setup()
323 rate = rt->info[rix].rateCode; in ath_beacon_setup()
325 rate |= rt->info[rix].shortPreamble; in ath_beacon_setup()
327 , m->m_len + IEEE80211_CRC_LEN /* frame length */ in ath_beacon_setup()
340 * The EDMA HAL currently assumes that _all_ rate control in ath_beacon_setup()
344 if (sc->sc_isedma) { in ath_beacon_setup()
347 rc[0].ChSel = sc->sc_txchainmask; in ath_beacon_setup()
349 rc[0].Rate = rt->info[rix].rateCode; in ath_beacon_setup()
353 ath_hal_computetxtime(ah, rt, roundup(m->m_len, 4), in ath_beacon_setup()
359 segLenList[0] = roundup(m->m_len, 4); in ath_beacon_setup()
361 bufAddrList[0] = bf->bf_segs[0].ds_addr; in ath_beacon_setup()
367 , sc->sc_bhalq /* hardware TXQ */ in ath_beacon_setup()
381 struct ieee80211_beacon_offsets *bo = &vap->iv_bcn_off; in ath_beacon_update()
383 setbit(bo->bo_flags, item); in ath_beacon_update()
398 ret = ath_hal_get_mib_cycle_counts(sc->sc_ah, &hs); in ath_beacon_miss()
400 if (ath_hal_gethangstate(sc->sc_ah, 0xffff, &hangs) && hangs != 0) { in ath_beacon_miss()
408 if (if_ath_alq_checkdebug(&sc->sc_alq, ATH_ALQ_MISSED_BEACON)) in ath_beacon_miss()
409 if_ath_alq_post(&sc->sc_alq, ATH_ALQ_MISSED_BEACON, 0, NULL); in ath_beacon_miss()
433 struct ath_hal *ah = sc->sc_ah; in ath_beacon_proc()
448 if (ath_hal_numtxpending(ah, sc->sc_bhalq) != 0) { in ath_beacon_proc()
450 sc->sc_bmisscount++; in ath_beacon_proc()
451 sc->sc_stats.ast_be_missed++; in ath_beacon_proc()
456 __func__, sc->sc_bmisscount); in ath_beacon_proc()
457 if (sc->sc_bmisscount >= ath_bstuck_threshold) in ath_beacon_proc()
458 taskqueue_enqueue(sc->sc_tq, &sc->sc_bstucktask); in ath_beacon_proc()
461 if (sc->sc_bmisscount != 0) { in ath_beacon_proc()
464 __func__, sc->sc_bmisscount); in ath_beacon_proc()
465 sc->sc_bmisscount = 0; in ath_beacon_proc()
467 if (if_ath_alq_checkdebug(&sc->sc_alq, ATH_ALQ_RESUME_BEACON)) in ath_beacon_proc()
468 if_ath_alq_post(&sc->sc_alq, ATH_ALQ_RESUME_BEACON, 0, NULL); in ath_beacon_proc()
472 if (sc->sc_stagbeacons) { /* staggered beacons */ in ath_beacon_proc()
473 struct ieee80211com *ic = &sc->sc_ic; in ath_beacon_proc()
478 slot = ((tsftu % ic->ic_lintval) * ATH_BCBUF) / ic->ic_lintval; in ath_beacon_proc()
479 vap = sc->sc_bslot[(slot+1) % ATH_BCBUF]; in ath_beacon_proc()
481 if (vap != NULL && vap->iv_state >= IEEE80211_S_RUN) { in ath_beacon_proc()
484 bfaddr = bf->bf_daddr; in ath_beacon_proc()
490 vap = sc->sc_bslot[slot]; in ath_beacon_proc()
491 if (vap != NULL && vap->iv_state >= IEEE80211_S_RUN) { in ath_beacon_proc()
495 * otherwise it won't work for EDMA chipsets! in ath_beacon_proc()
499 *bflink = bf->bf_daddr; in ath_beacon_proc()
500 ath_hal_gettxdesclinkptr(sc->sc_ah, in ath_beacon_proc()
501 bf->bf_desc, &bflink); in ath_beacon_proc()
507 * otherwise it won't work for EDMA chipsets! in ath_beacon_proc()
513 * Handle slot time change when a non-ERP station joins/leaves in ath_beacon_proc()
520 if (sc->sc_updateslot == UPDATE) { in ath_beacon_proc()
521 sc->sc_updateslot = COMMIT; /* commit next beacon */ in ath_beacon_proc()
522 sc->sc_slotupdate = slot; in ath_beacon_proc()
523 } else if (sc->sc_updateslot == COMMIT && sc->sc_slotupdate == slot) in ath_beacon_proc()
527 * Check recent per-antenna transmit statistics and flip in ath_beacon_proc()
529 * on the non-default antenna. in ath_beacon_proc()
532 if (!sc->sc_diversity && (!sc->sc_stagbeacons || slot == 0)) { in ath_beacon_proc()
533 otherant = sc->sc_defant & 1 ? 2 : 1; in ath_beacon_proc()
534 if (sc->sc_ant_tx[otherant] > sc->sc_ant_tx[sc->sc_defant] + 2) in ath_beacon_proc()
536 sc->sc_ant_tx[1] = sc->sc_ant_tx[2] = 0; in ath_beacon_proc()
540 ATH_TXQ_LOCK(sc->sc_cabq); in ath_beacon_proc()
542 ATH_TXQ_UNLOCK(sc->sc_cabq); in ath_beacon_proc()
551 if (! sc->sc_isedma) { in ath_beacon_proc()
552 if (!ath_hal_stoptxdma(ah, sc->sc_bhalq)) { in ath_beacon_proc()
555 __func__, sc->sc_bhalq); in ath_beacon_proc()
560 ath_hal_puttxbuf(ah, sc->sc_bhalq, bfaddr); in ath_beacon_proc()
561 ath_hal_txstart(ah, sc->sc_bhalq); in ath_beacon_proc()
563 sc->sc_stats.ast_be_xmit++; in ath_beacon_proc()
571 struct ath_txq *cabq = sc->sc_cabq; in ath_beacon_cabq_start_edma()
579 if (TAILQ_EMPTY(&cabq->axq_q)) in ath_beacon_cabq_start_edma()
581 bf = TAILQ_FIRST(&cabq->axq_q); in ath_beacon_cabq_start_edma()
582 bf_last = TAILQ_LAST(&cabq->axq_q, axq_q_s); in ath_beacon_cabq_start_edma()
588 * This ideally should live in the EDMA code file in ath_beacon_cabq_start_edma()
592 * We can't treat this like a normal TX queue because in ath_beacon_cabq_start_edma()
593 * in the case of multi-VAP traffic, we may have to flush in ath_beacon_cabq_start_edma()
595 * But for non-staggered beacons, we could in theory in ath_beacon_cabq_start_edma()
598 * how to correctly/better handle multi-VAP CABQ traffic in ath_beacon_cabq_start_edma()
599 * with EDMA. in ath_beacon_cabq_start_edma()
608 if (cabq->axq_fifo_depth >= HAL_TXFIFO_DEPTH) { in ath_beacon_cabq_start_edma()
609 device_printf(sc->sc_dev, in ath_beacon_cabq_start_edma()
612 cabq->axq_qnum, in ath_beacon_cabq_start_edma()
613 cabq->axq_fifo_depth); in ath_beacon_cabq_start_edma()
625 bf->bf_flags |= ATH_BUF_FIFOPTR; in ath_beacon_cabq_start_edma()
626 bf_last->bf_flags |= ATH_BUF_FIFOEND; in ath_beacon_cabq_start_edma()
630 TAILQ_FOREACH(bfi, &cabq->axq_q, bf_list) { in ath_beacon_cabq_start_edma()
631 ath_printtxbuf(sc, bf, cabq->axq_qnum, i, 0); in ath_beacon_cabq_start_edma()
642 TAILQ_CONCAT(&cabq->fifo.axq_q, &cabq->axq_q, bf_list); in ath_beacon_cabq_start_edma()
643 cabq->axq_link = NULL; in ath_beacon_cabq_start_edma()
644 cabq->fifo.axq_depth += cabq->axq_depth; in ath_beacon_cabq_start_edma()
645 cabq->axq_depth = 0; in ath_beacon_cabq_start_edma()
648 cabq->axq_fifo_depth++; in ath_beacon_cabq_start_edma()
651 ath_hal_puttxbuf(sc->sc_ah, cabq->axq_qnum, bf->bf_daddr); in ath_beacon_cabq_start_edma()
652 cabq->axq_flags |= ATH_TXQ_PUTRUNNING; in ath_beacon_cabq_start_edma()
655 ath_hal_txstart(sc->sc_ah, cabq->axq_qnum); in ath_beacon_cabq_start_edma()
663 struct ath_txq *cabq = sc->sc_cabq; in ath_beacon_cabq_start_legacy()
666 if (TAILQ_EMPTY(&cabq->axq_q)) in ath_beacon_cabq_start_legacy()
668 bf = TAILQ_FIRST(&cabq->axq_q); in ath_beacon_cabq_start_legacy()
671 ath_hal_puttxbuf(sc->sc_ah, cabq->axq_qnum, bf->bf_daddr); in ath_beacon_cabq_start_legacy()
672 cabq->axq_flags |= ATH_TXQ_PUTRUNNING; in ath_beacon_cabq_start_legacy()
675 ath_hal_txstart(sc->sc_ah, cabq->axq_qnum); in ath_beacon_cabq_start_legacy()
679 * Start CABQ transmission - this assumes that all frames are prepped
685 struct ath_txq *cabq = sc->sc_cabq; in ath_beacon_cabq_start()
689 if (TAILQ_EMPTY(&cabq->axq_q)) in ath_beacon_cabq_start()
692 if (sc->sc_isedma) in ath_beacon_cabq_start()
702 struct ath_txq *cabq = sc->sc_cabq; in ath_beacon_generate()
707 KASSERT(vap->iv_state >= IEEE80211_S_RUN, in ath_beacon_generate()
708 ("not running, state %d", vap->iv_state)); in ath_beacon_generate()
709 KASSERT(avp->av_bcbuf != NULL, ("no beacon buffer")); in ath_beacon_generate()
713 * non-zero then we need to remap the memory because in ath_beacon_generate()
717 bf = avp->av_bcbuf; in ath_beacon_generate()
718 m = bf->bf_m; in ath_beacon_generate()
720 nmcastq = avp->av_mcastq.axq_depth; in ath_beacon_generate()
722 if (ieee80211_beacon_update(bf->bf_node, m, nmcastq)) { in ath_beacon_generate()
724 bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); in ath_beacon_generate()
725 error = bus_dmamap_load_mbuf_sg(sc->sc_dmat, bf->bf_dmamap, m, in ath_beacon_generate()
726 bf->bf_segs, &bf->bf_nseg, in ath_beacon_generate()
729 if_printf(vap->iv_ifp, in ath_beacon_generate()
735 if ((vap->iv_bcn_off.bo_tim[4] & 1) && cabq->axq_depth) { in ath_beacon_generate()
738 __func__, nmcastq, cabq->axq_depth); in ath_beacon_generate()
739 sc->sc_stats.ast_cabq_busy++; in ath_beacon_generate()
740 if (sc->sc_nvaps > 1 && sc->sc_stagbeacons) { in ath_beacon_generate()
749 * XXX TODO: this doesn't stop CABQ DMA - it assumes in ath_beacon_generate()
759 * XXX can we even stop TX DMA here? Check what the in ath_beacon_generate()
761 * that stopping TX requires RX is paused. in ath_beacon_generate()
767 bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, BUS_DMASYNC_PREWRITE); in ath_beacon_generate()
779 if (vap->iv_bcn_off.bo_tim[4] & 1) { in ath_beacon_generate()
781 ATH_TXQ_LOCK(&avp->av_mcastq); in ath_beacon_generate()
794 bfm = TAILQ_FIRST(&avp->av_mcastq.axq_q); in ath_beacon_generate()
801 * EDMA descriptors require some recalculation in ath_beacon_generate()
806 ath_hal_settxdesclink(sc->sc_ah, in ath_beacon_generate()
807 bfc_last->bf_lastds, in ath_beacon_generate()
808 bfm->bf_daddr); in ath_beacon_generate()
810 ath_txqmove(cabq, &avp->av_mcastq); in ath_beacon_generate()
814 * queue frame arrived before we grabbed the TX in ath_beacon_generate()
817 sc->sc_stats.ast_cabq_xmit += nmcastq; in ath_beacon_generate()
819 ATH_TXQ_UNLOCK(&avp->av_mcastq); in ath_beacon_generate()
828 struct ath_hal *ah = sc->sc_ah; in ath_beacon_start_adhoc()
833 KASSERT(avp->av_bcbuf != NULL, ("no beacon buffer")); in ath_beacon_start_adhoc()
837 * non-zero then we need to remap the memory because in ath_beacon_start_adhoc()
841 bf = avp->av_bcbuf; in ath_beacon_start_adhoc()
842 m = bf->bf_m; in ath_beacon_start_adhoc()
843 if (ieee80211_beacon_update(bf->bf_node, m, 0)) { in ath_beacon_start_adhoc()
845 bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); in ath_beacon_start_adhoc()
846 error = bus_dmamap_load_mbuf_sg(sc->sc_dmat, bf->bf_dmamap, m, in ath_beacon_start_adhoc()
847 bf->bf_segs, &bf->bf_nseg, in ath_beacon_start_adhoc()
850 if_printf(vap->iv_ifp, in ath_beacon_start_adhoc()
857 bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, BUS_DMASYNC_PREWRITE); in ath_beacon_start_adhoc()
859 /* NB: caller is known to have already stopped tx dma */ in ath_beacon_start_adhoc()
860 ath_hal_puttxbuf(ah, sc->sc_bhalq, bf->bf_daddr); in ath_beacon_start_adhoc()
861 ath_hal_txstart(ah, sc->sc_bhalq); in ath_beacon_start_adhoc()
872 __func__, bf, bf->bf_m, bf->bf_node); in ath_beacon_return()
873 if (bf->bf_m != NULL) { in ath_beacon_return()
874 bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); in ath_beacon_return()
875 m_freem(bf->bf_m); in ath_beacon_return()
876 bf->bf_m = NULL; in ath_beacon_return()
878 if (bf->bf_node != NULL) { in ath_beacon_return()
879 ieee80211_free_node(bf->bf_node); in ath_beacon_return()
880 bf->bf_node = NULL; in ath_beacon_return()
882 TAILQ_INSERT_TAIL(&sc->sc_bbuf, bf, bf_list); in ath_beacon_return()
893 TAILQ_FOREACH(bf, &sc->sc_bbuf, bf_list) { in ath_beacon_free()
896 __func__, bf, bf->bf_m, bf->bf_node); in ath_beacon_free()
897 if (bf->bf_m != NULL) { in ath_beacon_free()
898 bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); in ath_beacon_free()
899 m_freem(bf->bf_m); in ath_beacon_free()
900 bf->bf_m = NULL; in ath_beacon_free()
902 if (bf->bf_node != NULL) { in ath_beacon_free()
903 ieee80211_free_node(bf->bf_node); in ath_beacon_free()
904 bf->bf_node = NULL; in ath_beacon_free()
930 struct ath_hal *ah = sc->sc_ah; in ath_beacon_config()
932 struct ieee80211com *ic = &sc->sc_ic; in ath_beacon_config()
948 TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { in ath_beacon_config()
950 if ((vap->iv_opmode == IEEE80211_M_STA) && in ath_beacon_config()
951 ((vap->iv_flags_ext & IEEE80211_FEXT_SWBMISS) != 0)) in ath_beacon_config()
959 device_printf(sc->sc_dev, "called with no valid vaps?\n"); in ath_beacon_config()
963 if ((vap->iv_flags_ext & IEEE80211_FEXT_SWBMISS) != 0) { in ath_beacon_config()
964 device_printf(sc->sc_dev, "called on VAP with SWBMISS set?\n"); in ath_beacon_config()
971 ni = ieee80211_ref_node(vap->iv_bss); in ath_beacon_config()
979 memset(&avp->quiet_ie, 0, sizeof(avp->quiet_ie)); in ath_beacon_config()
982 nexttbtt = TSF_TO_TU(le32dec(ni->ni_tstamp.data + 4), in ath_beacon_config()
983 le32dec(ni->ni_tstamp.data)); in ath_beacon_config()
985 tsf_beacon = ((uint64_t) le32dec(ni->ni_tstamp.data + 4)) << 32; in ath_beacon_config()
986 tsf_beacon |= le32dec(ni->ni_tstamp.data); in ath_beacon_config()
988 if (ic->ic_opmode == IEEE80211_M_HOSTAP || in ath_beacon_config()
989 ic->ic_opmode == IEEE80211_M_MBSS) { in ath_beacon_config()
991 * For multi-bss ap/mesh support beacons are either staggered in ath_beacon_config()
997 intval = ni->ni_intval & HAL_BEACON_PERIOD; in ath_beacon_config()
998 if (sc->sc_stagbeacons) in ath_beacon_config()
1002 intval = ni->ni_intval & HAL_BEACON_PERIOD; in ath_beacon_config()
1015 * The specification (802.11-2012 10.1.3.2 - Beacon Generation in in ath_beacon_config()
1026 if (ic->ic_opmode == IEEE80211_M_STA && !sc->sc_swbmiss) { in ath_beacon_config()
1035 dtimperiod = ni->ni_dtim_period; in ath_beacon_config()
1038 dtimcount = ni->ni_dtim_count; in ath_beacon_config()
1062 (long long) tsf - in ath_beacon_config()
1069 (long long) ((long long) nexttbtt * 1024LL) - (long long) tsf_beacon); in ath_beacon_config()
1077 remainder = (nexttbtt - tsftu) % intval; in ath_beacon_config()
1080 countdiff = (oldtbtt - nexttbtt) / intval % dtimperiod; in ath_beacon_config()
1082 dtimcount -= countdiff; in ath_beacon_config()
1084 dtimcount += dtimperiod - countdiff; in ath_beacon_config()
1090 remainder = (tsftu - nexttbtt) % intval; in ath_beacon_config()
1091 nexttbtt = tsftu - remainder + intval; in ath_beacon_config()
1092 countdiff = (nexttbtt - oldtbtt) / intval % dtimperiod; in ath_beacon_config()
1094 dtimcount -= countdiff; in ath_beacon_config()
1096 dtimcount += dtimperiod - countdiff; in ath_beacon_config()
1104 (long long) ((long long)nexttbtt * 1024LL) - (long long)tsf); in ath_beacon_config()
1124 bs.bs_timoffset = ni->ni_timoff; in ath_beacon_config()
1131 bs.bs_bmissthreshold = vap->iv_bmissthreshold; in ath_beacon_config()
1171 sc->sc_imask |= HAL_INT_BMISS; in ath_beacon_config()
1172 ath_hal_intrset(ah, sc->sc_imask); in ath_beacon_config()
1177 if (ic->ic_opmode == IEEE80211_M_IBSS) { in ath_beacon_config()
1182 * self-linked tx descriptor and let the hardware in ath_beacon_config()
1186 if (!sc->sc_hasveol) in ath_beacon_config()
1187 sc->sc_imask |= HAL_INT_SWBA; in ath_beacon_config()
1200 } else if (ic->ic_opmode == IEEE80211_M_HOSTAP || in ath_beacon_config()
1201 ic->ic_opmode == IEEE80211_M_MBSS) { in ath_beacon_config()
1207 sc->sc_imask |= HAL_INT_SWBA; /* beacon prepare */ in ath_beacon_config()
1212 * Now dirty things because for now, the EDMA HAL has in ath_beacon_config()
1215 if (sc->sc_isedma) { in ath_beacon_config()
1225 sc->sc_bmisscount = 0; in ath_beacon_config()
1226 ath_hal_intrset(ah, sc->sc_imask); in ath_beacon_config()
1228 * When using a self-linked beacon descriptor in in ath_beacon_config()
1231 if (ic->ic_opmode == IEEE80211_M_IBSS && sc->sc_hasveol) in ath_beacon_config()
1239 __func__, nexttbtt, intval, ni->ni_intval, in ath_beacon_config()
1242 (long long) tsf - in ath_beacon_config()