Lines Matching +full:- +full:150

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2010-2011 Monthadar Al Jaberi, TerraNet AB
47 p = medium_get_next_packet(hal->hal_md);
51 hal->plugin->work(hal->plugin, p);
54 DWTAP_PRINTF("[%d] freeing m=%p\n", p->id, p->m);
56 m_free(p->m);
66 mtx_init(&hal->hal_mtx, "wtap_hal mtx", NULL, MTX_DEF | MTX_RECURSE);
68 hal->hal_md = (struct wtap_medium *)malloc(sizeof(struct wtap_medium),
71 init_medium(hal->hal_md);
73 TASK_INIT(&hal->hal_md->tx_handler->proc, 0, hal_tx_proc, hal);
75 callout_init_mtx(&hal->hw.timer_intr, &hal->hal_mtx, 0);
76 hal->hw.timer_intr_intval = msecs_to_ticks(HAL_TIMER_INTVAL);
83 plugin->init(plugin);
84 hal->plugin = plugin;
91 hal->plugin->deinit(hal->plugin);
92 hal->plugin = NULL; /* catch illegal usages */
100 deinit_medium(hal->hal_md);
101 free(hal->hal_md, M_WTAP);
102 mtx_destroy(&hal->hal_mtx);
109 {0,152,154,152,150,151},
110 {0,152,154,152,150,152},
111 {0,152,154,152,150,153},
112 {0,152,154,152,150,154},
113 {0,152,154,152,150,155},
114 {0,152,154,152,150,156},
115 {0,152,154,152,150,157},
116 {0,152,154,152,150,158},
177 if(hal->hal_devs[id] != NULL){
179 return -1;
182 hal->hal_devs[id] = (struct wtap_softc *)malloc(
184 hal->hal_devs[id]->sc_md = hal->hal_md;
185 hal->hal_devs[id]->id = id;
186 hal->hal_devs[id]->hal = hal;
187 snprintf(hal->hal_devs[id]->name, sizeof(hal->hal_devs[id]->name),
189 mtx_init(&hal->hal_devs[id]->sc_mtx, "wtap_softc mtx", NULL,
192 if(wtap_attach(hal->hal_devs[id], macaddr)){
194 return -1;
205 if(hal->hal_devs[id] == NULL){
207 return -1;
210 if(wtap_detach(hal->hal_devs[id]))
212 mtx_destroy(&hal->hal_devs[id]->sc_mtx);
213 free(hal->hal_devs[id], M_WTAP);
214 hal->hal_devs[id] = NULL;
222 uint32_t intval = hal->hw.timer_intr_intval;
224 hal->hw.tsf += ticks_to_msecs(intval);
226 callout_schedule(&hal->hw.timer_intr, intval);
232 mtx_lock(&hal->hal_mtx);
234 callout_stop(&hal->hw.timer_intr);
235 hal->hw.tsf = 0;
236 callout_reset(&hal->hw.timer_intr, hal->hw.timer_intr_intval,
239 mtx_unlock(&hal->hal_mtx);
245 return (hal->hw.tsf);