Commit d51173c1 authored by Johannes Berg's avatar Johannes Berg

wifi: iwlwifi: mvm: use min_t() for agg_size

We can use min_t() for the agg_size and avoid
spelling out the (firmware) limit twice.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarGregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230620125813.211768036c1f.I78b7eea32eaae20cc9f32869aa3f42814634ce9a@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent c7fa5e68
......@@ -92,9 +92,8 @@ u32 iwl_mvm_get_sta_ampdu_dens(struct ieee80211_link_sta *link_sta,
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK);
/* Limit to max A-MPDU supported by FW */
if (agg_size > (STA_FLG_MAX_AGG_SIZE_4M >> STA_FLG_MAX_AGG_SIZE_SHIFT))
agg_size = (STA_FLG_MAX_AGG_SIZE_4M >>
STA_FLG_MAX_AGG_SIZE_SHIFT);
agg_size = min_t(u32, agg_size,
STA_FLG_MAX_AGG_SIZE_4M >> STA_FLG_MAX_AGG_SIZE_SHIFT);
*_agg_size = agg_size;
return mpdu_dens;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment