wifi: mac80211: check for station first in client probe
authorJohannes Berg <johannes.berg@intel.com>
Tue, 15 Aug 2023 16:41:32 +0000 (18:41 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 22 Aug 2023 19:40:39 +0000 (21:40 +0200)
commit67dfa589aa8806c7959cbca2f4613b8d41c75a06
tree9932c06deb046398b83c5dad7e999ee5b788c36e
parentabc76cf552e13cfa88a204b362a86b0e08e95228
wifi: mac80211: check for station first in client probe

When probing a client, first check if we have it, and then
check for the channel context, otherwise you can trigger
the warning there easily by probing when the AP isn't even
started yet. Since a client existing means the AP is also
operating, we can then keep the warning.

Also simplify the moved code a bit.

Reported-by: syzbot+999fac712d84878a7379@syzkaller.appspotmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/cfg.c