wifi: nl80211: make nl80211_check_scan_flags() type safe
authorJohannes Berg <johannes.berg@intel.com>
Mon, 9 Jun 2025 18:35:20 +0000 (21:35 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 9 Jul 2025 09:52:35 +0000 (11:52 +0200)
commita1d9979c36a4362cdee628bf2b30d83aab611098
tree7a9aa42f6f4213a9dec0eb03db5df690bce8a382
parentf0df91b6a7120d85c873f5e77bc183fb6eccda16
wifi: nl80211: make nl80211_check_scan_flags() type safe

The cast from void * here coupled with the boolean argument
on what to cast to is confusing and really not needed, just
split the code and make a type-safe interface. It seems to
even reduce the code size slightly, at least on x86-64.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250609213231.bdb3c96570b0.Ia153e6ce06dc9a636ff5bcc1d52468a1afd06e13@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/nl80211.c