staging: vt6656: Remove unused variable bLongHeader
authorMalcolm Priestley <tvboxspy@gmail.com>
Mon, 25 Nov 2013 22:14:16 +0000 (22:14 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Nov 2013 03:03:58 +0000 (19:03 -0800)
Remove dead bLongHeader code.

In s_vFillTxKey use ieee80211_has_a4 to detect long headers for future use.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/device.h
drivers/staging/vt6656/rxtx.c

index ec8acbd4abaac2bb5332e4ee39def2028ca59ecd..9a4dfbcea8b7ff8dd557cfc001cc246940ce47e9 100644 (file)
@@ -598,7 +598,6 @@ struct vnt_private {
 
        int bCCK;
        int bEncryptionEnable;
-       int bLongHeader;
        int bShortSlotTime;
        int bProtectMode;
        int bNonERPPresent;
index 723a8de3a4669c99f3cfbc25da3a8f2ceca050f3..aa71d39b1259b2eaa1630a3ea1000fed27b4e83d 100644 (file)
@@ -278,7 +278,7 @@ static void s_vFillTxKey(struct vnt_private *pDevice,
                mic_hdr->tsc_15_0 = cpu_to_be16(pTransmitKey->wTSC15_0);
 
                /* MICHDR1 */
-               if (pDevice->bLongHeader)
+               if (ieee80211_has_a4(pMACHeader->frame_control))
                        mic_hdr->hlen = cpu_to_be16(28);
                else
                        mic_hdr->hlen = cpu_to_be16(22);
@@ -292,7 +292,7 @@ static void s_vFillTxKey(struct vnt_private *pDevice,
                                                                & 0xc78f);
                mic_hdr->seq_ctrl = cpu_to_le16(pMACHeader->seq_ctrl & 0xf);
 
-               if (pDevice->bLongHeader)
+               if (ieee80211_has_a4(pMACHeader->frame_control))
                        memcpy(mic_hdr->addr4, pMACHeader->addr4, ETH_ALEN);
        }
 }
@@ -790,7 +790,6 @@ static u16 s_vGenerateTxParameter(struct vnt_private *pDevice,
 {
        struct vnt_tx_fifo_head *pFifoHead = &tx_buffer->fifo_head;
        union vnt_tx_data_head *head = NULL;
-       u32 cbMACHdLen = WLAN_HDR_ADDR3_LEN; /* 24 */
        u16 wFifoCtl;
        u8 byFBOption = AUTO_FB_NONE;
 
@@ -805,9 +804,6 @@ static u16 s_vGenerateTxParameter(struct vnt_private *pDevice,
        if (!pFifoHead)
                return 0;
 
-       if (pDevice->bLongHeader)
-               cbMACHdLen = WLAN_HDR_ADDR3_LEN + 6;
-
        if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {
                if (need_rts) {
                        struct vnt_rrv_time_rts *pBuf =
@@ -1007,16 +1003,9 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType,
 
     pTxBufHead->wTimeStamp = DEFAULT_MSDU_LIFETIME_RES_64us;
 
-    //Set FIFOCTL_LHEAD
-    if (pDevice->bLongHeader)
-        pTxBufHead->wFIFOCtl |= FIFOCTL_LHEAD;
-
     //Set FRAGCTL_MACHDCNT
-    if (pDevice->bLongHeader) {
-        cbMACHdLen = WLAN_HDR_ADDR3_LEN + 6;
-    } else {
-        cbMACHdLen = WLAN_HDR_ADDR3_LEN;
-    }
+       cbMACHdLen = WLAN_HDR_ADDR3_LEN;
+
     pTxBufHead->wFragCtl |= (u16)(cbMACHdLen << 10);
 
     //Set FIFOCTL_GrpAckPolicy
@@ -1336,11 +1325,6 @@ static void s_vGenerateMACHeader(struct vnt_private *pDevice,
 
     pMACHeader->duration_id = cpu_to_le16(wDuration);
 
-    if (pDevice->bLongHeader) {
-        PWLAN_80211HDR_A4 pMACA4Header  = (PWLAN_80211HDR_A4) pbyBufferAddr;
-        pMACHeader->frame_control |= (FC_TODS | FC_FROMDS);
-        memcpy(pMACA4Header->abyAddr4, pDevice->abyBSSID, WLAN_ADDR_LEN);
-    }
     pMACHeader->seq_ctrl = cpu_to_le16(pDevice->wSeqCounter << 4);
 
     //Set FragNumber in Sequence Control