Skip to contentSkip to conversation

Staging: RT2860: Fixed multiple errors in rtusb_io.h

PATCH In review Neil Munro 2 participants 2 messages Oct 23, 2010 – Nov 9, 2010 Staging

lore
Share & tools
lore

Neil Munro

author
#0 lore raw

PATCH 2/2 Staging: RT2860: Fixed multiple errors in rtusb_io.h

Fixed the errors in rtusb_io.h

---
 drivers/staging/rt2860/rtusb_io.h |   44 +++++++++++++++++++-----------------
 1 files changed, 23 insertions(+), 21 deletions(-)
drivers/staging/rt2860/rtusb_io.h +23 -21
index 64a2fe4..bbb34d2 100644
@@ -144,42 +144,44 @@ struct rt_cmdq {
 
 /* add Client security information into ASIC WCID table and IVEIV table */
 #define RTMP_STA_SECURITY_INFO_ADD(pAd, apidx, KeyID, pEntry)						\
-	{	RTMP_STA_ENTRY_MAC_RESET(pAd, pEntry->Aid);								\
-		if (pEntry->Aid >= 1) {														\
-			struct rt_set_asic_wcid_attri	SetAsicWcidAttri;								\
-			SetAsicWcidAttri.WCID = pEntry->Aid;									\
-			if ((pEntry->AuthMode <= Ndis802_11AuthModeAutoSwitch) &&				\
-				(pEntry->WepStatus == Ndis802_11Encryption1Enabled))				\
-			{																		\
-				SetAsicWcidAttri.Cipher = pAd->SharedKey[apidx][KeyID].CipherAlg;	\
-			}																		\
-			else if (pEntry->AuthMode == Ndis802_11AuthModeWPANone)					\
-			{																		\
-				SetAsicWcidAttri.Cipher = pAd->SharedKey[apidx][KeyID].CipherAlg;	\
-			}																		\
-			else SetAsicWcidAttri.Cipher = 0;										\
-            DBGPRINT(RT_DEBUG_TRACE, ("aid cipher = %ld\n",SetAsicWcidAttri.Cipher));       \
+{
+	RTMP_STA_ENTRY_MAC_RESET(pAd, pEntry->Aid);								\
+	if (pEntry->Aid >= 1) {														\
+		struct rt_set_asic_wcid_attri	SetAsicWcidAttri;								\
+		SetAsicWcidAttri.WCID = pEntry->Aid;									\
+		if ((pEntry->AuthMode <= Ndis802_11AuthModeAutoSwitch) &&				\
+			(pEntry->WepStatus == Ndis802_11Encryption1Enabled)) {	\
+			SetAsicWcidAttri.Cipher = pAd->SharedKey[apidx][KeyID].CipherAlg;	\
+		}																		\
+		else if (pEntry->AuthMode == Ndis802_11AuthModeWPANone)	{	\
+			SetAsicWcidAttri.Cipher = pAd->SharedKey[apidx][KeyID].CipherAlg;	\
+		}																		\
+		else
+			SetAsicWcidAttri.Cipher = 0;										\
+			DBGPRINT(RT_DEBUG_TRACE, ("aid cipher = %ld\n", SetAsicWcidAttri.Cipher));       \
 			RTUSBEnqueueInternalCmd(pAd, CMDTHREAD_SET_ASIC_WCID_CIPHER,			\
-							&SetAsicWcidAttri, sizeof(struct rt_set_asic_wcid_attri)); } }
+						&SetAsicWcidAttri, sizeof(struct rt_set_asic_wcid_attri));
+	}
+}
 
 /* Insert the BA bitmap to ASIC for the Wcid entry */
 #define RTMP_ADD_BA_SESSION_TO_ASIC(_pAd, _Aid, _TID)					\
-		do{																\
+		do {																\
 			struct rt_set_asic_wcid	SetAsicWcid;							\
 			SetAsicWcid.WCID = (_Aid);									\
 			SetAsicWcid.SetTid = (0x10000<<(_TID));						\
 			SetAsicWcid.DeleteTid = 0xffffffff;							\
 			RTUSBEnqueueInternalCmd((_pAd), CMDTHREAD_SET_ASIC_WCID, &SetAsicWcid, sizeof(struct rt_set_asic_wcid));	\
-		}while(0)
+		} while (0)
 
 /* Remove the BA bitmap from ASIC for the Wcid entry */
 #define RTMP_DEL_BA_SESSION_FROM_ASIC(_pAd, _Wcid, _TID)				\
-		do{																\
+		do {																\
 			struct rt_set_asic_wcid	SetAsicWcid;							\
 			SetAsicWcid.WCID = (_Wcid);									\
 			SetAsicWcid.SetTid = (0xffffffff);							\
-			SetAsicWcid.DeleteTid = (0x10000<<(_TID) );					\
+			SetAsicWcid.DeleteTid = (0x10000<<(_TID));					\
 			RTUSBEnqueueInternalCmd((_pAd), CMDTHREAD_SET_ASIC_WCID, &SetAsicWcid, sizeof(struct rt_set_asic_wcid));	\
-		}while(0)
+		} while (0)
 
 #endif /* __RTUSB_IO_H__ // */

--
1.7.3.2

#1 lore raw
Quoted 1 line · Neil Munro

Fixed the errors in rtusb_io.h

"errors"? What type of errors? Do you mean checkpatch.pl warnings/errors?

Quoted 25 lines
---
 drivers/staging/rt2860/rtusb_io.h |   44 +++++++++++++++++++-----------------
 1 files changed, 23 insertions(+), 21 deletions(-)
drivers/staging/rt2860/rtusb_io.h +0 -11
index 64a2fe4..bbb34d2 100644
@@ -144,42 +144,44 @@ struct rt_cmdq {
 
 /* add Client security information into ASIC WCID table and IVEIV table */
 #define RTMP_STA_SECURITY_INFO_ADD(pAd, apidx, KeyID, pEntry)						\
-	{	RTMP_STA_ENTRY_MAC_RESET(pAd, pEntry->Aid);								\
-		if (pEntry->Aid >= 1) {														\
-			struct rt_set_asic_wcid_attri	SetAsicWcidAttri;								\
-			SetAsicWcidAttri.WCID = pEntry->Aid;									\
-			if ((pEntry->AuthMode <= Ndis802_11AuthModeAutoSwitch) &&				\
-				(pEntry->WepStatus == Ndis802_11Encryption1Enabled))				\
-			{																		\
-				SetAsicWcidAttri.Cipher = pAd->SharedKey[apidx][KeyID].CipherAlg;	\
-			}																		\
-			else if (pEntry->AuthMode == Ndis802_11AuthModeWPANone)					\
-			{																		\

drivers/staging/rt2860/rtusb_io.h struct rt_cmdq { · line 152

Quoted 10 lines
drivers/staging/rt2860/rtusb_io.h +6 -4
-				SetAsicWcidAttri.Cipher = pAd->SharedKey[apidx][KeyID].CipherAlg;	\
-			}																		\
-			else SetAsicWcidAttri.Cipher = 0;										\
-            DBGPRINT(RT_DEBUG_TRACE, ("aid cipher = %ld\n",SetAsicWcidAttri.Cipher));       \
+{
+	RTMP_STA_ENTRY_MAC_RESET(pAd, pEntry->Aid);								\
+	if (pEntry->Aid >= 1) {														\
+		struct rt_set_asic_wcid_attri	SetAsicWcidAttri;								\
+		SetAsicWcidAttri.WCID = pEntry->Aid;									\
+		if ((pEntry->AuthMode <= Ndis802_11AuthModeAutoSwitch) &&				\

Are you sure this is still all ok? The tabs look pretty wrong and the ends of the line should be smaller, right?

If you are going to fix up the spacing, please also fix the length of the lines at the same time, especially when it is so easy to do so.

Care to resend this?

thanks,

greg k-h