mwifiex: Fix NL80211_TX_POWER_LIMITED
authorAdrian Bunk <bunk@kernel.org>
Wed, 13 Feb 2019 13:59:38 +0000 (15:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 1 Dec 2019 08:16:12 +0000 (09:16 +0100)
commit49a9643b5e8d305876f8de52af7946379c77033d
tree578af3f51837c5d3d70626fdcdace53dbb96e981
parente80e88ef6057c7947409bda9898387d25e54aaa9
mwifiex: Fix NL80211_TX_POWER_LIMITED

[ Upstream commit 65a576e27309120e0621f54d5c81eb9128bd56be ]

NL80211_TX_POWER_LIMITED was treated as NL80211_TX_POWER_AUTOMATIC,
which is the opposite of what should happen and can cause nasty
regulatory problems.

if/else converted to a switch without default to make gcc warn
on unhandled enum values.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/marvell/mwifiex/cfg80211.c
drivers/net/wireless/marvell/mwifiex/ioctl.h
drivers/net/wireless/marvell/mwifiex/sta_ioctl.c