Defer rtm_80211info() call from ieee80211_set_link_state() to a task context.
authorstsp <stsp@openbsd.org>
Sun, 5 Dec 2021 11:33:45 +0000 (11:33 +0000)
committerstsp <stsp@openbsd.org>
Sun, 5 Dec 2021 11:33:45 +0000 (11:33 +0000)
commite798b40ea0544f3813d4fbf7be2d26cbec7f6a9f
tree2b09315e8733aecedef40e9cfa5f4b2d140248d3
parentc1ab3fc89e515c43f19943f4026f0b91db90b2f8
Defer rtm_80211info() call from ieee80211_set_link_state() to a task context.

Sending routing messages requires a socket lock which may sleep.
ieee80211_set_link_state() is called from interrupts and timeouts where
sleeping is not allowed. mvs@ pointed out that if_link_state_change()
is already using a task for this reason.

Should fix a witness-related panic reported by cheloha@

ok mvs@ tobhe@ florian@
sys/net80211/ieee80211.c
sys/net80211/ieee80211_proto.c
sys/net80211/ieee80211_proto.h
sys/net80211/ieee80211_var.h