Home
last modified time | relevance | path

Searched refs:hal (Results 1 – 25 of 133) sorted by relevance

123456

/src/sys/dev/wtap/wtap_hal/
H A Dhal.c38 struct wtap_hal *hal = (struct wtap_hal *)arg; in hal_tx_proc() local
45 hal = (struct wtap_hal *)arg; in hal_tx_proc()
47 p = medium_get_next_packet(hal->hal_md); in hal_tx_proc()
51 hal->plugin->work(hal->plugin, p); in hal_tx_proc()
62 init_hal(struct wtap_hal *hal) in init_hal() argument
66 mtx_init(&hal->hal_mtx, "wtap_hal mtx", NULL, MTX_DEF | MTX_RECURSE); in init_hal()
68 hal->hal_md = (struct wtap_medium *)malloc(sizeof(struct wtap_medium), in init_hal()
71 init_medium(hal->hal_md); in init_hal()
73 TASK_INIT(&hal->hal_md->tx_handler->proc, 0, hal_tx_proc, hal); in init_hal()
75 callout_init_mtx(&hal->hw.timer_intr, &hal->hal_mtx, 0); in init_hal()
[all …]
/src/sys/dev/etherswitch/mtkswitch/
H A Dmtkswitch_mt7620.c164 val = sc->hal.mtkswitch_read(sc, MTKSWITCH_REG32(reg)); in mtkswitch_reg_read()
176 tmp = sc->hal.mtkswitch_read(sc, MTKSWITCH_REG32(reg)); in mtkswitch_reg_write()
184 sc->hal.mtkswitch_write(sc, MTKSWITCH_REG32(reg), tmp); in mtkswitch_reg_write()
227 val = sc->hal.mtkswitch_read(sc, MTKSWITCH_PCR(port)); in mtkswitch_port_init()
229 sc->hal.mtkswitch_write(sc, MTKSWITCH_PCR(port), val); in mtkswitch_port_init()
232 val = sc->hal.mtkswitch_read(sc, MTKSWITCH_PVC(port)); in mtkswitch_port_init()
234 sc->hal.mtkswitch_write(sc, MTKSWITCH_PVC(port), val); in mtkswitch_port_init()
241 sc->hal.mtkswitch_write(sc, MTKSWITCH_PMCR(port), val); in mtkswitch_port_init()
251 val = sc->hal.mtkswitch_read(sc, MTKSWITCH_PMSR(port)); in mtkswitch_get_port_status()
279 while (sc->hal.mtkswitch_read(sc, MTKSWITCH_ATC) & ATC_BUSY); in mtkswitch_atu_flush()
[all …]
H A Dmtkswitch_rt3050.c224 err = sc->hal.mtkswitch_vlan_set_pvid(sc, p->es_port, in mtkswitch_port_vlan_setup()
270 sc->hal.mtkswitch_vlan_get_pvid(sc, p->es_port, &p->es_pvid); in mtkswitch_port_vlan_get()
506 sc->hal.mtkswitch_reset = mtkswitch_reset; in mtk_attach_switch_rt3050()
507 sc->hal.mtkswitch_hw_setup = mtkswitch_hw_setup; in mtk_attach_switch_rt3050()
508 sc->hal.mtkswitch_hw_global_setup = mtkswitch_hw_global_setup; in mtk_attach_switch_rt3050()
509 sc->hal.mtkswitch_port_init = mtkswitch_port_init; in mtk_attach_switch_rt3050()
510 sc->hal.mtkswitch_get_port_status = mtkswitch_get_port_status; in mtk_attach_switch_rt3050()
511 sc->hal.mtkswitch_atu_flush = mtkswitch_atu_flush; in mtk_attach_switch_rt3050()
512 sc->hal.mtkswitch_port_vlan_setup = mtkswitch_port_vlan_setup; in mtk_attach_switch_rt3050()
513 sc->hal.mtkswitch_port_vlan_get = mtkswitch_port_vlan_get; in mtk_attach_switch_rt3050()
[all …]
H A Dmtkswitch.c158 sc->hal.mtkswitch_vlan_init_hw(sc); in mtkswitch_set_vlan_mode()
202 if (sc->hal.mtkswitch_reset(sc)) { in mtkswitch_attach()
207 err = sc->hal.mtkswitch_hw_setup(sc); in mtkswitch_attach()
212 err = sc->hal.mtkswitch_hw_global_setup(sc); in mtkswitch_attach()
219 sc->hal.mtkswitch_port_init(sc, port); in mtkswitch_attach()
361 portstatus = sc->hal.mtkswitch_get_port_status(sc, in mtkswitch_miipollstat()
383 sc->hal.mtkswitch_atu_flush(sc); in mtkswitch_miipollstat()
440 err = sc->hal.mtkswitch_port_vlan_get(sc, p); in mtkswitch_getport()
485 err = sc->hal.mtkswitch_port_vlan_setup(sc, p); in mtkswitch_setport()
575 return (sc->hal.mtkswitch_vlan_getvgroup(sc, e)); in mtkswitch_getvgroup()
[all …]
/src/sys/contrib/dev/athk/ath11k/
H A Dhal.c200 struct ath11k_hal *hal = &ab->hal; in ath11k_hal_alloc_cont_rdp() local
204 hal->rdp.vaddr = dma_alloc_coherent(ab->dev, size, &hal->rdp.paddr, in ath11k_hal_alloc_cont_rdp()
206 if (!hal->rdp.vaddr) in ath11k_hal_alloc_cont_rdp()
214 struct ath11k_hal *hal = &ab->hal; in ath11k_hal_free_cont_rdp() local
217 if (!hal->rdp.vaddr) in ath11k_hal_free_cont_rdp()
222 hal->rdp.vaddr, hal->rdp.paddr); in ath11k_hal_free_cont_rdp()
223 hal->rdp.vaddr = NULL; in ath11k_hal_free_cont_rdp()
228 struct ath11k_hal *hal = &ab->hal; in ath11k_hal_alloc_cont_wrp() local
232 hal->wrp.vaddr = dma_alloc_coherent(ab->dev, size, &hal->wrp.paddr, in ath11k_hal_alloc_cont_wrp()
234 if (!hal->wrp.vaddr) in ath11k_hal_alloc_cont_wrp()
[all …]
/src/sys/contrib/dev/athk/ath12k/
H A Dhal.c521 struct ath12k_hal *hal = &ab->hal; in ath12k_hal_srng_create_config_qcn9274() local
524 hal->srng_config = kmemdup(hw_srng_config_template, in ath12k_hal_srng_create_config_qcn9274()
527 if (!hal->srng_config) in ath12k_hal_srng_create_config_qcn9274()
530 s = &hal->srng_config[HAL_REO_DST]; in ath12k_hal_srng_create_config_qcn9274()
536 s = &hal->srng_config[HAL_REO_EXCEPTION]; in ath12k_hal_srng_create_config_qcn9274()
540 s = &hal->srng_config[HAL_REO_REINJECT]; in ath12k_hal_srng_create_config_qcn9274()
546 s = &hal->srng_config[HAL_REO_CMD]; in ath12k_hal_srng_create_config_qcn9274()
550 s = &hal->srng_config[HAL_REO_STATUS]; in ath12k_hal_srng_create_config_qcn9274()
554 s = &hal->srng_config[HAL_TCL_DATA]; in ath12k_hal_srng_create_config_qcn9274()
560 s = &hal->srng_config[HAL_TCL_CMD]; in ath12k_hal_srng_create_config_qcn9274()
[all …]
/src/sys/dev/wtap/
H A Dif_wtap_module.c59 static struct wtap_hal *hal; variable
82 if(new_wtap(hal, *(int *)data)) in wtap_ioctl()
86 if(free_wtap(hal, *(int *)data)) in wtap_ioctl()
109 hal = (struct wtap_hal *)malloc(sizeof(struct wtap_hal), in event_handler()
112 init_hal(hal); in event_handler()
118 plugin->base.wp_hal = hal; in event_handler()
122 register_plugin(hal, (struct wtap_plugin *)plugin); in event_handler()
128 deregister_plugin(hal); in event_handler()
129 deinit_hal(hal); in event_handler()
130 free(hal, M_WTAP); in event_handler()
/src/sys/contrib/dev/rtw88/
H A Dsar.c11 const struct rtw_hal *hal = &rtwdev->hal; in rtw_query_sar() local
12 const struct rtw_sar *sar = &hal->sar; in rtw_query_sar()
27 struct rtw_hal *hal = &rtwdev->hal; in rtw_apply_sar() local
28 struct rtw_sar *sar = &hal->sar; in rtw_apply_sar()
36 rtw_phy_set_tx_power_level(rtwdev, hal->current_channel); in rtw_apply_sar()
44 struct rtw_hal *hal = &rtwdev->hal; in rtw_sar_to_phy() local
52 hal->tx_pwr_by_rate_base_2g[arg->path][arg->rs] : in rtw_sar_to_phy()
53 hal->tx_pwr_by_rate_base_5g[arg->path][arg->rs]; in rtw_sar_to_phy()
H A Dphy.c266 struct rtw_hal *hal = &rtwdev->hal; in rtw_phy_dig_write() local
275 for (path = 0; path < hal->rf_path_num; path++) { in rtw_phy_dig_write()
676 for (i = 0; i < rtwdev->hal.rf_path_num; i++) { in rtw_phy_parsing_cfo_iter()
771 if (rtwdev->hal.current_band_type != RTW_BAND_2G) in rtw_phy_cck_pd()
940 struct rtw_hal *hal = &rtwdev->hal; in rtw_phy_read_rf() local
945 if (rf_path >= hal->rf_phy_num) { in rtw_phy_read_rf()
963 struct rtw_hal *hal = &rtwdev->hal; in rtw_phy_read_rf_sipi() local
972 if (rf_path >= hal->rf_phy_num) { in rtw_phy_read_rf_sipi()
1012 struct rtw_hal *hal = &rtwdev->hal; in rtw_phy_write_rf_reg_sipi() local
1019 if (rf_path >= hal->rf_phy_num) { in rtw_phy_write_rf_reg_sipi()
[all …]
H A Dmain.c825 struct rtw_hal *hal = &rtwdev->hal; in rtw_update_channel() local
826 u8 *cch_by_bw = hal->cch_by_bw; in rtw_update_channel()
895 hal->current_primary_channel_index = primary_channel_idx; in rtw_update_channel()
896 hal->current_band_width = bandwidth; in rtw_update_channel()
897 hal->primary_channel = primary_channel; in rtw_update_channel()
898 hal->current_channel = center_channel; in rtw_update_channel()
899 hal->current_band_type = band; in rtw_update_channel()
900 hal->sar_band = sar_band; in rtw_update_channel()
956 struct rtw_hal *hal = &rtwdev->hal; in rtw_set_channel() local
975 hal->current_primary_channel_index); in rtw_set_channel()
[all …]
H A Drtw88xxa.c127 struct rtw_hal *hal = &rtwdev->hal; in rtw88xxa_read_usb_type() local
168 hal->rf_type = RF_1T1R; in rtw88xxa_read_usb_type()
169 hal->rf_path_num = 1; in rtw88xxa_read_usb_type()
170 hal->rf_phy_num = 1; in rtw88xxa_read_usb_type()
171 hal->antenna_tx = BB_PATH_A; in rtw88xxa_read_usb_type()
172 hal->antenna_rx = BB_PATH_A; in rtw88xxa_read_usb_type()
176 hal->rf_type = RF_2T2R; in rtw88xxa_read_usb_type()
177 hal->rf_path_num = 2; in rtw88xxa_read_usb_type()
178 hal->rf_phy_num = 2; in rtw88xxa_read_usb_type()
179 hal->antenna_tx = BB_PATH_AB; in rtw88xxa_read_usb_type()
[all …]
H A Drtw8814a.c79 struct rtw_hal *hal = &rtwdev->hal; in rtw8814a_read_rf_type() local
87 hal->rf_type = RF_2T2R; in rtw8814a_read_rf_type()
90 hal->rf_type = RF_3T3R; in rtw8814a_read_rf_type()
96 hal->rf_type = RF_2T2R; in rtw8814a_read_rf_type()
100 hal->rf_path_num = 4; in rtw8814a_read_rf_type()
101 hal->rf_phy_num = 4; in rtw8814a_read_rf_type()
103 if (hal->rf_type == RF_3T3R) { in rtw8814a_read_rf_type()
104 hal->antenna_rx = BB_PATH_ABC; in rtw8814a_read_rf_type()
105 hal->antenna_tx = BB_PATH_ABC; in rtw8814a_read_rf_type()
107 hal->antenna_rx = BB_PATH_AB; in rtw8814a_read_rf_type()
[all …]
H A Drtw8822b.c136 for (path = RF_PATH_A; path < rtwdev->hal.rf_path_num; path++) { in rtw8822b_pwrtrack_init()
154 struct rtw_hal *hal = &rtwdev->hal; in rtw8822b_phy_set_param() local
178 rtw8822b_config_trx_mode(rtwdev, hal->antenna_tx, hal->antenna_rx, in rtw8822b_phy_set_param()
292 struct rtw_hal *hal = &rtwdev->hal; in rtw8822b_set_channel_rfe_efem() local
306 if (hal->antenna_rx == BB_PATH_AB || in rtw8822b_set_channel_rfe_efem()
307 hal->antenna_tx == BB_PATH_AB) { in rtw8822b_set_channel_rfe_efem()
310 } else if (hal->antenna_rx == hal->antenna_tx) { in rtw8822b_set_channel_rfe_efem()
321 struct rtw_hal *hal = &rtwdev->hal; in rtw8822b_set_channel_rfe_ifem() local
336 if (hal->antenna_rx == BB_PATH_AB || in rtw8822b_set_channel_rfe_ifem()
337 hal->antenna_tx == BB_PATH_AB) { in rtw8822b_set_channel_rfe_ifem()
[all …]
H A Dmac80211.c307 rtwdev->hal.rcr |= BIT_AM; in rtw_ops_configure_filter()
309 rtwdev->hal.rcr &= ~(BIT_AM); in rtw_ops_configure_filter()
313 rtwdev->hal.rcr |= BIT_ACRC32; in rtw_ops_configure_filter()
315 rtwdev->hal.rcr &= ~(BIT_ACRC32); in rtw_ops_configure_filter()
319 rtwdev->hal.rcr |= BIT_AAP; in rtw_ops_configure_filter()
321 rtwdev->hal.rcr &= ~(BIT_AAP); in rtw_ops_configure_filter()
325 rtwdev->hal.rcr &= ~(BIT_CBSSID_BCN | BIT_CBSSID_DATA); in rtw_ops_configure_filter()
327 rtwdev->hal.rcr |= BIT_CBSSID_BCN; in rtw_ops_configure_filter()
332 changed_flags, *new_flags, rtwdev->hal.rcr); in rtw_ops_configure_filter()
334 rtw_write32(rtwdev, REG_RCR, rtwdev->hal.rcr); in rtw_ops_configure_filter()
[all …]
H A Drtw8821c.c50 struct rtw_hal *hal = &rtwdev->hal; in rtw8821c_read_efuse() local
74 hal->pkg_type = map->rfe_option & BIT(5) ? 1 : 0; in rtw8821c_read_efuse()
83 hal->rfe_btg = true; in rtw8821c_read_efuse()
160 struct rtw_hal *hal = &rtwdev->hal; in rtw8821c_phy_set_param() local
195 hal->ch_param[0] = rtw_read32_mask(rtwdev, REG_TXSF2, MASKDWORD); in rtw8821c_phy_set_param()
196 hal->ch_param[1] = rtw_read32_mask(rtwdev, REG_TXSF6, MASKDWORD); in rtw8821c_phy_set_param()
197 hal->ch_param[2] = rtw_read32_mask(rtwdev, REG_TXFILTER, MASKDWORD); in rtw8821c_phy_set_param()
312 struct rtw_hal *hal = &rtwdev->hal; in rtw8821c_set_channel_rf() local
344 if (hal->rfe_btg) in rtw8821c_set_channel_rf()
386 struct rtw_hal *hal = &rtwdev->hal; in rtw8821c_cck_tx_filter_srrc() local
[all …]
/src/sys/contrib/dev/rtw89/
H A Dchan.h122 struct rtw89_hal *hal = &rtwdev->hal; in rtw89_get_entity_state() local
124 return READ_ONCE(hal->entity_active[phy_idx]); in rtw89_get_entity_state()
131 struct rtw89_hal *hal = &rtwdev->hal; in rtw89_set_entity_state() local
133 WRITE_ONCE(hal->entity_active[phy_idx], active); in rtw89_set_entity_state()
139 struct rtw89_hal *hal = &rtwdev->hal; in rtw89_get_entity_mode() local
141 return READ_ONCE(hal->entity_mode); in rtw89_get_entity_mode()
147 struct rtw89_hal *hal = &rtwdev->hal; in rtw89_set_entity_mode() local
149 WRITE_ONCE(hal->entity_mode, mode); in rtw89_set_entity_mode()
H A Dchan.c178 struct rtw89_hal *hal = &rtwdev->hal; in rtw89_assign_entity_chan() local
179 struct rtw89_chan *chan = &hal->chanctx[idx].chan; in rtw89_assign_entity_chan()
180 struct rtw89_chan_rcd *rcd = &hal->chanctx[idx].rcd; in rtw89_assign_entity_chan()
197 struct rtw89_hal *hal = &rtwdev->hal; in rtw89_iterate_entity_chan() local
204 for_each_set_bit(idx, hal->entity_map, NUM_OF_RTW89_CHANCTX) { in rtw89_iterate_entity_chan()
218 struct rtw89_hal *hal = &rtwdev->hal; in __rtw89_config_entity_chandef() local
220 hal->chanctx[idx].chandef = *chandef; in __rtw89_config_entity_chandef()
227 struct rtw89_hal *hal = &rtwdev->hal; in rtw89_config_entity_chandef() local
230 clear_bit(idx, hal->entity_map); in rtw89_config_entity_chandef()
235 set_bit(idx, hal->entity_map); in rtw89_config_entity_chandef()
[all …]
H A Dmac80211.c321 rtwdev->hal.rx_fltr &= ~B_AX_A_MC; in rtw89_ops_configure_filter()
323 rtwdev->hal.rx_fltr |= B_AX_A_MC; in rtw89_ops_configure_filter()
327 rtwdev->hal.rx_fltr |= B_AX_A_CRC32_ERR; in rtw89_ops_configure_filter()
329 rtwdev->hal.rx_fltr &= ~B_AX_A_CRC32_ERR; in rtw89_ops_configure_filter()
333 rtwdev->hal.rx_fltr &= ~B_AX_A_A1_MATCH; in rtw89_ops_configure_filter()
335 rtwdev->hal.rx_fltr |= B_AX_A_A1_MATCH; in rtw89_ops_configure_filter()
339 rtwdev->hal.rx_fltr &= ~B_AX_A_BCN_CHK_EN; in rtw89_ops_configure_filter()
340 rtwdev->hal.rx_fltr &= ~B_AX_A_BC; in rtw89_ops_configure_filter()
341 rtwdev->hal.rx_fltr &= ~B_AX_A_A1_MATCH; in rtw89_ops_configure_filter()
343 rtwdev->hal.rx_fltr |= B_AX_A_BCN_CHK_EN; in rtw89_ops_configure_filter()
[all …]
/src/sys/dev/etherswitch/arswitch/
H A Darswitch.c226 sc->hal.arswitch_vlan_init_hw(sc); in arswitch_set_vlan_mode()
528 sc->hal.arswitch_port_init = ar8xxx_port_init; in arswitch_attach()
529 sc->hal.arswitch_port_vlan_setup = ar8xxx_port_vlan_setup; in arswitch_attach()
530 sc->hal.arswitch_port_vlan_get = ar8xxx_port_vlan_get; in arswitch_attach()
531 sc->hal.arswitch_vlan_init_hw = ar8xxx_reset_vlans; in arswitch_attach()
532 sc->hal.arswitch_hw_get_switch_macaddr = ar8xxx_hw_get_switch_macaddr; in arswitch_attach()
533 sc->hal.arswitch_hw_set_switch_macaddr = ar8xxx_hw_set_switch_macaddr; in arswitch_attach()
535 sc->hal.arswitch_vlan_getvgroup = ar8xxx_getvgroup; in arswitch_attach()
536 sc->hal.arswitch_vlan_setvgroup = ar8xxx_setvgroup; in arswitch_attach()
538 sc->hal.arswitch_vlan_get_pvid = ar8xxx_get_pvid; in arswitch_attach()
[all …]
H A Darswitch_8327.c816 sc->hal.arswitch_vlan_set_pvid(sc, p->es_port, p->es_pvid); in ar8327_port_vlan_setup()
837 sc->hal.arswitch_vlan_get_pvid(sc, p->es_port, &p->es_pvid); in ar8327_port_vlan_get()
953 sc->hal.arswitch_vlan_set_pvid(sc, i, sc->vid[0]); in ar8327_reset_vlans()
956 sc->hal.arswitch_set_dot1q_vlan(sc, ports, ports, sc->vid[0]); in ar8327_reset_vlans()
1269 sc->hal.arswitch_hw_setup = ar8327_hw_setup; in ar8327_attach()
1270 sc->hal.arswitch_hw_global_setup = ar8327_hw_global_setup; in ar8327_attach()
1272 sc->hal.arswitch_port_init = ar8327_port_init; in ar8327_attach()
1274 sc->hal.arswitch_vlan_getvgroup = ar8327_vlan_getvgroup; in ar8327_attach()
1275 sc->hal.arswitch_vlan_setvgroup = ar8327_vlan_setvgroup; in ar8327_attach()
1276 sc->hal.arswitch_port_vlan_setup = ar8327_port_vlan_setup; in ar8327_attach()
[all …]
H A Darswitch_vlans.c197 if (sc->hal.arswitch_flush_dot1q_vlan(sc)) { in ar8xxx_reset_vlans()
224 sc->hal.arswitch_vlan_set_pvid(sc, i, sc->vid[0]); in ar8xxx_reset_vlans()
228 sc->hal.arswitch_set_dot1q_vlan(sc, ports, sc->vid[0], sc->vid[0]); in ar8xxx_reset_vlans()
291 err = sc->hal.arswitch_get_dot1q_vlan(sc, &vg->es_member_ports, in ar8xxx_getvgroup()
296 err = sc->hal.arswitch_get_port_vlan(sc, &vg->es_member_ports, in ar8xxx_getvgroup()
331 err = sc->hal.arswitch_purge_dot1q_vlan(sc, vid); in ar8xxx_setvgroup()
353 err = sc->hal.arswitch_set_dot1q_vlan(sc, vg->es_member_ports, in ar8xxx_setvgroup()
357 err = sc->hal.arswitch_set_port_vlan(sc, vg->es_member_ports, vid); in ar8xxx_setvgroup()
/src/sys/dev/aq/
H A Daq_fw.h62 int (*reset)(struct aq_hw* hal);
64 int (*set_mode)(struct aq_hw* hal, enum aq_hw_fw_mpi_state_e mode, aq_fw_link_speed_t speed);
65 …int (*get_mode)(struct aq_hw* hal, enum aq_hw_fw_mpi_state_e* mode, aq_fw_link_speed_t* speed, aq_…
67 int (*get_mac_addr)(struct aq_hw* hal, uint8_t* mac_addr);
68 int (*get_stats)(struct aq_hw* hal, struct aq_hw_stats_s* stats);
70 int (*led_control)(struct aq_hw* hal, uint32_t mode);
/src/sys/dev/wtap/plugins/
H A Dvisibility.c86 struct wtap_hal *hal = (struct wtap_hal *)vis_plugin->base.wp_hal; in visibility_work() local
109 if(hal->hal_devs[k] != NULL in visibility_work()
110 && hal->hal_devs[k]->up == 1){ in visibility_work()
112 hal->hal_devs[k]; in visibility_work()
168 struct wtap_hal *hal = vis_plugin->base.wp_hal; in vis_ioctl() local
178 medium_close(hal->hal_md); in vis_ioctl()
180 medium_open(hal->hal_md); in vis_ioctl()
/src/sys/dev/etherswitch/ip17x/
H A Dip175d.c210 sc->hal.ip17x_reset = ip175d_reset; in ip175d_attach()
211 sc->hal.ip17x_hw_setup = ip175d_hw_setup; in ip175d_attach()
212 sc->hal.ip17x_get_vlan_mode = ip175d_get_vlan_mode; in ip175d_attach()
213 sc->hal.ip17x_set_vlan_mode = ip175d_set_vlan_mode; in ip175d_attach()
H A Dip175c.c245 sc->hal.ip17x_reset = ip175c_reset; in ip175c_attach()
246 sc->hal.ip17x_hw_setup = ip175c_hw_setup; in ip175c_attach()
247 sc->hal.ip17x_get_vlan_mode = ip175c_get_vlan_mode; in ip175c_attach()
248 sc->hal.ip17x_set_vlan_mode = ip175c_set_vlan_mode; in ip175c_attach()

123456