staging: vt6655: Remove BBvCalculateParameter and its data members
authorMalcolm Priestley <tvboxspy@gmail.com>
Wed, 20 Aug 2014 21:30:31 +0000 (22:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Aug 2014 20:48:19 +0000 (13:48 -0700)
Remove data members bySignalField*, byServiceField*, wTransmitLength*
from structures in desc.h

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

index 584220613fdfd96ae10d8c6908246d3406d7b59d..40710bb1be2adb293f80bbe4cbe1cd90923ee4cd 100644 (file)
@@ -1954,149 +1954,6 @@ void vnt_get_phy_field(struct vnt_private *priv, u32 frame_length,
        }
 }
 
-void
-BBvCalculateParameter(
-       struct vnt_private *pDevice,
-       unsigned int cbFrameLength,
-       unsigned short wRate,
-       unsigned char byPacketType,
-       unsigned short *pwPhyLen,
-       unsigned char *pbyPhySrv,
-       unsigned char *pbyPhySgn
-)
-{
-       unsigned int cbBitCount;
-       unsigned int cbUsCount = 0;
-       unsigned int cbTmp;
-       bool bExtBit;
-       unsigned char byPreambleType = pDevice->byPreambleType;
-
-       cbBitCount = cbFrameLength * 8;
-       bExtBit = false;
-
-       switch (wRate) {
-       case RATE_1M:
-               cbUsCount = cbBitCount;
-               *pbyPhySgn = 0x00;
-               break;
-
-       case RATE_2M:
-               cbUsCount = cbBitCount / 2;
-               if (byPreambleType == 1)
-                       *pbyPhySgn = 0x09;
-               else /* long preamble */
-                       *pbyPhySgn = 0x01;
-               break;
-
-       case RATE_5M:
-               cbUsCount = (cbBitCount * 10) / 55;
-               cbTmp = (cbUsCount * 55) / 10;
-               if (cbTmp != cbBitCount)
-                       cbUsCount++;
-               if (byPreambleType == 1)
-                       *pbyPhySgn = 0x0a;
-               else /* long preamble */
-                       *pbyPhySgn = 0x02;
-               break;
-
-       case RATE_11M:
-               cbUsCount = cbBitCount / 11;
-               cbTmp = cbUsCount * 11;
-               if (cbTmp != cbBitCount) {
-                       cbUsCount++;
-                       if ((cbBitCount - cbTmp) <= 3)
-                               bExtBit = true;
-               }
-               if (byPreambleType == 1)
-                       *pbyPhySgn = 0x0b;
-               else /* long preamble */
-                       *pbyPhySgn = 0x03;
-               break;
-
-       case RATE_6M:
-               if (byPacketType == PK_TYPE_11A) { /*11a, 5GHZ */
-                       *pbyPhySgn = 0x9B; /* 1001 1011 */
-               } else {/* 11g, 2.4GHZ */
-                       *pbyPhySgn = 0x8B; /* 1000 1011 */
-               }
-               break;
-
-       case RATE_9M:
-               if (byPacketType == PK_TYPE_11A) {/* 11a, 5GHZ */
-                       *pbyPhySgn = 0x9F; /* 1001 1111 */
-               } else {/* 11g, 2.4GHZ */
-                       *pbyPhySgn = 0x8F; /* 1000 1111 */
-               }
-               break;
-
-       case RATE_12M:
-               if (byPacketType == PK_TYPE_11A) {/* 11a, 5GHZ */
-                       *pbyPhySgn = 0x9A; /* 1001 1010 */
-               } else {/* 11g, 2.4GHZ */
-                       *pbyPhySgn = 0x8A; /* 1000 1010 */
-               }
-               break;
-
-       case RATE_18M:
-               if (byPacketType == PK_TYPE_11A) {/* 11a, 5GHZ */
-                       *pbyPhySgn = 0x9E; /* 1001 1110 */
-               } else {/* 11g, 2.4GHZ */
-                       *pbyPhySgn = 0x8E; /* 1000 1110 */
-               }
-               break;
-
-       case RATE_24M:
-               if (byPacketType == PK_TYPE_11A) {/* 11a, 5GHZ */
-                       *pbyPhySgn = 0x99; /* 1001 1001 */
-               } else {/* 11g, 2.4GHZ */
-                       *pbyPhySgn = 0x89; /* 1000 1001 */
-               }
-               break;
-
-       case RATE_36M:
-               if (byPacketType == PK_TYPE_11A) {/* 11a, 5GHZ */
-                       *pbyPhySgn = 0x9D; /* 1001 1101 */
-               } else {/* 11g, 2.4GHZ */
-                       *pbyPhySgn = 0x8D; /* 1000 1101 */
-               }
-               break;
-
-       case RATE_48M:
-               if (byPacketType == PK_TYPE_11A) {/* 11a, 5GHZ */
-                       *pbyPhySgn = 0x98; /* 1001 1000 */
-               } else {/* 11g, 2.4GHZ */
-                       *pbyPhySgn = 0x88; /* 1000 1000 */
-               }
-               break;
-
-       case RATE_54M:
-               if (byPacketType == PK_TYPE_11A) {/* 11a, 5GHZ */
-                       *pbyPhySgn = 0x9C; /* 1001 1100 */
-               } else {/* 11g, 2.4GHZ */
-                       *pbyPhySgn = 0x8C; /* 1000 1100 */
-               }
-               break;
-
-       default:
-               if (byPacketType == PK_TYPE_11A) {/* 11a, 5GHZ */
-                       *pbyPhySgn = 0x9C; /* 1001 1100 */
-               } else {/* 11g, 2.4GHZ */
-                       *pbyPhySgn = 0x8C; /* 1000 1100 */
-               }
-               break;
-       }
-
-       if (byPacketType == PK_TYPE_11B) {
-               *pbyPhySrv = 0x00;
-               if (bExtBit)
-                       *pbyPhySrv = *pbyPhySrv | 0x80;
-               *pwPhyLen = (unsigned short)cbUsCount;
-       } else {
-               *pbyPhySrv = 0x00;
-               *pwPhyLen = (unsigned short)cbFrameLength;
-       }
-}
-
 /*
  * Description: Read a byte from BASEBAND, by embedded programming
  *
index 049e6b48460e4e445697fbc90cf905eb2690d051..78620d34fc7fd8b736f04fd04c92d4d29affb6a4 100644 (file)
@@ -76,17 +76,6 @@ BBuGetFrameTime(
        unsigned short wRate
 );
 
-void
-BBvCalculateParameter(
-       struct vnt_private *pDevice,
-       unsigned int cbFrameLength,
-       unsigned short wRate,
-       unsigned char byPacketType,
-       unsigned short *pwPhyLen,
-       unsigned char *pbyPhySrv,
-       unsigned char *pbyPhySgn
-);
-
 void vnt_get_phy_field(struct vnt_private *, u32 frame_length,
                       u16 tx_rate, u8 pkt_type, struct vnt_phy_field *);
 
index 18427238efcf3b5c947d921a8fff02c16859987a..10bd5648ca1f6bfcf8a4ce4a772f90a6f2abafde 100644 (file)
@@ -393,12 +393,6 @@ union vnt_phy_field_swap {
 typedef struct tagSRTS_g {
        struct vnt_phy_field b;
        struct vnt_phy_field a;
-       unsigned char bySignalField_b;
-       unsigned char byServiceField_b;
-       unsigned short wTransmitLength_b;
-       unsigned char bySignalField_a;
-       unsigned char byServiceField_a;
-       unsigned short wTransmitLength_a;
        unsigned short wDuration_ba;
        unsigned short wDuration_aa;
        unsigned short wDuration_bb;
@@ -411,12 +405,6 @@ typedef const SRTS_g *PCSRTS_g;
 typedef struct tagSRTS_g_FB {
        struct vnt_phy_field b;
        struct vnt_phy_field a;
-       unsigned char bySignalField_b;
-       unsigned char byServiceField_b;
-       unsigned short wTransmitLength_b;
-       unsigned char bySignalField_a;
-       unsigned char byServiceField_a;
-       unsigned short wTransmitLength_a;
        unsigned short wDuration_ba;
        unsigned short wDuration_aa;
        unsigned short wDuration_bb;
@@ -432,9 +420,6 @@ typedef const SRTS_g_FB *PCSRTS_g_FB;
 
 typedef struct tagSRTS_ab {
        struct vnt_phy_field ab;
-       unsigned char bySignalField;
-       unsigned char byServiceField;
-       unsigned short wTransmitLength;
        unsigned short wDuration;
        unsigned short wReserved;
        SRTSData    Data;
@@ -444,9 +429,6 @@ typedef const SRTS_ab *PCSRTS_ab;
 
 typedef struct tagSRTS_a_FB {
        struct vnt_phy_field a;
-       unsigned char bySignalField;
-       unsigned char byServiceField;
-       unsigned short wTransmitLength;
        unsigned short wDuration;
        unsigned short wReserved;
        unsigned short wRTSDuration_f0;
@@ -469,9 +451,6 @@ SCTSData, *PSCTSData;
 
 typedef struct tagSCTS {
        struct vnt_phy_field b;
-       unsigned char bySignalField_b;
-       unsigned char byServiceField_b;
-       unsigned short wTransmitLength_b;
        unsigned short wDuration_ba;
        unsigned short wReserved;
        SCTSData    Data;
@@ -481,9 +460,6 @@ typedef const SCTS *PCSCTS;
 
 typedef struct tagSCTS_FB {
        struct vnt_phy_field b;
-       unsigned char bySignalField_b;
-       unsigned char byServiceField_b;
-       unsigned short wTransmitLength_b;
        unsigned short wDuration_ba;
        unsigned short wReserved;
        unsigned short wCTSDuration_ba_f0;
@@ -520,12 +496,6 @@ typedef const STxShortBufHead *PCSTxShortBufHead;
 typedef struct tagSTxDataHead_g {
        struct vnt_phy_field b;
        struct vnt_phy_field a;
-       unsigned char bySignalField_b;
-       unsigned char byServiceField_b;
-       unsigned short wTransmitLength_b;
-       unsigned char bySignalField_a;
-       unsigned char byServiceField_a;
-       unsigned short wTransmitLength_a;
        unsigned short wDuration_b;
        unsigned short wDuration_a;
        unsigned short wTimeStampOff_b;
@@ -537,12 +507,6 @@ typedef const STxDataHead_g *PCSTxDataHead_g;
 typedef struct tagSTxDataHead_g_FB {
        struct vnt_phy_field b;
        struct vnt_phy_field a;
-       unsigned char bySignalField_b;
-       unsigned char byServiceField_b;
-       unsigned short wTransmitLength_b;
-       unsigned char bySignalField_a;
-       unsigned char byServiceField_a;
-       unsigned short wTransmitLength_a;
        unsigned short wDuration_b;
        unsigned short wDuration_a;
        unsigned short wDuration_a_f0;
@@ -555,9 +519,6 @@ typedef const STxDataHead_g_FB *PCSTxDataHead_g_FB;
 
 typedef struct tagSTxDataHead_ab {
        struct vnt_phy_field ab;
-       unsigned char bySignalField;
-       unsigned char byServiceField;
-       unsigned short wTransmitLength;
        unsigned short wDuration;
        unsigned short wTimeStampOff;
 } __attribute__ ((__packed__))
@@ -566,9 +527,6 @@ typedef const STxDataHead_ab *PCSTxDataHead_ab;
 
 typedef struct tagSTxDataHead_a_FB {
        struct vnt_phy_field a;
-       unsigned char bySignalField;
-       unsigned char byServiceField;
-       unsigned short wTransmitLength;
        unsigned short wDuration;
        unsigned short wTimeStampOff;
        unsigned short wDuration_f0;