linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/17] staging:rtl8192u: Coding Style changes
@ 2018-08-21 17:15 John Whitmore
  2018-08-21 17:15 ` [PATCH 01/17] staging:rtl8192u: Remove unused defines - Style John Whitmore
                   ` (17 more replies)
  0 siblings, 18 replies; 22+ messages in thread
From: John Whitmore @ 2018-08-21 17:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

This is a series of patches to clean up the header file:
drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h

John Whitmore (17):
  staging:rtl8192u: Remove unused defines - Style
  staging:rtl8192u: Refactor SEQUENCE_CONTROL - Style
  staging:rtl8192u: Rename ShortData - Style
  staging:rtl8192u: Rename member variables - Style
  staging:rtl8192u: Refactor BA_PARAM_SET - Style
  staging:rtl8192u: Remove charData and rename shortData - Style
  staging:rtl8192u: Rename ba_param_set members - Style
  staging:rtl8192u: Refactor DELBA_PARAM_SET - Style
  staging:rtl8192u: Refactor union delba_param_set - Style
  staging:rtl8192u: Refactor struct BA_RECORD - Style
  staging:rtl8192u: Rename member variable Timer - Style
  staging:rtl8192u: Rename bValid - Style
  staging:rtl8192u: Rename DialogToken - Style
  staging:rtl8192u: Rename BaParamSet - Style
  staging:rtl8192u: Rename BaTimeoutValue - Style
  staging:rtl8192u: Rename BaStartSeqCtrl - Style
  staging:rtl8192u: Remove commented out code and indent - Style

 .../staging/rtl8192u/ieee80211/ieee80211.h    |   2 +-
 .../staging/rtl8192u/ieee80211/ieee80211_tx.c |   4 +-
 .../staging/rtl8192u/ieee80211/rtl819x_BA.h   |  84 ++++----
 .../rtl8192u/ieee80211/rtl819x_BAProc.c       | 184 +++++++++---------
 .../staging/rtl8192u/ieee80211/rtl819x_TS.h   |   6 +-
 .../rtl8192u/ieee80211/rtl819x_TSProc.c       |   6 +-
 6 files changed, 136 insertions(+), 150 deletions(-)

-- 
2.18.0


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

* [PATCH 01/17] staging:rtl8192u: Remove unused defines - Style
  2018-08-21 17:15 [PATCH 00/17] staging:rtl8192u: Coding Style changes John Whitmore
@ 2018-08-21 17:15 ` John Whitmore
  2018-08-27 17:27   ` Greg KH
  2018-08-21 17:15 ` [PATCH 02/17] staging:rtl8192u: Refactor SEQUENCE_CONTROL " John Whitmore
                   ` (16 subsequent siblings)
  17 siblings, 1 reply; 22+ messages in thread
From: John Whitmore @ 2018-08-21 17:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Remove a number of unused constant definitions.

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

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
index b6a76aae4832..8a74faedf6d6 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
@@ -2,11 +2,7 @@
 #ifndef _BATYPE_H_
 #define _BATYPE_H_
 
-#define		TOTAL_TXBA_NUM	16
-#define	TOTAL_RXBA_NUM	16
-
 #define	BA_SETUP_TIMEOUT	200
-#define	BA_INACT_TIMEOUT	60000
 
 #define	BA_POLICY_DELAYED		0
 #define	BA_POLICY_IMMEDIATE	1
@@ -15,7 +11,6 @@
 #define	ADDBA_STATUS_REFUSED		37
 #define	ADDBA_STATUS_INVALID_PARAM	38
 
-#define	DELBA_REASON_QSTA_LEAVING	36
 #define	DELBA_REASON_END_BA			37
 #define	DELBA_REASON_UNKNOWN_BA	38
 #define	DELBA_REASON_TIMEOUT			39
-- 
2.18.0


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

* [PATCH 02/17] staging:rtl8192u: Refactor SEQUENCE_CONTROL - Style
  2018-08-21 17:15 [PATCH 00/17] staging:rtl8192u: Coding Style changes John Whitmore
  2018-08-21 17:15 ` [PATCH 01/17] staging:rtl8192u: Remove unused defines - Style John Whitmore
@ 2018-08-21 17:15 ` John Whitmore
  2018-08-21 17:15 ` [PATCH 03/17] staging:rtl8192u: Rename ShortData " John Whitmore
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: John Whitmore @ 2018-08-21 17:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Remove the 'typedef' from union SEQUENCE_CONTROL. This clears a
checkpatch issue with defining new types.

Additionally renamed the union to lowercase to comply with coding
standard.

These are coding style changes which should not impact runtime
code execution.

typedef union _SEQUENCE_CONTROL{
+union sequence_control {

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h     | 6 +++---
 drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
index 8a74faedf6d6..446de58f1849 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
@@ -22,13 +22,13 @@ struct ieee80211_ADDBA_Req{
 } __attribute__ ((packed));
 */
 //Is this need?I put here just to make it easier to define structure BA_RECORD //WB
-typedef union _SEQUENCE_CONTROL{
+union sequence_control {
 	u16 ShortData;
 	struct {
 		u16	FragNum:4;
 		u16	SeqNum:12;
 	} field;
-} SEQUENCE_CONTROL, *PSEQUENCE_CONTROL;
+};
 
 typedef union _BA_PARAM_SET {
 	u8 charData[2];
@@ -57,7 +57,7 @@ typedef struct _BA_RECORD {
 	u8				DialogToken;
 	BA_PARAM_SET		BaParamSet;
 	u16				BaTimeoutValue;
-	SEQUENCE_CONTROL	BaStartSeqCtrl;
+	union sequence_control	BaStartSeqCtrl;
 } BA_RECORD, *PBA_RECORD;
 
 #endif //end _BATYPE_H_
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
index 01b631c2a180..c1fe42e0893c 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
@@ -324,7 +324,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
 	PBA_RECORD pBA = NULL;
 	PBA_PARAM_SET	pBaParamSet = NULL;
 	u16 *pBaTimeoutVal = NULL;
-	PSEQUENCE_CONTROL pBaStartSeqCtrl = NULL;
+	union sequence_control *pBaStartSeqCtrl = NULL;
 	struct rx_ts_record  *pTS = NULL;
 
 	if (skb->len < sizeof(struct rtl_80211_hdr_3addr) + 9) {
@@ -344,7 +344,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
 	pDialogToken = tag + 2;  //category+action
 	pBaParamSet = (PBA_PARAM_SET)(tag + 3);   //+DialogToken
 	pBaTimeoutVal = (u16 *)(tag + 5);
-	pBaStartSeqCtrl = (PSEQUENCE_CONTROL)(req + 7);
+	pBaStartSeqCtrl = (union sequence_control *)(req + 7);
 
 	netdev_info(ieee->dev, "====================>rx ADDBAREQ from :%pM\n", dst);
 //some other capability is not ready now.
-- 
2.18.0


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

* [PATCH 03/17] staging:rtl8192u: Rename ShortData - Style
  2018-08-21 17:15 [PATCH 00/17] staging:rtl8192u: Coding Style changes John Whitmore
  2018-08-21 17:15 ` [PATCH 01/17] staging:rtl8192u: Remove unused defines - Style John Whitmore
  2018-08-21 17:15 ` [PATCH 02/17] staging:rtl8192u: Refactor SEQUENCE_CONTROL " John Whitmore
@ 2018-08-21 17:15 ` John Whitmore
  2018-08-21 17:15 ` [PATCH 04/17] staging:rtl8192u: Rename member variables " John Whitmore
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: John Whitmore @ 2018-08-21 17:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Rename the ShortData member variable to short_data. This clears a
checkpatch issue with CamelCase naming.

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

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h     | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
index 446de58f1849..ec9bbddca3de 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
@@ -23,7 +23,7 @@ struct ieee80211_ADDBA_Req{
 */
 //Is this need?I put here just to make it easier to define structure BA_RECORD //WB
 union sequence_control {
-	u16 ShortData;
+	u16 short_data;
 	struct {
 		u16	FragNum:4;
 		u16	SeqNum:12;
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
index c1fe42e0893c..6a95b47aa595 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
@@ -93,7 +93,7 @@ void ResetBaEntry(PBA_RECORD pBA)
 	pBA->BaParamSet.shortData	= 0;
 	pBA->BaTimeoutValue		= 0;
 	pBA->DialogToken		= 0;
-	pBA->BaStartSeqCtrl.ShortData	= 0;
+	pBA->BaStartSeqCtrl.short_data	= 0;
 }
 //These functions need porting here or not?
 /*******************************************************************************************************************************
-- 
2.18.0


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

* [PATCH 04/17] staging:rtl8192u: Rename member variables - Style
  2018-08-21 17:15 [PATCH 00/17] staging:rtl8192u: Coding Style changes John Whitmore
                   ` (2 preceding siblings ...)
  2018-08-21 17:15 ` [PATCH 03/17] staging:rtl8192u: Rename ShortData " John Whitmore
@ 2018-08-21 17:15 ` John Whitmore
  2018-08-21 17:15 ` [PATCH 05/17] staging:rtl8192u: Refactor BA_PARAM_SET " John Whitmore
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: John Whitmore @ 2018-08-21 17:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Rename the member variables FragNum and SeqNum. This change clears
a checkpatch issue with CamelCase naming.

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

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c   | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h     | 4 ++--
 drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
index cc4049de975d..a61e3805437d 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
@@ -342,7 +342,7 @@ static void ieee80211_tx_query_agg_cap(struct ieee80211_device *ieee,
 		}
 		else if (!pTxTs->using_ba)
 		{
-			if (SN_LESS(pTxTs->tx_admitted_ba_record.BaStartSeqCtrl.field.SeqNum, (pTxTs->tx_cur_seq + 1) % 4096))
+			if (SN_LESS(pTxTs->tx_admitted_ba_record.BaStartSeqCtrl.field.seq_num, (pTxTs->tx_cur_seq + 1) % 4096))
 				pTxTs->using_ba = true;
 			else
 				goto FORCED_AGG_SETTING;
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
index ec9bbddca3de..6bbabd9e6562 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
@@ -25,8 +25,8 @@ struct ieee80211_ADDBA_Req{
 union sequence_control {
 	u16 short_data;
 	struct {
-		u16	FragNum:4;
-		u16	SeqNum:12;
+		u16	frag_num:4;
+		u16	seq_num:12;
 	} field;
 };
 
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
index 6a95b47aa595..643fd891f476 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
@@ -630,7 +630,7 @@ TsInitAddBA(
 	// 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
-	pBA->BaStartSeqCtrl.field.SeqNum = (pTS->tx_cur_seq + 3) % 4096;	// Block Ack will start after 3 packets later.
+	pBA->BaStartSeqCtrl.field.seq_num = (pTS->tx_cur_seq + 3) % 4096;	// Block Ack will start after 3 packets later.
 
 	ActivateBAEntry(ieee, pBA, BA_SETUP_TIMEOUT);
 
-- 
2.18.0


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

* [PATCH 05/17] staging:rtl8192u: Refactor BA_PARAM_SET - Style
  2018-08-21 17:15 [PATCH 00/17] staging:rtl8192u: Coding Style changes John Whitmore
                   ` (3 preceding siblings ...)
  2018-08-21 17:15 ` [PATCH 04/17] staging:rtl8192u: Rename member variables " John Whitmore
@ 2018-08-21 17:15 ` John Whitmore
  2018-08-21 17:15 ` [PATCH 06/17] staging:rtl8192u: Remove charData and rename shortData " John Whitmore
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: John Whitmore @ 2018-08-21 17:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Refactor the union BA_PARAM_SET, firstly removing the 'typedef', this
clears the checkpatch issue with defining new types. Secondly the union
is renamed to lowercase to comply with the coding standard.

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

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h     | 6 +++---
 drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
index 6bbabd9e6562..44f820404347 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
@@ -30,7 +30,7 @@ union sequence_control {
 	} field;
 };
 
-typedef union _BA_PARAM_SET {
+union ba_param_set {
 	u8 charData[2];
 	u16 shortData;
 	struct {
@@ -39,7 +39,7 @@ typedef union _BA_PARAM_SET {
 		u16 TID:4;
 		u16 BufferSize:10;
 	} field;
-} BA_PARAM_SET, *PBA_PARAM_SET;
+};
 
 typedef union _DELBA_PARAM_SET {
 	u8 charData[2];
@@ -55,7 +55,7 @@ typedef struct _BA_RECORD {
 	struct timer_list		Timer;
 	u8				bValid;
 	u8				DialogToken;
-	BA_PARAM_SET		BaParamSet;
+	union ba_param_set		BaParamSet;
 	u16				BaTimeoutValue;
 	union sequence_control	BaStartSeqCtrl;
 } BA_RECORD, *PBA_RECORD;
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
index 643fd891f476..469e3e9a0d2e 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
@@ -322,7 +322,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
 	u16 rc = 0;
 	u8 *dst = NULL, *pDialogToken = NULL, *tag = NULL;
 	PBA_RECORD pBA = NULL;
-	PBA_PARAM_SET	pBaParamSet = NULL;
+	union ba_param_set     *pBaParamSet = NULL;
 	u16 *pBaTimeoutVal = NULL;
 	union sequence_control *pBaStartSeqCtrl = NULL;
 	struct rx_ts_record  *pTS = NULL;
@@ -342,7 +342,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
 	dst = &req->addr2[0];
 	tag += sizeof(struct rtl_80211_hdr_3addr);
 	pDialogToken = tag + 2;  //category+action
-	pBaParamSet = (PBA_PARAM_SET)(tag + 3);   //+DialogToken
+	pBaParamSet = (union ba_param_set *)(tag + 3);   //+DialogToken
 	pBaTimeoutVal = (u16 *)(tag + 5);
 	pBaStartSeqCtrl = (union sequence_control *)(req + 7);
 
@@ -423,7 +423,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)
 	struct tx_ts_record     *pTS = NULL;
 	u8 *dst = NULL, *pDialogToken = NULL, *tag = NULL;
 	u16 *pStatusCode = NULL, *pBaTimeoutVal = NULL;
-	PBA_PARAM_SET		pBaParamSet = NULL;
+	union ba_param_set       *pBaParamSet = NULL;
 	u16			ReasonCode;
 
 	if (skb->len < sizeof(struct rtl_80211_hdr_3addr) + 9) {
@@ -439,7 +439,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)
 	tag += sizeof(struct rtl_80211_hdr_3addr);
 	pDialogToken = tag + 2;
 	pStatusCode = (u16 *)(tag + 3);
-	pBaParamSet = (PBA_PARAM_SET)(tag + 5);
+	pBaParamSet = (union ba_param_set *)(tag + 5);
 	pBaTimeoutVal = (u16 *)(tag + 7);
 
 	// Check the capability
-- 
2.18.0


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

* [PATCH 06/17] staging:rtl8192u: Remove charData and rename shortData - Style
  2018-08-21 17:15 [PATCH 00/17] staging:rtl8192u: Coding Style changes John Whitmore
                   ` (4 preceding siblings ...)
  2018-08-21 17:15 ` [PATCH 05/17] staging:rtl8192u: Refactor BA_PARAM_SET " John Whitmore
@ 2018-08-21 17:15 ` John Whitmore
  2018-08-21 17:15 ` [PATCH 07/17] staging:rtl8192u: Rename ba_param_set members " John Whitmore
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: John Whitmore @ 2018-08-21 17:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

The union ba_param_set contains the member variable charData which is
unused. The variable has been removed.

Additionally the member variable shortData has been renamed to clear
a checkpatch issue with CamelCase naming.

These are coding style changes which should not impact runtime code
execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h     | 3 +--
 drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
index 44f820404347..d3730fc6c8fe 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
@@ -31,8 +31,7 @@ union sequence_control {
 };
 
 union ba_param_set {
-	u8 charData[2];
-	u16 shortData;
+	u16 short_data;
 	struct {
 		u16 AMSDU_Support:1;
 		u16 BAPolicy:1;
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
index 469e3e9a0d2e..1a9271548b94 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
@@ -90,7 +90,7 @@ static u8 RxTsDeleteBA(struct ieee80211_device *ieee, struct rx_ts_record *pRxTs
 void ResetBaEntry(PBA_RECORD pBA)
 {
 	pBA->bValid			= false;
-	pBA->BaParamSet.shortData	= 0;
+	pBA->BaParamSet.short_data	= 0;
 	pBA->BaTimeoutValue		= 0;
 	pBA->DialogToken		= 0;
 	pBA->BaStartSeqCtrl.short_data	= 0;
@@ -151,7 +151,7 @@ static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, P
 	}
 	// BA Parameter Set
 
-	put_unaligned_le16(pBA->BaParamSet.shortData, tag);
+	put_unaligned_le16(pBA->BaParamSet.short_data, tag);
 	tag += 2;
 	// BA Timeout Value
 
-- 
2.18.0


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

* [PATCH 07/17] staging:rtl8192u: Rename ba_param_set members - Style
  2018-08-21 17:15 [PATCH 00/17] staging:rtl8192u: Coding Style changes John Whitmore
                   ` (5 preceding siblings ...)
  2018-08-21 17:15 ` [PATCH 06/17] staging:rtl8192u: Remove charData and rename shortData " John Whitmore
@ 2018-08-21 17:15 ` John Whitmore
  2018-08-21 17:15 ` [PATCH 08/17] staging:rtl8192u: Refactor DELBA_PARAM_SET " John Whitmore
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: John Whitmore @ 2018-08-21 17:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Rename the member variables of union ba_param_set to clear the
checkpatch issue with CamelCase naming:

AMSDU_Support  to  amsdu_support
BAPolicy       to  ba_policy
TID            to  tid
BufferSize     to  buffer_size

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

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 .../staging/rtl8192u/ieee80211/rtl819x_BA.h   |  8 +++---
 .../rtl8192u/ieee80211/rtl819x_BAProc.c       | 28 +++++++++----------
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
index d3730fc6c8fe..8beae1af63a1 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
@@ -33,10 +33,10 @@ union sequence_control {
 union ba_param_set {
 	u16 short_data;
 	struct {
-		u16 AMSDU_Support:1;
-		u16 BAPolicy:1;
-		u16 TID:4;
-		u16 BufferSize:10;
+		u16 amsdu_support:1;
+		u16 ba_policy:1;
+		u16 tid:4;
+		u16 buffer_size:10;
 	} field;
 };
 
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
index 1a9271548b94..42f458b4ece0 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
@@ -202,7 +202,7 @@ static struct sk_buff *ieee80211_DELBA(
 	memset(&DelbaParamSet, 0, 2);
 
 	DelbaParamSet.field.Initiator	= (TxRxSelect == TX_DIR) ? 1 : 0;
-	DelbaParamSet.field.TID	= pBA->BaParamSet.field.TID;
+	DelbaParamSet.field.TID	= pBA->BaParamSet.field.tid;
 
 	skb = dev_alloc_skb(len + sizeof(struct rtl_80211_hdr_3addr)); //need to add something others? FIXME
 	if (!skb) {
@@ -362,7 +362,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
 			ieee,
 			(struct ts_common_info **)(&pTS),
 			dst,
-			(u8)(pBaParamSet->field.TID),
+			(u8)(pBaParamSet->field.tid),
 			RX_DIR,
 			true)) {
 		rc = ADDBA_STATUS_REFUSED;
@@ -371,10 +371,10 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
 	}
 	pBA = &pTS->rx_admitted_ba_record;
 	// To Determine the ADDBA Req content
-	// We can do much more check here, including BufferSize, AMSDU_Support, Policy, StartSeqCtrl...
+	// We can do much more check here, including buffer_size, AMSDU_Support, Policy, StartSeqCtrl...
 	// I want to check StartSeqCtrl to make sure when we start aggregation!!!
 	//
-	if (pBaParamSet->field.BAPolicy == BA_POLICY_DELAYED) {
+	if (pBaParamSet->field.ba_policy == BA_POLICY_DELAYED) {
 		rc = ADDBA_STATUS_INVALID_PARAM;
 		IEEE80211_DEBUG(IEEE80211_DL_ERR, "BA Policy is not correct in %s()\n", __func__);
 		goto OnADDBAReq_Fail;
@@ -388,9 +388,9 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
 	pBA->BaStartSeqCtrl = *pBaStartSeqCtrl;
 	//for half N mode we only aggregate 1 frame
 	if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))
-	pBA->BaParamSet.field.BufferSize = 1;
+	pBA->BaParamSet.field.buffer_size = 1;
 	else
-	pBA->BaParamSet.field.BufferSize = 32;
+	pBA->BaParamSet.field.buffer_size = 32;
 	ActivateBAEntry(ieee, pBA, pBA->BaTimeoutValue);
 	ieee80211_send_ADDBARsp(ieee, dst, pBA, ADDBA_STATUS_SUCCESS);
 
@@ -403,7 +403,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
 		BA.BaParamSet = *pBaParamSet;
 		BA.BaTimeoutValue = *pBaTimeoutVal;
 		BA.DialogToken = *pDialogToken;
-		BA.BaParamSet.field.BAPolicy = BA_POLICY_IMMEDIATE;
+		BA.BaParamSet.field.ba_policy = BA_POLICY_IMMEDIATE;
 		ieee80211_send_ADDBARsp(ieee, dst, &BA, rc);
 		return 0; //we send RSP out.
 	}
@@ -461,7 +461,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)
 			ieee,
 			(struct ts_common_info **)(&pTS),
 			dst,
-			(u8)(pBaParamSet->field.TID),
+			(u8)(pBaParamSet->field.tid),
 			TX_DIR,
 			false)) {
 		IEEE80211_DEBUG(IEEE80211_DL_ERR, "can't get TS in %s()\n", __func__);
@@ -498,7 +498,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)
 		// We can compare the value of BA parameter set that Peer returned and Self sent.
 		// If it is OK, then admitted. Or we can send DELBA to cancel BA mechanism.
 		//
-		if (pBaParamSet->field.BAPolicy == BA_POLICY_DELAYED) {
+		if (pBaParamSet->field.ba_policy == BA_POLICY_DELAYED) {
 			// Since this is a kind of ADDBA failed, we delay next ADDBA process.
 			pTS->add_ba_req_delayed = true;
 			DeActivateBAEntry(ieee, pAdmittedBA);
@@ -624,11 +624,11 @@ TsInitAddBA(
 	DeActivateBAEntry(ieee, pBA);
 
 	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.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->BaParamSet.field.amsdu_support = 0;	// Do not support A-MSDU with A-MPDU now!!
+	pBA->BaParamSet.field.ba_policy = Policy;	// Policy: Delayed or Immediate
+	pBA->BaParamSet.field.tid = pTS->ts_common_info.t_spec.ts_info.uc_tsid;	// TID
+	// buffer_size: This need to be set according to A-MPDU vector
+	pBA->BaParamSet.field.buffer_size = 32;		// buffer_size: This need to be set according to A-MPDU vector
 	pBA->BaTimeoutValue = 0;					// Timeout value: Set 0 to disable Timer
 	pBA->BaStartSeqCtrl.field.seq_num = (pTS->tx_cur_seq + 3) % 4096;	// Block Ack will start after 3 packets later.
 
-- 
2.18.0


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

* [PATCH 08/17] staging:rtl8192u: Refactor DELBA_PARAM_SET - Style
  2018-08-21 17:15 [PATCH 00/17] staging:rtl8192u: Coding Style changes John Whitmore
                   ` (6 preceding siblings ...)
  2018-08-21 17:15 ` [PATCH 07/17] staging:rtl8192u: Rename ba_param_set members " John Whitmore
@ 2018-08-21 17:15 ` John Whitmore
  2018-08-21 17:15 ` [PATCH 09/17] staging:rtl8192u: Refactor union delba_param_set " John Whitmore
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: John Whitmore @ 2018-08-21 17:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Remove the typedef directive from union DELBA_PARAM_SET, to clear the
checkpatch issue with CamelCase naming.

Rename the union to lowercase to comply with the coding standard.

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

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h     | 4 ++--
 drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
index 8beae1af63a1..10e81c3c0ff1 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
@@ -40,7 +40,7 @@ union ba_param_set {
 	} field;
 };
 
-typedef union _DELBA_PARAM_SET {
+union delba_param_set {
 	u8 charData[2];
 	u16 shortData;
 	struct {
@@ -48,7 +48,7 @@ typedef union _DELBA_PARAM_SET {
 		u16 Initiator:1;
 		u16 TID:4;
 	} field;
-} DELBA_PARAM_SET, *PDELBA_PARAM_SET;
+};
 
 typedef struct _BA_RECORD {
 	struct timer_list		Timer;
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
index 42f458b4ece0..931123faf9ed 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
@@ -187,7 +187,7 @@ static struct sk_buff *ieee80211_DELBA(
 	u16			 ReasonCode
 	)
 {
-	DELBA_PARAM_SET	DelbaParamSet;
+	union delba_param_set	DelbaParamSet;
 	struct sk_buff *skb = NULL;
 	 struct rtl_80211_hdr_3addr *Delba = NULL;
 	u8 *tag = NULL;
@@ -543,7 +543,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)
 int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb)
 {
 	 struct rtl_80211_hdr_3addr *delba = NULL;
-	PDELBA_PARAM_SET	pDelBaParamSet = NULL;
+	union delba_param_set   *pDelBaParamSet = NULL;
 	u8			*dst = NULL;
 
 	if (skb->len < sizeof(struct rtl_80211_hdr_3addr) + 6) {
@@ -563,7 +563,7 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb)
 	IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA|IEEE80211_DL_BA, skb->data, skb->len);
 	delba = (struct rtl_80211_hdr_3addr *)skb->data;
 	dst = &delba->addr2[0];
-	pDelBaParamSet = (PDELBA_PARAM_SET)&delba->payload[2];
+	pDelBaParamSet = (union delba_param_set *)&delba->payload[2];
 
 	if (pDelBaParamSet->field.Initiator == 1) {
 		struct rx_ts_record *pRxTs;
-- 
2.18.0


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

* [PATCH 09/17] staging:rtl8192u: Refactor union delba_param_set - Style
  2018-08-21 17:15 [PATCH 00/17] staging:rtl8192u: Coding Style changes John Whitmore
                   ` (7 preceding siblings ...)
  2018-08-21 17:15 ` [PATCH 08/17] staging:rtl8192u: Refactor DELBA_PARAM_SET " John Whitmore
@ 2018-08-21 17:15 ` John Whitmore
  2018-08-21 17:15 ` [PATCH 10/17] staging:rtl8192u: Refactor struct BA_RECORD " John Whitmore
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: John Whitmore @ 2018-08-21 17:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

remove member 'charData' from the union delba_param_set, as it is not
used in code. The remaining member variables have all been renamed to
clear the checkpatch issue with CamelCase naming.

shortData  to short_data
Reserved   to reserved
Initiator  to initiator
TID        to tid

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

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h     |  9 ++++-----
 drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 12 ++++++------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
index 10e81c3c0ff1..008fe722af03 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
@@ -41,12 +41,11 @@ union ba_param_set {
 };
 
 union delba_param_set {
-	u8 charData[2];
-	u16 shortData;
+	u16 short_data;
 	struct {
-		u16 Reserved:11;
-		u16 Initiator:1;
-		u16 TID:4;
+		u16 reserved:11;
+		u16 initiator:1;
+		u16 tid:4;
 	} field;
 };
 
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
index 931123faf9ed..e504d1eb2ccf 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
@@ -201,8 +201,8 @@ static struct sk_buff *ieee80211_DELBA(
 
 	memset(&DelbaParamSet, 0, 2);
 
-	DelbaParamSet.field.Initiator	= (TxRxSelect == TX_DIR) ? 1 : 0;
-	DelbaParamSet.field.TID	= pBA->BaParamSet.field.tid;
+	DelbaParamSet.field.initiator	= (TxRxSelect == TX_DIR) ? 1 : 0;
+	DelbaParamSet.field.tid	= pBA->BaParamSet.field.tid;
 
 	skb = dev_alloc_skb(len + sizeof(struct rtl_80211_hdr_3addr)); //need to add something others? FIXME
 	if (!skb) {
@@ -226,7 +226,7 @@ static struct sk_buff *ieee80211_DELBA(
 
 	// DELBA Parameter Set
 
-	put_unaligned_le16(DelbaParamSet.shortData, tag);
+	put_unaligned_le16(DelbaParamSet.short_data, tag);
 	tag += 2;
 	// Reason Code
 
@@ -565,14 +565,14 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb)
 	dst = &delba->addr2[0];
 	pDelBaParamSet = (union delba_param_set *)&delba->payload[2];
 
-	if (pDelBaParamSet->field.Initiator == 1) {
+	if (pDelBaParamSet->field.initiator == 1) {
 		struct rx_ts_record *pRxTs;
 
 		if (!GetTs(
 				ieee,
 				(struct ts_common_info **)&pRxTs,
 				dst,
-				(u8)pDelBaParamSet->field.TID,
+				(u8)pDelBaParamSet->field.tid,
 				RX_DIR,
 				false)) {
 			IEEE80211_DEBUG(IEEE80211_DL_ERR,  "can't get TS for RXTS in %s()\n", __func__);
@@ -587,7 +587,7 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb)
 			ieee,
 			(struct ts_common_info **)&pTxTs,
 			dst,
-			(u8)pDelBaParamSet->field.TID,
+			(u8)pDelBaParamSet->field.tid,
 			TX_DIR,
 			false)) {
 			IEEE80211_DEBUG(IEEE80211_DL_ERR,  "can't get TS for TXTS in %s()\n", __func__);
-- 
2.18.0


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

* [PATCH 10/17] staging:rtl8192u: Refactor struct BA_RECORD - Style
  2018-08-21 17:15 [PATCH 00/17] staging:rtl8192u: Coding Style changes John Whitmore
                   ` (8 preceding siblings ...)
  2018-08-21 17:15 ` [PATCH 09/17] staging:rtl8192u: Refactor union delba_param_set " John Whitmore
@ 2018-08-21 17:15 ` John Whitmore
  2018-08-21 17:15 ` [PATCH 11/17] staging:rtl8192u: Rename member variable Timer " John Whitmore
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: John Whitmore @ 2018-08-21 17:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Remove the 'typedef' directive from the BA_RECORD structure, to clear
the checkpatch issue with defining new types.

Additionally rename the structure to lowercase to comply with the
coding style.

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

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 .../staging/rtl8192u/ieee80211/ieee80211.h    |  2 +-
 .../staging/rtl8192u/ieee80211/rtl819x_BA.h   |  4 +-
 .../rtl8192u/ieee80211/rtl819x_BAProc.c       | 48 +++++++++----------
 .../staging/rtl8192u/ieee80211/rtl819x_TS.h   |  6 +--
 4 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index 3cfeac0d7214..c1d34d9ef2e5 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -2395,7 +2395,7 @@ void TsInitDelBA(struct ieee80211_device *ieee,
 void BaSetupTimeOut(struct timer_list *t);
 void TxBaInactTimeout(struct timer_list *t);
 void RxBaInactTimeout(struct timer_list *t);
-void ResetBaEntry(PBA_RECORD pBA);
+void ResetBaEntry(struct ba_record *pBA);
 //function in TS.c
 bool GetTs(
 	struct ieee80211_device		*ieee,
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
index 008fe722af03..b1697cb483ff 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
@@ -49,13 +49,13 @@ union delba_param_set {
 	} field;
 };
 
-typedef struct _BA_RECORD {
+struct ba_record {
 	struct timer_list		Timer;
 	u8				bValid;
 	u8				DialogToken;
 	union ba_param_set		BaParamSet;
 	u16				BaTimeoutValue;
 	union sequence_control	BaStartSeqCtrl;
-} BA_RECORD, *PBA_RECORD;
+};
 
 #endif //end _BATYPE_H_
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
index e504d1eb2ccf..cb84335468ab 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
@@ -12,11 +12,11 @@
 
 /********************************************************************************************************************
  *function:  Activate BA entry. And if Time is nozero, start timer.
- *   input:  PBA_RECORD			pBA  //BA entry to be enabled
+ *   input:  struct ba_record          *pBA  //BA entry to be enabled
  *	     u16			Time //indicate time delay.
  *  output:  none
  ********************************************************************************************************************/
-static void ActivateBAEntry(struct ieee80211_device *ieee, PBA_RECORD pBA, u16 Time)
+static void ActivateBAEntry(struct ieee80211_device *ieee, struct ba_record *pBA, u16 Time)
 {
 	pBA->bValid = true;
 	if (Time != 0)
@@ -25,10 +25,10 @@ static void ActivateBAEntry(struct ieee80211_device *ieee, PBA_RECORD pBA, u16 T
 
 /********************************************************************************************************************
  *function:  deactivate BA entry, including its timer.
- *   input:  PBA_RECORD			pBA  //BA entry to be disabled
+ *   input:  struct ba_record       *pBA  //BA entry to be disabled
  *  output:  none
  ********************************************************************************************************************/
-static void DeActivateBAEntry(struct ieee80211_device *ieee, PBA_RECORD pBA)
+static void DeActivateBAEntry(struct ieee80211_device *ieee, struct ba_record *pBA)
 {
 	pBA->bValid = false;
 	del_timer_sync(&pBA->Timer);
@@ -42,8 +42,8 @@ static void DeActivateBAEntry(struct ieee80211_device *ieee, PBA_RECORD pBA)
  ********************************************************************************************************************/
 static u8 TxTsDeleteBA(struct ieee80211_device *ieee, struct tx_ts_record *pTxTs)
 {
-	PBA_RECORD		pAdmittedBa = &pTxTs->tx_admitted_ba_record;  //These two BA entries must exist in TS structure
-	PBA_RECORD		pPendingBa = &pTxTs->tx_pending_ba_record;
+	struct ba_record *pAdmittedBa = &pTxTs->tx_admitted_ba_record;  //These two BA entries must exist in TS structure
+	struct ba_record *pPendingBa = &pTxTs->tx_pending_ba_record;
 	u8			bSendDELBA = false;
 
 	// Delete pending BA
@@ -70,7 +70,7 @@ static u8 TxTsDeleteBA(struct ieee80211_device *ieee, struct tx_ts_record *pTxTs
  ********************************************************************************************************************/
 static u8 RxTsDeleteBA(struct ieee80211_device *ieee, struct rx_ts_record *pRxTs)
 {
-	PBA_RECORD		pBa = &pRxTs->rx_admitted_ba_record;
+	struct ba_record       *pBa = &pRxTs->rx_admitted_ba_record;
 	u8			bSendDELBA = false;
 
 	if (pBa->bValid) {
@@ -84,10 +84,10 @@ static u8 RxTsDeleteBA(struct ieee80211_device *ieee, struct rx_ts_record *pRxTs
 /********************************************************************************************************************
  *function: reset BA entry
  *   input:
- *	     PBA_RECORD		pBA //entry to be reset
+ *	     struct ba_record *pBA //entry to be reset
  *  output:  none
  ********************************************************************************************************************/
-void ResetBaEntry(PBA_RECORD pBA)
+void ResetBaEntry(struct ba_record *pBA)
 {
 	pBA->bValid			= false;
 	pBA->BaParamSet.short_data	= 0;
@@ -99,13 +99,13 @@ void ResetBaEntry(PBA_RECORD pBA)
 /*******************************************************************************************************************************
  *function:  construct ADDBAREQ and ADDBARSP frame here together.
  *   input:  u8*		Dst	//ADDBA frame's destination
- *	     PBA_RECORD		pBA	//BA_RECORD entry which stores the necessary information for BA.
+ *	     struct ba_record  *pBA	//BA_RECORD entry which stores the necessary information for BA.
  *	     u16		StatusCode  //status code in RSP and I will use it to indicate whether it's RSP or REQ(will I?)
  *	     u8			type	//indicate whether it's RSP(ACT_ADDBARSP) ow REQ(ACT_ADDBAREQ)
  *  output:  none
  *  return:  sk_buff*		skb     //return constructed skb to xmit
  *******************************************************************************************************************************/
-static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, PBA_RECORD pBA, u16 StatusCode, u8 type)
+static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, struct ba_record *pBA, u16 StatusCode, u8 type)
 {
 	struct sk_buff *skb = NULL;
 	 struct rtl_80211_hdr_3addr *BAReq = NULL;
@@ -173,7 +173,7 @@ static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, P
 /********************************************************************************************************************
  *function:  construct DELBA frame
  *   input:  u8*		dst	//DELBA frame's destination
- *	     PBA_RECORD		pBA	//BA_RECORD entry which stores the necessary information for BA
+ *	     struct ba_record  *pBA	//BA_RECORD entry which stores the necessary information for BA
  *	     enum tr_select	TxRxSelect  //TX RX direction
  *	     u16		ReasonCode  //status code.
  *  output:  none
@@ -182,7 +182,7 @@ static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, P
 static struct sk_buff *ieee80211_DELBA(
 	struct ieee80211_device  *ieee,
 	u8		         *dst,
-	PBA_RECORD		 pBA,
+	struct ba_record         *pBA,
 	enum tr_select		 TxRxSelect,
 	u16			 ReasonCode
 	)
@@ -243,12 +243,12 @@ static struct sk_buff *ieee80211_DELBA(
 /********************************************************************************************************************
  *function: send ADDBAReq frame out
  *   input:  u8*		dst	//ADDBAReq frame's destination
- *	     PBA_RECORD		pBA	//BA_RECORD entry which stores the necessary information for BA
+ *	     struct ba_record  *pBA	//BA_RECORD entry which stores the necessary information for BA
  *  output:  none
  *  notice: If any possible, please hide pBA in ieee. And temporarily use Manage Queue as softmac_mgmt_xmit() usually does
  ********************************************************************************************************************/
 static void ieee80211_send_ADDBAReq(struct ieee80211_device *ieee,
-				    u8 *dst, PBA_RECORD pBA)
+				    u8 *dst, struct ba_record *pBA)
 {
 	struct sk_buff *skb;
 	skb = ieee80211_ADDBA(ieee, dst, pBA, 0, ACT_ADDBAREQ); //construct ACT_ADDBAREQ frames so set statuscode zero.
@@ -266,13 +266,13 @@ static void ieee80211_send_ADDBAReq(struct ieee80211_device *ieee,
 /********************************************************************************************************************
  *function: send ADDBARSP frame out
  *   input:  u8*		dst	//DELBA frame's destination
- *	     PBA_RECORD		pBA	//BA_RECORD entry which stores the necessary information for BA
+ *	     struct ba_record  *pBA	//BA_RECORD entry which stores the necessary information for BA
  *	     u16		StatusCode //RSP StatusCode
  *  output:  none
  *  notice: If any possible, please hide pBA in ieee. And temporarily use Manage Queue as softmac_mgmt_xmit() usually does
  ********************************************************************************************************************/
 static void ieee80211_send_ADDBARsp(struct ieee80211_device *ieee, u8 *dst,
-				    PBA_RECORD pBA, u16 StatusCode)
+				    struct ba_record *pBA, u16 StatusCode)
 {
 	struct sk_buff *skb;
 	skb = ieee80211_ADDBA(ieee, dst, pBA, StatusCode, ACT_ADDBARSP); //construct ACT_ADDBARSP frames
@@ -289,7 +289,7 @@ static void ieee80211_send_ADDBARsp(struct ieee80211_device *ieee, u8 *dst,
 /********************************************************************************************************************
  *function: send ADDBARSP frame out
  *   input:  u8*		dst	//DELBA frame's destination
- *	     PBA_RECORD		pBA	//BA_RECORD entry which stores the necessary information for BA
+ *	     struct ba_record  *pBA	//BA_RECORD entry which stores the necessary information for BA
  *	     enum tr_select     TxRxSelect //TX or RX
  *	     u16		ReasonCode //DEL ReasonCode
  *  output:  none
@@ -297,7 +297,7 @@ static void ieee80211_send_ADDBARsp(struct ieee80211_device *ieee, u8 *dst,
  ********************************************************************************************************************/
 
 static void ieee80211_send_DELBA(struct ieee80211_device *ieee, u8 *dst,
-				 PBA_RECORD pBA, enum tr_select TxRxSelect,
+				 struct ba_record *pBA, enum tr_select TxRxSelect,
 				 u16 ReasonCode)
 {
 	struct sk_buff *skb;
@@ -321,7 +321,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
 	 struct rtl_80211_hdr_3addr *req = NULL;
 	u16 rc = 0;
 	u8 *dst = NULL, *pDialogToken = NULL, *tag = NULL;
-	PBA_RECORD pBA = NULL;
+	struct ba_record *pBA = NULL;
 	union ba_param_set     *pBaParamSet = NULL;
 	u16 *pBaTimeoutVal = NULL;
 	union sequence_control *pBaStartSeqCtrl = NULL;
@@ -399,7 +399,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
 
 OnADDBAReq_Fail:
 	{
-		BA_RECORD	BA;
+		struct ba_record	BA;
 		BA.BaParamSet = *pBaParamSet;
 		BA.BaTimeoutValue = *pBaTimeoutVal;
 		BA.DialogToken = *pDialogToken;
@@ -419,7 +419,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
 int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)
 {
 	 struct rtl_80211_hdr_3addr *rsp = NULL;
-	PBA_RECORD		pPendingBA, pAdmittedBA;
+	struct ba_record        *pPendingBA, *pAdmittedBA;
 	struct tx_ts_record     *pTS = NULL;
 	u8 *dst = NULL, *pDialogToken = NULL, *tag = NULL;
 	u16 *pStatusCode = NULL, *pBaTimeoutVal = NULL;
@@ -526,7 +526,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)
 
 OnADDBARsp_Reject:
 	{
-		BA_RECORD	BA;
+		struct ba_record	BA;
 		BA.BaParamSet = *pBaParamSet;
 		ieee80211_send_DELBA(ieee, dst, &BA, TX_DIR, ReasonCode);
 		return 0;
@@ -615,7 +615,7 @@ TsInitAddBA(
 	u8		bOverwritePending
 	)
 {
-	PBA_RECORD			pBA = &pTS->tx_pending_ba_record;
+	struct ba_record *pBA = &pTS->tx_pending_ba_record;
 
 	if (pBA->bValid && !bOverwritePending)
 		return;
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h
index 924d4b373099..7ed140009760 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h
@@ -78,8 +78,8 @@ struct ts_common_info {
 struct tx_ts_record {
 	struct ts_common_info		ts_common_info;
 	u16				tx_cur_seq;
-	BA_RECORD			tx_pending_ba_record;
-	BA_RECORD			tx_admitted_ba_record;
+	struct ba_record		tx_pending_ba_record;
+	struct ba_record		tx_admitted_ba_record;
 	u8				add_ba_req_in_progress;
 	u8				add_ba_req_delayed;
 	u8				using_ba;
@@ -93,7 +93,7 @@ struct rx_ts_record {
 	u16				rx_timeout_indicate_seq;
 	struct list_head		rx_pending_pkt_list;
 	struct timer_list		rx_pkt_pending_timer;
-	BA_RECORD			rx_admitted_ba_record;
+	struct ba_record		rx_admitted_ba_record;
 	u16				rx_last_seq_num;
 	u8				rx_last_frag_num;
 	u8				num;
-- 
2.18.0


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

* [PATCH 11/17] staging:rtl8192u: Rename member variable Timer - Style
  2018-08-21 17:15 [PATCH 00/17] staging:rtl8192u: Coding Style changes John Whitmore
                   ` (9 preceding siblings ...)
  2018-08-21 17:15 ` [PATCH 10/17] staging:rtl8192u: Refactor struct BA_RECORD " John Whitmore
@ 2018-08-21 17:15 ` John Whitmore
  2018-08-21 17:15 ` [PATCH 12/17] staging:rtl8192u: Rename bValid " John Whitmore
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: John Whitmore @ 2018-08-21 17:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Rename the member variable Timer to all lowercase to clear the
checkpatch issue with CamelCase naming.

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

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h     |  2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 10 +++++-----
 drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c |  6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
index b1697cb483ff..a36e8ecc6c59 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
@@ -50,7 +50,7 @@ union delba_param_set {
 };
 
 struct ba_record {
-	struct timer_list		Timer;
+	struct timer_list		timer;
 	u8				bValid;
 	u8				DialogToken;
 	union ba_param_set		BaParamSet;
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
index cb84335468ab..3e88333688ea 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
@@ -20,7 +20,7 @@ static void ActivateBAEntry(struct ieee80211_device *ieee, struct ba_record *pBA
 {
 	pBA->bValid = true;
 	if (Time != 0)
-		mod_timer(&pBA->Timer, jiffies + msecs_to_jiffies(Time));
+		mod_timer(&pBA->timer, jiffies + msecs_to_jiffies(Time));
 }
 
 /********************************************************************************************************************
@@ -31,7 +31,7 @@ static void ActivateBAEntry(struct ieee80211_device *ieee, struct ba_record *pBA
 static void DeActivateBAEntry(struct ieee80211_device *ieee, struct ba_record *pBA)
 {
 	pBA->bValid = false;
-	del_timer_sync(&pBA->Timer);
+	del_timer_sync(&pBA->timer);
 }
 /********************************************************************************************************************
  *function: deactivete BA entry in Tx Ts, and send DELBA.
@@ -669,7 +669,7 @@ TsInitDelBA(struct ieee80211_device *ieee, struct ts_common_info *pTsCommonInfo,
  ********************************************************************************************************************/
 void BaSetupTimeOut(struct timer_list *t)
 {
-	struct tx_ts_record *pTxTs = from_timer(pTxTs, t, tx_pending_ba_record.Timer);
+	struct tx_ts_record *pTxTs = from_timer(pTxTs, t, tx_pending_ba_record.timer);
 
 	pTxTs->add_ba_req_in_progress = false;
 	pTxTs->add_ba_req_delayed = true;
@@ -678,7 +678,7 @@ void BaSetupTimeOut(struct timer_list *t)
 
 void TxBaInactTimeout(struct timer_list *t)
 {
-	struct tx_ts_record *pTxTs = from_timer(pTxTs, t, tx_admitted_ba_record.Timer);
+	struct tx_ts_record *pTxTs = from_timer(pTxTs, t, tx_admitted_ba_record.timer);
 	struct ieee80211_device *ieee = container_of(pTxTs, struct ieee80211_device, TxTsRecord[pTxTs->num]);
 	TxTsDeleteBA(ieee, pTxTs);
 	ieee80211_send_DELBA(
@@ -691,7 +691,7 @@ void TxBaInactTimeout(struct timer_list *t)
 
 void RxBaInactTimeout(struct timer_list *t)
 {
-	struct rx_ts_record *pRxTs = from_timer(pRxTs, t, rx_admitted_ba_record.Timer);
+	struct rx_ts_record *pRxTs = from_timer(pRxTs, t, rx_admitted_ba_record.timer);
 	struct ieee80211_device *ieee = container_of(pRxTs, struct ieee80211_device, RxTsRecord[pRxTs->num]);
 
 	RxTsDeleteBA(ieee, pRxTs);
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
index d46d8f468671..317d275edeb0 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
@@ -151,9 +151,9 @@ void TSInitialize(struct ieee80211_device *ieee)
 		timer_setup(&pTxTS->ts_common_info.inact_timer, TsInactTimeout,
 			    0);
 		timer_setup(&pTxTS->ts_add_ba_timer, TsAddBaProcess, 0);
-		timer_setup(&pTxTS->tx_pending_ba_record.Timer, BaSetupTimeOut,
+		timer_setup(&pTxTS->tx_pending_ba_record.timer, BaSetupTimeOut,
 			    0);
-		timer_setup(&pTxTS->tx_admitted_ba_record.Timer,
+		timer_setup(&pTxTS->tx_admitted_ba_record.timer,
 			    TxBaInactTimeout, 0);
 		ResetTxTsEntry(pTxTS);
 		list_add_tail(&pTxTS->ts_common_info.list, &ieee->Tx_TS_Unused_List);
@@ -171,7 +171,7 @@ void TSInitialize(struct ieee80211_device *ieee)
 			    0);
 		timer_setup(&pRxTS->ts_common_info.inact_timer, TsInactTimeout,
 			    0);
-		timer_setup(&pRxTS->rx_admitted_ba_record.Timer,
+		timer_setup(&pRxTS->rx_admitted_ba_record.timer,
 			    RxBaInactTimeout, 0);
 		timer_setup(&pRxTS->rx_pkt_pending_timer, RxPktPendingTimeout, 0);
 		ResetRxTsEntry(pRxTS);
-- 
2.18.0


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

* [PATCH 12/17] staging:rtl8192u: Rename bValid - Style
  2018-08-21 17:15 [PATCH 00/17] staging:rtl8192u: Coding Style changes John Whitmore
                   ` (10 preceding siblings ...)
  2018-08-21 17:15 ` [PATCH 11/17] staging:rtl8192u: Rename member variable Timer " John Whitmore
@ 2018-08-21 17:15 ` John Whitmore
  2018-08-21 17:15 ` [PATCH 13/17] staging:rtl8192u: Rename DialogToken " John Whitmore
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: John Whitmore @ 2018-08-21 17:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Rename the member variable bValid to valid, this clears the checkpatch
issue with CamelCase naming.

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

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 .../staging/rtl8192u/ieee80211/ieee80211_tx.c |  2 +-
 .../staging/rtl8192u/ieee80211/rtl819x_BA.h   |  2 +-
 .../rtl8192u/ieee80211/rtl819x_BAProc.c       | 22 +++++++++----------
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
index a61e3805437d..a7850b04c81b 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
@@ -335,7 +335,7 @@ static void ieee80211_tx_query_agg_cap(struct ieee80211_device *ieee,
 			printk("===>can't get TS\n");
 			return;
 		}
-		if (!pTxTs->tx_admitted_ba_record.bValid)
+		if (!pTxTs->tx_admitted_ba_record.valid)
 		{
 			TsStartAddBaProcess(ieee, pTxTs);
 			goto FORCED_AGG_SETTING;
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
index a36e8ecc6c59..9ec381c049aa 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
@@ -51,7 +51,7 @@ union delba_param_set {
 
 struct ba_record {
 	struct timer_list		timer;
-	u8				bValid;
+	u8				valid;
 	u8				DialogToken;
 	union ba_param_set		BaParamSet;
 	u16				BaTimeoutValue;
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
index 3e88333688ea..feac3cb371cd 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
@@ -18,7 +18,7 @@
  ********************************************************************************************************************/
 static void ActivateBAEntry(struct ieee80211_device *ieee, struct ba_record *pBA, u16 Time)
 {
-	pBA->bValid = true;
+	pBA->valid = true;
 	if (Time != 0)
 		mod_timer(&pBA->timer, jiffies + msecs_to_jiffies(Time));
 }
@@ -30,7 +30,7 @@ static void ActivateBAEntry(struct ieee80211_device *ieee, struct ba_record *pBA
  ********************************************************************************************************************/
 static void DeActivateBAEntry(struct ieee80211_device *ieee, struct ba_record *pBA)
 {
-	pBA->bValid = false;
+	pBA->valid = false;
 	del_timer_sync(&pBA->timer);
 }
 /********************************************************************************************************************
@@ -47,13 +47,13 @@ static u8 TxTsDeleteBA(struct ieee80211_device *ieee, struct tx_ts_record *pTxTs
 	u8			bSendDELBA = false;
 
 	// Delete pending BA
-	if (pPendingBa->bValid) {
+	if (pPendingBa->valid) {
 		DeActivateBAEntry(ieee, pPendingBa);
 		bSendDELBA = true;
 	}
 
 	// Delete admitted BA
-	if (pAdmittedBa->bValid) {
+	if (pAdmittedBa->valid) {
 		DeActivateBAEntry(ieee, pAdmittedBa);
 		bSendDELBA = true;
 	}
@@ -73,7 +73,7 @@ static u8 RxTsDeleteBA(struct ieee80211_device *ieee, struct rx_ts_record *pRxTs
 	struct ba_record       *pBa = &pRxTs->rx_admitted_ba_record;
 	u8			bSendDELBA = false;
 
-	if (pBa->bValid) {
+	if (pBa->valid) {
 		DeActivateBAEntry(ieee, pBa);
 		bSendDELBA = true;
 	}
@@ -89,7 +89,7 @@ static u8 RxTsDeleteBA(struct ieee80211_device *ieee, struct rx_ts_record *pRxTs
  ********************************************************************************************************************/
 void ResetBaEntry(struct ba_record *pBA)
 {
-	pBA->bValid			= false;
+	pBA->valid			= false;
 	pBA->BaParamSet.short_data	= 0;
 	pBA->BaTimeoutValue		= 0;
 	pBA->DialogToken		= 0;
@@ -478,11 +478,11 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)
 	// Check if related BA is waiting for setup.
 	// If not, reject by sending DELBA frame.
 	//
-	if (pAdmittedBA->bValid) {
+	if (pAdmittedBA->valid) {
 		// Since BA is already setup, we ignore all other ADDBA Response.
 		IEEE80211_DEBUG(IEEE80211_DL_BA, "OnADDBARsp(): Recv ADDBA Rsp. Drop because already admit it! \n");
 		return -1;
-	} else if ((!pPendingBA->bValid) || (*pDialogToken != pPendingBA->DialogToken)) {
+	} else if ((!pPendingBA->valid) || (*pDialogToken != pPendingBA->DialogToken)) {
 		IEEE80211_DEBUG(IEEE80211_DL_ERR,  "OnADDBARsp(): Recv ADDBA Rsp. BA invalid, DELBA! \n");
 		ReasonCode = DELBA_REASON_UNKNOWN_BA;
 		goto OnADDBARsp_Reject;
@@ -617,7 +617,7 @@ TsInitAddBA(
 {
 	struct ba_record *pBA = &pTS->tx_pending_ba_record;
 
-	if (pBA->bValid && !bOverwritePending)
+	if (pBA->valid && !bOverwritePending)
 		return;
 
 	// Set parameters to "Pending" variable set
@@ -647,7 +647,7 @@ TsInitDelBA(struct ieee80211_device *ieee, struct ts_common_info *pTsCommonInfo,
 			ieee80211_send_DELBA(
 				ieee,
 				pTsCommonInfo->addr,
-				(pTxTs->tx_admitted_ba_record.bValid)?(&pTxTs->tx_admitted_ba_record):(&pTxTs->tx_pending_ba_record),
+				(pTxTs->tx_admitted_ba_record.valid)?(&pTxTs->tx_admitted_ba_record):(&pTxTs->tx_pending_ba_record),
 				TxRxSelect,
 				DELBA_REASON_END_BA);
 	} else if (TxRxSelect == RX_DIR) {
@@ -673,7 +673,7 @@ void BaSetupTimeOut(struct timer_list *t)
 
 	pTxTs->add_ba_req_in_progress = false;
 	pTxTs->add_ba_req_delayed = true;
-	pTxTs->tx_pending_ba_record.bValid = false;
+	pTxTs->tx_pending_ba_record.valid = false;
 }
 
 void TxBaInactTimeout(struct timer_list *t)
-- 
2.18.0


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

* [PATCH 13/17] staging:rtl8192u: Rename DialogToken - Style
  2018-08-21 17:15 [PATCH 00/17] staging:rtl8192u: Coding Style changes John Whitmore
                   ` (11 preceding siblings ...)
  2018-08-21 17:15 ` [PATCH 12/17] staging:rtl8192u: Rename bValid " John Whitmore
@ 2018-08-21 17:15 ` John Whitmore
  2018-08-21 17:15 ` [PATCH 14/17] staging:rtl8192u: Rename BaParamSet " John Whitmore
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: John Whitmore @ 2018-08-21 17:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Rename the member variable DialogToken to dialog_token. This clears
the checkpatch issue with CamelCase naming.

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

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h    |  2 +-
 .../staging/rtl8192u/ieee80211/rtl819x_BAProc.c    | 14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
index 9ec381c049aa..948888224f24 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
@@ -52,7 +52,7 @@ union delba_param_set {
 struct ba_record {
 	struct timer_list		timer;
 	u8				valid;
-	u8				DialogToken;
+	u8				dialog_token;
 	union ba_param_set		BaParamSet;
 	u16				BaTimeoutValue;
 	union sequence_control	BaStartSeqCtrl;
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
index feac3cb371cd..21398892b0e5 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
@@ -92,7 +92,7 @@ void ResetBaEntry(struct ba_record *pBA)
 	pBA->valid			= false;
 	pBA->BaParamSet.short_data	= 0;
 	pBA->BaTimeoutValue		= 0;
-	pBA->DialogToken		= 0;
+	pBA->dialog_token		= 0;
 	pBA->BaStartSeqCtrl.short_data	= 0;
 }
 //These functions need porting here or not?
@@ -140,7 +140,7 @@ static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, s
 	*tag++ = ACT_CAT_BA;
 	*tag++ = type;
 	// Dialog Token
-	*tag++ = pBA->DialogToken;
+	*tag++ = pBA->dialog_token;
 
 	if (ACT_ADDBARSP == type) {
 		// Status Code
@@ -382,7 +382,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
 		// Admit the ADDBA Request
 	//
 	DeActivateBAEntry(ieee, pBA);
-	pBA->DialogToken = *pDialogToken;
+	pBA->dialog_token = *pDialogToken;
 	pBA->BaParamSet = *pBaParamSet;
 	pBA->BaTimeoutValue = *pBaTimeoutVal;
 	pBA->BaStartSeqCtrl = *pBaStartSeqCtrl;
@@ -402,7 +402,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
 		struct ba_record	BA;
 		BA.BaParamSet = *pBaParamSet;
 		BA.BaTimeoutValue = *pBaTimeoutVal;
-		BA.DialogToken = *pDialogToken;
+		BA.dialog_token = *pDialogToken;
 		BA.BaParamSet.field.ba_policy = BA_POLICY_IMMEDIATE;
 		ieee80211_send_ADDBARsp(ieee, dst, &BA, rc);
 		return 0; //we send RSP out.
@@ -482,7 +482,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)
 		// Since BA is already setup, we ignore all other ADDBA Response.
 		IEEE80211_DEBUG(IEEE80211_DL_BA, "OnADDBARsp(): Recv ADDBA Rsp. Drop because already admit it! \n");
 		return -1;
-	} else if ((!pPendingBA->valid) || (*pDialogToken != pPendingBA->DialogToken)) {
+	} else if ((!pPendingBA->valid) || (*pDialogToken != pPendingBA->dialog_token)) {
 		IEEE80211_DEBUG(IEEE80211_DL_ERR,  "OnADDBARsp(): Recv ADDBA Rsp. BA invalid, DELBA! \n");
 		ReasonCode = DELBA_REASON_UNKNOWN_BA;
 		goto OnADDBARsp_Reject;
@@ -510,7 +510,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)
 		//
 		// Admitted condition
 		//
-		pAdmittedBA->DialogToken = *pDialogToken;
+		pAdmittedBA->dialog_token = *pDialogToken;
 		pAdmittedBA->BaTimeoutValue = *pBaTimeoutVal;
 		pAdmittedBA->BaStartSeqCtrl = pPendingBA->BaStartSeqCtrl;
 		pAdmittedBA->BaParamSet = *pBaParamSet;
@@ -623,7 +623,7 @@ TsInitAddBA(
 	// Set parameters to "Pending" variable set
 	DeActivateBAEntry(ieee, pBA);
 
-	pBA->DialogToken++;						// DialogToken: Only keep the latest dialog token
+	pBA->dialog_token++;						// 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.ba_policy = Policy;	// Policy: Delayed or Immediate
 	pBA->BaParamSet.field.tid = pTS->ts_common_info.t_spec.ts_info.uc_tsid;	// TID
-- 
2.18.0


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

* [PATCH 14/17] staging:rtl8192u: Rename BaParamSet - Style
  2018-08-21 17:15 [PATCH 00/17] staging:rtl8192u: Coding Style changes John Whitmore
                   ` (12 preceding siblings ...)
  2018-08-21 17:15 ` [PATCH 13/17] staging:rtl8192u: Rename DialogToken " John Whitmore
@ 2018-08-21 17:15 ` John Whitmore
  2018-08-21 17:15 ` [PATCH 15/17] staging:rtl8192u: Rename BaTimeoutValue " John Whitmore
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: John Whitmore @ 2018-08-21 17:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Rename the member variable BaParamSet to param_set. This clears the
checkpatch issue with CamelCase naming.

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

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 .../staging/rtl8192u/ieee80211/rtl819x_BA.h   |  2 +-
 .../rtl8192u/ieee80211/rtl819x_BAProc.c       | 28 +++++++++----------
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
index 948888224f24..64f20c124456 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
@@ -53,7 +53,7 @@ struct ba_record {
 	struct timer_list		timer;
 	u8				valid;
 	u8				dialog_token;
-	union ba_param_set		BaParamSet;
+	union ba_param_set		param_set;
 	u16				BaTimeoutValue;
 	union sequence_control	BaStartSeqCtrl;
 };
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
index 21398892b0e5..f3c98b9e2765 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
@@ -90,7 +90,7 @@ static u8 RxTsDeleteBA(struct ieee80211_device *ieee, struct rx_ts_record *pRxTs
 void ResetBaEntry(struct ba_record *pBA)
 {
 	pBA->valid			= false;
-	pBA->BaParamSet.short_data	= 0;
+	pBA->param_set.short_data	= 0;
 	pBA->BaTimeoutValue		= 0;
 	pBA->dialog_token		= 0;
 	pBA->BaStartSeqCtrl.short_data	= 0;
@@ -151,7 +151,7 @@ static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, s
 	}
 	// BA Parameter Set
 
-	put_unaligned_le16(pBA->BaParamSet.short_data, tag);
+	put_unaligned_le16(pBA->param_set.short_data, tag);
 	tag += 2;
 	// BA Timeout Value
 
@@ -202,7 +202,7 @@ static struct sk_buff *ieee80211_DELBA(
 	memset(&DelbaParamSet, 0, 2);
 
 	DelbaParamSet.field.initiator	= (TxRxSelect == TX_DIR) ? 1 : 0;
-	DelbaParamSet.field.tid	= pBA->BaParamSet.field.tid;
+	DelbaParamSet.field.tid	= pBA->param_set.field.tid;
 
 	skb = dev_alloc_skb(len + sizeof(struct rtl_80211_hdr_3addr)); //need to add something others? FIXME
 	if (!skb) {
@@ -383,14 +383,14 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
 	//
 	DeActivateBAEntry(ieee, pBA);
 	pBA->dialog_token = *pDialogToken;
-	pBA->BaParamSet = *pBaParamSet;
+	pBA->param_set = *pBaParamSet;
 	pBA->BaTimeoutValue = *pBaTimeoutVal;
 	pBA->BaStartSeqCtrl = *pBaStartSeqCtrl;
 	//for half N mode we only aggregate 1 frame
 	if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))
-	pBA->BaParamSet.field.buffer_size = 1;
+	pBA->param_set.field.buffer_size = 1;
 	else
-	pBA->BaParamSet.field.buffer_size = 32;
+	pBA->param_set.field.buffer_size = 32;
 	ActivateBAEntry(ieee, pBA, pBA->BaTimeoutValue);
 	ieee80211_send_ADDBARsp(ieee, dst, pBA, ADDBA_STATUS_SUCCESS);
 
@@ -400,10 +400,10 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
 OnADDBAReq_Fail:
 	{
 		struct ba_record	BA;
-		BA.BaParamSet = *pBaParamSet;
+		BA.param_set = *pBaParamSet;
 		BA.BaTimeoutValue = *pBaTimeoutVal;
 		BA.dialog_token = *pDialogToken;
-		BA.BaParamSet.field.ba_policy = BA_POLICY_IMMEDIATE;
+		BA.param_set.field.ba_policy = BA_POLICY_IMMEDIATE;
 		ieee80211_send_ADDBARsp(ieee, dst, &BA, rc);
 		return 0; //we send RSP out.
 	}
@@ -513,7 +513,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)
 		pAdmittedBA->dialog_token = *pDialogToken;
 		pAdmittedBA->BaTimeoutValue = *pBaTimeoutVal;
 		pAdmittedBA->BaStartSeqCtrl = pPendingBA->BaStartSeqCtrl;
-		pAdmittedBA->BaParamSet = *pBaParamSet;
+		pAdmittedBA->param_set = *pBaParamSet;
 		DeActivateBAEntry(ieee, pAdmittedBA);
 		ActivateBAEntry(ieee, pAdmittedBA, *pBaTimeoutVal);
 	} else {
@@ -527,7 +527,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)
 OnADDBARsp_Reject:
 	{
 		struct ba_record	BA;
-		BA.BaParamSet = *pBaParamSet;
+		BA.param_set = *pBaParamSet;
 		ieee80211_send_DELBA(ieee, dst, &BA, TX_DIR, ReasonCode);
 		return 0;
 	}
@@ -624,11 +624,11 @@ TsInitAddBA(
 	DeActivateBAEntry(ieee, pBA);
 
 	pBA->dialog_token++;						// 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.ba_policy = Policy;	// Policy: Delayed or Immediate
-	pBA->BaParamSet.field.tid = pTS->ts_common_info.t_spec.ts_info.uc_tsid;	// TID
+	pBA->param_set.field.amsdu_support = 0;	// Do not support A-MSDU with A-MPDU now!!
+	pBA->param_set.field.ba_policy = Policy;	// Policy: Delayed or Immediate
+	pBA->param_set.field.tid = pTS->ts_common_info.t_spec.ts_info.uc_tsid;	// TID
 	// buffer_size: This need to be set according to A-MPDU vector
-	pBA->BaParamSet.field.buffer_size = 32;		// buffer_size: This need to be set according to A-MPDU vector
+	pBA->param_set.field.buffer_size = 32;		// buffer_size: This need to be set according to A-MPDU vector
 	pBA->BaTimeoutValue = 0;					// Timeout value: Set 0 to disable Timer
 	pBA->BaStartSeqCtrl.field.seq_num = (pTS->tx_cur_seq + 3) % 4096;	// Block Ack will start after 3 packets later.
 
-- 
2.18.0


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

* [PATCH 15/17] staging:rtl8192u: Rename BaTimeoutValue - Style
  2018-08-21 17:15 [PATCH 00/17] staging:rtl8192u: Coding Style changes John Whitmore
                   ` (13 preceding siblings ...)
  2018-08-21 17:15 ` [PATCH 14/17] staging:rtl8192u: Rename BaParamSet " John Whitmore
@ 2018-08-21 17:15 ` John Whitmore
  2018-08-21 17:15 ` [PATCH 16/17] staging:rtl8192u: Rename BaStartSeqCtrl " John Whitmore
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: John Whitmore @ 2018-08-21 17:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Rename BaTimeoutValue to timeout_value. This clears checkpatch issue
with CamelCase naming.

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

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h    |  2 +-
 .../staging/rtl8192u/ieee80211/rtl819x_BAProc.c    | 14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
index 64f20c124456..01c30b1f44d2 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
@@ -54,7 +54,7 @@ struct ba_record {
 	u8				valid;
 	u8				dialog_token;
 	union ba_param_set		param_set;
-	u16				BaTimeoutValue;
+	u16				timeout_value;
 	union sequence_control	BaStartSeqCtrl;
 };
 
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
index f3c98b9e2765..102252749c0b 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
@@ -91,7 +91,7 @@ void ResetBaEntry(struct ba_record *pBA)
 {
 	pBA->valid			= false;
 	pBA->param_set.short_data	= 0;
-	pBA->BaTimeoutValue		= 0;
+	pBA->timeout_value		= 0;
 	pBA->dialog_token		= 0;
 	pBA->BaStartSeqCtrl.short_data	= 0;
 }
@@ -155,7 +155,7 @@ static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, s
 	tag += 2;
 	// BA Timeout Value
 
-	put_unaligned_le16(pBA->BaTimeoutValue, tag);
+	put_unaligned_le16(pBA->timeout_value, tag);
 	tag += 2;
 
 	if (ACT_ADDBAREQ == type) {
@@ -384,14 +384,14 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
 	DeActivateBAEntry(ieee, pBA);
 	pBA->dialog_token = *pDialogToken;
 	pBA->param_set = *pBaParamSet;
-	pBA->BaTimeoutValue = *pBaTimeoutVal;
+	pBA->timeout_value = *pBaTimeoutVal;
 	pBA->BaStartSeqCtrl = *pBaStartSeqCtrl;
 	//for half N mode we only aggregate 1 frame
 	if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))
 	pBA->param_set.field.buffer_size = 1;
 	else
 	pBA->param_set.field.buffer_size = 32;
-	ActivateBAEntry(ieee, pBA, pBA->BaTimeoutValue);
+	ActivateBAEntry(ieee, pBA, pBA->timeout_value);
 	ieee80211_send_ADDBARsp(ieee, dst, pBA, ADDBA_STATUS_SUCCESS);
 
 	// End of procedure.
@@ -401,7 +401,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
 	{
 		struct ba_record	BA;
 		BA.param_set = *pBaParamSet;
-		BA.BaTimeoutValue = *pBaTimeoutVal;
+		BA.timeout_value = *pBaTimeoutVal;
 		BA.dialog_token = *pDialogToken;
 		BA.param_set.field.ba_policy = BA_POLICY_IMMEDIATE;
 		ieee80211_send_ADDBARsp(ieee, dst, &BA, rc);
@@ -511,7 +511,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)
 		// Admitted condition
 		//
 		pAdmittedBA->dialog_token = *pDialogToken;
-		pAdmittedBA->BaTimeoutValue = *pBaTimeoutVal;
+		pAdmittedBA->timeout_value = *pBaTimeoutVal;
 		pAdmittedBA->BaStartSeqCtrl = pPendingBA->BaStartSeqCtrl;
 		pAdmittedBA->param_set = *pBaParamSet;
 		DeActivateBAEntry(ieee, pAdmittedBA);
@@ -629,7 +629,7 @@ TsInitAddBA(
 	pBA->param_set.field.tid = pTS->ts_common_info.t_spec.ts_info.uc_tsid;	// TID
 	// buffer_size: This need to be set according to A-MPDU vector
 	pBA->param_set.field.buffer_size = 32;		// buffer_size: This need to be set according to A-MPDU vector
-	pBA->BaTimeoutValue = 0;					// Timeout value: Set 0 to disable Timer
+	pBA->timeout_value = 0;					// Timeout value: Set 0 to disable Timer
 	pBA->BaStartSeqCtrl.field.seq_num = (pTS->tx_cur_seq + 3) % 4096;	// Block Ack will start after 3 packets later.
 
 	ActivateBAEntry(ieee, pBA, BA_SETUP_TIMEOUT);
-- 
2.18.0


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

* [PATCH 16/17] staging:rtl8192u: Rename BaStartSeqCtrl - Style
  2018-08-21 17:15 [PATCH 00/17] staging:rtl8192u: Coding Style changes John Whitmore
                   ` (14 preceding siblings ...)
  2018-08-21 17:15 ` [PATCH 15/17] staging:rtl8192u: Rename BaTimeoutValue " John Whitmore
@ 2018-08-21 17:15 ` John Whitmore
  2018-08-21 17:15 ` [PATCH 17/17] staging:rtl8192u: Remove commented out code and indent " John Whitmore
  2018-08-23  7:44 ` [PATCH 00/17] staging:rtl8192u: Coding Style changes Dan Carpenter
  17 siblings, 0 replies; 22+ messages in thread
From: John Whitmore @ 2018-08-21 17:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Rename BaStartSeqCtrl to start_seq_ctrl. This change clears the
checkpatch issue with CamelCase naming.

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

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c   |  2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h     |  2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 10 +++++-----
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
index a7850b04c81b..024fa2702546 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
@@ -342,7 +342,7 @@ static void ieee80211_tx_query_agg_cap(struct ieee80211_device *ieee,
 		}
 		else if (!pTxTs->using_ba)
 		{
-			if (SN_LESS(pTxTs->tx_admitted_ba_record.BaStartSeqCtrl.field.seq_num, (pTxTs->tx_cur_seq + 1) % 4096))
+			if (SN_LESS(pTxTs->tx_admitted_ba_record.start_seq_ctrl.field.seq_num, (pTxTs->tx_cur_seq + 1) % 4096))
 				pTxTs->using_ba = true;
 			else
 				goto FORCED_AGG_SETTING;
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
index 01c30b1f44d2..1a494ecf05ac 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
@@ -55,7 +55,7 @@ struct ba_record {
 	u8				dialog_token;
 	union ba_param_set		param_set;
 	u16				timeout_value;
-	union sequence_control	BaStartSeqCtrl;
+	union sequence_control	start_seq_ctrl;
 };
 
 #endif //end _BATYPE_H_
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
index 102252749c0b..109445407cec 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
@@ -93,7 +93,7 @@ void ResetBaEntry(struct ba_record *pBA)
 	pBA->param_set.short_data	= 0;
 	pBA->timeout_value		= 0;
 	pBA->dialog_token		= 0;
-	pBA->BaStartSeqCtrl.short_data	= 0;
+	pBA->start_seq_ctrl.short_data	= 0;
 }
 //These functions need porting here or not?
 /*******************************************************************************************************************************
@@ -160,7 +160,7 @@ static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, s
 
 	if (ACT_ADDBAREQ == type) {
 	// BA Start SeqCtrl
-		memcpy(tag, (u8 *)&(pBA->BaStartSeqCtrl), 2);
+		memcpy(tag, (u8 *)&(pBA->start_seq_ctrl), 2);
 		tag += 2;
 	}
 
@@ -385,7 +385,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
 	pBA->dialog_token = *pDialogToken;
 	pBA->param_set = *pBaParamSet;
 	pBA->timeout_value = *pBaTimeoutVal;
-	pBA->BaStartSeqCtrl = *pBaStartSeqCtrl;
+	pBA->start_seq_ctrl = *pBaStartSeqCtrl;
 	//for half N mode we only aggregate 1 frame
 	if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))
 	pBA->param_set.field.buffer_size = 1;
@@ -512,7 +512,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)
 		//
 		pAdmittedBA->dialog_token = *pDialogToken;
 		pAdmittedBA->timeout_value = *pBaTimeoutVal;
-		pAdmittedBA->BaStartSeqCtrl = pPendingBA->BaStartSeqCtrl;
+		pAdmittedBA->start_seq_ctrl = pPendingBA->start_seq_ctrl;
 		pAdmittedBA->param_set = *pBaParamSet;
 		DeActivateBAEntry(ieee, pAdmittedBA);
 		ActivateBAEntry(ieee, pAdmittedBA, *pBaTimeoutVal);
@@ -630,7 +630,7 @@ TsInitAddBA(
 	// buffer_size: This need to be set according to A-MPDU vector
 	pBA->param_set.field.buffer_size = 32;		// buffer_size: This need to be set according to A-MPDU vector
 	pBA->timeout_value = 0;					// Timeout value: Set 0 to disable Timer
-	pBA->BaStartSeqCtrl.field.seq_num = (pTS->tx_cur_seq + 3) % 4096;	// Block Ack will start after 3 packets later.
+	pBA->start_seq_ctrl.field.seq_num = (pTS->tx_cur_seq + 3) % 4096;	// Block Ack will start after 3 packets later.
 
 	ActivateBAEntry(ieee, pBA, BA_SETUP_TIMEOUT);
 
-- 
2.18.0


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

* [PATCH 17/17] staging:rtl8192u: Remove commented out code and indent - Style
  2018-08-21 17:15 [PATCH 00/17] staging:rtl8192u: Coding Style changes John Whitmore
                   ` (15 preceding siblings ...)
  2018-08-21 17:15 ` [PATCH 16/17] staging:rtl8192u: Rename BaStartSeqCtrl " John Whitmore
@ 2018-08-21 17:15 ` John Whitmore
  2018-08-23  7:44 ` [PATCH 00/17] staging:rtl8192u: Coding Style changes Dan Carpenter
  17 siblings, 0 replies; 22+ messages in thread
From: John Whitmore @ 2018-08-21 17:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Remove old commented out structure and clean up the indentation.

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

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 .../staging/rtl8192u/ieee80211/rtl819x_BA.h   | 47 ++++++++-----------
 1 file changed, 20 insertions(+), 27 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
index 1a494ecf05ac..1a727856ba53 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
@@ -2,26 +2,19 @@
 #ifndef _BATYPE_H_
 #define _BATYPE_H_
 
-#define	BA_SETUP_TIMEOUT	200
+#define	BA_SETUP_TIMEOUT	       200
 
-#define	BA_POLICY_DELAYED		0
-#define	BA_POLICY_IMMEDIATE	1
+#define	BA_POLICY_DELAYED		 0
+#define	BA_POLICY_IMMEDIATE	         1
 
-#define	ADDBA_STATUS_SUCCESS			0
+#define	ADDBA_STATUS_SUCCESS		 0
 #define	ADDBA_STATUS_REFUSED		37
 #define	ADDBA_STATUS_INVALID_PARAM	38
 
-#define	DELBA_REASON_END_BA			37
-#define	DELBA_REASON_UNKNOWN_BA	38
-#define	DELBA_REASON_TIMEOUT			39
-/*  whether need define BA Action frames here?
-struct ieee80211_ADDBA_Req{
-	struct ieee80211_header_data header;
-	u8	category;
-	u8
-} __attribute__ ((packed));
-*/
-//Is this need?I put here just to make it easier to define structure BA_RECORD //WB
+#define	DELBA_REASON_END_BA		37
+#define	DELBA_REASON_UNKNOWN_BA	        38
+#define	DELBA_REASON_TIMEOUT		39
+
 union sequence_control {
 	u16 short_data;
 	struct {
@@ -33,28 +26,28 @@ union sequence_control {
 union ba_param_set {
 	u16 short_data;
 	struct {
-		u16 amsdu_support:1;
-		u16 ba_policy:1;
-		u16 tid:4;
-		u16 buffer_size:10;
+		u16	amsdu_support:1;
+		u16	ba_policy:1;
+		u16	tid:4;
+		u16	buffer_size:10;
 	} field;
 };
 
 union delba_param_set {
 	u16 short_data;
 	struct {
-		u16 reserved:11;
-		u16 initiator:1;
-		u16 tid:4;
+		u16	reserved:11;
+		u16	initiator:1;
+		u16	tid:4;
 	} field;
 };
 
 struct ba_record {
-	struct timer_list		timer;
-	u8				valid;
-	u8				dialog_token;
-	union ba_param_set		param_set;
-	u16				timeout_value;
+	struct timer_list	timer;
+	u8			valid;
+	u8			dialog_token;
+	union ba_param_set	param_set;
+	u16			timeout_value;
 	union sequence_control	start_seq_ctrl;
 };
 
-- 
2.18.0


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

* Re: [PATCH 00/17] staging:rtl8192u: Coding Style changes
  2018-08-21 17:15 [PATCH 00/17] staging:rtl8192u: Coding Style changes John Whitmore
                   ` (16 preceding siblings ...)
  2018-08-21 17:15 ` [PATCH 17/17] staging:rtl8192u: Remove commented out code and indent " John Whitmore
@ 2018-08-23  7:44 ` Dan Carpenter
  17 siblings, 0 replies; 22+ messages in thread
From: Dan Carpenter @ 2018-08-23  7:44 UTC (permalink / raw)
  To: John Whitmore; +Cc: linux-kernel, devel, gregkh

Looks good.  Thanks!

regards,
dan carpenter


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

* Re: [PATCH 01/17] staging:rtl8192u: Remove unused defines - Style
  2018-08-21 17:15 ` [PATCH 01/17] staging:rtl8192u: Remove unused defines - Style John Whitmore
@ 2018-08-27 17:27   ` Greg KH
  2018-08-27 19:21     ` John Whitmore
  0 siblings, 1 reply; 22+ messages in thread
From: Greg KH @ 2018-08-27 17:27 UTC (permalink / raw)
  To: John Whitmore; +Cc: linux-kernel, devel

On Tue, Aug 21, 2018 at 06:15:21PM +0100, John Whitmore wrote:
> Remove a number of unused constant definitions.
> 
> This is a coding style change which should have no impact on runtime
> code execution.
> 
> Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
> ---
>  drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 5 -----
>  1 file changed, 5 deletions(-)

Is this series a duplicate of a prebious series?

it doesn't apply at all to my tree now.

totally confused,

greg k-h

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

* Re: [PATCH 01/17] staging:rtl8192u: Remove unused defines - Style
  2018-08-27 17:27   ` Greg KH
@ 2018-08-27 19:21     ` John Whitmore
  2018-08-27 19:30       ` Greg KH
  0 siblings, 1 reply; 22+ messages in thread
From: John Whitmore @ 2018-08-27 19:21 UTC (permalink / raw)
  To: Greg KH; +Cc: John Whitmore, linux-kernel, devel

On Mon, Aug 27, 2018 at 07:27:19PM +0200, Greg KH wrote:
> On Tue, Aug 21, 2018 at 06:15:21PM +0100, John Whitmore wrote:
> > Remove a number of unused constant definitions.
> > 
> > This is a coding style change which should have no impact on runtime
> > code execution.
> > 
> > Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
> > ---
> >  drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 5 -----
> >  1 file changed, 5 deletions(-)
> 
> Is this series a duplicate of a prebious series?
> 
> it doesn't apply at all to my tree now.
> 
> totally confused,
> 
> greg k-h

Sorry didn't mean to confuse you, but now you've got your own back ;)
After this message I got an automated email to say that the patch
had been applied. I'll give it a few days for the changes to make
it into staging-next and if needs be I will resubmit the patch.

Apologies also for sending a snap response from gmail web App. I
still haven't learned that it adds html by default.

jwhitmore

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

* Re: [PATCH 01/17] staging:rtl8192u: Remove unused defines - Style
  2018-08-27 19:21     ` John Whitmore
@ 2018-08-27 19:30       ` Greg KH
  0 siblings, 0 replies; 22+ messages in thread
From: Greg KH @ 2018-08-27 19:30 UTC (permalink / raw)
  To: John Whitmore; +Cc: devel, linux-kernel, John Whitmore

On Mon, Aug 27, 2018 at 08:21:36PM +0100, John Whitmore wrote:
> On Mon, Aug 27, 2018 at 07:27:19PM +0200, Greg KH wrote:
> > On Tue, Aug 21, 2018 at 06:15:21PM +0100, John Whitmore wrote:
> > > Remove a number of unused constant definitions.
> > > 
> > > This is a coding style change which should have no impact on runtime
> > > code execution.
> > > 
> > > Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
> > > ---
> > >  drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 5 -----
> > >  1 file changed, 5 deletions(-)
> > 
> > Is this series a duplicate of a prebious series?
> > 
> > it doesn't apply at all to my tree now.
> > 
> > totally confused,
> > 
> > greg k-h
> 
> Sorry didn't mean to confuse you, but now you've got your own back ;)
> After this message I got an automated email to say that the patch
> had been applied. I'll give it a few days for the changes to make
> it into staging-next and if needs be I will resubmit the patch.

Ok, thanks, I went through all of the staging patches today, I might
have ended up looking at a few of them twice :)

greg k-h

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

end of thread, other threads:[~2018-08-27 19:30 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-21 17:15 [PATCH 00/17] staging:rtl8192u: Coding Style changes John Whitmore
2018-08-21 17:15 ` [PATCH 01/17] staging:rtl8192u: Remove unused defines - Style John Whitmore
2018-08-27 17:27   ` Greg KH
2018-08-27 19:21     ` John Whitmore
2018-08-27 19:30       ` Greg KH
2018-08-21 17:15 ` [PATCH 02/17] staging:rtl8192u: Refactor SEQUENCE_CONTROL " John Whitmore
2018-08-21 17:15 ` [PATCH 03/17] staging:rtl8192u: Rename ShortData " John Whitmore
2018-08-21 17:15 ` [PATCH 04/17] staging:rtl8192u: Rename member variables " John Whitmore
2018-08-21 17:15 ` [PATCH 05/17] staging:rtl8192u: Refactor BA_PARAM_SET " John Whitmore
2018-08-21 17:15 ` [PATCH 06/17] staging:rtl8192u: Remove charData and rename shortData " John Whitmore
2018-08-21 17:15 ` [PATCH 07/17] staging:rtl8192u: Rename ba_param_set members " John Whitmore
2018-08-21 17:15 ` [PATCH 08/17] staging:rtl8192u: Refactor DELBA_PARAM_SET " John Whitmore
2018-08-21 17:15 ` [PATCH 09/17] staging:rtl8192u: Refactor union delba_param_set " John Whitmore
2018-08-21 17:15 ` [PATCH 10/17] staging:rtl8192u: Refactor struct BA_RECORD " John Whitmore
2018-08-21 17:15 ` [PATCH 11/17] staging:rtl8192u: Rename member variable Timer " John Whitmore
2018-08-21 17:15 ` [PATCH 12/17] staging:rtl8192u: Rename bValid " John Whitmore
2018-08-21 17:15 ` [PATCH 13/17] staging:rtl8192u: Rename DialogToken " John Whitmore
2018-08-21 17:15 ` [PATCH 14/17] staging:rtl8192u: Rename BaParamSet " John Whitmore
2018-08-21 17:15 ` [PATCH 15/17] staging:rtl8192u: Rename BaTimeoutValue " John Whitmore
2018-08-21 17:15 ` [PATCH 16/17] staging:rtl8192u: Rename BaStartSeqCtrl " John Whitmore
2018-08-21 17:15 ` [PATCH 17/17] staging:rtl8192u: Remove commented out code and indent " John Whitmore
2018-08-23  7:44 ` [PATCH 00/17] staging:rtl8192u: Coding Style changes Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).