Lines Matching +full:rx +full:- +full:ts +full:- +full:max

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2009-2010 Weongyo Jeong <weongyo@freebsd.org>
48 (((phy)->rev >= 2) && ((phy)->rf_ver == 0x2050) && \
49 ((phy)->rf_rev == 8))
51 (((phy)->rev > 1) || ((phy)->gmode))
54 struct timespec ts; \
55 nanouptime(&ts); \
56 (v) = ts.tv_nsec / 1000000 + ts.tv_sec * 1000; \
58 #define BWN_ISOLDFMT(mac) ((mac)->mac_fw.rev <= 351)
65 ((uint16_t)((((uint16_t)tq->tq_index + 1) << 12) | tp->tp_index))
67 ((uint16_t)(((uint16_t)dr->dr_index + 1) << 12) | (uint16_t)slot)
69 (bus_read_2((mac)->mac_sc->sc_mem_res, (o)))
71 (bus_read_4((mac)->mac_sc->sc_mem_res, (o)))
73 (bus_write_2((mac)->mac_sc->sc_mem_res, (o), (v)))
81 (bus_write_4((mac)->mac_sc->sc_mem_res, (o), (v)))
85 ((bhnd_get_hwrev(mac->mac_sc->sc_dev) >= 11) ? 0x18 : 0)
87 ((bhnd_get_hwrev(mac->mac_sc->sc_dev) >= 11) ? 0x38 : 8)
88 #define BWN_SEC_NEWAPI(mac) (mac->mac_fw.rev >= 351)
90 (BWN_SEC_NEWAPI(mac) ? idx : ((idx >= 4) ? idx - 4 : idx))
91 #define BWN_RF_READ(mac, r) (mac->mac_phy.rf_read(mac, r))
92 #define BWN_RF_WRITE(mac, r, v) (mac->mac_phy.rf_write(mac, r, v))
99 #define BWN_PHY_READ(mac, r) (mac->mac_phy.phy_read(mac, r))
101 (mac->mac_phy.phy_write(mac, r, v))
103 if (mac->mac_phy.phy_maskset != NULL) { \
104 KASSERT(mac->mac_status < BWN_MAC_STATUS_INITED || \
105 mac->mac_suspended > 0, \
107 mac->mac_phy.phy_maskset(mac, offset, 0xffff, set); \
113 if (mac->mac_phy.phy_maskset != NULL) { \
114 KASSERT(mac->mac_status < BWN_MAC_STATUS_INITED || \
115 mac->mac_suspended > 0, \
117 mac->mac_phy.phy_maskset(mac, offset, mask, set); \
123 if (mac->mac_phy.phy_maskset != NULL) { \
124 KASSERT(mac->mac_status < BWN_MAC_STATUS_INITED || \
125 mac->mac_suspended > 0, \
127 mac->mac_phy.phy_maskset(mac, offset, mask, 0); \
133 KASSERT(mac->mac_status < BWN_MAC_STATUS_INITED || \
134 mac->mac_suspended > 0, \
138 #define BWN_LO_CALIB_EXPIRE (1000 * (30 - 2))
139 #define BWN_LO_PWRVEC_EXPIRE (1000 * (30 - 2))
140 #define BWN_LO_TXCTL_EXPIRE (1000 * (180 - 4))
144 #define BWN_BBATTCMP(a, b) ((a)->att == (b)->att)
146 (((a)->att == (b)->att) && ((a)->padmix == (b)->padmix))
148 BWN_WRITE_2(mac, (tq)->tq_base + offset, value)
150 BWN_READ_4(mac, tq->tq_base + offset)
156 bus_barrier((mac)->mac_sc->sc_mem_res, (offset), (length), (flags))
158 (BWN_READ_4(dr->dr_mac, dr->dr_base + offset))
160 (BWN_WRITE_4(dr->dr_mac, dr->dr_base + offset, value))
215 uint8_t max; member
227 uint8_t max; member
476 * I'd like the newer PHY code to not hide in the top-level
661 bus_dmamap_t dr_spare_dmap; /* only for RX */
702 struct bwn_dma_ring *rx; member
735 struct bwn_pio_rxqueue rx; member
910 #define BWN_LED_EVENT_NONE -1
977 switch (mac->mac_fw.fw_hdr_format) { in bwn_tx_hdrsize()
986 mac->mac_fw.fw_hdr_format); in bwn_tx_hdrsize()
992 * Driver-specific vap state.
1077 mtx_init(&(sc)->sc_mtx, device_get_nameunit((sc)->sc_dev), \
1079 #define BWN_LOCK_DESTROY(sc) mtx_destroy(&(sc)->sc_mtx)
1080 #define BWN_LOCK(sc) mtx_lock(&(sc)->sc_mtx)
1081 #define BWN_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx)
1082 #define BWN_ASSERT_LOCKED(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED)
1096 struct ieee80211com *ic = &mac->mac_sc->sc_ic; in bwn_current_band()
1097 if (IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan)) in bwn_current_band()
1106 struct ieee80211com *ic = &mac->mac_sc->sc_ic; in bwn_is_40mhz()
1108 return !! (IEEE80211_IS_CHAN_HT40(ic->ic_curchan)); in bwn_is_40mhz()
1115 struct ieee80211com *ic = &mac->mac_sc->sc_ic; in bwn_get_centre_freq()
1117 return ic->ic_curchan->ic_freq; in bwn_get_centre_freq()
1125 return chan->ic_freq; in bwn_get_chan_centre_freq()
1132 struct ieee80211com *ic = &mac->mac_sc->sc_ic; in bwn_get_chan()
1134 return ic->ic_curchan->ic_ieee; in bwn_get_chan()
1141 struct ieee80211com *ic = &mac->mac_sc->sc_ic; in bwn_get_channel()
1142 return ic->ic_curchan; in bwn_get_channel()
1149 struct ieee80211com *ic = &mac->mac_sc->sc_ic; in bwn_is_chan_passive()
1150 return !! IEEE80211_IS_CHAN_PASSIVE(ic->ic_curchan); in bwn_is_chan_passive()
1156 struct ieee80211com *ic = &mac->mac_sc->sc_ic; in bwn_get_chan_type()
1158 c = ic->ic_curchan; in bwn_get_chan_type()
1174 return c->ic_maxpower / 2; in bwn_get_chan_power()