]> git.baikalelectronics.ru Git - kernel.git/commit
wifi: mac80211: make rate u32 in sta_set_rate_info_rx()
authorShayne Chen <shayne.chen@mediatek.com>
Thu, 9 Feb 2023 11:06:59 +0000 (19:06 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 15:43:42 +0000 (16:43 +0100)
commitc00bbb20a46e80e3a8bd55a4ca81a662a806b6b0
treea7a8863cc2baf0f447ef1e9e2669d436d449588b
parentbe6e76c19a48124ac51b89962f74a70223463942
wifi: mac80211: make rate u32 in sta_set_rate_info_rx()

[ Upstream commit 59336e07b287d91dc4ec265e07724e8f7e3d0209 ]

The value of last_rate in ieee80211_sta_rx_stats is degraded from u32 to
u16 after being assigned to rate variable, which causes information loss
in STA_STATS_FIELD_TYPE and later bitfields.

Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Link: https://lore.kernel.org/r/20230209110659.25447-1-shayne.chen@mediatek.com
Fixes: 8888ba3bbf42 ("mac80211: add support for HE")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/mac80211/sta_info.c