bug1:
Originally, wtap_node_write() gets the wrong softc by iterating V_inet and get the ifp by string comparison, then gets softc by ifp->if_softc. However, ifp->if_softc will not points to the correct softc owned by ieee80211com, and thus cause kernel panic. Fix it by assigning softc to cdev's si_drv1 in wtap_vap_create(), and gets softc via dev->si_drv1 in wtap_node_write().
bug2:
The cdev created by wtap_vap_create() use the name of ieee80211com rather than the vap's name. It will cause the second vap based on the same ieee80211com as first vap fails to create device node because the device node is already exists. Fix it by assigning vap->iv_ifp->if_xname to cdev's name.