All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2 0/7] vt6655: Cleanup of checkpatch errors
@ 2014-01-07 12:11 Michael Gunselmann
  2014-01-07 12:11 ` [PATCHv2 1/7] vt6655: balance faulty parentheses in 80211hdr.h Michael Gunselmann
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Michael Gunselmann @ 2014-01-07 12:11 UTC (permalink / raw)
  To: michael.gunselmann
  Cc: martin.hofmann, forest, gregkh, devel, linux-kernel, linux-kernel

This patch series cleans up some checkpatch errors and warnings
in some files of the vt6655 driver in staging.

The reference git tree is linux-next.

Not all files of the driver were cleaned up in this patch series.

The patches should not incorporate functional changes.

-- 
1.8.1.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCHv2 1/7] vt6655: balance faulty parentheses in 80211hdr.h
  2014-01-07 12:11 [PATCHv2 0/7] vt6655: Cleanup of checkpatch errors Michael Gunselmann
@ 2014-01-07 12:11 ` Michael Gunselmann
  2014-01-07 12:34   ` Dan Carpenter
  2014-01-07 12:11 ` [PATCHv2 2/7] vt6655: remove casts in wroute.c Michael Gunselmann
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 10+ messages in thread
From: Michael Gunselmann @ 2014-01-07 12:11 UTC (permalink / raw)
  To: michael.gunselmann
  Cc: martin.hofmann, forest, gregkh, devel, linux-kernel, linux-kernel

From: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>

The file 80211hdr.h contained the macro WLAN_GET_FC_PRVER(n). The big endian
fashion of this macro had unbalanced parentheses. This patch removes the
parentheses in question.

Signed-off-by: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>
Signed-off-by: Michael Gunselmann <michael.gunselmann@studium.uni-erlangen.de>
---
 drivers/staging/vt6655/80211hdr.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/vt6655/80211hdr.h b/drivers/staging/vt6655/80211hdr.h
index ba53340..ba155cd 100644
--- a/drivers/staging/vt6655/80211hdr.h
+++ b/drivers/staging/vt6655/80211hdr.h
@@ -155,7 +155,7 @@
 #ifdef __BIG_ENDIAN
 
 /* GET & SET Frame Control bit */
-#define WLAN_GET_FC_PRVER(n)    ((((unsigned short)(n) >> 8) & (BIT0 | BIT1))
+#define WLAN_GET_FC_PRVER(n)    (((unsigned short)(n) >> 8) & (BIT0 | BIT1))
 #define WLAN_GET_FC_FTYPE(n)    ((((unsigned short)(n) >> 8) & (BIT2 | BIT3)) >> 2)
 #define WLAN_GET_FC_FSTYPE(n)   ((((unsigned short)(n) >> 8) & (BIT4|BIT5|BIT6|BIT7)) >> 4)
 #define WLAN_GET_FC_TODS(n)     ((((unsigned short)(n) << 8) & (BIT8)) >> 8)
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCHv2 2/7] vt6655: remove casts in wroute.c
  2014-01-07 12:11 [PATCHv2 0/7] vt6655: Cleanup of checkpatch errors Michael Gunselmann
  2014-01-07 12:11 ` [PATCHv2 1/7] vt6655: balance faulty parentheses in 80211hdr.h Michael Gunselmann
@ 2014-01-07 12:11 ` Michael Gunselmann
  2014-01-07 12:11 ` [PATCHv2 3/7] vt6655: remove unnecessary braces " Michael Gunselmann
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Michael Gunselmann @ 2014-01-07 12:11 UTC (permalink / raw)
  To: michael.gunselmann
  Cc: martin.hofmann, forest, gregkh, devel, linux-kernel, linux-kernel

From: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>

The file wroute.c contained some silly casts. This patch removes them.

Signed-off-by: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>
Signed-off-by: Michael Gunselmann <michael.gunselmann@studium.uni-erlangen.de>
---
 drivers/staging/vt6655/wroute.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/vt6655/wroute.c b/drivers/staging/vt6655/wroute.c
index 85302c5..2e94efb 100644
--- a/drivers/staging/vt6655/wroute.c
+++ b/drivers/staging/vt6655/wroute.c
@@ -86,7 +86,7 @@ bool ROUTEbRelay(PSDevice pDevice, unsigned char *pbySkbData, unsigned int uData
 
 	pHeadTD->m_td1TD1.byTCR = (TCR_EDP | TCR_STP);
 
-	memcpy(pDevice->sTxEthHeader.abyDstAddr, (unsigned char *)pbySkbData, ETH_HLEN);
+	memcpy(pDevice->sTxEthHeader.abyDstAddr, pbySkbData, ETH_HLEN);
 
 	cbFrameBodySize = uDataLen - ETH_HLEN;
 
@@ -127,14 +127,14 @@ bool ROUTEbRelay(PSDevice pDevice, unsigned char *pbySkbData, unsigned int uData
 	if (uMACfragNum > AVAIL_TD(pDevice, TYPE_AC0DMA)) {
 		return false;
 	}
-	byPktType = (unsigned char)pDevice->byPacketType;
+	byPktType = pDevice->byPacketType;
 
 	if (pDevice->bFixRate) {
 		if (pDevice->eCurrentPHYType == PHY_TYPE_11B) {
 			if (pDevice->uConnectionRate >= RATE_11M) {
 				pDevice->wCurrentRate = RATE_11M;
 			} else {
-				pDevice->wCurrentRate = (unsigned short)pDevice->uConnectionRate;
+				pDevice->wCurrentRate = pDevice->uConnectionRate;
 			}
 		} else {
 			if ((pDevice->eCurrentPHYType == PHY_TYPE_11A) &&
@@ -144,7 +144,7 @@ bool ROUTEbRelay(PSDevice pDevice, unsigned char *pbySkbData, unsigned int uData
 				if (pDevice->uConnectionRate >= RATE_54M)
 					pDevice->wCurrentRate = RATE_54M;
 				else
-					pDevice->wCurrentRate = (unsigned short)pDevice->uConnectionRate;
+					pDevice->wCurrentRate = pDevice->uConnectionRate;
 			}
 		}
 	} else {
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCHv2 3/7] vt6655: remove unnecessary braces in wroute.c
  2014-01-07 12:11 [PATCHv2 0/7] vt6655: Cleanup of checkpatch errors Michael Gunselmann
  2014-01-07 12:11 ` [PATCHv2 1/7] vt6655: balance faulty parentheses in 80211hdr.h Michael Gunselmann
  2014-01-07 12:11 ` [PATCHv2 2/7] vt6655: remove casts in wroute.c Michael Gunselmann
@ 2014-01-07 12:11 ` Michael Gunselmann
  2014-01-07 12:11 ` [PATCHv2 4/7] vt6655: fix indentation " Michael Gunselmann
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Michael Gunselmann @ 2014-01-07 12:11 UTC (permalink / raw)
  To: michael.gunselmann
  Cc: martin.hofmann, forest, gregkh, devel, linux-kernel, linux-kernel

From: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>

This patch removes some unnecessary braces concerning if-statements in the file
wroute.c

Signed-off-by: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>
Signed-off-by: Michael Gunselmann <michael.gunselmann@studium.uni-erlangen.de>
---
 drivers/staging/vt6655/wroute.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/vt6655/wroute.c b/drivers/staging/vt6655/wroute.c
index 2e94efb..fdc13df 100644
--- a/drivers/staging/vt6655/wroute.c
+++ b/drivers/staging/vt6655/wroute.c
@@ -90,9 +90,8 @@ bool ROUTEbRelay(PSDevice pDevice, unsigned char *pbySkbData, unsigned int uData
 
 	cbFrameBodySize = uDataLen - ETH_HLEN;
 
-	if (ntohs(pDevice->sTxEthHeader.wType) > ETH_DATA_LEN) {
+	if (ntohs(pDevice->sTxEthHeader.wType) > ETH_DATA_LEN)
 		cbFrameBodySize += 8;
-	}
 
 	if (pDevice->bEncryptionEnable == true) {
 		bNeedEncryption = true;
@@ -124,18 +123,17 @@ bool ROUTEbRelay(PSDevice pDevice, unsigned char *pbySkbData, unsigned int uData
 
 	uMACfragNum = cbGetFragCount(pDevice, pTransmitKey, cbFrameBodySize, &pDevice->sTxEthHeader);
 
-	if (uMACfragNum > AVAIL_TD(pDevice, TYPE_AC0DMA)) {
+	if (uMACfragNum > AVAIL_TD(pDevice, TYPE_AC0DMA))
 		return false;
-	}
+
 	byPktType = pDevice->byPacketType;
 
 	if (pDevice->bFixRate) {
 		if (pDevice->eCurrentPHYType == PHY_TYPE_11B) {
-			if (pDevice->uConnectionRate >= RATE_11M) {
+			if (pDevice->uConnectionRate >= RATE_11M)
 				pDevice->wCurrentRate = RATE_11M;
-			} else {
+			else
 				pDevice->wCurrentRate = pDevice->uConnectionRate;
-			}
 		} else {
 			if ((pDevice->eCurrentPHYType == PHY_TYPE_11A) &&
 			    (pDevice->uConnectionRate <= RATE_6M)) {
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCHv2 4/7] vt6655: fix indentation in wroute.c
  2014-01-07 12:11 [PATCHv2 0/7] vt6655: Cleanup of checkpatch errors Michael Gunselmann
                   ` (2 preceding siblings ...)
  2014-01-07 12:11 ` [PATCHv2 3/7] vt6655: remove unnecessary braces " Michael Gunselmann
@ 2014-01-07 12:11 ` Michael Gunselmann
  2014-01-07 12:11 ` [PATCHv2 5/7] vt6655: remove typedefs in wpactl.h Michael Gunselmann
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Michael Gunselmann @ 2014-01-07 12:11 UTC (permalink / raw)
  To: michael.gunselmann
  Cc: martin.hofmann, forest, gregkh, devel, linux-kernel, linux-kernel

From: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>

This patch fixes indentation style belonging to function calls as well as some
run-away closing parentheses when calling functions.

Signed-off-by: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>
Signed-off-by: Michael Gunselmann <michael.gunselmann@studium.uni-erlangen.de>
---
 drivers/staging/vt6655/wroute.c | 30 +++++++++++++++++-------------
 1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/vt6655/wroute.c b/drivers/staging/vt6655/wroute.c
index fdc13df..c39d5ed 100644
--- a/drivers/staging/vt6655/wroute.c
+++ b/drivers/staging/vt6655/wroute.c
@@ -63,7 +63,8 @@ static int msglevel = MSG_LEVEL_INFO;
  * Return Value: true if packet duplicate; otherwise false
  *
  */
-bool ROUTEbRelay(PSDevice pDevice, unsigned char *pbySkbData, unsigned int uDataLen, unsigned int uNodeIndex)
+bool ROUTEbRelay(PSDevice pDevice, unsigned char *pbySkbData,
+		 unsigned int uDataLen, unsigned int uNodeIndex)
 {
 	PSMgmtObject    pMgmt = pDevice->pMgmt;
 	PSTxDesc        pHeadTD, pLastTD;
@@ -78,7 +79,8 @@ bool ROUTEbRelay(PSDevice pDevice, unsigned char *pbySkbData, unsigned int uData
 	unsigned char *pbyBSSID;
 
 	if (AVAIL_TD(pDevice, TYPE_AC0DMA) <= 0) {
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Relay can't allocate TD1..\n");
+		DBG_PRT(MSG_LEVEL_DEBUG,
+			KERN_INFO "Relay can't allocate TD1..\n");
 		return false;
 	}
 
@@ -98,9 +100,12 @@ bool ROUTEbRelay(PSDevice pDevice, unsigned char *pbySkbData, unsigned int uData
 
 		// get group key
 		pbyBSSID = pDevice->abyBroadcastAddr;
-		if (KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == false) {
+		if (KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID,
+		    GROUP_KEY, &pTransmitKey) == false) {
 			pTransmitKey = NULL;
-			DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG "KEY is NULL. [%d]\n", pDevice->pMgmt->eCurrMode);
+			DBG_PRT(MSG_LEVEL_DEBUG,
+				KERN_DEBUG "KEY is NULL. [%d]\n",
+				pDevice->pMgmt->eCurrMode);
 		} else {
 			DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG "Get GTK.\n");
 		}
@@ -116,12 +121,12 @@ bool ROUTEbRelay(PSDevice pDevice, unsigned char *pbySkbData, unsigned int uData
 			pTransmitKey->wTSC15_0 = pMgmt->sNodeDBTable[uNodeIndex].wTSC15_0;
 			memcpy(pTransmitKey->abyKey,
 			       &pMgmt->sNodeDBTable[uNodeIndex].abyWepKey[0],
-			       pTransmitKey->uKeyLength
-);
+			       pTransmitKey->uKeyLength);
 		}
 	}
 
-	uMACfragNum = cbGetFragCount(pDevice, pTransmitKey, cbFrameBodySize, &pDevice->sTxEthHeader);
+	uMACfragNum = cbGetFragCount(pDevice, pTransmitKey,
+				     cbFrameBodySize, &pDevice->sTxEthHeader);
 
 	if (uMACfragNum > AVAIL_TD(pDevice, TYPE_AC0DMA))
 		return false;
@@ -152,12 +157,11 @@ bool ROUTEbRelay(PSDevice pDevice, unsigned char *pbySkbData, unsigned int uData
 	if (pDevice->wCurrentRate <= RATE_11M)
 		byPktType = PK_TYPE_11B;
 
-	vGenerateFIFOHeader(pDevice, byPktType, pDevice->pbyTmpBuff, bNeedEncryption,
-			    cbFrameBodySize, TYPE_AC0DMA, pHeadTD,
-			    &pDevice->sTxEthHeader, pbySkbData, pTransmitKey, uNodeIndex,
-			    &uMACfragNum,
-			    &cbHeaderSize
-);
+	vGenerateFIFOHeader(pDevice, byPktType, pDevice->pbyTmpBuff,
+			    bNeedEncryption, cbFrameBodySize, TYPE_AC0DMA,
+			    pHeadTD, &pDevice->sTxEthHeader, pbySkbData,
+			    pTransmitKey, uNodeIndex, &uMACfragNum,
+			    &cbHeaderSize);
 
 	if (MACbIsRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_PS)) {
 		// Disable PS
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCHv2 5/7] vt6655: remove typedefs in wpactl.h
  2014-01-07 12:11 [PATCHv2 0/7] vt6655: Cleanup of checkpatch errors Michael Gunselmann
                   ` (3 preceding siblings ...)
  2014-01-07 12:11 ` [PATCHv2 4/7] vt6655: fix indentation " Michael Gunselmann
@ 2014-01-07 12:11 ` Michael Gunselmann
  2014-01-07 12:11 ` [PATCHv2 6/7] vt6655: fix printk usage in wpactl.c Michael Gunselmann
  2014-01-07 12:11 ` [PATCHv2 7/7] vt6655: Remove typedefs in 80211hdr.h Michael Gunselmann
  6 siblings, 0 replies; 10+ messages in thread
From: Michael Gunselmann @ 2014-01-07 12:11 UTC (permalink / raw)
  To: michael.gunselmann
  Cc: martin.hofmann, forest, gregkh, devel, linux-kernel, linux-kernel

From: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>

wpactl.h contained some typedefs for enums. These were removed in this patch.
Also, a typedef for a type "unsigned long long" that was only instantiated in
one place was removed and its declaration altered.

Signed-off-by: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>
Signed-off-by: Michael Gunselmann <michael.gunselmann@studium.uni-erlangen.de>
---
 drivers/staging/vt6655/hostap.c |  2 +-
 drivers/staging/vt6655/iwctl.c  |  2 +-
 drivers/staging/vt6655/wpactl.h | 12 +++++-------
 3 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c
index ca54b79..6eecd53 100644
--- a/drivers/staging/vt6655/hostap.c
+++ b/drivers/staging/vt6655/hostap.c
@@ -454,7 +454,7 @@ static int hostap_set_encryption(PSDevice pDevice,
 	unsigned long dwKeyIndex = 0;
 	unsigned char abyKey[MAX_KEY_LEN];
 	unsigned char abySeq[MAX_KEY_LEN];
-	NDIS_802_11_KEY_RSC   KeyRSC;
+	unsigned long long KeyRSC;
 	unsigned char byKeyDecMode = KEY_CTL_WEP;
 	int     ret = 0;
 	int     iNodeIndex = -1;
diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwctl.c
index 2db4bc8..ac3fc16 100644
--- a/drivers/staging/vt6655/iwctl.c
+++ b/drivers/staging/vt6655/iwctl.c
@@ -1827,7 +1827,7 @@ int iwctl_siwencodeext(struct net_device *dev,
 	struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
 	struct viawget_wpa_param *param = NULL;
 //original member
-	wpa_alg alg_name;
+	enum wpa_alg alg_name;
 	u8  addr[6];
 	int key_idx, set_tx = 0;
 	u8  seq[IW_ENCODE_SEQ_MAX_SIZE];
diff --git a/drivers/staging/vt6655/wpactl.h b/drivers/staging/vt6655/wpactl.h
index b9e2ab2..f7638ba 100644
--- a/drivers/staging/vt6655/wpactl.h
+++ b/drivers/staging/vt6655/wpactl.h
@@ -38,11 +38,11 @@
 
 //WPA related
 
-typedef enum { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP } wpa_alg;
-typedef enum { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP,
-	       CIPHER_WEP104 } wpa_cipher;
-typedef enum { KEY_MGMT_802_1X, KEY_MGMT_CCKM, KEY_MGMT_PSK, KEY_MGMT_NONE,
-	       KEY_MGMT_802_1X_NO_WPA, KEY_MGMT_WPA_NONE } wpa_key_mgmt;
+enum wpa_alg { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP };
+enum wpa_cipher { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP,
+		  CIPHER_WEP104 };
+enum wpa_key_mgmt { KEY_MGMT_802_1X, KEY_MGMT_CCKM, KEY_MGMT_PSK, KEY_MGMT_NONE,
+		    KEY_MGMT_802_1X_NO_WPA, KEY_MGMT_WPA_NONE };
 
 #define AUTH_ALG_OPEN_SYSTEM	0x01
 #define AUTH_ALG_SHARED_KEY	0x02
@@ -51,8 +51,6 @@ typedef enum { KEY_MGMT_802_1X, KEY_MGMT_CCKM, KEY_MGMT_PSK, KEY_MGMT_NONE,
 #define GENERIC_INFO_ELEM 0xdd
 #define RSN_INFO_ELEM 0x30
 
-typedef unsigned long long   NDIS_802_11_KEY_RSC;
-
 /*---------------------  Export Classes  ----------------------------*/
 
 /*---------------------  Export Variables  --------------------------*/
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCHv2 6/7] vt6655: fix printk usage in wpactl.c
  2014-01-07 12:11 [PATCHv2 0/7] vt6655: Cleanup of checkpatch errors Michael Gunselmann
                   ` (4 preceding siblings ...)
  2014-01-07 12:11 ` [PATCHv2 5/7] vt6655: remove typedefs in wpactl.h Michael Gunselmann
@ 2014-01-07 12:11 ` Michael Gunselmann
  2014-01-07 12:11 ` [PATCHv2 7/7] vt6655: Remove typedefs in 80211hdr.h Michael Gunselmann
  6 siblings, 0 replies; 10+ messages in thread
From: Michael Gunselmann @ 2014-01-07 12:11 UTC (permalink / raw)
  To: michael.gunselmann
  Cc: martin.hofmann, forest, gregkh, devel, linux-kernel, linux-kernel

From: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>

This patch fixes the usage of printk in wpactl.c concering one missing log level
occurence and some whitespaces before a newline.

Signed-off-by: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>
Signed-off-by: Michael Gunselmann <michael.gunselmann@studium.uni-erlangen.de>
---
 drivers/staging/vt6655/wpactl.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/vt6655/wpactl.c b/drivers/staging/vt6655/wpactl.c
index ee83704..7bad67a 100644
--- a/drivers/staging/vt6655/wpactl.c
+++ b/drivers/staging/vt6655/wpactl.c
@@ -206,7 +206,7 @@ int wpa_set_keys(PSDevice pDevice, void *ctx, bool fcpfkernel)
 	    param->u.wpa_key.seq_len >= MAX_KEY_LEN)
 		return -EINVAL;
 
-	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "param->u.wpa_key.alg_name = %d \n", param->u.wpa_key.alg_name);
+	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "param->u.wpa_key.alg_name = %d\n", param->u.wpa_key.alg_name);
 	if (param->u.wpa_key.alg_name == WPA_ALG_NONE) {
 		pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled;
 		pDevice->bEncryptionEnable = false;
@@ -415,7 +415,7 @@ int wpa_set_keys(PSDevice pDevice, void *ctx, bool fcpfkernel)
 	//spin_unlock_irq(&pDevice->lock);
 
 /*
-  DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " key=%x-%x-%x-%x-%x-xxxxx \n",
+  DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " key=%x-%x-%x-%x-%x-xxxxx\n",
   pMgmt->sNodeDBTable[iNodeIndex].abyWepKey[byKeyIndex][0],
   pMgmt->sNodeDBTable[iNodeIndex].abyWepKey[byKeyIndex][1],
   pMgmt->sNodeDBTable[iNodeIndex].abyWepKey[byKeyIndex][2],
@@ -596,7 +596,7 @@ static int wpa_get_scan(PSDevice pDevice,
 	ptempBSS = kmalloc(sizeof(KnownBSS), (int)GFP_ATOMIC);
 
 	if (ptempBSS == NULL) {
-		printk("bubble sort kmalloc memory fail@@@\n");
+		printk(KERN_ERR "bubble sort kmalloc memory fail@@@\n");
 
 		ret = -ENOMEM;
 
@@ -869,18 +869,18 @@ int wpa_ioctl(PSDevice pDevice, struct iw_point *p)
 	switch (param->cmd) {
 	case VIAWGET_SET_WPA:
 		ret = wpa_set_wpa(pDevice, param);
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_WPA \n");
+		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_WPA\n");
 		break;
 
 	case VIAWGET_SET_KEY:
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_KEY \n");
+		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_KEY\n");
 		spin_lock_irq(&pDevice->lock);
 		ret = wpa_set_keys(pDevice, param, false);
 		spin_unlock_irq(&pDevice->lock);
 		break;
 
 	case VIAWGET_SET_SCAN:
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_SCAN \n");
+		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_SCAN\n");
 		ret = wpa_set_scan(pDevice, param);
 		break;
 
@@ -891,33 +891,33 @@ int wpa_ioctl(PSDevice pDevice, struct iw_point *p)
 		break;
 
 	case VIAWGET_GET_SSID:
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_GET_SSID \n");
+		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_GET_SSID\n");
 		ret = wpa_get_ssid(pDevice, param);
 		wpa_ioctl = 1;
 		break;
 
 	case VIAWGET_GET_BSSID:
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_GET_BSSID \n");
+		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_GET_BSSID\n");
 		ret = wpa_get_bssid(pDevice, param);
 		wpa_ioctl = 1;
 		break;
 
 	case VIAWGET_SET_ASSOCIATE:
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_ASSOCIATE \n");
+		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_ASSOCIATE\n");
 		ret = wpa_set_associate(pDevice, param);
 		break;
 
 	case VIAWGET_SET_DISASSOCIATE:
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_DISASSOCIATE \n");
+		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_DISASSOCIATE\n");
 		ret = wpa_set_disassociate(pDevice, param);
 		break;
 
 	case VIAWGET_SET_DROP_UNENCRYPT:
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_DROP_UNENCRYPT \n");
+		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_DROP_UNENCRYPT\n");
 		break;
 
 	case VIAWGET_SET_DEAUTHENTICATE:
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_DEAUTHENTICATE \n");
+		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_DEAUTHENTICATE\n");
 		break;
 
 	default:
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCHv2 7/7] vt6655: Remove typedefs in 80211hdr.h
  2014-01-07 12:11 [PATCHv2 0/7] vt6655: Cleanup of checkpatch errors Michael Gunselmann
                   ` (5 preceding siblings ...)
  2014-01-07 12:11 ` [PATCHv2 6/7] vt6655: fix printk usage in wpactl.c Michael Gunselmann
@ 2014-01-07 12:11 ` Michael Gunselmann
  2014-01-08 19:07   ` Greg KH
  6 siblings, 1 reply; 10+ messages in thread
From: Michael Gunselmann @ 2014-01-07 12:11 UTC (permalink / raw)
  To: michael.gunselmann
  Cc: martin.hofmann, forest, gregkh, devel, linux-kernel,
	linux-kernel, Martin Hofmann, Michael Gunselmann

From: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>

The file 80211hdr.h contained typedefs for 5 types. To satisfy checkpatch,
this commit removes them. In 11 other files, every occurence of a now deleted
type has been substituted with the correct struct ... syntax.

Signed-off-by: Martin Hofmann <martin.hofmann@studium.uni-erlange.de>
Signed-off-by: Michael Gunselmann <michael.gunselmann@studium.uni-erlange.de>
---
 drivers/staging/vt6655/80211hdr.h | 31 ++++++++++++-------------
 drivers/staging/vt6655/80211mgr.c | 48 +++++++++++++++++++--------------------
 drivers/staging/vt6655/80211mgr.h | 26 ++++++++++-----------
 drivers/staging/vt6655/IEEE11h.c  | 14 ++++++------
 drivers/staging/vt6655/dpc.c      |  2 +-
 drivers/staging/vt6655/mib.c      |  4 ++--
 drivers/staging/vt6655/power.c    |  4 ++--
 drivers/staging/vt6655/rxtx.c     |  7 +++---
 drivers/staging/vt6655/vntwifi.c  |  2 +-
 drivers/staging/vt6655/wcmd.c     |  2 +-
 drivers/staging/vt6655/wmgr.c     | 24 ++++++++++----------
 drivers/staging/vt6655/wmgr.h     |  4 ++--
 12 files changed, 83 insertions(+), 85 deletions(-)

diff --git a/drivers/staging/vt6655/80211hdr.h b/drivers/staging/vt6655/80211hdr.h
index ba155cd..b2e2c5b 100644
--- a/drivers/staging/vt6655/80211hdr.h
+++ b/drivers/staging/vt6655/80211hdr.h
@@ -274,31 +274,29 @@
 #define IEEE_ADDR_UNIVERSAL         0x02
 #define IEEE_ADDR_GROUP             0x01
 
-typedef struct {
+struct IEEE_ADDR {
 	unsigned char abyAddr[6];
-} IEEE_ADDR, *PIEEE_ADDR;
+};
 
 /* 802.11 Header Format */
 
-typedef struct tagWLAN_80211HDR_A2 {
+struct WLAN_80211HDR_A2 {
 	unsigned short wFrameCtl;
 	unsigned short wDurationID;
 	unsigned char abyAddr1[WLAN_ADDR_LEN];
 	unsigned char abyAddr2[WLAN_ADDR_LEN];
-} __attribute__ ((__packed__))
-WLAN_80211HDR_A2, *PWLAN_80211HDR_A2;
+} __attribute__((__packed__));
 
-typedef struct tagWLAN_80211HDR_A3 {
+struct WLAN_80211HDR_A3 {
 	unsigned short wFrameCtl;
 	unsigned short wDurationID;
 	unsigned char abyAddr1[WLAN_ADDR_LEN];
 	unsigned char abyAddr2[WLAN_ADDR_LEN];
 	unsigned char abyAddr3[WLAN_ADDR_LEN];
 	unsigned short wSeqCtl;
-} __attribute__ ((__packed__))
-WLAN_80211HDR_A3, *PWLAN_80211HDR_A3;
+} __attribute__((__packed__));
 
-typedef struct tagWLAN_80211HDR_A4 {
+struct WLAN_80211HDR_A4 {
 	unsigned short wFrameCtl;
 	unsigned short wDurationID;
 	unsigned char abyAddr1[WLAN_ADDR_LEN];
@@ -306,14 +304,13 @@ typedef struct tagWLAN_80211HDR_A4 {
 	unsigned char abyAddr3[WLAN_ADDR_LEN];
 	unsigned short wSeqCtl;
 	unsigned char abyAddr4[WLAN_ADDR_LEN];
-} __attribute__ ((__packed__))
-WLAN_80211HDR_A4, *PWLAN_80211HDR_A4;
-
-typedef union tagUWLAN_80211HDR {
-	WLAN_80211HDR_A2        sA2;
-	WLAN_80211HDR_A3        sA3;
-	WLAN_80211HDR_A4        sA4;
-} UWLAN_80211HDR, *PUWLAN_80211HDR;
+} __attribute__((__packed__));
+
+union UWLAN_80211HDR {
+	struct WLAN_80211HDR_A2 sA2;
+	struct WLAN_80211HDR_A3 sA3;
+	struct WLAN_80211HDR_A4 sA4;
+};
 
 /*---------------------  Export Classes  ----------------------------*/
 
diff --git a/drivers/staging/vt6655/80211mgr.c b/drivers/staging/vt6655/80211mgr.c
index 7949d58..e586e51 100644
--- a/drivers/staging/vt6655/80211mgr.c
+++ b/drivers/staging/vt6655/80211mgr.c
@@ -88,7 +88,7 @@ vMgrEncodeBeacon(
 	PWLAN_FR_BEACON  pFrame
 )
 {
-	pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
+	pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf;
 
 	/* Fixed Fields */
 	pFrame->pqwTimestamp = (PQWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
@@ -121,7 +121,7 @@ vMgrDecodeBeacon(
 {
 	PWLAN_IE        pItem;
 
-	pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
+	pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf;
 
 	/* Fixed Fields */
 	pFrame->pqwTimestamp = (PQWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
@@ -236,7 +236,7 @@ vMgrEncodeIBSSATIM(
 	PWLAN_FR_IBSSATIM   pFrame
 )
 {
-	pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
+	pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf;
 	pFrame->len = WLAN_HDR_ADDR3_LEN;
 
 	return;
@@ -258,7 +258,7 @@ vMgrDecodeIBSSATIM(
 	PWLAN_FR_IBSSATIM   pFrame
 )
 {
-	pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
+	pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf;
 
 	return;
 }
@@ -279,7 +279,7 @@ vMgrEncodeDisassociation(
 	PWLAN_FR_DISASSOC  pFrame
 )
 {
-	pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
+	pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf;
 
 	/* Fixed Fields */
 	pFrame->pwReason = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
@@ -305,7 +305,7 @@ vMgrDecodeDisassociation(
 	PWLAN_FR_DISASSOC  pFrame
 )
 {
-	pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
+	pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf;
 
 	/* Fixed Fields */
 	pFrame->pwReason = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
@@ -330,7 +330,7 @@ vMgrEncodeAssocRequest(
 	PWLAN_FR_ASSOCREQ  pFrame
 )
 {
-	pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
+	pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf;
 	/* Fixed Fields */
 	pFrame->pwCapInfo = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
 					       + WLAN_ASSOCREQ_OFF_CAP_INFO);
@@ -358,7 +358,7 @@ vMgrDecodeAssocRequest(
 {
 	PWLAN_IE   pItem;
 
-	pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
+	pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf;
 	/* Fixed Fields */
 	pFrame->pwCapInfo = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
 					       + WLAN_ASSOCREQ_OFF_CAP_INFO);
@@ -421,7 +421,7 @@ vMgrEncodeAssocResponse(
 	PWLAN_FR_ASSOCRESP  pFrame
 )
 {
-	pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
+	pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf;
 
 	/* Fixed Fields */
 	pFrame->pwCapInfo = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
@@ -454,7 +454,7 @@ vMgrDecodeAssocResponse(
 {
 	PWLAN_IE   pItem;
 
-	pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
+	pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf;
 
 	/* Fixed Fields */
 	pFrame->pwCapInfo = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
@@ -497,14 +497,14 @@ vMgrEncodeReassocRequest(
 	PWLAN_FR_REASSOCREQ  pFrame
 )
 {
-	pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
+	pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf;
 
 	/* Fixed Fields */
 	pFrame->pwCapInfo = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
 					       + WLAN_REASSOCREQ_OFF_CAP_INFO);
 	pFrame->pwListenInterval = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
 						      + WLAN_REASSOCREQ_OFF_LISTEN_INT);
-	pFrame->pAddrCurrAP = (PIEEE_ADDR)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
+	pFrame->pAddrCurrAP = (struct IEEE_ADDR *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
 					   + WLAN_REASSOCREQ_OFF_CURR_AP);
 	pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_REASSOCREQ_OFF_CURR_AP + sizeof(*(pFrame->pAddrCurrAP));
 
@@ -528,14 +528,14 @@ vMgrDecodeReassocRequest(
 )
 {
 	PWLAN_IE   pItem;
-	pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
+	pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf;
 
 	/* Fixed Fields */
 	pFrame->pwCapInfo = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
 					       + WLAN_REASSOCREQ_OFF_CAP_INFO);
 	pFrame->pwListenInterval = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
 						      + WLAN_REASSOCREQ_OFF_LISTEN_INT);
-	pFrame->pAddrCurrAP = (PIEEE_ADDR)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
+	pFrame->pAddrCurrAP = (struct IEEE_ADDR *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
 					   + WLAN_REASSOCREQ_OFF_CURR_AP);
 
 	/* Information elements */
@@ -594,7 +594,7 @@ vMgrEncodeProbeRequest(
 	PWLAN_FR_PROBEREQ  pFrame
 )
 {
-	pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
+	pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf;
 	pFrame->len = WLAN_HDR_ADDR3_LEN;
 	return;
 }
@@ -617,7 +617,7 @@ vMgrDecodeProbeRequest(
 {
 	PWLAN_IE   pItem;
 
-	pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
+	pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf;
 
 	/* Information elements */
 	pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)));
@@ -665,7 +665,7 @@ vMgrEncodeProbeResponse(
 	PWLAN_FR_PROBERESP  pFrame
 )
 {
-	pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
+	pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf;
 
 	/* Fixed Fields */
 	pFrame->pqwTimestamp = (PQWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
@@ -699,7 +699,7 @@ vMgrDecodeProbeResponse(
 {
 	PWLAN_IE    pItem;
 
-	pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
+	pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf;
 
 	/* Fixed Fields */
 	pFrame->pqwTimestamp = (PQWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
@@ -808,7 +808,7 @@ vMgrEncodeAuthen(
 	PWLAN_FR_AUTHEN  pFrame
 )
 {
-	pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
+	pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf;
 
 	/* Fixed Fields */
 	pFrame->pwAuthAlgorithm = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
@@ -840,7 +840,7 @@ vMgrDecodeAuthen(
 {
 	PWLAN_IE    pItem;
 
-	pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
+	pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf;
 
 	/* Fixed Fields */
 	pFrame->pwAuthAlgorithm = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
@@ -877,7 +877,7 @@ vMgrEncodeDeauthen(
 	PWLAN_FR_DEAUTHEN  pFrame
 )
 {
-	pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
+	pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf;
 
 	/* Fixed Fields */
 	pFrame->pwReason = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
@@ -903,7 +903,7 @@ vMgrDecodeDeauthen(
 	PWLAN_FR_DEAUTHEN  pFrame
 )
 {
-	pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
+	pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf;
 
 	/* Fixed Fields */
 	pFrame->pwReason = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
@@ -928,7 +928,7 @@ vMgrEncodeReassocResponse(
 	PWLAN_FR_REASSOCRESP  pFrame
 )
 {
-	pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
+	pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf;
 
 	/* Fixed Fields */
 	pFrame->pwCapInfo = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
@@ -961,7 +961,7 @@ vMgrDecodeReassocResponse(
 {
 	PWLAN_IE   pItem;
 
-	pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
+	pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf;
 
 	/* Fixed Fields */
 	pFrame->pwCapInfo = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
diff --git a/drivers/staging/vt6655/80211mgr.h b/drivers/staging/vt6655/80211mgr.h
index 065238b..e1114ff 100644
--- a/drivers/staging/vt6655/80211mgr.h
+++ b/drivers/staging/vt6655/80211mgr.h
@@ -463,7 +463,7 @@ typedef struct tagWLAN_FR_MGMT {
 	unsigned int	uType;
 	unsigned int	len;
 	unsigned char *pBuf;
-	PUWLAN_80211HDR       pHdr;
+	union UWLAN_80211HDR *pHdr;
 } WLAN_FR_MGMT,  *PWLAN_FR_MGMT;
 
 /* Beacon frame */
@@ -471,7 +471,7 @@ typedef struct tagWLAN_FR_BEACON {
 	unsigned int	uType;
 	unsigned int	len;
 	unsigned char *pBuf;
-	PUWLAN_80211HDR         pHdr;
+	union UWLAN_80211HDR *pHdr;
 	/* fixed fields */
 	PQWORD                  pqwTimestamp;
 	unsigned short *pwBeaconInterval;
@@ -500,7 +500,7 @@ typedef struct tagWLAN_FR_IBSSATIM {
 	unsigned int	uType;
 	unsigned int	len;
 	unsigned char *pBuf;
-	PUWLAN_80211HDR         pHdr;
+	union UWLAN_80211HDR *pHdr;
 
 	/* fixed fields */
 	/* info elements */
@@ -512,7 +512,7 @@ typedef struct tagWLAN_FR_DISASSOC {
 	unsigned int	uType;
 	unsigned int	len;
 	unsigned char *pBuf;
-	PUWLAN_80211HDR         pHdr;
+	union UWLAN_80211HDR *pHdr;
 	/*-- fixed fields -----------*/
 	unsigned short *pwReason;
 	/*-- info elements ----------*/
@@ -523,7 +523,7 @@ typedef struct tagWLAN_FR_ASSOCREQ {
 	unsigned int	uType;
 	unsigned int	len;
 	unsigned char *pBuf;
-	PUWLAN_80211HDR         pHdr;
+	union UWLAN_80211HDR *pHdr;
 	/*-- fixed fields -----------*/
 	unsigned short *pwCapInfo;
 	unsigned short *pwListenInterval;
@@ -542,7 +542,7 @@ typedef struct tagWLAN_FR_ASSOCRESP {
 	unsigned int	uType;
 	unsigned int	len;
 	unsigned char *pBuf;
-	PUWLAN_80211HDR         pHdr;
+	union UWLAN_80211HDR *pHdr;
 	/*-- fixed fields -----------*/
 	unsigned short *pwCapInfo;
 	unsigned short *pwStatus;
@@ -557,12 +557,12 @@ typedef struct tagWLAN_FR_REASSOCREQ {
 	unsigned int	uType;
 	unsigned int	len;
 	unsigned char *pBuf;
-	PUWLAN_80211HDR         pHdr;
+	union UWLAN_80211HDR *pHdr;
 
 	/*-- fixed fields -----------*/
 	unsigned short *pwCapInfo;
 	unsigned short *pwListenInterval;
-	PIEEE_ADDR              pAddrCurrAP;
+	struct IEEE_ADDR *pAddrCurrAP;
 
 	/*-- info elements ----------*/
 	PWLAN_IE_SSID           pSSID;
@@ -577,7 +577,7 @@ typedef struct tagWLAN_FR_REASSOCRESP {
 	unsigned int	uType;
 	unsigned int	len;
 	unsigned char *pBuf;
-	PUWLAN_80211HDR         pHdr;
+	union UWLAN_80211HDR *pHdr;
 	/*-- fixed fields -----------*/
 	unsigned short *pwCapInfo;
 	unsigned short *pwStatus;
@@ -592,7 +592,7 @@ typedef struct tagWLAN_FR_PROBEREQ {
 	unsigned int	uType;
 	unsigned int	len;
 	unsigned char *pBuf;
-	PUWLAN_80211HDR         pHdr;
+	union UWLAN_80211HDR *pHdr;
 	/*-- fixed fields -----------*/
 	/*-- info elements ----------*/
 	PWLAN_IE_SSID           pSSID;
@@ -605,7 +605,7 @@ typedef struct tagWLAN_FR_PROBERESP {
 	unsigned int	uType;
 	unsigned int	len;
 	unsigned char *pBuf;
-	PUWLAN_80211HDR         pHdr;
+	union UWLAN_80211HDR *pHdr;
 	/*-- fixed fields -----------*/
 	PQWORD                  pqwTimestamp;
 	unsigned short *pwBeaconInterval;
@@ -632,7 +632,7 @@ typedef struct tagWLAN_FR_AUTHEN {
 	unsigned int	uType;
 	unsigned int	len;
 	unsigned char *pBuf;
-	PUWLAN_80211HDR         pHdr;
+	union UWLAN_80211HDR *pHdr;
 	/*-- fixed fields -----------*/
 	unsigned short *pwAuthAlgorithm;
 	unsigned short *pwAuthSequence;
@@ -646,7 +646,7 @@ typedef struct tagWLAN_FR_DEAUTHEN {
 	unsigned int	uType;
 	unsigned int	len;
 	unsigned char *pBuf;
-	PUWLAN_80211HDR         pHdr;
+	union UWLAN_80211HDR *pHdr;
 	/*-- fixed fields -----------*/
 	unsigned short *pwReason;
 
diff --git a/drivers/staging/vt6655/IEEE11h.c b/drivers/staging/vt6655/IEEE11h.c
index dfda3c8..5b3eaf0 100644
--- a/drivers/staging/vt6655/IEEE11h.c
+++ b/drivers/staging/vt6655/IEEE11h.c
@@ -46,14 +46,14 @@ static int          msglevel                = MSG_LEVEL_INFO;
 #pragma pack(1)
 
 typedef struct _WLAN_FRAME_ACTION {
-	WLAN_80211HDR_A3    Header;
+	struct WLAN_80211HDR_A3 Header;
 	unsigned char byCategory;
 	unsigned char byAction;
 	unsigned char abyVars[1];
 } WLAN_FRAME_ACTION, *PWLAN_FRAME_ACTION;
 
 typedef struct _WLAN_FRAME_MSRREQ {
-	WLAN_80211HDR_A3    Header;
+	struct WLAN_80211HDR_A3 Header;
 	unsigned char byCategory;
 	unsigned char byAction;
 	unsigned char byDialogToken;
@@ -61,7 +61,7 @@ typedef struct _WLAN_FRAME_MSRREQ {
 } WLAN_FRAME_MSRREQ, *PWLAN_FRAME_MSRREQ;
 
 typedef struct _WLAN_FRAME_MSRREP {
-	WLAN_80211HDR_A3    Header;
+	struct WLAN_80211HDR_A3 Header;
 	unsigned char byCategory;
 	unsigned char byAction;
 	unsigned char byDialogToken;
@@ -69,7 +69,7 @@ typedef struct _WLAN_FRAME_MSRREP {
 } WLAN_FRAME_MSRREP, *PWLAN_FRAME_MSRREP;
 
 typedef struct _WLAN_FRAME_TPCREQ {
-	WLAN_80211HDR_A3    Header;
+	struct WLAN_80211HDR_A3 Header;
 	unsigned char byCategory;
 	unsigned char byAction;
 	unsigned char byDialogToken;
@@ -77,7 +77,7 @@ typedef struct _WLAN_FRAME_TPCREQ {
 } WLAN_FRAME_TPCREQ, *PWLAN_FRAME_TPCREQ;
 
 typedef struct _WLAN_FRAME_TPCREP {
-	WLAN_80211HDR_A3    Header;
+	struct WLAN_80211HDR_A3 Header;
 	unsigned char byCategory;
 	unsigned char byAction;
 	unsigned char byDialogToken;
@@ -130,7 +130,7 @@ static bool s_bRxTPCReq(PSMgmtObject pMgmt,
 
 	pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
 	memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN);
-	pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket +
+	pTxPacket->p80211Header = (union UWLAN_80211HDR *)((unsigned char *)pTxPacket +
 						    sizeof(STxMgmtPacket));
 
 	pFrame = (PWLAN_FRAME_TPCREP)((unsigned char *)pTxPacket +
@@ -291,7 +291,7 @@ bool IEEE11hbMSRRepTx(void *pMgmtHandle)
 
 	pTxPacket = (PSTxMgmtPacket)pMgmt->abyCurrentMSRRep;
 	memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN);
-	pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket +
+	pTxPacket->p80211Header = (union UWLAN_80211HDR *)((unsigned char *)pTxPacket +
 						    sizeof(STxMgmtPacket));
 
 	pMSRRep->Header.wFrameCtl = (WLAN_SET_FC_FTYPE(WLAN_FTYPE_MGMT) |
diff --git a/drivers/staging/vt6655/dpc.c b/drivers/staging/vt6655/dpc.c
index 0a29c90..6de720b 100644
--- a/drivers/staging/vt6655/dpc.c
+++ b/drivers/staging/vt6655/dpc.c
@@ -538,7 +538,7 @@ device_receive_frame(
 			unsigned char *pbyData1;
 			unsigned char *pbyData2;
 
-			pRxPacket->p80211Header = (PUWLAN_80211HDR)(skb->data+4);
+			pRxPacket->p80211Header = (union UWLAN_80211HDR *)(skb->data+4);
 			pRxPacket->cbMPDULen = FrameSize;
 			pRxPacket->uRSSI = *pbyRSSI;
 			pRxPacket->bySQ = *pbySQ;
diff --git a/drivers/staging/vt6655/mib.c b/drivers/staging/vt6655/mib.c
index 6a59652..53e223f 100644
--- a/drivers/staging/vt6655/mib.c
+++ b/drivers/staging/vt6655/mib.c
@@ -394,11 +394,11 @@ STAvUpdateTDStatCounter(
 	unsigned int uIdx
 )
 {
-	PWLAN_80211HDR_A4   pHeader;
+	struct WLAN_80211HDR_A4 *pHeader;
 	unsigned char *pbyDestAddr;
 	unsigned char byTSR0_NCR = byTSR0 & TSR0_NCR;
 
-	pHeader = (PWLAN_80211HDR_A4) pbyBuffer;
+	pHeader = (struct WLAN_80211HDR_A4 *)pbyBuffer;
 	if (WLAN_GET_FC_TODS(pHeader->wFrameCtl) == 0) {
 		pbyDestAddr = &(pHeader->abyAddr1[0]);
 	} else {
diff --git a/drivers/staging/vt6655/power.c b/drivers/staging/vt6655/power.c
index 4bd1ccb..12a577d 100644
--- a/drivers/staging/vt6655/power.c
+++ b/drivers/staging/vt6655/power.c
@@ -243,7 +243,7 @@ PSvSendPSPOLL(
 
 	memset(pMgmt->pbyPSPacketPool, 0, sizeof(STxMgmtPacket) + WLAN_HDR_ADDR2_LEN);
 	pTxPacket = (PSTxMgmtPacket)pMgmt->pbyPSPacketPool;
-	pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
+	pTxPacket->p80211Header = (union UWLAN_80211HDR *)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
 	pTxPacket->p80211Header->sA2.wFrameCtl = cpu_to_le16(
 		(
 			WLAN_SET_FC_FTYPE(WLAN_TYPE_CTL) |
@@ -305,7 +305,7 @@ PSbSendNullPacket(
 
 	memset(pMgmt->pbyPSPacketPool, 0, sizeof(STxMgmtPacket) + WLAN_NULLDATA_FR_MAXLEN);
 	pTxPacket = (PSTxMgmtPacket)pMgmt->pbyPSPacketPool;
-	pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
+	pTxPacket->p80211Header = (union UWLAN_80211HDR *)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
 
 	if (pDevice->bEnablePSMode) {
 		pTxPacket->p80211Header->sA3.wFrameCtl = cpu_to_le16(
diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 6affd6e..5f18051 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -2107,7 +2107,8 @@ vGenerateMACHeader(
 	pMACHeader->wDurationID = cpu_to_le16(wDuration);
 
 	if (pDevice->bLongHeader) {
-		PWLAN_80211HDR_A4 pMACA4Header  = (PWLAN_80211HDR_A4) pbyBufferAddr;
+		struct WLAN_80211HDR_A4 *pMACA4Header =
+			(struct WLAN_80211HDR_A4 *)pbyBufferAddr;
 		pMACHeader->wFrameCtl |= (FC_TODS | FC_FROMDS);
 		memcpy(pMACA4Header->abyAddr4, pDevice->abyBSSID, WLAN_ADDR_LEN);
 	}
@@ -2603,7 +2604,7 @@ vDMA0_tx_80211(PSDevice  pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un
 	void *pMICHDR;
 	PSMgmtObject    pMgmt = pDevice->pMgmt;
 	unsigned short wCurrentRate = RATE_1M;
-	PUWLAN_80211HDR  p80211Header;
+	union UWLAN_80211HDR *p80211Header;
 	unsigned int uNodeIndex = 0;
 	bool bNodeExist = false;
 	SKeyItem        STempKey;
@@ -2622,7 +2623,7 @@ vDMA0_tx_80211(PSDevice  pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un
 	} else {
 		cbFrameBodySize = cbMPDULen - WLAN_HDR_ADDR3_LEN;
 	}
-	p80211Header = (PUWLAN_80211HDR)pbMPDU;
+	p80211Header = (union UWLAN_80211HDR *)pbMPDU;
 
 	pFrstTD = pDevice->apCurrTD[TYPE_TXDMA0];
 	pbyTxBufferAddr = (unsigned char *)pFrstTD->pTDInfo->buf;
diff --git a/drivers/staging/vt6655/vntwifi.c b/drivers/staging/vt6655/vntwifi.c
index e78aedf..39a9b09 100644
--- a/drivers/staging/vt6655/vntwifi.c
+++ b/drivers/staging/vt6655/vntwifi.c
@@ -695,7 +695,7 @@ VNTWIFIbMeasureReport(
 
 	//spin_lock_irq(&pDevice->lock);
 	if ((pvMeasureEID != NULL) &&
-	    (pMgmt->uLengthOfRepEIDs < (WLAN_A3FR_MAXLEN - sizeof(MEASEURE_REP) - sizeof(WLAN_80211HDR_A3) - 3))
+	    (pMgmt->uLengthOfRepEIDs < (WLAN_A3FR_MAXLEN - sizeof(MEASEURE_REP) - sizeof(struct WLAN_80211HDR_A3) - 3))
 ) {
 		pMgmt->pCurrMeasureEIDRep->byElementID = WLAN_EID_MEASURE_REP;
 		pMgmt->pCurrMeasureEIDRep->len = 3;
diff --git a/drivers/staging/vt6655/wcmd.c b/drivers/staging/vt6655/wcmd.c
index 72caaa2..7fe4c0c 100644
--- a/drivers/staging/vt6655/wcmd.c
+++ b/drivers/staging/vt6655/wcmd.c
@@ -253,7 +253,7 @@ s_MgrMakeProbeRequest(
 
 	pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
 	memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_PROBEREQ_FR_MAXLEN);
-	pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
+	pTxPacket->p80211Header = (union UWLAN_80211HDR *)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
 	sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
 	sFrame.len = WLAN_PROBEREQ_FR_MAXLEN;
 	vMgrEncodeProbeRequest(&sFrame);
diff --git a/drivers/staging/vt6655/wmgr.c b/drivers/staging/vt6655/wmgr.c
index 5200a2a..f1bb9c4 100644
--- a/drivers/staging/vt6655/wmgr.c
+++ b/drivers/staging/vt6655/wmgr.c
@@ -600,7 +600,7 @@ vMgrDisassocBeginSta(
 
 	pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
 	memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_DISASSOC_FR_MAXLEN);
-	pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
+	pTxPacket->p80211Header = (union UWLAN_80211HDR *)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
 
 	// Setup the sFrame structure
 	sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
@@ -1110,7 +1110,7 @@ vMgrAuthenBeginSta(
 
 	pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
 	memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_AUTHEN_FR_MAXLEN);
-	pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
+	pTxPacket->p80211Header = (union UWLAN_80211HDR *)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
 	sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
 	sFrame.len = WLAN_AUTHEN_FR_MAXLEN;
 	vMgrEncodeAuthen(&sFrame);
@@ -1168,7 +1168,7 @@ vMgrDeAuthenBeginSta(
 
 	pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
 	memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_DEAUTHEN_FR_MAXLEN);
-	pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
+	pTxPacket->p80211Header = (union UWLAN_80211HDR *)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
 	sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
 	sFrame.len = WLAN_DEAUTHEN_FR_MAXLEN;
 	vMgrEncodeDeauthen(&sFrame);
@@ -1291,7 +1291,7 @@ s_vMgrRxAuthenSequence_1(
 	// send auth reply
 	pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
 	memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_AUTHEN_FR_MAXLEN);
-	pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
+	pTxPacket->p80211Header = (union UWLAN_80211HDR *)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
 	sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
 	sFrame.len = WLAN_AUTHEN_FR_MAXLEN;
 	// format buffer structure
@@ -1397,7 +1397,7 @@ s_vMgrRxAuthenSequence_2(
 		if (cpu_to_le16((*(pFrame->pwStatus))) == WLAN_MGMT_STATUS_SUCCESS) {
 			pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
 			memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_AUTHEN_FR_MAXLEN);
-			pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
+			pTxPacket->p80211Header = (union UWLAN_80211HDR *)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
 			sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
 			sFrame.len = WLAN_AUTHEN_FR_MAXLEN;
 			// format buffer structure
@@ -1500,7 +1500,7 @@ reply:
 	// send auth reply
 	pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
 	memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_AUTHEN_FR_MAXLEN);
-	pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
+	pTxPacket->p80211Header = (union UWLAN_80211HDR *)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
 	sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
 	sFrame.len = WLAN_AUTHEN_FR_MAXLEN;
 	// format buffer structure
@@ -3056,7 +3056,7 @@ s_MgrMakeBeacon(
 	// prepare beacon frame
 	pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
 	memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_BEACON_FR_MAXLEN);
-	pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
+	pTxPacket->p80211Header = (union UWLAN_80211HDR *)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
 	// Setup the sFrame structure.
 	sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
 	sFrame.len = WLAN_BEACON_FR_MAXLEN;
@@ -3276,7 +3276,7 @@ s_MgrMakeProbeResponse(
 
 	pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
 	memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_PROBERESP_FR_MAXLEN);
-	pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
+	pTxPacket->p80211Header = (union UWLAN_80211HDR *)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
 	// Setup the sFrame structure.
 	sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
 	sFrame.len = WLAN_PROBERESP_FR_MAXLEN;
@@ -3453,7 +3453,7 @@ s_MgrMakeAssocRequest(
 
 	pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
 	memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_ASSOCREQ_FR_MAXLEN);
-	pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
+	pTxPacket->p80211Header = (union UWLAN_80211HDR *)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
 	// Setup the sFrame structure.
 	sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
 	sFrame.len = WLAN_ASSOCREQ_FR_MAXLEN;
@@ -3716,7 +3716,7 @@ s_MgrMakeReAssocRequest(
 
 	pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
 	memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_REASSOCREQ_FR_MAXLEN);
-	pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
+	pTxPacket->p80211Header = (union UWLAN_80211HDR *)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
 	/* Setup the sFrame structure. */
 	sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
 	sFrame.len = WLAN_REASSOCREQ_FR_MAXLEN;
@@ -3961,7 +3961,7 @@ s_MgrMakeAssocResponse(
 
 	pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
 	memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_ASSOCREQ_FR_MAXLEN);
-	pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
+	pTxPacket->p80211Header = (union UWLAN_80211HDR *)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
 	// Setup the sFrame structure
 	sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
 	sFrame.len = WLAN_REASSOCRESP_FR_MAXLEN;
@@ -4032,7 +4032,7 @@ s_MgrMakeReAssocResponse(
 
 	pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
 	memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_ASSOCREQ_FR_MAXLEN);
-	pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
+	pTxPacket->p80211Header = (union UWLAN_80211HDR *)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
 	// Setup the sFrame structure
 	sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
 	sFrame.len = WLAN_REASSOCRESP_FR_MAXLEN;
diff --git a/drivers/staging/vt6655/wmgr.h b/drivers/staging/vt6655/wmgr.h
index b91f1f8..683b02c 100644
--- a/drivers/staging/vt6655/wmgr.h
+++ b/drivers/staging/vt6655/wmgr.h
@@ -196,14 +196,14 @@ typedef enum tagWMAC_CURRENT_MODE {
 
 // Tx Management Packet descriptor
 typedef struct tagSTxMgmtPacket {
-	PUWLAN_80211HDR     p80211Header;
+	union UWLAN_80211HDR *p80211Header;
 	unsigned int cbMPDULen;
 	unsigned int cbPayloadLen;
 } STxMgmtPacket, *PSTxMgmtPacket;
 
 // Rx Management Packet descriptor
 typedef struct tagSRxMgmtPacket {
-	PUWLAN_80211HDR     p80211Header;
+	union UWLAN_80211HDR *p80211Header;
 	QWORD               qwLocalTSF;
 	unsigned int cbMPDULen;
 	unsigned int cbPayloadLen;
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCHv2 1/7] vt6655: balance faulty parentheses in 80211hdr.h
  2014-01-07 12:11 ` [PATCHv2 1/7] vt6655: balance faulty parentheses in 80211hdr.h Michael Gunselmann
@ 2014-01-07 12:34   ` Dan Carpenter
  0 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2014-01-07 12:34 UTC (permalink / raw)
  To: Michael Gunselmann
  Cc: devel, linux-kernel, gregkh, linux-kernel, martin.hofmann, forest

On Tue, Jan 07, 2014 at 01:11:45PM +0100, Michael Gunselmann wrote:
> From: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>
> 
> The file 80211hdr.h contained the macro WLAN_GET_FC_PRVER(n). The big endian
> fashion of this macro had unbalanced parentheses. This patch removes the
> parentheses in question.
> 

Good fix.  Next time, mention that this fixes a compile error and put
the GCC changelog if you have it.

(Don't redo the patch, it's fine as-is).

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCHv2 7/7] vt6655: Remove typedefs in 80211hdr.h
  2014-01-07 12:11 ` [PATCHv2 7/7] vt6655: Remove typedefs in 80211hdr.h Michael Gunselmann
@ 2014-01-08 19:07   ` Greg KH
  0 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2014-01-08 19:07 UTC (permalink / raw)
  To: Michael Gunselmann
  Cc: devel, linux-kernel, Martin Hofmann, linux-kernel,
	Michael Gunselmann, martin.hofmann, forest

On Tue, Jan 07, 2014 at 01:11:51PM +0100, Michael Gunselmann wrote:
> From: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>
> 
> The file 80211hdr.h contained typedefs for 5 types. To satisfy checkpatch,
> this commit removes them. In 11 other files, every occurence of a now deleted
> type has been substituted with the correct struct ... syntax.

Why not split this into 5 patches, one for each typedef?  That way the
one I don't like, I could have ignored, and taken the other 4 patches?
:)

> -typedef union tagUWLAN_80211HDR {
> -	WLAN_80211HDR_A2        sA2;
> -	WLAN_80211HDR_A3        sA3;
> -	WLAN_80211HDR_A4        sA4;
> -} UWLAN_80211HDR, *PUWLAN_80211HDR;
> +} __attribute__((__packed__));
> +
> +union UWLAN_80211HDR {
> +	struct WLAN_80211HDR_A2 sA2;
> +	struct WLAN_80211HDR_A3 sA3;
> +	struct WLAN_80211HDR_A4 sA4;
> +};

This really should be a struct of a union, right?  Then you don't have
these "odd" casts to do:

> -	pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
> +	pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf;

And are these casts even needed?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-01-08 19:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-07 12:11 [PATCHv2 0/7] vt6655: Cleanup of checkpatch errors Michael Gunselmann
2014-01-07 12:11 ` [PATCHv2 1/7] vt6655: balance faulty parentheses in 80211hdr.h Michael Gunselmann
2014-01-07 12:34   ` Dan Carpenter
2014-01-07 12:11 ` [PATCHv2 2/7] vt6655: remove casts in wroute.c Michael Gunselmann
2014-01-07 12:11 ` [PATCHv2 3/7] vt6655: remove unnecessary braces " Michael Gunselmann
2014-01-07 12:11 ` [PATCHv2 4/7] vt6655: fix indentation " Michael Gunselmann
2014-01-07 12:11 ` [PATCHv2 5/7] vt6655: remove typedefs in wpactl.h Michael Gunselmann
2014-01-07 12:11 ` [PATCHv2 6/7] vt6655: fix printk usage in wpactl.c Michael Gunselmann
2014-01-07 12:11 ` [PATCHv2 7/7] vt6655: Remove typedefs in 80211hdr.h Michael Gunselmann
2014-01-08 19:07   ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.