Skip to content

Commit 1ca9c73

Browse files
Malcolm Priestleygregkh
authored andcommitted
staging: vt6656: Just check NEWRSR_DECRYPTOK for RX_FLAG_DECRYPTED.
At present the driver does a number of checks for RX_FLAG_DECRYPTED. Remove all these and just pass check NEWRSR_DECRYPTOK mac80211 will handle the processing of the sk_buff and dispose of it. This means that mac80211 can do unsupported encryption modes on stack. Signed-off-by: Malcolm Priestley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent b653174 commit 1ca9c73

File tree

1 file changed

+2
-16
lines changed
  • drivers/staging/vt6656

1 file changed

+2
-16
lines changed

drivers/staging/vt6656/dpc.c

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@ int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb *ptr_rcb,
3030
struct ieee80211_supported_band *sband;
3131
struct sk_buff *skb;
3232
struct ieee80211_rx_status *rx_status;
33-
struct ieee80211_hdr *hdr;
3433
struct vnt_rx_header *head;
3534
struct vnt_rx_tail *tail;
36-
__le16 fc;
3735
u32 frame_size;
3836
int ii;
3937
u16 rx_bitrate, pay_load_with_padding;
@@ -115,22 +113,10 @@ int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb *ptr_rcb,
115113
if (!(tail->rsr & RSR_CRCOK))
116114
rx_status->flag |= RX_FLAG_FAILED_FCS_CRC;
117115

118-
hdr = (struct ieee80211_hdr *)(skb->data);
119-
fc = hdr->frame_control;
120-
121116
rx_status->rate_idx = rate_idx;
122117

123-
if (ieee80211_has_protected(fc)) {
124-
if (priv->local_id > REV_ID_VT3253_A1) {
125-
rx_status->flag |= RX_FLAG_DECRYPTED;
126-
127-
/* Drop packet */
128-
if (!(tail->new_rsr & NEWRSR_DECRYPTOK)) {
129-
dev_kfree_skb(skb);
130-
return true;
131-
}
132-
}
133-
}
118+
if (tail->new_rsr & NEWRSR_DECRYPTOK)
119+
rx_status->flag |= RX_FLAG_DECRYPTED;
134120

135121
ieee80211_rx_irqsafe(priv->hw, skb);
136122

0 commit comments

Comments
 (0)