Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07bbf350 authored by Adam Latham's avatar Adam Latham Committed by Greg Kroah-Hartman
Browse files

Staging: winbond: Fix for brace style, length and whitespace in mac_structures.h



This patch fixes line length, brace style and whitespace issues in the
mac_structures.h file found by the checkpatch.pl tool

Signed-off-by: default avatarAdam Latham <adam.latham@unisontorbay.org.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent cb016cc4
Loading
Loading
Loading
Loading
+59 −63
Original line number Original line Diff line number Diff line
@@ -41,8 +41,10 @@
#define DOT_11_MAC_HEADER_SIZE		24
#define DOT_11_MAC_HEADER_SIZE		24
#define DOT_11_SNAP_SIZE			6
#define DOT_11_SNAP_SIZE			6
#define DOT_11_DURATION_OFFSET		2
#define DOT_11_DURATION_OFFSET		2
#define DOT_11_SEQUENCE_OFFSET		22 /* Sequence control offset */
/* Sequence control offset */
#define DOT_11_TYPE_OFFSET			30 /* The start offset of 802.11 Frame// */
#define DOT_11_SEQUENCE_OFFSET		22
/* The start offset of 802.11 Frame// */
#define DOT_11_TYPE_OFFSET			30
#define DOT_11_DATA_OFFSET          24
#define DOT_11_DATA_OFFSET          24
#define DOT_11_DA_OFFSET			4
#define DOT_11_DA_OFFSET			4
#define DOT_3_TYPE_ARP				0x80F3
#define DOT_3_TYPE_ARP				0x80F3
@@ -385,9 +387,11 @@ struct Extended_Supported_Rates_Element {
#ifdef _WPA2_
#ifdef _WPA2_
#define VERSION_WPA2            1
#define VERSION_WPA2            1
#endif /* end def  _WPA2_ */
#endif /* end def  _WPA2_ */
#define OUI_WPA					0x00F25000	/* WPA2.0 OUI=00:50:F2, the MSB is reserved for suite type */
/* WPA2.0 OUI=00:50:F2, the MSB is reserved for suite type */
#define OUI_WPA					0x00F25000
#ifdef _WPA2_
#ifdef _WPA2_
#define OUI_WPA2				0x00AC0F00	/* for wpa2 change to 0x00ACOF04 by Ws 26/04/04 */
/* for wpa2 change to 0x00ACOF04 by Ws 26/04/04 */
#define OUI_WPA2				0x00AC0F00
#endif /* end def _WPA2_ */
#endif /* end def _WPA2_ */


#define OUI_WPA_ADDITIONAL		0x01
#define OUI_WPA_ADDITIONAL		0x01
@@ -400,8 +404,8 @@ struct Extended_Supported_Rates_Element {


#define WPA_OUI_BIG    ((u32) 0x01F25000)/* added by ws 09/23/04 */
#define WPA_OUI_BIG    ((u32) 0x01F25000)/* added by ws 09/23/04 */
#define WPA_OUI_LITTLE  ((u32) 0x01F25001)/* added by ws 09/23/04 */
#define WPA_OUI_LITTLE  ((u32) 0x01F25001)/* added by ws 09/23/04 */

/* 20061108 For WPS. It's little endian. Big endian is 0x0050F204 */
#define WPA_WPS_OUI				cpu_to_le32(0x04F25000) /* 20061108 For WPS. It's little endian. Big endian is 0x0050F204 */
#define WPA_WPS_OUI				cpu_to_le32(0x04F25000)


/* -----WPA2----- */
/* -----WPA2----- */
#ifdef _WPA2_
#ifdef _WPA2_
@@ -420,13 +424,10 @@ struct Extended_Supported_Rates_Element {
#define OUI_CIPHER_CCMP				0x04
#define OUI_CIPHER_CCMP				0x04
#define OUI_CIPHER_WEP_104			0x05
#define OUI_CIPHER_WEP_104			0x05


struct suite_selector
struct suite_selector{
{
	union{
	union
	{
		u8	Value[4];
		u8	Value[4];
		struct _SUIT_
		struct _SUIT_ {
		{
			u8	OUI[3];
			u8	OUI[3];
			u8	Type;
			u8	Type;
		} SuitSelector;
		} SuitSelector;
@@ -434,31 +435,27 @@ struct suite_selector
};
};


/* --  WPA  -- */
/* --  WPA  -- */
struct	RSN_Information_Element
struct	RSN_Information_Element{
{
	u8					Element_ID;
	u8					Element_ID;
	u8					Length;
	u8					Length;
	struct suite_selector	OuiWPAAdditional; /* WPA version 2.0 additional field, and should be 00:50:F2:01 */
 /* WPA version 2.0 additional field, and should be 00:50:F2:01 */
	struct suite_selector	OuiWPAAdditional;
	u16					Version;
	u16					Version;
	struct suite_selector		GroupKeySuite;
	struct suite_selector		GroupKeySuite;
	u16					PairwiseKeySuiteCount;
	u16					PairwiseKeySuiteCount;
	struct suite_selector		PairwiseKeySuite[1];
	struct suite_selector		PairwiseKeySuite[1];
} __attribute__ ((packed));
} __attribute__ ((packed));
struct RSN_Auth_Sub_Information_Element
struct RSN_Auth_Sub_Information_Element {
{
	u16				AuthKeyMngtSuiteCount;
	u16				AuthKeyMngtSuiteCount;
	struct suite_selector	AuthKeyMngtSuite[1];
	struct suite_selector	AuthKeyMngtSuite[1];
} __attribute__ ((packed));
} __attribute__ ((packed));


/* --  WPA2  -- */
/* --  WPA2  -- */
struct RSN_Capability_Element
struct RSN_Capability_Element {
{
  union {
  union
  {
	u16	__attribute__ ((packed))	wValue;
	u16	__attribute__ ((packed))	wValue;
    #ifdef _BIG_ENDIAN_	 /* 20060927 add by anson's endian */
    #ifdef _BIG_ENDIAN_	 /* 20060927 add by anson's endian */
    struct _RSN_Capability
    struct _RSN_Capability {
    {
	u16   __attribute__ ((packed))  Reserved2:8; /* 20051201 */
	u16   __attribute__ ((packed))  Reserved2:8; /* 20051201 */
	u16   __attribute__ ((packed))  Reserved1:2;
	u16   __attribute__ ((packed))  Reserved1:2;
	u16   __attribute__ ((packed))  GTK_Replay_Counter:2;
	u16   __attribute__ ((packed))  GTK_Replay_Counter:2;
@@ -467,8 +464,7 @@ struct RSN_Capability_Element
	u16   __attribute__ ((packed))  Pre_Auth:1;
	u16   __attribute__ ((packed))  Pre_Auth:1;
    } __attribute__ ((packed))  RSN_Capability;
    } __attribute__ ((packed))  RSN_Capability;
    #else
    #else
    struct _RSN_Capability
    struct _RSN_Capability {
    {
	u16   __attribute__ ((packed))  Pre_Auth:1;
	u16   __attribute__ ((packed))  Pre_Auth:1;
	u16   __attribute__ ((packed))  No_Pairwise:1;
	u16   __attribute__ ((packed))  No_Pairwise:1;
	u16   __attribute__ ((packed))  PTK_Replay_Counter:2;
	u16   __attribute__ ((packed))  PTK_Replay_Counter:2;
@@ -482,13 +478,11 @@ struct RSN_Capability_Element
} __attribute__ ((packed)) ;
} __attribute__ ((packed)) ;


#ifdef _WPA2_
#ifdef _WPA2_
struct pmkid
struct pmkid {
{
  u8 pValue[16];
  u8 pValue[16];
};
};


struct	WPA2_RSN_Information_Element
struct	WPA2_RSN_Information_Element {
{
	u8					Element_ID;
	u8					Element_ID;
	u8					Length;
	u8					Length;
	u16					Version;
	u16					Version;
@@ -498,15 +492,13 @@ struct WPA2_RSN_Information_Element


} __attribute__ ((packed));
} __attribute__ ((packed));


struct WPA2_RSN_Auth_Sub_Information_Element
struct WPA2_RSN_Auth_Sub_Information_Element {
{
	u16				AuthKeyMngtSuiteCount;
	u16				AuthKeyMngtSuiteCount;
	struct suite_selector	AuthKeyMngtSuite[1];
	struct suite_selector	AuthKeyMngtSuite[1];
} __attribute__ ((packed));
} __attribute__ ((packed));




struct PMKID_Information_Element
struct PMKID_Information_Element {
{
	u16				PMKID_Count;
	u16				PMKID_Count;
	struct pmkid pmkid[16];
	struct pmkid pmkid[16];
} __attribute__ ((packed));
} __attribute__ ((packed));
@@ -515,10 +507,11 @@ struct PMKID_Information_Element
/*============================================================
/*============================================================
// MAC Frame structure (different type) and subfield structure
// MAC Frame structure (different type) and subfield structure
//============================================================*/
//============================================================*/
struct MAC_frame_control
struct MAC_frame_control {
{
/* a combination of the [Protocol Version, Control Type, Control Subtype]*/
    u8    mac_frame_info; /* a combination of the [Protocol Version, Control Type, Control Subtype]*/
    u8    mac_frame_info;
    #ifdef _BIG_ENDIAN_ /* 20060927 add by anson's endian */
/* 20060927 add by anson's endian */
    #ifdef _BIG_ENDIAN_
    u8    order:1;
    u8    order:1;
    u8    WEP:1;
    u8    WEP:1;
    u8    more_data:1;
    u8    more_data:1;
@@ -540,7 +533,8 @@ struct MAC_frame_control
} __attribute__ ((packed));
} __attribute__ ((packed));


struct Management_Frame {
struct Management_Frame {
    struct MAC_frame_control frame_control; /* 2B, ToDS,FromDS,MoreFrag,MoreData,Order=0 */
/* 2B, ToDS,FromDS,MoreFrag,MoreData,Order=0 */
    struct MAC_frame_control frame_control;
    u16		duration;
    u16		duration;
    u8		DA[MAC_ADDR_LENGTH];			/* Addr1 */
    u8		DA[MAC_ADDR_LENGTH];			/* Addr1 */
    u8		SA[MAC_ADDR_LENGTH];			/* Addr2 */
    u8		SA[MAC_ADDR_LENGTH];			/* Addr2 */
@@ -552,7 +546,8 @@ struct Management_Frame {


/* SW-MAC don't Tx/Rx Control-Frame, HW-MAC do it. */
/* SW-MAC don't Tx/Rx Control-Frame, HW-MAC do it. */
struct Control_Frame {
struct Control_Frame {
    struct MAC_frame_control frame_control; /* ToDS,FromDS,MoreFrag,Retry,MoreData,WEP,Order=0 */
/* ToDS,FromDS,MoreFrag,Retry,MoreData,WEP,Order=0 */
    struct MAC_frame_control frame_control;
    u16		duration;
    u16		duration;
    u8		RA[MAC_ADDR_LENGTH];
    u8		RA[MAC_ADDR_LENGTH];
    u8		TA[MAC_ADDR_LENGTH];
    u8		TA[MAC_ADDR_LENGTH];
@@ -628,7 +623,8 @@ struct Authentication_Frame_Body {
    u16    sequenceNumber;
    u16    sequenceNumber;
    u16    statusCode;
    u16    statusCode;
	/* NB: don't include ChallengeText in this structure
	/* NB: don't include ChallengeText in this structure
	// struct Challenge_Text_Element sChallengeTextElement; // wkchen added */
	// struct Challenge_Text_Element sChallengeTextElement;
	// wkchen added */
} __attribute__ ((packed));
} __attribute__ ((packed));