1
0
Fork 0

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

commit d971fdd341 upstream.

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: Malcolm Priestley <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/9c1323ff-dbb3-0eaa-43e1-9453f7390dc0@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5.4-rM2-2.2.x-imx-squashed
Malcolm Priestley 2020-01-08 21:40:58 +00:00 committed by Greg Kroah-Hartman
parent 3a5bff77f4
commit 1a80cc38db
2 changed files with 10 additions and 4 deletions

View File

@ -52,6 +52,8 @@
#define RATE_AUTO 12
#define MAX_RATE 12
#define VNT_B_RATES (BIT(RATE_1M) | BIT(RATE_2M) |\
BIT(RATE_5M) | BIT(RATE_11M))
/*
* device specific

View File

@ -815,10 +815,14 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)
if (info->band == NL80211_BAND_5GHZ) {
pkt_type = PK_TYPE_11A;
} else {
if (tx_rate->flags & IEEE80211_TX_RC_USE_CTS_PROTECT)
pkt_type = PK_TYPE_11GB;
else
pkt_type = PK_TYPE_11GA;
if (tx_rate->flags & IEEE80211_TX_RC_USE_CTS_PROTECT) {
if (priv->basic_rates & VNT_B_RATES)
pkt_type = PK_TYPE_11GB;
else
pkt_type = PK_TYPE_11GA;
} else {
pkt_type = PK_TYPE_11A;
}
}
} else {
pkt_type = PK_TYPE_11B;