mwifiex: Use function to check whether interface type change is allowed

Instead of bailing out in the function which is supposed to do the type
change, detect invalid changes beforehand using a generic function and
return an error if the change is not allowed.

Signed-off-by: Jonas Dreßler <verdre@v0yd.nl>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210914195909.36035-3-verdre@v0yd.nl
This commit is contained in:
Jonas Dreßler 2021-09-14 21:59:02 +02:00 • committed by Kalle Valo
commit abe3a2c9ea