Lines Matching defs:id
56 DWTAP_PRINTF("[%d] freeing m=%p\n", p->id, p->m);
106 new_wtap(struct wtap_hal *hal, int32_t id)
176 uint8_t const *macaddr = mac_pool[id];
177 if(hal->hal_devs[id] != NULL){
178 printf("error, wtap_id=%d already created\n", id);
182 hal->hal_devs[id] = (struct wtap_softc *)malloc(
184 bzero(hal->hal_devs[id], sizeof(struct wtap_softc));
185 hal->hal_devs[id]->sc_md = hal->hal_md;
186 hal->hal_devs[id]->id = id;
187 snprintf(hal->hal_devs[id]->name, sizeof(hal->hal_devs[id]->name),
188 "wlan%d", id);
189 mtx_init(&hal->hal_devs[id]->sc_mtx, "wtap_softc mtx", NULL,
192 if(wtap_attach(hal->hal_devs[id], macaddr)){
201 free_wtap(struct wtap_hal *hal, int32_t id)
205 if(hal->hal_devs[id] == NULL){
206 printf("error, wtap_id=%d never created\n", id);
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;