Move event packet handling into a serialized process context to remove
authorpatrick <patrick@openbsd.org>
Mon, 5 Feb 2018 10:30:04 +0000 (10:30 +0000)
committerpatrick <patrick@openbsd.org>
Mon, 5 Feb 2018 10:30:04 +0000 (10:30 +0000)
commitf4e8af020b0d2ad9134a42c7778ae70546d2cfb3
treea0c567c5d2e0a61f3080ba693b2658e777404dfc
parent9f962d91a6e340229bbcbc30078185776c5ec74d
Move event packet handling into a serialized process context to remove
a state transitioning race condition.  Event packets, like completing
authentication and the following association completion, are usually
received shortly after another.  The code that handles those events is
scheduled using a task, so it can easily happen that the state change
caused by the authentication packet was not done before the following
association event arrived.  By moving the event packet handling into the
same context as the state task we serialize the processing and remove
the race condition.  Fixes connecting to the 5GHz WiFi AP used at a2k18.

ok stsp@
sys/dev/ic/bwfm.c
sys/dev/ic/bwfmvar.h