Lines Matching refs:id
54 DWTAP_PRINTF("[%d] freeing m=%p\n", p->id, p->m);
104 new_wtap(struct wtap_hal *hal, int32_t id)
174 uint8_t const *macaddr = mac_pool[id];
175 if(hal->hal_devs[id] != NULL){
176 printf("error, wtap_id=%d already created\n", id);
180 hal->hal_devs[id] = (struct wtap_softc *)malloc(
182 bzero(hal->hal_devs[id], sizeof(struct wtap_softc));
183 hal->hal_devs[id]->sc_md = hal->hal_md;
184 hal->hal_devs[id]->id = id;
185 snprintf(hal->hal_devs[id]->name, sizeof(hal->hal_devs[id]->name),
186 "wlan%d", id);
187 mtx_init(&hal->hal_devs[id]->sc_mtx, "wtap_softc mtx", NULL,
190 if(wtap_attach(hal->hal_devs[id], macaddr)){
199 free_wtap(struct wtap_hal *hal, int32_t id)
203 if(hal->hal_devs[id] == NULL){
204 printf("error, wtap_id=%d never created\n", id);
208 if(wtap_detach(hal->hal_devs[id]))
210 mtx_destroy(&hal->hal_devs[id]->sc_mtx);
211 free(hal->hal_devs[id], M_WTAP);
212 hal->hal_devs[id] = NULL;