Patch "wifi: mac80211: make rate u32 in sta_set_rate_info_rx()" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    wifi: mac80211: make rate u32 in sta_set_rate_info_rx()

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     wifi-mac80211-make-rate-u32-in-sta_set_rate_info_rx.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 7e20a9270f4dade928d996ec1d894e712bc99442
Author: Shayne Chen <shayne.chen@xxxxxxxxxxxx>
Date:   Thu Feb 9 19:06:59 2023 +0800

    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@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230209110659.25447-1-shayne.chen@xxxxxxxxxxxx
    Fixes: 41cbb0f5a295 ("mac80211: add support for HE")
    Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index cee39ae52245c..d572478c4d68e 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -2159,7 +2159,7 @@ static void sta_stats_decode_rate(struct ieee80211_local *local, u32 rate,
 
 static int sta_set_rate_info_rx(struct sta_info *sta, struct rate_info *rinfo)
 {
-	u16 rate = READ_ONCE(sta_get_last_rx_stats(sta)->last_rate);
+	u32 rate = READ_ONCE(sta_get_last_rx_stats(sta)->last_rate);
 
 	if (rate == STA_STATS_RATE_INVALID)
 		return -EINVAL;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux