OSDN Git Service

mwifiex: Use helper function for counting interface types
authorJonas Dreßler <verdre@v0yd.nl>
Tue, 14 Sep 2021 19:59:04 +0000 (21:59 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 21 Sep 2021 15:02:17 +0000 (18:02 +0300)
commit54350dac4e6a966a816ea0152ad2fba30ca189d0
tree1a0b6368b1960acdffd29c82895d48cd5230cc4c
parentc2e9666cdffd347460a2b17988db4cfaf2a68fb9
mwifiex: Use helper function for counting interface types

Use a small helper function to increment and decrement the counter of
the interface types we currently manage. This makes the code that
actually changes and sets up the interface type a bit less messy and
also helps avoiding mistakes in case someone increments/decrements a
counter wrongly.

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-5-verdre@v0yd.nl
drivers/net/wireless/marvell/mwifiex/cfg80211.c