mac80211: initialize last_rate for S1G STAs
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>
This commit is contained in:

committed by
Johannes Berg

parent
8b783d104e
commit
12bf8fad4c
@@ -5190,8 +5190,10 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata,
|
||||
int shift = ieee80211_vif_get_shift(&sdata->vif);
|
||||
|
||||
/* TODO: S1G Basic Rate Set is expressed elsewhere */
|
||||
if (cbss->channel->band == NL80211_BAND_S1GHZ)
|
||||
if (cbss->channel->band == NL80211_BAND_S1GHZ) {
|
||||
ieee80211_s1g_sta_rate_init(new_sta);
|
||||
goto skip_rates;
|
||||
}
|
||||
|
||||
ieee80211_get_rates(sband, bss->supp_rates,
|
||||
bss->supp_rates_len,
|
||||
|
Reference in New Issue
Block a user