mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
wifi: iwlwifi: work around -Wenum-compare-conditional warning
This is one of only three -Wenum-compare-conditional warnings we get
in randconfig builds:
drivers/net/wireless/intel/iwlwifi/mvm/sta.c:4331:17: error: conditional expression between different enumeration types ('enum iwl_fw_sta_type' and 'enum iwl_sta_type') [-Werror,-Wenum-compare-conditional]
4331 | u32 type = mld ? STATION_TYPE_PEER : IWL_STA_LINK;
| ^ ~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~
This is a false positive since the code works as intended, but the
warning is otherwise sensible, so slightly rewrite it in order to
not trigger the warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20241018151841.3821671-1-arnd@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
188a1bf894
commit
cadae7ead4
|
|
@ -4328,7 +4328,10 @@ int iwl_mvm_add_pasn_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
|||
unsigned int wdg_timeout =
|
||||
iwl_mvm_get_wd_timeout(mvm, vif);
|
||||
bool mld = iwl_mvm_has_mld_api(mvm->fw);
|
||||
u32 type = mld ? STATION_TYPE_PEER : IWL_STA_LINK;
|
||||
u32 type = IWL_STA_LINK;
|
||||
|
||||
if (mld)
|
||||
type = STATION_TYPE_PEER;
|
||||
|
||||
ret = iwl_mvm_allocate_int_sta(mvm, sta, 0,
|
||||
NL80211_IFTYPE_UNSPECIFIED, type);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user