staging: vt6656: remove ieee80211_hdr from vnt_usb_send_context.
authorMalcolm Priestley <tvboxspy@gmail.com>
Thu, 21 May 2020 09:31:36 +0000 (10:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 May 2020 09:02:26 +0000 (11:02 +0200)
It is only used in one place were it can be pointed to at skb->data.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/556fab01-aa1e-154e-149e-c04feeb76efa@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/device.h
drivers/staging/vt6656/rxtx.c

index d1b19dcaf9912b1960bba98599b5aa8b710c6315..0486aabba0611f34a798b10f6b293f5bd7fd836d 100644 (file)
@@ -238,7 +238,6 @@ struct vnt_rcb {
 struct vnt_usb_send_context {
        void *priv;
        struct sk_buff *skb;
-       struct ieee80211_hdr *hdr;
        void *tx_buffer;
        unsigned int buf_len;
        u32 frame_len;
index 8f9904c8045c35371fa59d1b08fc653edd7c0828..a47f42bedfa932725ff4e6b112bef7da17c7dc95 100644 (file)
@@ -73,8 +73,6 @@ static struct vnt_usb_send_context
                context = priv->tx_context[ii];
                if (!context->in_use) {
                        context->in_use = true;
-                       context->hdr = NULL;
-
                        return context;
                }
        }
@@ -392,7 +390,7 @@ static void vnt_fill_txkey(struct vnt_usb_send_context *tx_context,
                           struct sk_buff *skb, u16 payload_len,
                           struct vnt_mic_hdr *mic_hdr)
 {
-       struct ieee80211_hdr *hdr = tx_context->hdr;
+       struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
        u64 pn64;
        u8 *iv = ((u8 *)hdr + ieee80211_get_hdrlen_from_skb(skb));
 
@@ -544,7 +542,6 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)
        tx_context->need_ack = false;
        tx_context->frame_len = skb->len + 4;
        tx_context->tx_rate =  rate->hw_value;
-       tx_context->hdr = hdr;
 
        spin_unlock_irqrestore(&priv->lock, flags);