sys/qwz: handle QoS in native WiFi frames
Rebuild the QoS control field for native WiFi RX frames from descriptor
metadata before passing them to net80211.
On TX, strip the hostside QoS control field when using native WiFi
encapsulation, after deriving the TID for the firmware descriptor.
OK: mglocker@
Introduce reference counters for SysV semaphores to fix the context
switch use-after-free after tsleep in sys_semget().
sys___semctl() has no such problems, because we do complete reload and
re-check of semaphore stuff, however I like to replace all of them
with the only "semaptr != sema[ix]" check. The semaphore was changed, go
to the beginning of sys___semctl() and acquire it again.
Note, seminfo.semmni only grows, so even if `sema' array was
re-allocated, the sema[ix] is still valid.
"go for it" from deraadt