Lines Matching defs:urtwn_softc
242 CFATTACH_DECL_NEW(urtwn, sizeof(struct urtwn_softc), urtwn_match,
245 static int urtwn_open_pipes(struct urtwn_softc *);
246 static void urtwn_close_pipes(struct urtwn_softc *);
247 static int urtwn_alloc_rx_list(struct urtwn_softc *);
248 static void urtwn_free_rx_list(struct urtwn_softc *);
249 static int urtwn_alloc_tx_list(struct urtwn_softc *);
250 static void urtwn_free_tx_list(struct urtwn_softc *);
252 static void urtwn_do_async(struct urtwn_softc *,
253 void (*)(struct urtwn_softc *, void *), void *, int);
254 static void urtwn_wait_async(struct urtwn_softc *);
255 static int urtwn_write_region_1(struct urtwn_softc *, uint16_t, uint8_t *,
257 static void urtwn_write_1(struct urtwn_softc *, uint16_t, uint8_t);
258 static void urtwn_write_2(struct urtwn_softc *, uint16_t, uint16_t);
259 static void urtwn_write_4(struct urtwn_softc *, uint16_t, uint32_t);
260 static int urtwn_write_region(struct urtwn_softc *, uint16_t, uint8_t *,
262 static int urtwn_read_region_1(struct urtwn_softc *, uint16_t, uint8_t *,
264 static uint8_t urtwn_read_1(struct urtwn_softc *, uint16_t);
265 static uint16_t urtwn_read_2(struct urtwn_softc *, uint16_t);
266 static uint32_t urtwn_read_4(struct urtwn_softc *, uint16_t);
267 static int urtwn_fw_cmd(struct urtwn_softc *, uint8_t, const void *, int);
268 static void urtwn_r92c_rf_write(struct urtwn_softc *, int, uint8_t,
270 static void urtwn_r88e_rf_write(struct urtwn_softc *, int, uint8_t,
272 static void urtwn_r92e_rf_write(struct urtwn_softc *, int, uint8_t,
274 static uint32_t urtwn_rf_read(struct urtwn_softc *, int, uint8_t);
275 static int urtwn_llt_write(struct urtwn_softc *, uint32_t, uint32_t);
276 static uint8_t urtwn_efuse_read_1(struct urtwn_softc *, uint16_t);
277 static void urtwn_efuse_read(struct urtwn_softc *);
278 static void urtwn_efuse_switch_power(struct urtwn_softc *);
279 static int urtwn_read_chipid(struct urtwn_softc *);
281 static void urtwn_dump_rom(struct urtwn_softc *, struct r92c_rom *);
283 static void urtwn_read_rom(struct urtwn_softc *);
284 static void urtwn_r88e_read_rom(struct urtwn_softc *);
286 static int urtwn_ra_init(struct urtwn_softc *);
287 static int urtwn_get_nettype(struct urtwn_softc *);
288 static void urtwn_set_nettype0_msr(struct urtwn_softc *, uint8_t);
289 static void urtwn_tsf_sync_enable(struct urtwn_softc *);
290 static void urtwn_set_led(struct urtwn_softc *, int, int);
292 static void urtwn_calib_to_cb(struct urtwn_softc *, void *);
296 static void urtwn_newstate_cb(struct urtwn_softc *, void *);
298 static void urtwn_wme_update_cb(struct urtwn_softc *, void *);
299 static void urtwn_update_avgrssi(struct urtwn_softc *, int, int8_t);
300 static int8_t urtwn_get_rssi(struct urtwn_softc *, int, void *);
301 static int8_t urtwn_r88e_get_rssi(struct urtwn_softc *, int, void *);
302 static void urtwn_rx_frame(struct urtwn_softc *, uint8_t *, int);
305 static int urtwn_tx(struct urtwn_softc *, struct mbuf *,
308 urtwn_get_tx_data(struct urtwn_softc *, size_t);
312 static int urtwn_r92c_power_on(struct urtwn_softc *);
313 static int urtwn_r92e_power_on(struct urtwn_softc *);
314 static int urtwn_r88e_power_on(struct urtwn_softc *);
315 static int urtwn_llt_init(struct urtwn_softc *);
316 static void urtwn_fw_reset(struct urtwn_softc *);
317 static void urtwn_r88e_fw_reset(struct urtwn_softc *);
318 static int urtwn_fw_loadpage(struct urtwn_softc *, int, uint8_t *, int);
319 static int urtwn_load_firmware(struct urtwn_softc *);
320 static int urtwn_r92c_dma_init(struct urtwn_softc *);
321 static int urtwn_r88e_dma_init(struct urtwn_softc *);
322 static void urtwn_mac_init(struct urtwn_softc *);
323 static void urtwn_bb_init(struct urtwn_softc *);
324 static void urtwn_rf_init(struct urtwn_softc *);
325 static void urtwn_cam_init(struct urtwn_softc *);
326 static void urtwn_pa_bias_init(struct urtwn_softc *);
327 static void urtwn_rxfilter_init(struct urtwn_softc *);
328 static void urtwn_edca_init(struct urtwn_softc *);
329 static void urtwn_write_txpower(struct urtwn_softc *, int,
331 static void urtwn_get_txpower(struct urtwn_softc *, size_t, u_int, u_int,
333 static void urtwn_r88e_get_txpower(struct urtwn_softc *, size_t, u_int,
335 static void urtwn_set_txpower(struct urtwn_softc *, u_int, u_int);
336 static void urtwn_set_chan(struct urtwn_softc *, struct ieee80211_channel *,
338 static void urtwn_iq_calib(struct urtwn_softc *, bool);
339 static void urtwn_lc_calib(struct urtwn_softc *);
340 static void urtwn_temp_calib(struct urtwn_softc *);
344 static void urtwn_chip_stop(struct urtwn_softc *);
346 static void urtwn_delay_ms(struct urtwn_softc *, int ms);
374 struct urtwn_softc *sc = device_private(self);
574 struct urtwn_softc *sc = device_private(self);
627 struct urtwn_softc *sc = device_private(self);
641 urtwn_open_pipes(struct urtwn_softc *sc)
723 urtwn_close_pipes(struct urtwn_softc *sc)
749 urtwn_alloc_rx_list(struct urtwn_softc *sc)
782 urtwn_free_rx_list(struct urtwn_softc *sc)
801 urtwn_alloc_tx_list(struct urtwn_softc *sc)
843 urtwn_free_tx_list(struct urtwn_softc *sc)
862 urtwn_tx_beacon(struct urtwn_softc *sc, struct mbuf *m,
875 urtwn_cmdq_invariants(struct urtwn_softc *sc)
895 struct urtwn_softc *sc = arg;
949 urtwn_do_async(struct urtwn_softc *sc, void (*cb)(struct urtwn_softc *, void *),
987 urtwn_wait_async(struct urtwn_softc *sc)
1000 urtwn_write_region_1(struct urtwn_softc *sc, uint16_t addr, uint8_t *buf,
1023 urtwn_write_1(struct urtwn_softc *sc, uint16_t addr, uint8_t val)
1033 urtwn_write_2(struct urtwn_softc *sc, uint16_t addr, uint16_t val)
1046 urtwn_write_4(struct urtwn_softc *sc, uint16_t addr, uint32_t val)
1061 urtwn_write_region(struct urtwn_softc *sc, uint16_t addr, uint8_t *buf, int len)
1071 urtwn_read_region_1(struct urtwn_softc *sc, uint16_t addr, uint8_t *buf,
1093 urtwn_read_1(struct urtwn_softc *sc, uint16_t addr)
1107 urtwn_read_2(struct urtwn_softc *sc, uint16_t addr)
1123 urtwn_read_4(struct urtwn_softc *sc, uint16_t addr)
1139 urtwn_fw_cmd(struct urtwn_softc *sc, uint8_t id, const void *buf, int len)
1199 urtwn_rf_write(struct urtwn_softc *sc, int chain, uint8_t addr, uint32_t val)
1206 urtwn_r92c_rf_write(struct urtwn_softc *sc, int chain, uint8_t addr,
1215 urtwn_r88e_rf_write(struct urtwn_softc *sc, int chain, uint8_t addr,
1224 urtwn_r92e_rf_write(struct urtwn_softc *sc, int chain, uint8_t addr,
1233 urtwn_rf_read(struct urtwn_softc *sc, int chain, uint8_t addr)
1264 urtwn_llt_write(struct urtwn_softc *sc, uint32_t addr, uint32_t data)
1287 urtwn_efuse_read_1(struct urtwn_softc *sc, uint16_t addr)
1314 urtwn_efuse_read(struct urtwn_softc *sc)
1354 urtwn_efuse_switch_power(struct urtwn_softc *sc)
1377 urtwn_read_chipid(struct urtwn_softc *sc)
1412 urtwn_dump_rom(struct urtwn_softc *sc, struct r92c_rom *rp)
1493 urtwn_read_rom(struct urtwn_softc *sc)
1528 urtwn_r88e_read_rom(struct urtwn_softc *sc)
1622 urtwn_ra_init(struct urtwn_softc *sc)
1726 urtwn_get_nettype(struct urtwn_softc *sc)
1751 urtwn_set_nettype0_msr(struct urtwn_softc *sc, uint8_t type)
1765 urtwn_tsf_sync_enable(struct urtwn_softc *sc)
1795 urtwn_set_led(struct urtwn_softc *sc, int led, int on)
1840 struct urtwn_softc *sc = arg;
1853 urtwn_calib_to_cb(struct urtwn_softc *sc, void *arg)
1897 struct urtwn_softc *sc = arg;
1930 struct urtwn_softc *sc = ic->ic_ifp->if_softc;
1947 urtwn_newstate_cb(struct urtwn_softc *sc, void *arg)
2243 struct urtwn_softc *sc = ic->ic_ifp->if_softc;
2257 urtwn_wme_update_cb(struct urtwn_softc *sc, void *arg)
2291 urtwn_update_avgrssi(struct urtwn_softc *sc, int rate, int8_t rssi)
2333 urtwn_get_rssi(struct urtwn_softc *sc, int rate, void *physt)
2362 urtwn_r88e_get_rssi(struct urtwn_softc *sc, int rate, void *physt)
2416 urtwn_rx_frame(struct urtwn_softc *sc, uint8_t *buf, int pktlen)
2552 struct urtwn_softc *sc = data->sc;
2637 urtwn_put_tx_data(struct urtwn_softc *sc, struct urtwn_tx_data *data)
2651 struct urtwn_softc *sc = data->sc;
2686 urtwn_tx(struct urtwn_softc *sc, struct mbuf *m, struct ieee80211_node *ni,
2889 urtwn_get_tx_data(struct urtwn_softc *sc, size_t pidx)
2906 struct urtwn_softc *sc = ifp->if_softc;
3017 struct urtwn_softc *sc = ifp->if_softc;
3038 struct urtwn_softc *sc = ifp->if_softc;
3108 urtwn_power_on(struct urtwn_softc *sc)
3115 urtwn_r92c_power_on(struct urtwn_softc *sc)
3211 urtwn_r92e_power_on(struct urtwn_softc *sc)
3291 urtwn_r88e_power_on(struct urtwn_softc *sc)
3351 urtwn_llt_init(struct urtwn_softc *sc)
3406 urtwn_fw_reset(struct urtwn_softc *sc)
3434 urtwn_r88e_fw_reset(struct urtwn_softc *sc)
3469 urtwn_fw_loadpage(struct urtwn_softc *sc, int page, uint8_t *buf, int len)
3501 urtwn_load_firmware(struct urtwn_softc *sc)
3646 urtwn_dma_init(struct urtwn_softc *sc)
3653 urtwn_r92c_dma_init(struct urtwn_softc *sc)
3740 urtwn_r88e_dma_init(struct urtwn_softc *sc)
3795 urtwn_mac_init(struct urtwn_softc *sc)
3820 urtwn_bb_init(struct urtwn_softc *sc)
3984 urtwn_rf_init(struct urtwn_softc *sc)
4070 urtwn_cam_init(struct urtwn_softc *sc)
4120 urtwn_pa_bias_init(struct urtwn_softc *sc)
4146 urtwn_rxfilter_init(struct urtwn_softc *sc)
4171 urtwn_edca_init(struct urtwn_softc *sc)
4194 urtwn_write_txpower(struct urtwn_softc *sc, int chain,
4259 urtwn_get_txpower(struct urtwn_softc *sc, size_t chain, u_int chan, u_int ht40m,
4369 urtwn_r88e_get_txpower(struct urtwn_softc *sc, size_t chain, u_int chan,
4438 urtwn_set_txpower(struct urtwn_softc *sc, u_int chan, u_int ht40m)
4458 urtwn_set_chan(struct urtwn_softc *sc, struct ieee80211_channel *c, u_int ht40m)
4548 urtwn_iq_calib(struct urtwn_softc *sc, bool inited)
4696 urtwn_lc_calib(struct urtwn_softc *sc)
4744 urtwn_temp_calib(struct urtwn_softc *sc)
4791 struct urtwn_softc *sc = ifp->if_softc;
5061 struct urtwn_softc *sc = ifp->if_softc;
5104 struct urtwn_softc *sc = ifp->if_softc;
5116 urtwn_chip_stop(struct urtwn_softc *sc)
5239 urtwn_delay_ms(struct urtwn_softc *sc, int ms)