Lines Matching full:mac

58 #define	BWN_ISOLDFMT(mac)		((mac)->mac_fw.rev <= 351)  argument
61 #define BWN_HDRSIZE(mac) bwn_tx_hdrsize(mac) argument
68 #define BWN_READ_2(mac, o) \ argument
69 (bus_read_2((mac)->mac_sc->sc_mem_res, (o)))
70 #define BWN_READ_4(mac, o) \ argument
71 (bus_read_4((mac)->mac_sc->sc_mem_res, (o)))
72 #define BWN_WRITE_2(mac, o, v) \ argument
73 (bus_write_2((mac)->mac_sc->sc_mem_res, (o), (v)))
74 #define BWN_WRITE_2_F(mac, o, v) do { \ argument
75 (BWN_WRITE_2(mac, o, v)); \
76 BWN_READ_2(mac, o); \
78 #define BWN_WRITE_SETMASK2(mac, offset, mask, set) \ argument
79 BWN_WRITE_2(mac, offset, (BWN_READ_2(mac, offset) & mask) | set)
80 #define BWN_WRITE_4(mac, o, v) \ argument
81 (bus_write_4((mac)->mac_sc->sc_mem_res, (o), (v)))
82 #define BWN_WRITE_SETMASK4(mac, offset, mask, set) \ argument
83 BWN_WRITE_4(mac, offset, (BWN_READ_4(mac, offset) & mask) | set)
84 #define BWN_PIO_TXQOFFSET(mac) \ argument
85 ((bhnd_get_hwrev(mac->mac_sc->sc_dev) >= 11) ? 0x18 : 0)
86 #define BWN_PIO_RXQOFFSET(mac) \ argument
87 ((bhnd_get_hwrev(mac->mac_sc->sc_dev) >= 11) ? 0x38 : 8)
88 #define BWN_SEC_NEWAPI(mac) (mac->mac_fw.rev >= 351) argument
89 #define BWN_SEC_KEY2FW(mac, idx) \ argument
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)) argument
92 #define BWN_RF_WRITE(mac, r, v) (mac->mac_phy.rf_write(mac, r, v)) argument
93 #define BWN_RF_MASK(mac, o, m) \ argument
94 BWN_RF_WRITE(mac, o, BWN_RF_READ(mac, o) & m)
95 #define BWN_RF_SETMASK(mac, offset, mask, set) \ argument
96 BWN_RF_WRITE(mac, offset, (BWN_RF_READ(mac, offset) & mask) | set)
97 #define BWN_RF_SET(mac, offset, set) \ argument
98 BWN_RF_WRITE(mac, offset, BWN_RF_READ(mac, offset) | set)
99 #define BWN_PHY_READ(mac, r) (mac->mac_phy.phy_read(mac, r)) argument
100 #define BWN_PHY_WRITE(mac, r, v) \ argument
101 (mac->mac_phy.phy_write(mac, r, v))
102 #define BWN_PHY_SET(mac, offset, set) do { \ argument
103 if (mac->mac_phy.phy_maskset != NULL) { \
104 KASSERT(mac->mac_status < BWN_MAC_STATUS_INITED || \
105 mac->mac_suspended > 0, \
106 ("dont access PHY or RF registers after turning on MAC")); \
107 mac->mac_phy.phy_maskset(mac, offset, 0xffff, set); \
109 BWN_PHY_WRITE(mac, offset, \
110 BWN_PHY_READ(mac, offset) | (set)); \
112 #define BWN_PHY_SETMASK(mac, offset, mask, set) do { \ argument
113 if (mac->mac_phy.phy_maskset != NULL) { \
114 KASSERT(mac->mac_status < BWN_MAC_STATUS_INITED || \
115 mac->mac_suspended > 0, \
116 ("dont access PHY or RF registers after turning on MAC")); \
117 mac->mac_phy.phy_maskset(mac, offset, mask, set); \
119 BWN_PHY_WRITE(mac, offset, \
120 (BWN_PHY_READ(mac, offset) & (mask)) | (set)); \
122 #define BWN_PHY_MASK(mac, offset, mask) do { \ argument
123 if (mac->mac_phy.phy_maskset != NULL) { \
124 KASSERT(mac->mac_status < BWN_MAC_STATUS_INITED || \
125 mac->mac_suspended > 0, \
126 ("dont access PHY or RF registers after turning on MAC")); \
127 mac->mac_phy.phy_maskset(mac, offset, mask, 0); \
129 BWN_PHY_WRITE(mac, offset, \
130 BWN_PHY_READ(mac, offset) & (mask)); \
132 #define BWN_PHY_COPY(mac, dst, src) do { \ argument
133 KASSERT(mac->mac_status < BWN_MAC_STATUS_INITED || \
134 mac->mac_suspended > 0, \
135 ("dont access PHY or RF registers after turning on MAC")); \
136 BWN_PHY_WRITE(mac, dst, BWN_PHY_READ(mac, src)); \
147 #define BWN_PIO_WRITE_2(mac, tq, offset, value) \ argument
148 BWN_WRITE_2(mac, (tq)->tq_base + offset, value)
149 #define BWN_PIO_READ_4(mac, tq, offset) \ argument
150 BWN_READ_4(mac, tq->tq_base + offset)
155 #define BWN_BARRIER(mac, offset, length, flags) \ argument
156 bus_barrier((mac)->mac_sc->sc_mem_res, (offset), (length), (flags))
975 bwn_tx_hdrsize(struct bwn_mac *mac) in bwn_tx_hdrsize() argument
977 switch (mac->mac_fw.fw_hdr_format) { in bwn_tx_hdrsize()
986 mac->mac_fw.fw_hdr_format); in bwn_tx_hdrsize()
1085 bwn_channel_band(struct bwn_mac *mac, struct ieee80211_channel *c) in bwn_channel_band() argument
1094 bwn_current_band(struct bwn_mac *mac) in bwn_current_band() argument
1096 struct ieee80211com *ic = &mac->mac_sc->sc_ic; in bwn_current_band()
1104 bwn_is_40mhz(struct bwn_mac *mac) in bwn_is_40mhz() argument
1106 struct ieee80211com *ic = &mac->mac_sc->sc_ic; in bwn_is_40mhz()
1112 bwn_get_centre_freq(struct bwn_mac *mac) in bwn_get_centre_freq() argument
1115 struct ieee80211com *ic = &mac->mac_sc->sc_ic; in bwn_get_centre_freq()
1121 bwn_get_chan_centre_freq(struct bwn_mac *mac, struct ieee80211_channel *chan) in bwn_get_chan_centre_freq() argument
1129 bwn_get_chan(struct bwn_mac *mac) in bwn_get_chan() argument
1132 struct ieee80211com *ic = &mac->mac_sc->sc_ic; in bwn_get_chan()
1138 bwn_get_channel(struct bwn_mac *mac) in bwn_get_channel() argument
1141 struct ieee80211com *ic = &mac->mac_sc->sc_ic; in bwn_get_channel()
1146 bwn_is_chan_passive(struct bwn_mac *mac) in bwn_is_chan_passive() argument
1149 struct ieee80211com *ic = &mac->mac_sc->sc_ic; in bwn_is_chan_passive()
1154 bwn_get_chan_type(struct bwn_mac *mac, struct ieee80211_channel *c) in bwn_get_chan_type() argument
1156 struct ieee80211com *ic = &mac->mac_sc->sc_ic; in bwn_get_chan_type()
1170 bwn_get_chan_power(struct bwn_mac *mac, struct ieee80211_channel *c) in bwn_get_chan_power() argument