]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: mwifiex: move common settings out of switch/case
authorSascha Hauer <s.hauer@pengutronix.de>
Thu, 10 Apr 2025 10:24:33 +0000 (12:24 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 23 Apr 2025 13:34:23 +0000 (15:34 +0200)
commitc96d5afc34dfcf38a00233a073c601949ba8286c
tree64dcd34f5ba0c575618e05356a0ff81932e7cc89
parentd19b9ca761e774e31d7b24bcefe09f84d9a7ecc7
wifi: mwifiex: move common settings out of switch/case

In mwifiex_add_virtual_intf() several settings done in a switch/case
are the same in all cases. Move them out of the switch/case to
deduplicate the code.

bss_started is not initialized in all switch/case branches, but it is
only used in AP mode in the driver, so it doesn't hurt to move its
initialization out of the switch/case as well.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Francesco Dolcini <francesco@dolcini.it>
Acked-by: Brian Norris <briannorris@chromium.org>
Link: https://patch.msgid.link/20250410-mwifiex-cleanup-1-v6-9-a6bbd4ac4d37@pengutronix.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/marvell/mwifiex/cfg80211.c