diff mbox series

[PATCH-v2,6/6] mac80211: last_rate is 32-bit number.

Message ID 20210324181441.13755-6-greearb@candelatech.com
State New
Headers show
Series [PATCH-v2,1/6] mac80211: Fix station rx-packets counters. | expand

Commit Message

Ben Greear March 24, 2021, 6:14 p.m. UTC
From: Ben Greear <greearb@candelatech.com>

Assign it to 32-bit holding variable instead of 16 when processing
the rx rate.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
 net/mac80211/sta_info.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 6dd62ba40133..a28a562a8fb4 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -2246,7 +2246,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;