Commit 40a596e6 authored by Fabian Bläse's avatar Fabian Bläse Committed by Greg Kroah-Hartman

rtl8192u/rtl819x_Qos.h: Adjust spaces to coding guidelines

This patch improves spacing according to the coding guidelines,
mainly around braces.

This patch fixes errors reported by checkpatch.
Signed-off-by: default avatarFabian Bläse <fabian.blaese@fau.de>
Signed-off-by: default avatarMaximilian Ott <maximilian.o.ott@fau.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f4442634
...@@ -31,7 +31,7 @@ typedef u32 QOS_MODE, *PQOS_MODE; ...@@ -31,7 +31,7 @@ typedef u32 QOS_MODE, *PQOS_MODE;
// QoS ACK Policy Field Values // QoS ACK Policy Field Values
// Ref: WMM spec 2.1.6: QoS Control Field, p.10. // Ref: WMM spec 2.1.6: QoS Control Field, p.10.
// //
typedef enum _ACK_POLICY{ typedef enum _ACK_POLICY {
eAckPlc0_ACK = 0x00, eAckPlc0_ACK = 0x00,
eAckPlc1_NoACK = 0x01, eAckPlc1_NoACK = 0x01,
} ACK_POLICY, *PACK_POLICY; } ACK_POLICY, *PACK_POLICY;
...@@ -44,7 +44,7 @@ typedef enum _ACK_POLICY{ ...@@ -44,7 +44,7 @@ typedef enum _ACK_POLICY{
// 1. WMM spec 2.1.6: QoS Control Field, p.9. // 1. WMM spec 2.1.6: QoS Control Field, p.9.
// 2. 802.11e/D13.0 7.1.3.5, p.26. // 2. 802.11e/D13.0 7.1.3.5, p.26.
// //
typedef union _QOS_CTRL_FIELD{ typedef union _QOS_CTRL_FIELD {
u8 charData[2]; u8 charData[2];
u16 shortData; u16 shortData;
...@@ -56,7 +56,7 @@ typedef union _QOS_CTRL_FIELD{ ...@@ -56,7 +56,7 @@ typedef union _QOS_CTRL_FIELD{
u8 AckPolicy:2; u8 AckPolicy:2;
u8 usRsvd2:1; u8 usRsvd2:1;
u8 ucRsvdByte; u8 ucRsvdByte;
}WMM; } WMM;
// 802.11e: QoS data type frame sent by non-AP QSTAs. // 802.11e: QoS data type frame sent by non-AP QSTAs.
struct { struct {
...@@ -65,7 +65,7 @@ typedef union _QOS_CTRL_FIELD{ ...@@ -65,7 +65,7 @@ typedef union _QOS_CTRL_FIELD{
u8 AckPolicy:2; u8 AckPolicy:2;
u8 usRsvd:1; u8 usRsvd:1;
u8 TxopOrQsize; // (BIT4=0)TXOP Duration Requested or (BIT4=1)Queue Size. u8 TxopOrQsize; // (BIT4=0)TXOP Duration Requested or (BIT4=1)Queue Size.
}BySta; } BySta;
// 802.11e: QoS data, QoS Null, and QoS Data+CF-Ack frames sent by HC. // 802.11e: QoS data, QoS Null, and QoS Data+CF-Ack frames sent by HC.
struct { struct {
...@@ -74,7 +74,7 @@ typedef union _QOS_CTRL_FIELD{ ...@@ -74,7 +74,7 @@ typedef union _QOS_CTRL_FIELD{
u8 AckPolicy:2; u8 AckPolicy:2;
u8 usRsvd:1; u8 usRsvd:1;
u8 PSBufState; // QAP PS Buffer State. u8 PSBufState; // QAP PS Buffer State.
}ByHc_Data; } ByHc_Data;
// 802.11e: QoS (+) CF-Poll frames sent by HC. // 802.11e: QoS (+) CF-Poll frames sent by HC.
struct { struct {
...@@ -83,9 +83,9 @@ typedef union _QOS_CTRL_FIELD{ ...@@ -83,9 +83,9 @@ typedef union _QOS_CTRL_FIELD{
u8 AckPolicy:2; u8 AckPolicy:2;
u8 usRsvd:1; u8 usRsvd:1;
u8 TxopLimit; // TXOP Limit. u8 TxopLimit; // TXOP Limit.
}ByHc_CFP; } ByHc_CFP;
}QOS_CTRL_FIELD, *PQOS_CTRL_FIELD; } QOS_CTRL_FIELD, *PQOS_CTRL_FIELD;
// //
...@@ -94,13 +94,13 @@ typedef union _QOS_CTRL_FIELD{ ...@@ -94,13 +94,13 @@ typedef union _QOS_CTRL_FIELD{
// 1. WMM spec 2.2.1: WME Information Element, p.11. // 1. WMM spec 2.2.1: WME Information Element, p.11.
// 2. 8185 QoS code: QOS_INFO [def. in QoS_mp.h] // 2. 8185 QoS code: QOS_INFO [def. in QoS_mp.h]
// //
typedef union _QOS_INFO_FIELD{ typedef union _QOS_INFO_FIELD {
u8 charData; u8 charData;
struct { struct {
u8 ucParameterSetCount:4; u8 ucParameterSetCount:4;
u8 ucReserved:4; u8 ucReserved:4;
}WMM; } WMM;
struct { struct {
//Ref WMM_Specification_1-1.pdf, 2006-06-13 Isaiah //Ref WMM_Specification_1-1.pdf, 2006-06-13 Isaiah
...@@ -112,14 +112,14 @@ typedef union _QOS_INFO_FIELD{ ...@@ -112,14 +112,14 @@ typedef union _QOS_INFO_FIELD{
u8 ucMaxSPLen:2; u8 ucMaxSPLen:2;
u8 ucReserved2:1; u8 ucReserved2:1;
}ByWmmPsSta; } ByWmmPsSta;
struct { struct {
//Ref WMM_Specification_1-1.pdf, 2006-06-13 Isaiah //Ref WMM_Specification_1-1.pdf, 2006-06-13 Isaiah
u8 ucParameterSetCount:4; u8 ucParameterSetCount:4;
u8 ucReserved:3; u8 ucReserved:3;
u8 ucApUapsd:1; u8 ucApUapsd:1;
}ByWmmPsAp; } ByWmmPsAp;
struct { struct {
u8 ucAC3_UAPSD:1; u8 ucAC3_UAPSD:1;
...@@ -172,7 +172,7 @@ typedef union _QOS_INFO_FIELD{ ...@@ -172,7 +172,7 @@ typedef union _QOS_INFO_FIELD{
u8 ucApUapsd:1; u8 ucApUapsd:1;
} ByAllAp; } ByAllAp;
}QOS_INFO_FIELD, *PQOS_INFO_FIELD; } QOS_INFO_FIELD, *PQOS_INFO_FIELD;
// //
// ACI to AC coding. // ACI to AC coding.
...@@ -198,7 +198,7 @@ typedef u32 AC_CODING; ...@@ -198,7 +198,7 @@ typedef u32 AC_CODING;
// ACI/AIFSN Field. // ACI/AIFSN Field.
// Ref: WMM spec 2.2.2: WME Parameter Element, p.12. // Ref: WMM spec 2.2.2: WME Parameter Element, p.12.
// //
typedef union _ACI_AIFSN{ typedef union _ACI_AIFSN {
u8 charData; u8 charData;
struct { struct {
...@@ -206,26 +206,26 @@ typedef union _ACI_AIFSN{ ...@@ -206,26 +206,26 @@ typedef union _ACI_AIFSN{
u8 ACM:1; u8 ACM:1;
u8 ACI:2; u8 ACI:2;
u8 Reserved:1; u8 Reserved:1;
}f; // Field } f; // Field
}ACI_AIFSN, *PACI_AIFSN; } ACI_AIFSN, *PACI_AIFSN;
// //
// ECWmin/ECWmax field. // ECWmin/ECWmax field.
// Ref: WMM spec 2.2.2: WME Parameter Element, p.13. // Ref: WMM spec 2.2.2: WME Parameter Element, p.13.
// //
typedef union _ECW{ typedef union _ECW {
u8 charData; u8 charData;
struct { struct {
u8 ECWmin:4; u8 ECWmin:4;
u8 ECWmax:4; u8 ECWmax:4;
}f; // Field } f; // Field
}ECW, *PECW; } ECW, *PECW;
// //
// AC Parameters Record Format. // AC Parameters Record Format.
// Ref: WMM spec 2.2.2: WME Parameter Element, p.12. // Ref: WMM spec 2.2.2: WME Parameter Element, p.12.
// //
typedef union _AC_PARAM{ typedef union _AC_PARAM {
u32 longData; u32 longData;
u8 charData[4]; u8 charData[4];
...@@ -233,15 +233,15 @@ typedef union _AC_PARAM{ ...@@ -233,15 +233,15 @@ typedef union _AC_PARAM{
ACI_AIFSN AciAifsn; ACI_AIFSN AciAifsn;
ECW Ecw; ECW Ecw;
u16 TXOPLimit; u16 TXOPLimit;
}f; // Field } f; // Field
}AC_PARAM, *PAC_PARAM; } AC_PARAM, *PAC_PARAM;
// //
// QoS element subtype // QoS element subtype
// //
typedef enum _QOS_ELE_SUBTYPE{ typedef enum _QOS_ELE_SUBTYPE {
QOSELE_TYPE_INFO = 0x00, // 0x00: Information element QOSELE_TYPE_INFO = 0x00, // 0x00: Information element
QOSELE_TYPE_PARAM = 0x01, // 0x01: parameter element QOSELE_TYPE_PARAM = 0x01, // 0x01: parameter element
} QOS_ELE_SUBTYPE, *PQOS_ELE_SUBTYPE; } QOS_ELE_SUBTYPE, *PQOS_ELE_SUBTYPE;
...@@ -251,7 +251,7 @@ typedef enum _QOS_ELE_SUBTYPE{ ...@@ -251,7 +251,7 @@ typedef enum _QOS_ELE_SUBTYPE{
// Direction Field Values. // Direction Field Values.
// Ref: WMM spec 2.2.11: WME TSPEC Element, p.18. // Ref: WMM spec 2.2.11: WME TSPEC Element, p.18.
// //
typedef enum _DIRECTION_VALUE{ typedef enum _DIRECTION_VALUE {
DIR_UP = 0, // 0x00 // UpLink DIR_UP = 0, // 0x00 // UpLink
DIR_DOWN = 1, // 0x01 // DownLink DIR_DOWN = 1, // 0x01 // DownLink
DIR_DIRECT = 2, // 0x10 // DirectLink DIR_DIRECT = 2, // 0x10 // DirectLink
...@@ -265,7 +265,7 @@ typedef enum _DIRECTION_VALUE{ ...@@ -265,7 +265,7 @@ typedef enum _DIRECTION_VALUE{
// 1. WMM spec 2.2.11: WME TSPEC Element, p.18. // 1. WMM spec 2.2.11: WME TSPEC Element, p.18.
// 2. 8185 QoS code: QOS_TSINFO [def. in QoS_mp.h] // 2. 8185 QoS code: QOS_TSINFO [def. in QoS_mp.h]
// //
typedef union _QOS_TSINFO{ typedef union _QOS_TSINFO {
u8 charData[3]; u8 charData[3];
struct { struct {
u8 ucTrafficType:1; //WMM is reserved u8 ucTrafficType:1; //WMM is reserved
...@@ -278,14 +278,14 @@ typedef union _QOS_TSINFO{ ...@@ -278,14 +278,14 @@ typedef union _QOS_TSINFO{
u8 ucTSInfoAckPolicy:2; //WMM is reserved u8 ucTSInfoAckPolicy:2; //WMM is reserved
u8 ucSchedule:1; //WMM is reserved u8 ucSchedule:1; //WMM is reserved
u8 ucReserved:7; u8 ucReserved:7;
}field; } field;
}QOS_TSINFO, *PQOS_TSINFO; } QOS_TSINFO, *PQOS_TSINFO;
// //
// WMM TSPEC Body. // WMM TSPEC Body.
// Ref: WMM spec 2.2.11: WME TSPEC Element, p.16. // Ref: WMM spec 2.2.11: WME TSPEC Element, p.16.
// //
typedef union _TSPEC_BODY{ typedef union _TSPEC_BODY {
u8 charData[55]; u8 charData[55];
struct { struct {
...@@ -306,14 +306,14 @@ typedef union _TSPEC_BODY{ ...@@ -306,14 +306,14 @@ typedef union _TSPEC_BODY{
u16 SurplusBandwidthAllowance; u16 SurplusBandwidthAllowance;
u16 MediumTime; u16 MediumTime;
} f; // Field } f; // Field
}TSPEC_BODY, *PTSPEC_BODY; } TSPEC_BODY, *PTSPEC_BODY;
// //
// WMM TSPEC Element. // WMM TSPEC Element.
// Ref: WMM spec 2.2.11: WME TSPEC Element, p.16. // Ref: WMM spec 2.2.11: WME TSPEC Element, p.16.
// //
typedef struct _WMM_TSPEC{ typedef struct _WMM_TSPEC {
u8 ID; u8 ID;
u8 Length; u8 Length;
u8 OUI[3]; u8 OUI[3];
...@@ -327,19 +327,19 @@ typedef struct _WMM_TSPEC{ ...@@ -327,19 +327,19 @@ typedef struct _WMM_TSPEC{
// ACM implementation method. // ACM implementation method.
// Annie, 2005-12-13. // Annie, 2005-12-13.
// //
typedef enum _ACM_METHOD{ typedef enum _ACM_METHOD {
eAcmWay0_SwAndHw = 0, // By SW and HW. eAcmWay0_SwAndHw = 0, // By SW and HW.
eAcmWay1_HW = 1, // By HW. eAcmWay1_HW = 1, // By HW.
eAcmWay2_SW = 2, // By SW. eAcmWay2_SW = 2, // By SW.
} ACM_METHOD, *PACM_METHOD; } ACM_METHOD, *PACM_METHOD;
typedef struct _ACM{ typedef struct _ACM {
// u8 RegEnableACM; // u8 RegEnableACM;
u64 UsedTime; u64 UsedTime;
u64 MediumTime; u64 MediumTime;
u8 HwAcmCtl; // TRUE: UsedTime exceed => Do NOT USE this AC. It wll be written to ACM_CONTROL(0xBF BIT 0/1/2 in 8185B). u8 HwAcmCtl; // TRUE: UsedTime exceed => Do NOT USE this AC. It wll be written to ACM_CONTROL(0xBF BIT 0/1/2 in 8185B).
}ACM, *PACM; } ACM, *PACM;
typedef u8 AC_UAPSD, *PAC_UAPSD; typedef u8 AC_UAPSD, *PAC_UAPSD;
...@@ -359,15 +359,15 @@ typedef u8 AC_UAPSD, *PAC_UAPSD; ...@@ -359,15 +359,15 @@ typedef u8 AC_UAPSD, *PAC_UAPSD;
//typedef struct _TCLASS{ //typedef struct _TCLASS{
// TODO // TODO
//} TCLASS, *PTCLASS; //} TCLASS, *PTCLASS;
typedef union _QOS_TCLAS{ typedef union _QOS_TCLAS {
struct _TYPE_GENERAL{ struct _TYPE_GENERAL {
u8 Priority; u8 Priority;
u8 ClassifierType; u8 ClassifierType;
u8 Mask; u8 Mask;
} TYPE_GENERAL; } TYPE_GENERAL;
struct _TYPE0_ETH{ struct _TYPE0_ETH {
u8 Priority; u8 Priority;
u8 ClassifierType; u8 ClassifierType;
u8 Mask; u8 Mask;
...@@ -376,7 +376,7 @@ typedef union _QOS_TCLAS{ ...@@ -376,7 +376,7 @@ typedef union _QOS_TCLAS{
u16 Type; u16 Type;
} TYPE0_ETH; } TYPE0_ETH;
struct _TYPE1_IPV4{ struct _TYPE1_IPV4 {
u8 Priority; u8 Priority;
u8 ClassifierType; u8 ClassifierType;
u8 Mask; u8 Mask;
...@@ -390,7 +390,7 @@ typedef union _QOS_TCLAS{ ...@@ -390,7 +390,7 @@ typedef union _QOS_TCLAS{
u8 Reserved; u8 Reserved;
} TYPE1_IPV4; } TYPE1_IPV4;
struct _TYPE1_IPV6{ struct _TYPE1_IPV6 {
u8 Priority; u8 Priority;
u8 ClassifierType; u8 ClassifierType;
u8 Mask; u8 Mask;
...@@ -402,7 +402,7 @@ typedef union _QOS_TCLAS{ ...@@ -402,7 +402,7 @@ typedef union _QOS_TCLAS{
u8 FlowLabel[3]; u8 FlowLabel[3];
} TYPE1_IPV6; } TYPE1_IPV6;
struct _TYPE2_8021Q{ struct _TYPE2_8021Q {
u8 Priority; u8 Priority;
u8 ClassifierType; u8 ClassifierType;
u8 Mask; u8 Mask;
...@@ -415,7 +415,7 @@ typedef union _QOS_TCLAS{ ...@@ -415,7 +415,7 @@ typedef union _QOS_TCLAS{
//- TSPEC //- TSPEC
//- AC (which to mapping) //- AC (which to mapping)
//} WMM_TSTREAM, *PWMM_TSTREAM; //} WMM_TSTREAM, *PWMM_TSTREAM;
typedef struct _QOS_TSTREAM{ typedef struct _QOS_TSTREAM {
u8 AC; u8 AC;
WMM_TSPEC TSpec; WMM_TSPEC TSpec;
QOS_TCLAS TClass; QOS_TCLAS TClass;
...@@ -439,16 +439,16 @@ typedef struct _QOS_TSTREAM{ ...@@ -439,16 +439,16 @@ typedef struct _QOS_TSTREAM{
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// 802.11 Management frame Status Code field // 802.11 Management frame Status Code field
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
typedef struct _OCTET_STRING{ typedef struct _OCTET_STRING {
u8 *Octet; u8 *Octet;
u16 Length; u16 Length;
}OCTET_STRING, *POCTET_STRING; } OCTET_STRING, *POCTET_STRING;
// //
// STA QoS data. // STA QoS data.
// Ref: DOT11_QOS in 8185 code. [def. in QoS_mp.h] // Ref: DOT11_QOS in 8185 code. [def. in QoS_mp.h]
// //
typedef struct _STA_QOS{ typedef struct _STA_QOS {
//DECLARE_RT_OBJECT(STA_QOS); //DECLARE_RT_OBJECT(STA_QOS);
u8 WMMIEBuf[MAX_WMMELE_LENGTH]; u8 WMMIEBuf[MAX_WMMELE_LENGTH];
u8 *WMMIE; u8 *WMMIE;
...@@ -495,13 +495,13 @@ typedef struct _STA_QOS{ ...@@ -495,13 +495,13 @@ typedef struct _STA_QOS{
// Enable/Disable Rx immediate BA capability. // Enable/Disable Rx immediate BA capability.
u8 bEnableRxImmBA; u8 bEnableRxImmBA;
}STA_QOS, *PSTA_QOS; } STA_QOS, *PSTA_QOS;
// //
// BSS QOS data. // BSS QOS data.
// Ref: BssDscr in 8185 code. [def. in BssDscr.h] // Ref: BssDscr in 8185 code. [def. in BssDscr.h]
// //
typedef struct _BSS_QOS{ typedef struct _BSS_QOS {
QOS_MODE bdQoSMode; QOS_MODE bdQoSMode;
u8 bdWMMIEBuf[MAX_WMMELE_LENGTH]; u8 bdWMMIEBuf[MAX_WMMELE_LENGTH];
...@@ -514,7 +514,7 @@ typedef struct _BSS_QOS{ ...@@ -514,7 +514,7 @@ typedef struct _BSS_QOS{
QOS_INFO_FIELD QosInfoField; QOS_INFO_FIELD QosInfoField;
AC_PARAM AcParameter[4]; AC_PARAM AcParameter[4];
}BSS_QOS, *PBSS_QOS; } BSS_QOS, *PBSS_QOS;
// //
...@@ -522,12 +522,12 @@ typedef struct _BSS_QOS{ ...@@ -522,12 +522,12 @@ typedef struct _BSS_QOS{
//#define QoSCtl (( (Adapter->bRegQoS) && (Adapter->dot11QoS.QoSMode &(QOS_EDCA|QOS_HCCA)) ) ?sQoSCtlLng:0) //#define QoSCtl (( (Adapter->bRegQoS) && (Adapter->dot11QoS.QoSMode &(QOS_EDCA|QOS_HCCA)) ) ?sQoSCtlLng:0)
// //
#define sQoSCtlLng 2 #define sQoSCtlLng 2
#define QOS_CTRL_LEN(_QosMode) ((_QosMode > QOS_DISABLE)? sQoSCtlLng : 0) #define QOS_CTRL_LEN(_QosMode) ((_QosMode > QOS_DISABLE) ? sQoSCtlLng : 0)
//Added by joseph //Added by joseph
//UP Mapping to AC, using in MgntQuery_SequenceNumber() and maybe for DSCP //UP Mapping to AC, using in MgntQuery_SequenceNumber() and maybe for DSCP
//#define UP2AC(up) ((up<3)?((up==0)?1:0):(up>>1)) //#define UP2AC(up) ((up<3)?((up==0)?1:0):(up>>1))
#define IsACValid(ac) ((ac<=7 )?true:false ) #define IsACValid(ac) ((ac <= 7) ? true : false)
#endif // #ifndef __INC_QOS_TYPE_H #endif // #ifndef __INC_QOS_TYPE_H
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment