Skip to content

Commit

Permalink
cfg80211: fix default HE tx bitrate mask in 2G band
Browse files Browse the repository at this point in the history
In 2G band, a HE sta can only supports HT and HE, but not supports VHT.
In this case, default HE tx bitrate mask isn't filled, when we use iw to
set bitrates without any parameter.

Signed-off-by: Ping-Ke Shih <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Johannes Berg <[email protected]>
  • Loading branch information
Ping-Ke Shih authored and jmberg-intel committed Jun 23, 2021
1 parent 057e377 commit 9df66d5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -4781,11 +4781,10 @@ static int nl80211_parse_tx_bitrate_mask(struct genl_info *info,
sband->ht_cap.mcs.rx_mask,
sizeof(mask->control[i].ht_mcs));

if (!sband->vht_cap.vht_supported)
continue;

vht_tx_mcs_map = le16_to_cpu(sband->vht_cap.vht_mcs.tx_mcs_map);
vht_build_mcs_mask(vht_tx_mcs_map, mask->control[i].vht_mcs);
if (sband->vht_cap.vht_supported) {
vht_tx_mcs_map = le16_to_cpu(sband->vht_cap.vht_mcs.tx_mcs_map);
vht_build_mcs_mask(vht_tx_mcs_map, mask->control[i].vht_mcs);
}

he_cap = ieee80211_get_he_iftype_cap(sband, wdev->iftype);
if (!he_cap)
Expand Down

0 comments on commit 9df66d5

Please sign in to comment.