From: Johannes Berg Date: Sun, 27 Aug 2023 11:05:28 +0000 (+0300) Subject: wifi: mac80211: fix # of MSDU in A-MSDU calculation X-Git-Tag: v6.1.63~362 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9c6269f5d11f55575209a053c84fdb1d0f182ab1;p=sdk%2Femulator%2Femulator-kernel.git wifi: mac80211: fix # of MSDU in A-MSDU calculation [ Upstream commit 428e8976a15f849ad92b1c1e38dda2a684350ff7 ] During my refactoring I wanted to get rid of the switch, but replaced it with the wrong calculation. Fix that. Fixes: 175ad2ec89fe ("wifi: mac80211: limit A-MSDU subframes for client too") Reported-by: Emmanuel Grumbach Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230827135854.51bf1b8b0adb.Iffbd337fdad2b86ae12f5a39c69fb82b517f7486@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index b8c6f6a668fc..49b71453dec3 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -2918,7 +2918,7 @@ void ieee80211_sta_set_max_amsdu_subframes(struct sta_info *sta, WLAN_EXT_CAPA9_MAX_MSDU_IN_AMSDU_MSB) << 1; if (val) - sta->sta.max_amsdu_subframes = 4 << val; + sta->sta.max_amsdu_subframes = 4 << (4 - val); } #ifdef CONFIG_LOCKDEP