提交 218d2e26 编写于 作者: B Bala Shanmugam 提交者: John W. Linville

cfg80211: Validate legacy rateset.

Legacy rates are not validated while configuring
tx rateset using iw. So below cmd is accepted by nl80211.
sudo iw wlan2 set bitrates legacy-2.4 1 2 3

Validate legacy rates and return
error if any rate in the rateset is not valid.
Signed-off-by: NBala Shanmugam <bkamatch@qca.qualcomm.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 0d8a0a17
...@@ -5577,6 +5577,9 @@ static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb, ...@@ -5577,6 +5577,9 @@ static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
sband, sband,
nla_data(tb[NL80211_TXRATE_LEGACY]), nla_data(tb[NL80211_TXRATE_LEGACY]),
nla_len(tb[NL80211_TXRATE_LEGACY])); nla_len(tb[NL80211_TXRATE_LEGACY]));
if ((mask.control[band].legacy == 0) &&
nla_len(tb[NL80211_TXRATE_LEGACY]))
return -EINVAL;
} }
if (tb[NL80211_TXRATE_MCS]) { if (tb[NL80211_TXRATE_MCS]) {
if (!ht_rateset_to_mask( if (!ht_rateset_to_mask(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册