Skip to contentSkip to conversation

staging:rtl8192u: rtl819x_Qos.h style changes

PATCH New John Whitmore 1 participant 15 messages Jul 31, 2018 Staging

lore
Share & tools
lore
#0 lore raw

cover staging:rtl8192u: rtl819x_Qos.h style changes

The first patch is a change to the block comment on the function cmpk_counttxstatistic(). The function is a static to the file so the block comment could be trimmed. Unfortunately I could find no useful information in the block comment, apart from function name and list of parameter types, which is included in the declaration. As a result I totally cut the block comment.

All the remaining 13 patches fix coding style and checkpatch issues with the file rtl819x_Qos.h. Possibly the major change is the truncation of a number of unions to the structure which is actually being used.

John Whitmore (14):
staging:rtl8192u: Clean cmpk_counttxstatistic() comments - Style staging:rtl8192u: Remove union from aci_aifsn - Style staging:rtl8192u: Remove union from qos_tsinfo - Style staging:rtl8192u: Rename members of struct qos_tsinfo - Style staging:rtl8192u: Refactor union TSPEC_BODY - Style staging:rtl8192u: Rename TSInfo - Style staging:rtl8192u: Rename tspec_body members - Style staging:rtl8192u: Remove commented out code - Style staging:rtl8192u: Move QOS_TCLAS to rtl819x_TS.h - Style staging:rtl8192u: rename OCTET_STRING - Style staging:rtl8192u: Rename octet_string members - Style staging:rtl8192u: Remove unused UP2AC - Style staging:rtl8192u: Rename IsACValid and add parenthesis - Style staging:rtl8192u: Change clock comment - Style

 .../staging/rtl8192u/ieee80211/ieee80211.h    |   4 +-
 .../rtl8192u/ieee80211/ieee80211_softmac.c    |  40 ++--
 .../rtl8192u/ieee80211/rtl819x_BAProc.c       |   2 +-
 .../rtl8192u/ieee80211/rtl819x_HTProc.c       |   4 +-
 .../staging/rtl8192u/ieee80211/rtl819x_Qos.h  | 207 ++++++------------
 .../staging/rtl8192u/ieee80211/rtl819x_TS.h   |  53 ++++-
 .../rtl8192u/ieee80211/rtl819x_TSProc.c       |  36 +--
 drivers/staging/rtl8192u/r8192U_dm.c          |   4 +-
 drivers/staging/rtl8192u/r819xU_cmdpkt.c      |  18 --
 9 files changed, 160 insertions(+), 208 deletions(-)
Signature · 1 line
2.18.0
#1 lore raw

PATCH 1/14 staging:rtl8192u: Clean cmpk_counttxstatistic() comments - Style

The only useful piece of information in the header comment of this static function was the name of the function and parameters. That is not useful information, given that they are in the C Source of the function declaration, a few lines below the comment. The block comment has been removed.

This is a coding style change, there should be no impact on runtime code execution.

---
 drivers/staging/rtl8192u/r819xU_cmdpkt.c | 18 ------------------
 1 file changed, 18 deletions(-)
drivers/staging/rtl8192u/r819xU_cmdpkt.c +0 -18
index d2293a335ed1..900f7866d381 100644
@@ -60,24 +60,6 @@ rt_status SendTxCommandPacket(struct net_device *dev, void *pData, u32 DataLen)
 	return RT_STATUS_SUCCESS;
 }
 
-/*-----------------------------------------------------------------------------
- * Function:    cmpk_counttxstatistic()
- *
- * Overview:
- *
- * Input:       PADAPTER	pAdapter
- *              STRUCT CMD_PKT_TX_FEEDBACK	*psTx_FB
- *
- * Output:      NONE
- *
- * Return:      NONE
- *
- * Revised History:
- *  When		Who	Remark
- *  05/12/2008		amy	Create Version 0 porting from windows code.
- *
- *---------------------------------------------------------------------------
- */
 static void cmpk_count_txstatistic(struct net_device *dev, struct cmd_pkt_tx_feedback *pstx_fb)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
Signature · 1 line
2.18.0
#2 lore raw

PATCH 2/14 staging:rtl8192u: Remove union from aci_aifsn - Style

In reply to John Whitmore

The union aci_aifsn is not used as a union, but only as a struct. The union seems to have been used to ensure that the size of the structure was only a single byte. That size is set by the bitfield structure, adding a union with an unused byte adds nothing.

The union has been removed. This is a coding style change and should not impact runtime code execution.

---
 .../staging/rtl8192u/ieee80211/rtl819x_Qos.h  | 23 ++++++++-----------
 drivers/staging/rtl8192u/r8192U_dm.c          |  4 ++--
 2 files changed, 12 insertions(+), 15 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h +10 -13
index 810d81addcf6..1f16d1692c03 100644
@@ -2,19 +2,16 @@
 #ifndef __INC_QOS_TYPE_H
 #define __INC_QOS_TYPE_H
 
-//
-// ACI/AIFSN Field.
-// Ref: WMM spec 2.2.2: WME Parameter Element, p.12.
-//
-union aci_aifsn {
-	u8	char_data;
-
-	struct {
-		u8	aifsn:4;
-		u8	acm:1;
-		u8	aci:2;
-		u8	reserved:1;
-	} f;	// Field
+/*
+ * ACI/AIFSN Field.
+ * Ref: WMM spec 2.2.2: WME Parameter Element, p.12.
+ * Note: 1 Byte Length
+ */
+struct aci_aifsn {
+	u8	aifsn:4;
+	u8	acm:1;
+	u8	aci:2;
+	u8:1;
 };
 
 //
drivers/staging/rtl8192u/r8192U_dm.c +2 -2
index 92ba1fdd9831..0ba1b1e2bc6e 100644
@@ -2242,12 +2242,12 @@ static void dm_check_edca_turbo(
 			{
 				/*  TODO:  Modified this part and try to set acm control in only 1 IO processing!! */
 
-				union aci_aifsn *pAciAifsn = (union aci_aifsn *)&(qos_parameters->aifs[0]);
+				struct aci_aifsn *pAciAifsn = (struct aci_aifsn *)&(qos_parameters->aifs[0]);
 				u8		AcmCtrl;
 
 				read_nic_byte(dev, AcmHwCtrl, &AcmCtrl);
 
-				if (pAciAifsn->f.acm) { /*  acm bit is 1. */
+				if (pAciAifsn->acm) { /*  acm bit is 1. */
 					AcmCtrl |= AcmHw_BeqEn;
 				} else {	/* ACM bit is 0. */
 					AcmCtrl &= (~AcmHw_BeqEn);
Signature · 1 line
2.18.0
#3 lore raw

PATCH 3/14 staging:rtl8192u: Remove union from qos_tsinfo - Style

In reply to John Whitmore

The union is never used as a union but only as a bitfield struct. One side of the union (u8 charData[3];) Only seems to be present to ensure that the structures size is 3 bytes in length. That length, of the structure is dictated by the largest element of the union, so the byte array only dictates size if it's the largest element of the union. The byte array and union add nothing.

The union has therefore been removed and the structure and access to the structure simplified.

Additionally since one of the bitfield variables (ucAccessPolicy) spans a byte boundary the base type of the bitfield has been changed from u8 to u16. Compilers have probably moved on from having an issue with this, call it OCD.

The changes are coding style in nature and should not impact runtime code execution.

---
 .../rtl8192u/ieee80211/rtl819x_BAProc.c       |  2 +-
 .../staging/rtl8192u/ieee80211/rtl819x_Qos.h  | 40 +++++++++----------
 .../rtl8192u/ieee80211/rtl819x_TSProc.c       | 26 ++++++------
 3 files changed, 33 insertions(+), 35 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +1 -1
index e296813203aa..4e8bcc25ad2c 100644
@@ -626,7 +626,7 @@ TsInitAddBA(
 	pBA->DialogToken++;						// DialogToken: Only keep the latest dialog token
 	pBA->BaParamSet.field.AMSDU_Support = 0;	// Do not support A-MSDU with A-MPDU now!!
 	pBA->BaParamSet.field.BAPolicy = Policy;	// Policy: Delayed or Immediate
-	pBA->BaParamSet.field.TID = pTS->ts_common_info.t_spec.f.TSInfo.field.ucTSID;	// TID
+	pBA->BaParamSet.field.TID = pTS->ts_common_info.t_spec.f.TSInfo.ucTSID;	// TID
 	// BufferSize: This need to be set according to A-MPDU vector
 	pBA->BaParamSet.field.BufferSize = 32;		// BufferSize: This need to be set according to A-MPDU vector
 	pBA->BaTimeoutValue = 0;					// Timeout value: Set 0 to disable Timer
drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h +19 -21
index 1f16d1692c03..4faa89db8355 100644
@@ -26,26 +26,24 @@ enum direction_value {
 };
 
 
-//
-// TS Info field in WMM TSPEC Element.
-// Ref:
-//	1. WMM spec 2.2.11: WME TSPEC Element, p.18.
-//	2. 8185 QoS code: QOS_TSINFO [def. in QoS_mp.h]
-//
-union qos_tsinfo {
-	u8		charData[3];
-	struct {
-		u8		ucTrafficType:1;			//WMM is reserved
-		u8		ucTSID:4;
-		u8		ucDirection:2;
-		u8		ucAccessPolicy:2;	//WMM: bit8=0, bit7=1
-		u8		ucAggregation:1;		//WMM is reserved
-		u8		ucPSB:1;				//WMMSA is APSD
-		u8		ucUP:3;
-		u8		ucTSInfoAckPolicy:2;		//WMM is reserved
-		u8		ucSchedule:1;			//WMM is reserved
-		u8		ucReserved:7;
-	} field;
+/*
+ * TS Info field in WMM TSPEC Element.
+ * Ref:
+ *	1. WMM spec 2.2.11: WME TSPEC Element, p.18.
+ *	2. 8185 QoS code: QOS_TSINFO [def. in QoS_mp.h]
+ * Note: sizeof 3 Bytes
+ */
+struct qos_tsinfo {
+	u16		ucTrafficType:1;	//WMM is reserved
+	u16		ucTSID:4;
+	u16		ucDirection:2;
+	u16		ucAccessPolicy:2;	//WMM: bit8=0, bit7=1
+	u16		ucAggregation:1;	//WMM is reserved
+	u16		ucPSB:1;		//WMMSA is APSD
+	u16		ucUP:3;
+	u16		ucTSInfoAckPolicy:2;	//WMM is reserved
+	u8		ucSchedule:1;		//WMM is reserved
+	u8		ucReserved:7;
 };
 
 //
@@ -56,7 +54,7 @@ typedef union _TSPEC_BODY {
 	u8		charData[55];
 
 	struct {
-		union qos_tsinfo	TSInfo;	//u8	TSInfo[3];
+		struct qos_tsinfo	TSInfo;	//u8	TSInfo[3];
 		u16	NominalMSDUsize;
 		u16	MaxMSDUsize;
 		u32	MinServiceItv;
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +13 -13
index c21bf3d3b242..39a074621b3b 100644
@@ -246,10 +246,10 @@ static struct ts_common_info *SearchAdmitTRStream(struct ieee80211_device *ieee,
 		if (!search_dir[dir])
 			continue;
 		list_for_each_entry(pRet, psearch_list, list){
-	//		IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:%pM, TID:%d, dir:%d\n", pRet->Addr, pRet->TSpec.f.TSInfo.field.ucTSID, pRet->TSpec.f.TSInfo.field.ucDirection);
+	//		IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:%pM, TID:%d, dir:%d\n", pRet->Addr, pRet->TSpec.f.TSInfo.ucTSID, pRet->TSpec.f.TSInfo.ucDirection);
 			if (memcmp(pRet->addr, Addr, 6) == 0)
-				if (pRet->t_spec.f.TSInfo.field.ucTSID == TID)
-					if(pRet->t_spec.f.TSInfo.field.ucDirection == dir) {
+				if (pRet->t_spec.f.TSInfo.ucTSID == TID)
+					if(pRet->t_spec.f.TSInfo.ucDirection == dir) {
 	//					printk("Bingo! got it\n");
 						break;
 					}
@@ -355,7 +355,7 @@ bool GetTs(
 			// For HCCA or WMMSA, TS cannot be addmit without negotiation.
 			//
 			TSPEC_BODY	TSpec;
-			union qos_tsinfo	*pTSInfo = &TSpec.f.TSInfo;
+			struct qos_tsinfo	*pTSInfo = &TSpec.f.TSInfo;
 			struct list_head	*pUnusedList =
 								(TxRxSelect == TX_DIR)?
 								(&ieee->Tx_TS_Unused_List):
@@ -383,15 +383,15 @@ bool GetTs(
 
 				IEEE80211_DEBUG(IEEE80211_DL_TS, "to init current TS, UP:%d, Dir:%d, addr:%pM\n", UP, Dir, Addr);
 				// Prepare TS Info releated field
-				pTSInfo->field.ucTrafficType = 0;			// Traffic type: WMM is reserved in this field
-				pTSInfo->field.ucTSID = UP;			// TSID
-				pTSInfo->field.ucDirection = Dir;			// Direction: if there is DirectLink, this need additional consideration.
-				pTSInfo->field.ucAccessPolicy = 1;		// Access policy
-				pTSInfo->field.ucAggregation = 0;		// Aggregation
-				pTSInfo->field.ucPSB = 0;				// Aggregation
-				pTSInfo->field.ucUP = UP;				// User priority
-				pTSInfo->field.ucTSInfoAckPolicy = 0;		// Ack policy
-				pTSInfo->field.ucSchedule = 0;			// Schedule
+				pTSInfo->ucTrafficType = 0;		// Traffic type: WMM is reserved in this field
+				pTSInfo->ucTSID = UP;			// TSID
+				pTSInfo->ucDirection = Dir;		// Direction: if there is DirectLink, this need additional consideration.
+				pTSInfo->ucAccessPolicy = 1;		// Access policy
+				pTSInfo->ucAggregation = 0;		// Aggregation
+				pTSInfo->ucPSB = 0;			// Aggregation
+				pTSInfo->ucUP = UP;			// User priority
+				pTSInfo->ucTSInfoAckPolicy = 0;		// Ack policy
+				pTSInfo->ucSchedule = 0;		// Schedule
 
 				MakeTSEntry(*ppTS, Addr, &TSpec, NULL, 0, 0);
 				AdmitTS(ieee, *ppTS, 0);
Signature · 1 line
2.18.0
#4 lore raw

PATCH 4/14 staging:rtl8192u: Rename members of struct qos_tsinfo - Style

In reply to John Whitmore

The member variables of struct qos_tsinfo all cause checkpatch issues with CamelCase naming. As the variables are used in so few places the changes are combined into this single patch.

Additionally the member variable usReserved is never used in code so has been removed.

These are all coding style changes which should have no impact on runtime code execution.

---
 .../rtl8192u/ieee80211/rtl819x_BAProc.c       |  2 +-
 .../staging/rtl8192u/ieee80211/rtl819x_Qos.h  | 20 ++++++++---------
 .../rtl8192u/ieee80211/rtl819x_TSProc.c       | 22 +++++++++----------
 3 files changed, 22 insertions(+), 22 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +1 -1
index 4e8bcc25ad2c..96fab43c1cfe 100644
@@ -626,7 +626,7 @@ TsInitAddBA(
 	pBA->DialogToken++;						// DialogToken: Only keep the latest dialog token
 	pBA->BaParamSet.field.AMSDU_Support = 0;	// Do not support A-MSDU with A-MPDU now!!
 	pBA->BaParamSet.field.BAPolicy = Policy;	// Policy: Delayed or Immediate
-	pBA->BaParamSet.field.TID = pTS->ts_common_info.t_spec.f.TSInfo.ucTSID;	// TID
+	pBA->BaParamSet.field.TID = pTS->ts_common_info.t_spec.f.TSInfo.uc_tsid;	// TID
 	// BufferSize: This need to be set according to A-MPDU vector
 	pBA->BaParamSet.field.BufferSize = 32;		// BufferSize: This need to be set according to A-MPDU vector
 	pBA->BaTimeoutValue = 0;					// Timeout value: Set 0 to disable Timer
drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h +10 -10
index 4faa89db8355..d36a14197b4c 100644
@@ -34,16 +34,16 @@ enum direction_value {
  * Note: sizeof 3 Bytes
  */
 struct qos_tsinfo {
-	u16		ucTrafficType:1;	//WMM is reserved
-	u16		ucTSID:4;
-	u16		ucDirection:2;
-	u16		ucAccessPolicy:2;	//WMM: bit8=0, bit7=1
-	u16		ucAggregation:1;	//WMM is reserved
-	u16		ucPSB:1;		//WMMSA is APSD
-	u16		ucUP:3;
-	u16		ucTSInfoAckPolicy:2;	//WMM is reserved
-	u8		ucSchedule:1;		//WMM is reserved
-	u8		ucReserved:7;
+	u16		uc_traffic_type:1;	        //WMM is reserved
+	u16		uc_tsid:4;
+	u16		uc_direction:2;
+	u16		uc_access_policy:2;	        //WMM: bit8=0, bit7=1
+	u16		uc_aggregation:1;	        //WMM is reserved
+	u16		uc_psb:1;		        //WMMSA is APSD
+	u16		uc_up:3;
+	u16		uc_ts_info_ack_policy:2;	//WMM is reserved
+	u8		uc_schedule:1;		        //WMM is reserved
+	u8:7;
 };
 
 //
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +11 -11
index 39a074621b3b..076278dae321 100644
@@ -248,8 +248,8 @@ static struct ts_common_info *SearchAdmitTRStream(struct ieee80211_device *ieee,
 		list_for_each_entry(pRet, psearch_list, list){
 	//		IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:%pM, TID:%d, dir:%d\n", pRet->Addr, pRet->TSpec.f.TSInfo.ucTSID, pRet->TSpec.f.TSInfo.ucDirection);
 			if (memcmp(pRet->addr, Addr, 6) == 0)
-				if (pRet->t_spec.f.TSInfo.ucTSID == TID)
-					if(pRet->t_spec.f.TSInfo.ucDirection == dir) {
+				if (pRet->t_spec.f.TSInfo.uc_tsid == TID)
+					if(pRet->t_spec.f.TSInfo.uc_direction == dir) {
 	//					printk("Bingo! got it\n");
 						break;
 					}
@@ -383,15 +383,15 @@ bool GetTs(
 
 				IEEE80211_DEBUG(IEEE80211_DL_TS, "to init current TS, UP:%d, Dir:%d, addr:%pM\n", UP, Dir, Addr);
 				// Prepare TS Info releated field
-				pTSInfo->ucTrafficType = 0;		// Traffic type: WMM is reserved in this field
-				pTSInfo->ucTSID = UP;			// TSID
-				pTSInfo->ucDirection = Dir;		// Direction: if there is DirectLink, this need additional consideration.
-				pTSInfo->ucAccessPolicy = 1;		// Access policy
-				pTSInfo->ucAggregation = 0;		// Aggregation
-				pTSInfo->ucPSB = 0;			// Aggregation
-				pTSInfo->ucUP = UP;			// User priority
-				pTSInfo->ucTSInfoAckPolicy = 0;		// Ack policy
-				pTSInfo->ucSchedule = 0;		// Schedule
+				pTSInfo->uc_traffic_type = 0;		// Traffic type: WMM is reserved in this field
+				pTSInfo->uc_tsid = UP;			// TSID
+				pTSInfo->uc_direction = Dir;		// Direction: if there is DirectLink, this need additional consideration.
+				pTSInfo->uc_access_policy = 1;		// Access policy
+				pTSInfo->uc_aggregation = 0;		// Aggregation
+				pTSInfo->uc_psb = 0;			// Aggregation
+				pTSInfo->uc_up = UP;			// User priority
+				pTSInfo->uc_ts_info_ack_policy = 0;	// Ack policy
+				pTSInfo->uc_schedule = 0;		// Schedule
 
 				MakeTSEntry(*ppTS, Addr, &TSpec, NULL, 0, 0);
 				AdmitTS(ieee, *ppTS, 0);
Signature · 1 line
2.18.0
#5 lore raw

PATCH 5/14 staging:rtl8192u: Refactor union TSPEC_BODY - Style

In reply to John Whitmore

The union TSPEC_BODY is never used as a union. The union comprises an array of bytes and a bitfield structure, both of which are 55 bytes in length, but the byte array is never used. As a result the union has been truncated to the bitfield struct, which is actually used.

Additionally the typedef has been removed from the structure to clear the checkpatch issue with defining new types. Additionally the name has been changed to lowercase to comply with coding style.

These changes are all coding style changes which should have no impact on runtime code execution.

---
 .../rtl8192u/ieee80211/rtl819x_BAProc.c       |  2 +-
 .../staging/rtl8192u/ieee80211/rtl819x_Qos.h  | 49 +++++++++----------
 .../staging/rtl8192u/ieee80211/rtl819x_TS.h   |  2 +-
 .../rtl8192u/ieee80211/rtl819x_TSProc.c       | 16 +++---
 4 files changed, 33 insertions(+), 36 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +1 -1
index 96fab43c1cfe..d35f10c695e4 100644
@@ -626,7 +626,7 @@ TsInitAddBA(
 	pBA->DialogToken++;						// DialogToken: Only keep the latest dialog token
 	pBA->BaParamSet.field.AMSDU_Support = 0;	// Do not support A-MSDU with A-MPDU now!!
 	pBA->BaParamSet.field.BAPolicy = Policy;	// Policy: Delayed or Immediate
-	pBA->BaParamSet.field.TID = pTS->ts_common_info.t_spec.f.TSInfo.uc_tsid;	// TID
+	pBA->BaParamSet.field.TID = pTS->ts_common_info.t_spec.TSInfo.uc_tsid;	// TID
 	// BufferSize: This need to be set according to A-MPDU vector
 	pBA->BaParamSet.field.BufferSize = 32;		// BufferSize: This need to be set according to A-MPDU vector
 	pBA->BaTimeoutValue = 0;					// Timeout value: Set 0 to disable Timer
drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h +23 -26

55 lines not on this page · raw message

drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h +1 -1
index f5e79853fe9c..a9f865f810ce 100644
@@ -19,7 +19,7 @@ struct ts_common_info {
 	struct timer_list		setup_timer;
 	struct timer_list		inact_timer;
 	u8				addr[6];
-	TSPEC_BODY			t_spec;
+	struct tspec_body		t_spec;
 	QOS_TCLAS			t_class[TCLAS_NUM];
 	u8				t_clas_proc;
 	u8				t_clas_num;
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +8 -8
index 076278dae321..bd2b4e5dfa60 100644
@@ -104,7 +104,7 @@ static void TsAddBaProcess(struct timer_list *t)
 static void ResetTsCommonInfo(struct ts_common_info *pTsCommonInfo)
 {
 	eth_zero_addr(pTsCommonInfo->addr);
-	memset(&pTsCommonInfo->t_spec, 0, sizeof(TSPEC_BODY));
+	memset(&pTsCommonInfo->t_spec, 0, sizeof(struct tspec_body));
 	memset(&pTsCommonInfo->t_class, 0, sizeof(QOS_TCLAS)*TCLAS_NUM);
 	pTsCommonInfo->t_clas_proc = 0;
 	pTsCommonInfo->t_clas_num = 0;
@@ -246,10 +246,10 @@ static struct ts_common_info *SearchAdmitTRStream(struct ieee80211_device *ieee,
 		if (!search_dir[dir])
 			continue;
 		list_for_each_entry(pRet, psearch_list, list){
-	//		IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:%pM, TID:%d, dir:%d\n", pRet->Addr, pRet->TSpec.f.TSInfo.ucTSID, pRet->TSpec.f.TSInfo.ucDirection);
+	//		IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:%pM, TID:%d, dir:%d\n", pRet->Addr, pRet->TSpec.TSInfo.ucTSID, pRet->TSpec.TSInfo.ucDirection);
 			if (memcmp(pRet->addr, Addr, 6) == 0)
-				if (pRet->t_spec.f.TSInfo.uc_tsid == TID)
-					if(pRet->t_spec.f.TSInfo.uc_direction == dir) {
+				if (pRet->t_spec.TSInfo.uc_tsid == TID)
+					if(pRet->t_spec.TSInfo.uc_direction == dir) {
 	//					printk("Bingo! got it\n");
 						break;
 					}
@@ -265,7 +265,7 @@ static struct ts_common_info *SearchAdmitTRStream(struct ieee80211_device *ieee,
 }
 
 static void MakeTSEntry(struct ts_common_info *pTsCommonInfo, u8 *Addr,
-			PTSPEC_BODY pTSPEC, PQOS_TCLAS pTCLAS, u8 TCLAS_Num,
+			struct tspec_body *pTSPEC, PQOS_TCLAS pTCLAS, u8 TCLAS_Num,
 			u8 TCLAS_Proc)
 {
 	u8	count;
@@ -276,7 +276,7 @@ static void MakeTSEntry(struct ts_common_info *pTsCommonInfo, u8 *Addr,
 	memcpy(pTsCommonInfo->addr, Addr, 6);
 
 	if(pTSPEC != NULL)
-		memcpy((u8 *)(&(pTsCommonInfo->t_spec)), (u8 *)pTSPEC, sizeof(TSPEC_BODY));
+		memcpy((u8 *)(&(pTsCommonInfo->t_spec)), (u8 *)pTSPEC, sizeof(struct tspec_body));
 
 	for(count = 0; count < TCLAS_Num; count++)
 		memcpy((u8 *)(&(pTsCommonInfo->t_class[count])), (u8 *)pTCLAS, sizeof(QOS_TCLAS));
@@ -354,8 +354,8 @@ bool GetTs(
 			// This is for EDCA and WMM to add a new TS.
 			// For HCCA or WMMSA, TS cannot be addmit without negotiation.
 			//
-			TSPEC_BODY	TSpec;
-			struct qos_tsinfo	*pTSInfo = &TSpec.f.TSInfo;
+			struct tspec_body	TSpec;
+			struct qos_tsinfo	*pTSInfo = &TSpec.TSInfo;
 			struct list_head	*pUnusedList =
 								(TxRxSelect == TX_DIR)?
 								(&ieee->Tx_TS_Unused_List):
Signature · 1 line
2.18.0
#6 lore raw

PATCH 6/14 staging:rtl8192u: Rename TSInfo - Style

In reply to John Whitmore

Rename TSInfo, the memeber variable of struct tspec_body to ts_info. This change clears the checkpatch issue with CamelCase naming.

This is a coding style change which should not impact runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h    | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +1 -1
index d35f10c695e4..01b631c2a180 100644
@@ -626,7 +626,7 @@ TsInitAddBA(
 	pBA->DialogToken++;						// DialogToken: Only keep the latest dialog token
 	pBA->BaParamSet.field.AMSDU_Support = 0;	// Do not support A-MSDU with A-MPDU now!!
 	pBA->BaParamSet.field.BAPolicy = Policy;	// Policy: Delayed or Immediate
-	pBA->BaParamSet.field.TID = pTS->ts_common_info.t_spec.TSInfo.uc_tsid;	// TID
+	pBA->BaParamSet.field.TID = pTS->ts_common_info.t_spec.ts_info.uc_tsid;	// TID
 	// BufferSize: This need to be set according to A-MPDU vector
 	pBA->BaParamSet.field.BufferSize = 32;		// BufferSize: This need to be set according to A-MPDU vector
 	pBA->BaTimeoutValue = 0;					// Timeout value: Set 0 to disable Timer
drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h +1 -1
index a4cecf4cc756..db0392cfd6d4 100644
@@ -52,7 +52,7 @@ struct qos_tsinfo {
  * Note: sizeof 55 bytes
  */
 struct tspec_body {
-	struct qos_tsinfo	TSInfo;	//u8	TSInfo[3];
+	struct qos_tsinfo	ts_info;	//u8	TSInfo[3];
 	u16	NominalMSDUsize;
 	u16	MaxMSDUsize;
 	u32	MinServiceItv;
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +4 -4
index bd2b4e5dfa60..e0ccabadec22 100644
@@ -246,10 +246,10 @@ static struct ts_common_info *SearchAdmitTRStream(struct ieee80211_device *ieee,
 		if (!search_dir[dir])
 			continue;
 		list_for_each_entry(pRet, psearch_list, list){
-	//		IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:%pM, TID:%d, dir:%d\n", pRet->Addr, pRet->TSpec.TSInfo.ucTSID, pRet->TSpec.TSInfo.ucDirection);
+	//		IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:%pM, TID:%d, dir:%d\n", pRet->Addr, pRet->TSpec.ts_info.ucTSID, pRet->TSpec.ts_info.ucDirection);
 			if (memcmp(pRet->addr, Addr, 6) == 0)
-				if (pRet->t_spec.TSInfo.uc_tsid == TID)
-					if(pRet->t_spec.TSInfo.uc_direction == dir) {
+				if (pRet->t_spec.ts_info.uc_tsid == TID)
+					if(pRet->t_spec.ts_info.uc_direction == dir) {
 	//					printk("Bingo! got it\n");
 						break;
 					}
@@ -355,7 +355,7 @@ bool GetTs(
 			// For HCCA or WMMSA, TS cannot be addmit without negotiation.
 			//
 			struct tspec_body	TSpec;
-			struct qos_tsinfo	*pTSInfo = &TSpec.TSInfo;
+			struct qos_tsinfo	*pTSInfo = &TSpec.ts_info;
 			struct list_head	*pUnusedList =
 								(TxRxSelect == TX_DIR)?
 								(&ieee->Tx_TS_Unused_List):
Signature · 1 line
2.18.0
#7 lore raw

PATCH 7/14 staging:rtl8192u: Rename tspec_body members - Style

In reply to John Whitmore

The member variables of the tspec_body have been renamed to clear the checkpatch issue with CamelCase naming. As these member variables are never used in the code the changes are combined into this single patch.

These changes are coding style changes which should have no impact on runtime code execution.

---
 .../staging/rtl8192u/ieee80211/rtl819x_Qos.h  | 30 +++++++++----------
 1 file changed, 15 insertions(+), 15 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h +15 -15
index db0392cfd6d4..025810c93160 100644
@@ -53,21 +53,21 @@ struct qos_tsinfo {
  */
 struct tspec_body {
 	struct qos_tsinfo	ts_info;	//u8	TSInfo[3];
-	u16	NominalMSDUsize;
-	u16	MaxMSDUsize;
-	u32	MinServiceItv;
-	u32	MaxServiceItv;
-	u32	InactivityItv;
-	u32	SuspenItv;
-	u32	ServiceStartTime;
-	u32	MinDataRate;
-	u32	MeanDataRate;
-	u32	PeakDataRate;
-	u32	MaxBurstSize;
-	u32	DelayBound;
-	u32	MinPhyRate;
-	u16	SurplusBandwidthAllowance;
-	u16	MediumTime;
+	u16	nominal_msd_usize;
+	u16	max_msd_usize;
+	u32	min_service_itv;
+	u32	max_service_itv;
+	u32	inactivity_itv;
+	u32	suspen_itv;
+	u32	service_start_time;
+	u32	min_data_rate;
+	u32	mean_data_rate;
+	u32	peak_data_rate;
+	u32	max_burst_size;
+	u32	delay_bound;
+	u32	min_phy_rate;
+	u16	surplus_bandwidth_allowance;
+	u16	medium_time;
 };
 
 //typedef struct _TCLASS{
Signature · 1 line
2.18.0
#8 lore raw

PATCH 8/14 staging:rtl8192u: Remove commented out code - Style

In reply to John Whitmore

A number of structures have been commented out of code. Obviously they are not used and as a result have been removed from the code.

This is a coding style change which should have no impact on runtime code execution.

---
 .../staging/rtl8192u/ieee80211/rtl819x_Qos.h  | 19 -------------------
 1 file changed, 19 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h +0 -19
index 025810c93160..a4b8b577cf79 100644
@@ -25,7 +25,6 @@ enum direction_value {
 	DIR_BI_DIR		= 3,		// 0x11	// Bi-Direction
 };
 
-
 /*
  * TS Info field in WMM TSPEC Element.
  * Ref:
@@ -70,9 +69,6 @@ struct tspec_body {
 	u16	medium_time;
 };
 
-//typedef struct _TCLASS{
-// TODO
-//} TCLASS, *PTCLASS;
 typedef union _QOS_TCLAS {
 
 	struct _TYPE_GENERAL {
@@ -124,21 +120,6 @@ typedef union _QOS_TCLAS {
 	} TYPE2_8021Q;
 } QOS_TCLAS, *PQOS_TCLAS;
 
-//typedef struct _U_APSD{
-//- TriggerEnable [4]
-//- MaxSPLength
-//- HighestAcBuffered
-//} U_APSD, *PU_APSD;
-
-//joseph TODO:
-//	UAPSD function should be implemented by 2 data structure
-//	"Qos control field" and "Qos info field"
-//typedef struct _QOS_UAPSD{
-//	u8			bTriggerEnable[4];
-//	u8			MaxSPLength;
-//	u8			HighestBufAC;
-//} QOS_UAPSD, *PQOS_APSD;
-
 //----------------------------------------------------------------------------
 //      802.11 Management frame Status Code field
 //----------------------------------------------------------------------------
Signature · 1 line
2.18.0
#9 lore raw

PATCH 9/14 staging:rtl8192u: Move QOS_TCLAS to rtl819x_TS.h - Style

In reply to John Whitmore

Move the union QOS_TCLAS from the header file rtl819x_Qos.h to header file rtl819x_TS.h, where the structure is actually used, as the member of another structure.

This is a coding style change, which should have no impact on runtime code execution.

---
 .../staging/rtl8192u/ieee80211/rtl819x_Qos.h  | 51 -------------------
 .../staging/rtl8192u/ieee80211/rtl819x_TS.h   | 51 +++++++++++++++++++
 2 files changed, 51 insertions(+), 51 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h +0 -51
index a4b8b577cf79..fb055a848d59 100644
@@ -69,57 +69,6 @@ struct tspec_body {
 	u16	medium_time;
 };
 
-typedef union _QOS_TCLAS {
-
-	struct _TYPE_GENERAL {
-		u8		Priority;
-		u8		ClassifierType;
-		u8		Mask;
-	} TYPE_GENERAL;
-
-	struct _TYPE0_ETH {
-		u8		Priority;
-		u8		ClassifierType;
-		u8		Mask;
-		u8		SrcAddr[6];
-		u8		DstAddr[6];
-		u16		Type;
-	} TYPE0_ETH;
-
-	struct _TYPE1_IPV4 {
-		u8		Priority;
-		u8		ClassifierType;
-		u8		Mask;
-		u8		Version;
-		u8		SrcIP[4];
-		u8		DstIP[4];
-		u16		SrcPort;
-		u16		DstPort;
-		u8		DSCP;
-		u8		Protocol;
-		u8		Reserved;
-	} TYPE1_IPV4;
-
-	struct _TYPE1_IPV6 {
-		u8		Priority;
-		u8		ClassifierType;
-		u8		Mask;
-		u8		Version;
-		u8		SrcIP[16];
-		u8		DstIP[16];
-		u16		SrcPort;
-		u16		DstPort;
-		u8		FlowLabel[3];
-	} TYPE1_IPV6;
-
-	struct _TYPE2_8021Q {
-		u8		Priority;
-		u8		ClassifierType;
-		u8		Mask;
-		u16		TagType;
-	} TYPE2_8021Q;
-} QOS_TCLAS, *PQOS_TCLAS;
-
 //----------------------------------------------------------------------------
 //      802.11 Management frame Status Code field
 //----------------------------------------------------------------------------
drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h +51 -0

57 lines not on this page · raw message

Signature · 1 line
2.18.0
#10 lore raw

PATCH 10/14 staging:rtl8192u: rename OCTET_STRING - Style

In reply to John Whitmore

Rename the structure OCTET_STRING to octet_string. This is to comply with the coding style of using lowercase for types. In addition the typedef directive is removed to clear the checkpatch issue with defining new types.

These are coding style changes which should have no impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/ieee80211.h         | 4 ++--
 drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 6 +++---
 drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h       | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211.h +2 -2
index 326a1e47bade..3cfeac0d7214 100644
@@ -1543,14 +1543,14 @@ typedef struct _RT_POWER_SAVE_CONTROL {
 	bool				bTmpFilterHiddenAP;
 	bool				bTmpUpdateParms;
 	u8					tmpSsidBuf[33];
-	OCTET_STRING			tmpSsid2Scan;
+	struct octet_string			tmpSsid2Scan;
 	bool				bTmpSsid2Scan;
 	u8					tmpNetworkType;
 	u8					tmpChannelNumber;
 	u16					tmpBcnPeriod;
 	u8					tmpDtimPeriod;
 	u16					tmpmCap;
-	OCTET_STRING			tmpSuppRateSet;
+	struct octet_string			tmpSuppRateSet;
 	u8					tmpSuppRateBuf[MAX_NUM_RATES];
 	bool				bTmpSuppRate;
 	IbssParms				tmpIbpm;
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +3 -3
index ca3a35b8ac07..706b4419e643 100644
@@ -1063,7 +1063,7 @@ ieee80211_association_req(struct ieee80211_network *beacon,
 	if (beacon->bCkipSupported) {
 		static u8	AironetIeOui[] = {0x00, 0x01, 0x66}; // "4500-client"
 		u8	CcxAironetBuf[30];
-		OCTET_STRING	osCcxAironetIE;
+		struct octet_string	osCcxAironetIE;
 
 		memset(CcxAironetBuf, 0, 30);
 		osCcxAironetIE.Octet = CcxAironetBuf;
@@ -1087,7 +1087,7 @@ ieee80211_association_req(struct ieee80211_network *beacon,
 
 	if (beacon->bCcxRmEnable) {
 		static u8 CcxRmCapBuf[] = {0x00, 0x40, 0x96, 0x01, 0x01, 0x00};
-		OCTET_STRING osCcxRmCap;
+		struct octet_string osCcxRmCap;
 
 		osCcxRmCap.Octet = CcxRmCapBuf;
 		osCcxRmCap.Length = sizeof(CcxRmCapBuf);
@@ -1100,7 +1100,7 @@ ieee80211_association_req(struct ieee80211_network *beacon,
 
 	if (beacon->BssCcxVerNumber >= 2) {
 		u8			CcxVerNumBuf[] = {0x00, 0x40, 0x96, 0x03, 0x00};
-		OCTET_STRING	osCcxVerNum;
+		struct octet_string	osCcxVerNum;
 		CcxVerNumBuf[4] = beacon->BssCcxVerNumber;
 		osCcxVerNum.Octet = CcxVerNumBuf;
 		osCcxVerNum.Length = sizeof(CcxVerNumBuf);
drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h +2 -2
index fb055a848d59..531a3e22e799 100644
@@ -72,10 +72,10 @@ struct tspec_body {
 //----------------------------------------------------------------------------
 //      802.11 Management frame Status Code field
 //----------------------------------------------------------------------------
-typedef struct _OCTET_STRING {
+struct octet_string {
 	u8		*Octet;
 	u16             Length;
-} OCTET_STRING, *POCTET_STRING;
+};
 
 //Added by joseph
 //UP Mapping to AC, using in MgntQuery_SequenceNumber() and maybe for DSCP
Signature · 1 line
2.18.0
#11 lore raw

PATCH 11/14 staging:rtl8192u: Rename octet_string members - Style

In reply to John Whitmore

Rename the structure octet_string's member variables Octet to octet and Length to length. This change clears the checkpatch issue with CamelCase naming of variables.

This is purely a coding style change which should have no impact on runtime code execution.

---
 .../rtl8192u/ieee80211/ieee80211_softmac.c    | 34 +++++++++----------
 .../rtl8192u/ieee80211/rtl819x_HTProc.c       |  4 +--
 .../staging/rtl8192u/ieee80211/rtl819x_Qos.h  |  4 +--
 3 files changed, 21 insertions(+), 21 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +17 -17
index 706b4419e643..51cb5e4658b0 100644
@@ -1066,49 +1066,49 @@ ieee80211_association_req(struct ieee80211_network *beacon,
 		struct octet_string	osCcxAironetIE;
 
 		memset(CcxAironetBuf, 0, 30);
-		osCcxAironetIE.Octet = CcxAironetBuf;
-		osCcxAironetIE.Length = sizeof(CcxAironetBuf);
+		osCcxAironetIE.octet = CcxAironetBuf;
+		osCcxAironetIE.length = sizeof(CcxAironetBuf);
 		//
 		// Ref. CCX test plan v3.61, 3.2.3.1 step 13.
 		// We want to make the device type as "4500-client". 060926, by CCW.
 		//
-		memcpy(osCcxAironetIE.Octet, AironetIeOui, sizeof(AironetIeOui));
+		memcpy(osCcxAironetIE.octet, AironetIeOui, sizeof(AironetIeOui));
 
 		// CCX1 spec V1.13, A01.1 CKIP Negotiation (page23):
 		// "The CKIP negotiation is started with the associate request from the client to the access point,
 		//  containing an Aironet element with both the MIC and KP bits set."
-		osCcxAironetIE.Octet[IE_CISCO_FLAG_POSITION] |= (SUPPORT_CKIP_PK | SUPPORT_CKIP_MIC);
+		osCcxAironetIE.octet[IE_CISCO_FLAG_POSITION] |= (SUPPORT_CKIP_PK | SUPPORT_CKIP_MIC);
 		tag = skb_put(skb, ckip_ie_len);
 		*tag++ = MFIE_TYPE_AIRONET;
-		*tag++ = osCcxAironetIE.Length;
-		memcpy(tag, osCcxAironetIE.Octet, osCcxAironetIE.Length);
-		tag += osCcxAironetIE.Length;
+		*tag++ = osCcxAironetIE.length;
+		memcpy(tag, osCcxAironetIE.octet, osCcxAironetIE.length);
+		tag += osCcxAironetIE.length;
 	}
 
 	if (beacon->bCcxRmEnable) {
 		static u8 CcxRmCapBuf[] = {0x00, 0x40, 0x96, 0x01, 0x01, 0x00};
 		struct octet_string osCcxRmCap;
 
-		osCcxRmCap.Octet = CcxRmCapBuf;
-		osCcxRmCap.Length = sizeof(CcxRmCapBuf);
+		osCcxRmCap.octet = CcxRmCapBuf;
+		osCcxRmCap.length = sizeof(CcxRmCapBuf);
 		tag = skb_put(skb, ccxrm_ie_len);
 		*tag++ = MFIE_TYPE_GENERIC;
-		*tag++ = osCcxRmCap.Length;
-		memcpy(tag, osCcxRmCap.Octet, osCcxRmCap.Length);
-		tag += osCcxRmCap.Length;
+		*tag++ = osCcxRmCap.length;
+		memcpy(tag, osCcxRmCap.octet, osCcxRmCap.length);
+		tag += osCcxRmCap.length;
 	}
 
 	if (beacon->BssCcxVerNumber >= 2) {
 		u8			CcxVerNumBuf[] = {0x00, 0x40, 0x96, 0x03, 0x00};
 		struct octet_string	osCcxVerNum;
 		CcxVerNumBuf[4] = beacon->BssCcxVerNumber;
-		osCcxVerNum.Octet = CcxVerNumBuf;
-		osCcxVerNum.Length = sizeof(CcxVerNumBuf);
+		osCcxVerNum.octet = CcxVerNumBuf;
+		osCcxVerNum.length = sizeof(CcxVerNumBuf);
 		tag = skb_put(skb, cxvernum_ie_len);
 		*tag++ = MFIE_TYPE_GENERIC;
-		*tag++ = osCcxVerNum.Length;
-		memcpy(tag, osCcxVerNum.Octet, osCcxVerNum.Length);
-		tag += osCcxVerNum.Length;
+		*tag++ = osCcxVerNum.length;
+		memcpy(tag, osCcxVerNum.octet, osCcxVerNum.length);
+		tag += osCcxVerNum.length;
 	}
 	//HT cap element
 	if (ieee->pHTInfo->bCurrentHTSupport && ieee->pHTInfo->bEnableHT) {
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +2 -2
index 264d15fbcc6b..b948eae5909d 100644
@@ -738,10 +738,10 @@ void HTConstructRT2RTAggElement(struct ieee80211_device *ieee, u8 *posRT2RTAgg,
 	   section of code.
 	if(IS_UNDER_11N_AES_MODE(Adapter))
 	{
-		posRT2RTAgg->Octet[5] |= RT_HT_CAP_USE_AMPDU;
+		posRT2RTAgg->octet[5] |= RT_HT_CAP_USE_AMPDU;
 	}else
 	{
-		posRT2RTAgg->Octet[5] &= 0xfb;
+		posRT2RTAgg->octet[5] &= 0xfb;
 	}
 	*/
 #else
drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h +2 -2
index 531a3e22e799..50b05ee52210 100644
@@ -73,8 +73,8 @@ struct tspec_body {
 //      802.11 Management frame Status Code field
 //----------------------------------------------------------------------------
 struct octet_string {
-	u8		*Octet;
-	u16             Length;
+	u8		*octet;
+	u16             length;
 };
 
 //Added by joseph
Signature · 1 line
2.18.0
#12 lore raw

PATCH 12/14 staging:rtl8192u: Remove unused UP2AC - Style

In reply to John Whitmore

The macro UP2AC is commented out of the header file so the macro and its associated comment are removed.

This is a coding style change which should have no impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h | 3 ---
 1 file changed, 3 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h +0 -3
index 50b05ee52210..59a60f86607c 100644
@@ -77,9 +77,6 @@ struct octet_string {
 	u16             length;
 };
 
-//Added by joseph
-//UP Mapping to AC, using in MgntQuery_SequenceNumber() and maybe for DSCP
-//#define UP2AC(up)			((up<3)?((up==0)?1:0):(up>>1))
 #define IsACValid(ac)			((ac <= 7) ? true : false)
 
 #endif // #ifndef __INC_QOS_TYPE_H
Signature · 1 line
2.18.0
#13 lore raw

PATCH 13/14 staging:rtl8192u: Rename IsACValid and add parenthesis - Style

In reply to John Whitmore

The macro IsACValid is renamed to resolve the checkpatch issue with CamelCase naming. In addition the parameter has parenthesis added to clear the checkpatch issue with precedence issues.

These changes are coding style changes and as such should have not impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h    | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h +1 -1
index 59a60f86607c..77f0e26f5d2d 100644
@@ -77,6 +77,6 @@ struct octet_string {
 	u16             length;
 };
 
-#define IsACValid(ac)			((ac <= 7) ? true : false)
+#define is_ac_valid(ac)			(((ac) <= 7) ? true : false)
 
 #endif // #ifndef __INC_QOS_TYPE_H
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +1 -1
index e0ccabadec22..de06cd11ab65 100644
@@ -309,7 +309,7 @@ bool GetTs(
 		UP = 0;
 	} else {
 		// In WMM case: we use 4 TID only
-		if (!IsACValid(TID)) {
+		if (!is_ac_valid(TID)) {
 			IEEE80211_DEBUG(IEEE80211_DL_ERR, " in %s(), TID(%d) is not valid\n", __func__, TID);
 			return false;
 		}
Signature · 1 line
2.18.0
#14 lore raw

PATCH 14/14 staging:rtl8192u: Change clock comment - Style

In reply to John Whitmore

A number of block comments have been changed to comply with the coding standard. These are coding style changes which should have no impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h +7 -7
index 77f0e26f5d2d..3052f53d2e7e 100644
@@ -14,10 +14,10 @@ struct aci_aifsn {
 	u8:1;
 };
 
-//
-// Direction Field Values.
-// Ref: WMM spec 2.2.11: WME TSPEC Element, p.18.
-//
+/*
+ * Direction Field Values.
+ * Ref: WMM spec 2.2.11: WME TSPEC Element, p.18.
+ */
 enum direction_value {
 	DIR_UP			= 0,		// 0x00	// UpLink
 	DIR_DOWN		= 1,		// 0x01	// DownLink
@@ -69,9 +69,9 @@ struct tspec_body {
 	u16	medium_time;
 };
 
-//----------------------------------------------------------------------------
-//      802.11 Management frame Status Code field
-//----------------------------------------------------------------------------
+/*
+ *      802.11 Management frame Status Code field
+ */
 struct octet_string {
 	u8		*octet;
 	u16             length;
Signature · 1 line
2.18.0