]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: choose first enabled channel for monitor
authorKarthikeyan Kathirvel <kathirve@codeaurora.org>
Thu, 11 Mar 2021 05:29:07 +0000 (10:59 +0530)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 16 Mar 2021 20:20:47 +0000 (21:20 +0100)
commit76494e7a29a393683e507e2fb43ce3855330872e
treedeaabc9c937c2c5a6c49ce5ca0c445e63a6bfd22
parent01f719abcdcba5282c213eb24a475de24b819a90
mac80211: choose first enabled channel for monitor

Even if the first channel from sband channel list is invalid
or disabled mac80211 ends up choosing it as the default channel
for monitor interfaces, making them not usable.

Fix this by assigning the first available valid or enabled
channel instead.

Signed-off-by: Karthikeyan Kathirvel <kathirve@codeaurora.org>
Link: https://lore.kernel.org/r/1615440547-7661-1-git-send-email-kathirve@codeaurora.org
[reword commit message, comment, code cleanups]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/main.c