From: Johannes Berg Instead of having one check, provide an inline for the check whether or not flags are needed. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mld/mld.h | 8 ++++++++ drivers/net/wireless/intel/iwlwifi/mld/tx.c | 4 +--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mld/mld.h b/drivers/net/wireless/intel/iwlwifi/mld/mld.h index a9e65b216fd3..b50f97d336a5 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/mld.h +++ b/drivers/net/wireless/intel/iwlwifi/mld/mld.h @@ -625,4 +625,12 @@ static inline bool iwl_mld_error_before_recovery(struct iwl_mld *mld) int iwl_mld_tdls_sta_count(struct iwl_mld *mld); +static inline bool iwl_mld_queue_cmd_has_flags(struct iwl_mld *mld) +{ + return iwl_fw_lookup_cmd_ver(mld->fw, + WIDE_ID(DATA_PATH_GROUP, + SCD_QUEUE_CONFIG_CMD), + 0) >= 4; +} + #endif /* __iwl_mld_h__ */ diff --git a/drivers/net/wireless/intel/iwlwifi/mld/tx.c b/drivers/net/wireless/intel/iwlwifi/mld/tx.c index 43056206a1d8..5e57909f5d16 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/tx.c @@ -1543,9 +1543,7 @@ int iwl_mld_update_sta_txqs(struct iwl_mld *mld, lockdep_assert_wiphy(mld->wiphy); - if (iwl_fw_lookup_cmd_ver(mld->fw, - WIDE_ID(DATA_PATH_GROUP, SCD_QUEUE_CONFIG_CMD), - 0) >= 4) + if (iwl_mld_queue_cmd_has_flags(mld)) cmd.u.modify.flags = cpu_to_le16(IWL_SCD_QUEUE_MODIFY_FLAG_STA_MSK); -- 2.34.1