浏览代码

staging: vt6655: change typedef enum _VIA_PKT_TYPE to macro

Replacing for u8 type and removing cast for byBBType.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley 10 年之前
父节点
当前提交
bf8918de79
共有 2 个文件被更改,包括 11 次插入14 次删除
  1. 10 13
      drivers/staging/vt6655/device.h
  2. 1 1
      drivers/staging/vt6655/device_main.c

+ 10 - 13
drivers/staging/vt6655/device.h

@@ -152,14 +152,11 @@
 #define BB_TYPE_11B    1
 #define BB_TYPE_11G    2
 
-/* 0:11a,1:11b,2:11gb(only CCK in BasicRate),3:11ga(OFDM in Basic Rate) */
-typedef enum _VIA_PKT_TYPE
-{
-	PK_TYPE_11A = 0,
-	PK_TYPE_11B,
-	PK_TYPE_11GB,
-	PK_TYPE_11GA
-} VIA_PKT_TYPE, *PVIA_PKT_TYPE;
+/* 0:11a, 1:11b, 2:11gb (only CCK in BasicRate), 3:11ga (OFDM in BasicRate) */
+#define PK_TYPE_11A     0
+#define PK_TYPE_11B     1
+#define PK_TYPE_11GB    2
+#define PK_TYPE_11GA    3
 
 typedef struct __chip_info_tbl {
 	CHIP_TYPE   chip_id;
@@ -319,11 +316,11 @@ struct vnt_private {
 	unsigned char byCWMaxMin;
 
 	u8		byBBType; /* 0:11A, 1:11B, 2:11G */
-	VIA_PKT_TYPE            byPacketType; /*
-					       * 0:11a,1:11b,2:11gb (only CCK
-					       * in BasicRate), 3:11ga (OFDM in
-					       * Basic Rate)
-					       */
+	u8		byPacketType; /*
+				       * 0:11a,1:11b,2:11gb (only CCK
+				       * in BasicRate), 3:11ga (OFDM in
+				       * Basic Rate)
+				       */
 	unsigned short wBasicRate;
 	unsigned char byACKRate;
 	unsigned char byTopOFDMBasicRate;

+ 1 - 1
drivers/staging/vt6655/device_main.c

@@ -226,7 +226,7 @@ device_set_options(struct vnt_private *pDevice)
 	pDevice->byLongRetryLimit = pDevice->sOpts.long_retry;
 	pDevice->bDiversityRegCtlON = (pDevice->sOpts.flags & DEVICE_FLAGS_DiversityANT) ? 1 : 0;
 	pDevice->byBBType = pDevice->sOpts.bbp_type;
-	pDevice->byPacketType = (VIA_PKT_TYPE)pDevice->byBBType;
+	pDevice->byPacketType = pDevice->byBBType;
 	pDevice->byAutoFBCtrl = AUTO_FB_0;
 	pDevice->bUpdateBBVGA = true;
 	pDevice->byPreambleType = 0;