Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/wtap/wtap_hal/hal.c
Show First 20 Lines • Show All 177 Lines • ▼ Show 20 Lines | if(hal->hal_devs[id] != NULL){ | ||||
return -1; | return -1; | ||||
} | } | ||||
hal->hal_devs[id] = (struct wtap_softc *)malloc( | hal->hal_devs[id] = (struct wtap_softc *)malloc( | ||||
sizeof(struct wtap_softc), M_WTAP, M_NOWAIT | M_ZERO); | sizeof(struct wtap_softc), M_WTAP, M_NOWAIT | M_ZERO); | ||||
hal->hal_devs[id]->sc_md = hal->hal_md; | hal->hal_devs[id]->sc_md = hal->hal_md; | ||||
hal->hal_devs[id]->id = id; | hal->hal_devs[id]->id = id; | ||||
snprintf(hal->hal_devs[id]->name, sizeof(hal->hal_devs[id]->name), | snprintf(hal->hal_devs[id]->name, sizeof(hal->hal_devs[id]->name), | ||||
"wlan%d", id); | "wtap%d", id); | ||||
lwhsu: I think this is the only part you want to submit, others are already committed in… | |||||
mtx_init(&hal->hal_devs[id]->sc_mtx, "wtap_softc mtx", NULL, | mtx_init(&hal->hal_devs[id]->sc_mtx, "wtap_softc mtx", NULL, | ||||
MTX_DEF | MTX_RECURSE); | MTX_DEF | MTX_RECURSE); | ||||
if(wtap_attach(hal->hal_devs[id], macaddr)){ | if(wtap_attach(hal->hal_devs[id], macaddr)){ | ||||
printf("%s, cant alloc new wtap\n", __func__); | printf("%s, cant alloc new wtap\n", __func__); | ||||
return -1; | return -1; | ||||
} | } | ||||
Show All 20 Lines |
I think this is the only part you want to submit, others are already committed in cf337fcd7413486d6c7fc0529d76fefb63597d0e. Please rebase your patch onto the latest main branch.