staging: vt6656: desc.h: Move typedef tagSRrvTime_gRTS to new structure in rxtx.h
authorMalcolm Priestley <tvboxspy@gmail.com>
Fri, 16 Aug 2013 20:26:55 +0000 (21:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Aug 2013 22:39:18 +0000 (15:39 -0700)
To new structure.
typedef struct tagSRrvTime_gRTS -> struct vnt_rrv_time_rts

This is only needed by rxtc.c so moved to rxtx.h and
will eventually form part of the structure of
struct vnt_tx_buffer.

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

index d770a78e37dec61464fb2080e49d6eda66854886..89b580db22019810ea18cc8ac5635f2084521758 100644 (file)
 /*
  * RsvTime buffer header
  */
-typedef struct tagSRrvTime_gRTS {
-    u16        wRTSTxRrvTime_ba;
-    u16        wRTSTxRrvTime_aa;
-    u16        wRTSTxRrvTime_bb;
-    u16        wReserved;
-    u16        wTxRrvTime_b;
-    u16        wTxRrvTime_a;
-} __attribute__ ((__packed__))
-SRrvTime_gRTS, *PSRrvTime_gRTS;
-
-typedef const SRrvTime_gRTS *PCSRrvTime_gRTS;
-
 typedef struct tagSRrvTime_gCTS {
     u16        wCTSTxRrvTime_ba;
     u16        wReserved;
index d9827b31cfef9771ed8c25751cd955dd741ea608..c9dceae646a99df448107c96b37ba15ff83c8401 100644 (file)
@@ -919,7 +919,8 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice,
         if (pvRTS != NULL) { //RTS_need
             //Fill RsvTime
             if (pvRrvTime) {
-                PSRrvTime_gRTS pBuf = (PSRrvTime_gRTS)pvRrvTime;
+               struct vnt_rrv_time_rts *pBuf =
+                       (struct vnt_rrv_time_rts *)pvRrvTime;
                 pBuf->wRTSTxRrvTime_aa = cpu_to_le16((u16)s_uGetRTSCTSRsvTime(pDevice, 2, byPktType, cbFrameSize, wCurrentRate));//2:RTSTxRrvTime_aa, 1:2.4GHz
                 pBuf->wRTSTxRrvTime_ba = cpu_to_le16((u16)s_uGetRTSCTSRsvTime(pDevice, 1, byPktType, cbFrameSize, wCurrentRate));//1:RTSTxRrvTime_ba, 1:2.4GHz
                 pBuf->wRTSTxRrvTime_bb = cpu_to_le16((u16)s_uGetRTSCTSRsvTime(pDevice, 0, byPktType, cbFrameSize, wCurrentRate));//0:RTSTxRrvTime_bb, 1:2.4GHz
@@ -1149,15 +1150,17 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType,
     if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {//802.11g packet
         if (byFBOption == AUTO_FB_NONE) {
             if (bRTS == true) {//RTS_need
-                pvRrvTime = (PSRrvTime_gRTS) (pbyTxBufferAddr + wTxBufSize);
-                pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gRTS));
+               pvRrvTime = (struct vnt_rrv_time_rts *)
+                                       (pbyTxBufferAddr + wTxBufSize);
+               pMICHDR = (PSMICHDRHead)(pbyTxBufferAddr + wTxBufSize +
+                                       sizeof(struct vnt_rrv_time_rts));
                pvRTS = (struct vnt_rts_g *) (pbyTxBufferAddr + wTxBufSize +
-                               sizeof(SRrvTime_gRTS) + cbMICHDR);
+                               sizeof(struct vnt_rrv_time_rts) + cbMICHDR);
                 pvCTS = NULL;
                pvTxDataHd = (PSTxDataHead_g) (pbyTxBufferAddr + wTxBufSize +
-                       sizeof(SRrvTime_gRTS) + cbMICHDR +
+                       sizeof(struct vnt_rrv_time_rts) + cbMICHDR +
                                                sizeof(struct vnt_rts_g));
-               cbHeaderLength = wTxBufSize + sizeof(SRrvTime_gRTS) +
+               cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_rts) +
                        cbMICHDR + sizeof(struct vnt_rts_g) +
                                sizeof(STxDataHead_g);
             }
@@ -1176,16 +1179,19 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType,
         } else {
             // Auto Fall Back
             if (bRTS == true) {//RTS_need
-                pvRrvTime = (PSRrvTime_gRTS) (pbyTxBufferAddr + wTxBufSize);
-                pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gRTS));
+               pvRrvTime = (struct vnt_rrv_time_rts *)(pbyTxBufferAddr +
+                                                               wTxBufSize);
+               pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize +
+                                       sizeof(struct vnt_rrv_time_rts));
                pvRTS = (struct vnt_rts_g_fb *) (pbyTxBufferAddr + wTxBufSize +
-                               sizeof(SRrvTime_gRTS) + cbMICHDR);
+                               sizeof(struct vnt_rrv_time_rts) + cbMICHDR);
                 pvCTS = NULL;
                pvTxDataHd = (PSTxDataHead_g_FB) (pbyTxBufferAddr + wTxBufSize +
-                       sizeof(SRrvTime_gRTS) + cbMICHDR +
+                       sizeof(struct vnt_rrv_time_rts) + cbMICHDR +
                                        sizeof(struct vnt_rts_g_fb));
-               cbHeaderLength = wTxBufSize + sizeof(SRrvTime_gRTS) + cbMICHDR +
-                       sizeof(struct vnt_rts_g_fb) + sizeof(STxDataHead_g_FB);
+               cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_rts) +
+                       cbMICHDR + sizeof(struct vnt_rts_g_fb) +
+                               sizeof(STxDataHead_g_FB);
             }
             else if (bRTS == false) { //RTS_needless
                 pvRrvTime = (PSRrvTime_gCTS) (pbyTxBufferAddr + wTxBufSize);
index 8fd5be175e6b06670ce337e26547f1f6862fbfba..8afade2d511830bcf1fc0673532fa65284b137c6 100644 (file)
 #include "device.h"
 #include "wcmd.h"
 
+/* RsvTime buffer header */
+struct vnt_rrv_time_rts {
+       u16 wRTSTxRrvTime_ba;
+       u16 wRTSTxRrvTime_aa;
+       u16 wRTSTxRrvTime_bb;
+       u16 wReserved;
+       u16 wTxRrvTime_b;
+       u16 wTxRrvTime_a;
+} __packed;
+
 /* RTS buffer header */
 struct vnt_rts_g {
        u8 bySignalField_b;