Commit d971fdd3 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: correct packet types for CTS protect, mode.

It appears that the driver still transmits in CTS protect mode even
though it is not enabled in mac80211.

That is both packet types PK_TYPE_11GA and PK_TYPE_11GB both use CTS protect.
The only difference between them GA does not use B rates.

Find if only B rate in GB or GA in protect mode otherwise transmit packets
as PK_TYPE_11A.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/9c1323ff-dbb3-0eaa-43e1-9453f7390dc0@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 02ede956
...@@ -52,6 +52,8 @@ ...@@ -52,6 +52,8 @@
#define RATE_AUTO 12 #define RATE_AUTO 12
#define MAX_RATE 12 #define MAX_RATE 12
#define VNT_B_RATES (BIT(RATE_1M) | BIT(RATE_2M) |\
BIT(RATE_5M) | BIT(RATE_11M))
/* /*
* device specific * device specific
......
...@@ -815,10 +815,14 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb) ...@@ -815,10 +815,14 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)
if (info->band == NL80211_BAND_5GHZ) { if (info->band == NL80211_BAND_5GHZ) {
pkt_type = PK_TYPE_11A; pkt_type = PK_TYPE_11A;
} else { } else {
if (tx_rate->flags & IEEE80211_TX_RC_USE_CTS_PROTECT) if (tx_rate->flags & IEEE80211_TX_RC_USE_CTS_PROTECT) {
if (priv->basic_rates & VNT_B_RATES)
pkt_type = PK_TYPE_11GB; pkt_type = PK_TYPE_11GB;
else else
pkt_type = PK_TYPE_11GA; pkt_type = PK_TYPE_11GA;
} else {
pkt_type = PK_TYPE_11A;
}
} }
} else { } else {
pkt_type = PK_TYPE_11B; pkt_type = PK_TYPE_11B;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment