mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 08:44:21 +08:00
12bf8fad4c
last_rate is initialized to zero by sta_info_alloc(), but this indicates legacy bitrate for the last TX rate (and invalid for the last RX rate). To avoid a warning when decoding the last rate as legacy (before a data frame has been sent), initialize them as S1G MCS. Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com> Link: https://lore.kernel.org/r/20201005164522.18069-2-thomas@adapt-ip.com [rename to ieee80211_s1g_sta_rate_init(), seems more appropriate] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
17 lines
419 B
C
17 lines
419 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* S1G handling
|
|
* Copyright(c) 2020 Adapt-IP
|
|
*/
|
|
#include <linux/ieee80211.h>
|
|
#include <net/mac80211.h>
|
|
#include "ieee80211_i.h"
|
|
|
|
void ieee80211_s1g_sta_rate_init(struct sta_info *sta)
|
|
{
|
|
/* avoid indicating legacy bitrates for S1G STAs */
|
|
sta->tx_stats.last_rate.flags |= IEEE80211_TX_RC_S1G_MCS;
|
|
sta->rx_stats.last_rate =
|
|
STA_STATS_FIELD(TYPE, STA_STATS_RATE_TYPE_S1G);
|
|
}
|