linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/14] staging:rtl8192u: Coding style changes
@ 2018-07-20 20:21 John Whitmore
  2018-07-20 20:21 ` [PATCH 01/14] staging:rtl8192u: Remove multiple blank lines - Style John Whitmore
                   ` (13 more replies)
  0 siblings, 14 replies; 16+ messages in thread
From: John Whitmore @ 2018-07-20 20:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

This is a collection of simple coding style chages to clear checkpatch
issues in the file drivers/staging/rtl8192u/ieee80211/dot11d.h

John Whitmore (14):
  staging:rtl8192u: Remove multiple blank lines - Style
  staging:rtl8192u: Remove typedef from structure - Style
  staging:rtl8192u: Rename structure member FirstChnl - Style
  staging:rtl8192u: Rename variable NumChnls - Style
  staging:rtl8192u: Rename variable MaxTxPowerInDbm - Style
  staging:rtl8192u: Remove typedef and rename DOT11D_STATE - Style
  staging:rtl8192u: Remove typedef and rename struct RT_DOT11D_INFO -
    Style
  staging:rtl8192u: Rename bEnabled > enabled - Style
  staging:rtl8192u: Rename CountryIeLen > country_ie_len - Style
  staging:rtl8192u: Rename CountryIeBuf > country_ie_buf - Style
  staging:rtl8192u: Rename CountryIeSrcAddr > country_ie_src_addr -
    Style
  staging:rtl8192u: Rename CountryIeWatchdog > country_ie_watchdog -
    Style
  staging:rtl8192u: Rename MaxTxPwrDbmList > max_tx_pwr_dbm_list - Style
  staging:rtl8192u: Rename variable State > state - Style

 drivers/staging/rtl8192u/ieee80211/dot11d.c   | 60 +++++++++----------
 drivers/staging/rtl8192u/ieee80211/dot11d.h   | 55 +++++++++--------
 .../rtl8192u/ieee80211/ieee80211_softmac.c    |  2 +-
 drivers/staging/rtl8192u/r8192U_core.c        |  2 +-
 4 files changed, 59 insertions(+), 60 deletions(-)

-- 
2.18.0


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

* [PATCH 01/14] staging:rtl8192u: Remove multiple blank lines - Style
  2018-07-20 20:21 [PATCH 00/14] staging:rtl8192u: Coding style changes John Whitmore
@ 2018-07-20 20:21 ` John Whitmore
  2018-07-20 20:21 ` [PATCH 02/14] staging:rtl8192u: Remove typedef from structure " John Whitmore
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: John Whitmore @ 2018-07-20 20:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Remove multiple blank lines which cause checkpatch issues. These are purely
coding style changes which should not impact execution.

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

diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.h b/drivers/staging/rtl8192u/ieee80211/dot11d.h
index 88bc298305bd..23ab2dae8347 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.h
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.h
@@ -4,7 +4,6 @@
 
 #include "ieee80211.h"
 
-
 typedef struct _CHNL_TXPOWER_TRIPLE {
 	u8 FirstChnl;
 	u8  NumChnls;
@@ -59,7 +58,6 @@ typedef struct _RT_DOT11D_INFO {
 
 #define IS_DOT11D_STATE_DONE(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->State == DOT11D_STATE_DONE)
 
-
 void
 Dot11d_Init(
 	struct ieee80211_device *dev
-- 
2.18.0


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

* [PATCH 02/14] staging:rtl8192u: Remove typedef from structure - Style
  2018-07-20 20:21 [PATCH 00/14] staging:rtl8192u: Coding style changes John Whitmore
  2018-07-20 20:21 ` [PATCH 01/14] staging:rtl8192u: Remove multiple blank lines - Style John Whitmore
@ 2018-07-20 20:21 ` John Whitmore
  2018-07-20 20:21 ` [PATCH 03/14] staging:rtl8192u: Rename structure member FirstChnl " John Whitmore
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: John Whitmore @ 2018-07-20 20:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Remove the typedef directive from struct _CHNL_TXPOWER_TRIPLE. This is a
coding style change which clears a checkpatch issue with declaring new types.
There should be no impact on runtime execution.

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

diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.c b/drivers/staging/rtl8192u/ieee80211/dot11d.c
index ba284bfb3b6d..8ac08ee5256e 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.c
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.c
@@ -54,13 +54,13 @@ void Dot11d_UpdateCountryIe(struct ieee80211_device *dev, u8 *pTaddr,
 {
 	PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
 	u8 i, j, NumTriples, MaxChnlNum;
-	PCHNL_TXPOWER_TRIPLE pTriple;
+	struct chnl_txpower_triple *pTriple;
 
 	memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1);
 	memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);
 	MaxChnlNum = 0;
 	NumTriples = (CoutryIeLen - 3) / 3; /* skip 3-byte country string. */
-	pTriple = (PCHNL_TXPOWER_TRIPLE)(pCoutryIe + 3);
+	pTriple = (struct chnl_txpower_triple *)(pCoutryIe + 3);
 	for (i = 0; i < NumTriples; i++) {
 		if (MaxChnlNum >= pTriple->FirstChnl) {
 			/* It is not in a monotonically increasing order, so
@@ -83,7 +83,7 @@ void Dot11d_UpdateCountryIe(struct ieee80211_device *dev, u8 *pTaddr,
 			MaxChnlNum = pTriple->FirstChnl + j;
 		}
 
-		pTriple = (PCHNL_TXPOWER_TRIPLE)((u8 *)pTriple + 3);
+		pTriple = (struct chnl_txpower_triple *)((u8 *)pTriple + 3);
 	}
 	netdev_info(dev->dev, "Channel List:");
 	for (i = 1; i <= MAX_CHANNEL_NUMBER; i++)
diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.h b/drivers/staging/rtl8192u/ieee80211/dot11d.h
index 23ab2dae8347..9471279cf8e6 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.h
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.h
@@ -4,11 +4,11 @@
 
 #include "ieee80211.h"
 
-typedef struct _CHNL_TXPOWER_TRIPLE {
+struct chnl_txpower_triple {
 	u8 FirstChnl;
 	u8  NumChnls;
 	u8  MaxTxPowerInDbm;
-} CHNL_TXPOWER_TRIPLE, *PCHNL_TXPOWER_TRIPLE;
+};
 
 typedef enum _DOT11D_STATE {
 	DOT11D_STATE_NONE = 0,
-- 
2.18.0


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

* [PATCH 03/14] staging:rtl8192u: Rename structure member FirstChnl - Style
  2018-07-20 20:21 [PATCH 00/14] staging:rtl8192u: Coding style changes John Whitmore
  2018-07-20 20:21 ` [PATCH 01/14] staging:rtl8192u: Remove multiple blank lines - Style John Whitmore
  2018-07-20 20:21 ` [PATCH 02/14] staging:rtl8192u: Remove typedef from structure " John Whitmore
@ 2018-07-20 20:21 ` John Whitmore
  2018-07-20 20:21 ` [PATCH 04/14] staging:rtl8192u: Rename variable NumChnls " John Whitmore
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: John Whitmore @ 2018-07-20 20:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Rename structure member FirstChnl to first_channel. This coding style change
clears a checkpatch issue with CamelCase naming. This change should not impact
the runtime code execution.

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

diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.c b/drivers/staging/rtl8192u/ieee80211/dot11d.c
index 8ac08ee5256e..f24dae97bc0d 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.c
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.c
@@ -62,14 +62,14 @@ void Dot11d_UpdateCountryIe(struct ieee80211_device *dev, u8 *pTaddr,
 	NumTriples = (CoutryIeLen - 3) / 3; /* skip 3-byte country string. */
 	pTriple = (struct chnl_txpower_triple *)(pCoutryIe + 3);
 	for (i = 0; i < NumTriples; i++) {
-		if (MaxChnlNum >= pTriple->FirstChnl) {
+		if (MaxChnlNum >= pTriple->first_channel) {
 			/* It is not in a monotonically increasing order, so
 			 * stop processing.
 			 */
 			netdev_err(dev->dev, "Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n");
 			return;
 		}
-		if (MAX_CHANNEL_NUMBER < (pTriple->FirstChnl + pTriple->NumChnls)) {
+		if (MAX_CHANNEL_NUMBER < (pTriple->first_channel + pTriple->NumChnls)) {
 			/* It is not a valid set of channel id, so stop
 			 * processing.
 			 */
@@ -78,9 +78,9 @@ void Dot11d_UpdateCountryIe(struct ieee80211_device *dev, u8 *pTaddr,
 		}
 
 		for (j = 0; j < pTriple->NumChnls; j++) {
-			pDot11dInfo->channel_map[pTriple->FirstChnl + j] = 1;
-			pDot11dInfo->MaxTxPwrDbmList[pTriple->FirstChnl + j] = pTriple->MaxTxPowerInDbm;
-			MaxChnlNum = pTriple->FirstChnl + j;
+			pDot11dInfo->channel_map[pTriple->first_channel + j] = 1;
+			pDot11dInfo->MaxTxPwrDbmList[pTriple->first_channel + j] = pTriple->MaxTxPowerInDbm;
+			MaxChnlNum = pTriple->first_channel + j;
 		}
 
 		pTriple = (struct chnl_txpower_triple *)((u8 *)pTriple + 3);
diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.h b/drivers/staging/rtl8192u/ieee80211/dot11d.h
index 9471279cf8e6..968c622137df 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.h
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.h
@@ -5,7 +5,7 @@
 #include "ieee80211.h"
 
 struct chnl_txpower_triple {
-	u8 FirstChnl;
+	u8  first_channel;
 	u8  NumChnls;
 	u8  MaxTxPowerInDbm;
 };
-- 
2.18.0


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

* [PATCH 04/14] staging:rtl8192u: Rename variable NumChnls - Style
  2018-07-20 20:21 [PATCH 00/14] staging:rtl8192u: Coding style changes John Whitmore
                   ` (2 preceding siblings ...)
  2018-07-20 20:21 ` [PATCH 03/14] staging:rtl8192u: Rename structure member FirstChnl " John Whitmore
@ 2018-07-20 20:21 ` John Whitmore
  2018-07-20 20:21 ` [PATCH 05/14] staging:rtl8192u: Rename variable MaxTxPowerInDbm " John Whitmore
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: John Whitmore @ 2018-07-20 20:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Rename the member variable NumChnls to num_channels. This change clears the
checkpatch issue with CamelCase naming. The change should not impact runtime
execution.

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

diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.c b/drivers/staging/rtl8192u/ieee80211/dot11d.c
index f24dae97bc0d..17bccb7bf594 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.c
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.c
@@ -69,7 +69,7 @@ void Dot11d_UpdateCountryIe(struct ieee80211_device *dev, u8 *pTaddr,
 			netdev_err(dev->dev, "Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n");
 			return;
 		}
-		if (MAX_CHANNEL_NUMBER < (pTriple->first_channel + pTriple->NumChnls)) {
+		if (MAX_CHANNEL_NUMBER < (pTriple->first_channel + pTriple->num_channels)) {
 			/* It is not a valid set of channel id, so stop
 			 * processing.
 			 */
@@ -77,7 +77,7 @@ void Dot11d_UpdateCountryIe(struct ieee80211_device *dev, u8 *pTaddr,
 			return;
 		}
 
-		for (j = 0; j < pTriple->NumChnls; j++) {
+		for (j = 0; j < pTriple->num_channels; j++) {
 			pDot11dInfo->channel_map[pTriple->first_channel + j] = 1;
 			pDot11dInfo->MaxTxPwrDbmList[pTriple->first_channel + j] = pTriple->MaxTxPowerInDbm;
 			MaxChnlNum = pTriple->first_channel + j;
diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.h b/drivers/staging/rtl8192u/ieee80211/dot11d.h
index 968c622137df..8c2b11d12185 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.h
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.h
@@ -6,7 +6,7 @@
 
 struct chnl_txpower_triple {
 	u8  first_channel;
-	u8  NumChnls;
+	u8  num_channels;
 	u8  MaxTxPowerInDbm;
 };
 
-- 
2.18.0


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

* [PATCH 05/14] staging:rtl8192u: Rename variable MaxTxPowerInDbm - Style
  2018-07-20 20:21 [PATCH 00/14] staging:rtl8192u: Coding style changes John Whitmore
                   ` (3 preceding siblings ...)
  2018-07-20 20:21 ` [PATCH 04/14] staging:rtl8192u: Rename variable NumChnls " John Whitmore
@ 2018-07-20 20:21 ` John Whitmore
  2018-07-20 20:21 ` [PATCH 06/14] staging:rtl8192u: Remove typedef and rename DOT11D_STATE " John Whitmore
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: John Whitmore @ 2018-07-20 20:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Rename the variable MaxTxPowerInDbm to max_tx_pwr_dbm. This change clears a
checkpatch issue with CamelCase naming. This coding style change should not
impact runtime execution.

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

diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.c b/drivers/staging/rtl8192u/ieee80211/dot11d.c
index 17bccb7bf594..44b5e506b140 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.c
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.c
@@ -79,7 +79,7 @@ void Dot11d_UpdateCountryIe(struct ieee80211_device *dev, u8 *pTaddr,
 
 		for (j = 0; j < pTriple->num_channels; j++) {
 			pDot11dInfo->channel_map[pTriple->first_channel + j] = 1;
-			pDot11dInfo->MaxTxPwrDbmList[pTriple->first_channel + j] = pTriple->MaxTxPowerInDbm;
+			pDot11dInfo->MaxTxPwrDbmList[pTriple->first_channel + j] = pTriple->max_tx_pwr_dbm;
 			MaxChnlNum = pTriple->first_channel + j;
 		}
 
diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.h b/drivers/staging/rtl8192u/ieee80211/dot11d.h
index 8c2b11d12185..1b377faa53e0 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.h
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.h
@@ -7,7 +7,7 @@
 struct chnl_txpower_triple {
 	u8  first_channel;
 	u8  num_channels;
-	u8  MaxTxPowerInDbm;
+	u8  max_tx_pwr_dbm;
 };
 
 typedef enum _DOT11D_STATE {
-- 
2.18.0


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

* [PATCH 06/14] staging:rtl8192u: Remove typedef and rename DOT11D_STATE - Style
  2018-07-20 20:21 [PATCH 00/14] staging:rtl8192u: Coding style changes John Whitmore
                   ` (4 preceding siblings ...)
  2018-07-20 20:21 ` [PATCH 05/14] staging:rtl8192u: Rename variable MaxTxPowerInDbm " John Whitmore
@ 2018-07-20 20:21 ` John Whitmore
  2018-07-20 20:21 ` [PATCH 07/14] staging:rtl8192u: Remove typedef and rename struct RT_DOT11D_INFO " John Whitmore
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: John Whitmore @ 2018-07-20 20:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Remove typedef from enumerated type DOT11D_STATE to clear checkpatch issue
with declaring new types.

Rename the enumertion from DOT11D_STATE to dot11d_state.

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

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

diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.h b/drivers/staging/rtl8192u/ieee80211/dot11d.h
index 1b377faa53e0..9402c05cb24f 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.h
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.h
@@ -10,11 +10,11 @@ struct chnl_txpower_triple {
 	u8  max_tx_pwr_dbm;
 };
 
-typedef enum _DOT11D_STATE {
+enum dot11d_state {
 	DOT11D_STATE_NONE = 0,
 	DOT11D_STATE_LEARNED,
 	DOT11D_STATE_DONE,
-} DOT11D_STATE;
+};
 
 typedef struct _RT_DOT11D_INFO {
 	/* DECLARE_RT_OBJECT(RT_DOT11D_INFO); */
@@ -29,7 +29,7 @@ typedef struct _RT_DOT11D_INFO {
 	u8  channel_map[MAX_CHANNEL_NUMBER+1];  /* !Value 0: Invalid, 1: Valid (active scan), 2: Valid (passive scan) */
 	u8  MaxTxPwrDbmList[MAX_CHANNEL_NUMBER+1];
 
-	DOT11D_STATE State;
+	enum dot11d_state State;
 } RT_DOT11D_INFO, *PRT_DOT11D_INFO;
 #define eqMacAddr(a, b)		(((a)[0] == (b)[0] && \
 	(a)[1] == (b)[1] && (a)[2] == (b)[2] && (a)[3] == (b)[3] && \
-- 
2.18.0


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

* [PATCH 07/14] staging:rtl8192u: Remove typedef and rename struct RT_DOT11D_INFO - Style
  2018-07-20 20:21 [PATCH 00/14] staging:rtl8192u: Coding style changes John Whitmore
                   ` (5 preceding siblings ...)
  2018-07-20 20:21 ` [PATCH 06/14] staging:rtl8192u: Remove typedef and rename DOT11D_STATE " John Whitmore
@ 2018-07-20 20:21 ` John Whitmore
  2018-07-21  7:00   ` Greg KH
  2018-07-20 20:21 ` [PATCH 08/14] staging:rtl8192u: Rename bEnabled > enabled " John Whitmore
                   ` (6 subsequent siblings)
  13 siblings, 1 reply; 16+ messages in thread
From: John Whitmore @ 2018-07-20 20:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Removed the typedef from structure RT_DOT11D_INFO. This change clears the
checkpatch issue with declaring new types.

Rename the structure from RT_DOT11D_INFO to rt_dot11d_info.

Coding style changes which should not impact runtime execution of code.

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

diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.c b/drivers/staging/rtl8192u/ieee80211/dot11d.c
index 44b5e506b140..cd63e158c7c8 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.c
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.c
@@ -5,7 +5,7 @@
 
 void Dot11d_Init(struct ieee80211_device *ieee)
 {
-	PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(ieee);
+	struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(ieee);
 
 	pDot11dInfo->bEnabled = false;
 
@@ -23,7 +23,7 @@ EXPORT_SYMBOL(Dot11d_Init);
 void Dot11d_Reset(struct ieee80211_device *ieee)
 {
 	u32 i;
-	PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(ieee);
+	struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(ieee);
 	/* Clear old channel map */
 	memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1);
 	memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);
@@ -52,7 +52,7 @@ EXPORT_SYMBOL(Dot11d_Reset);
 void Dot11d_UpdateCountryIe(struct ieee80211_device *dev, u8 *pTaddr,
 			    u16 CoutryIeLen, u8 *pCoutryIe)
 {
-	PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
+	struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(dev);
 	u8 i, j, NumTriples, MaxChnlNum;
 	struct chnl_txpower_triple *pTriple;
 
@@ -101,7 +101,7 @@ EXPORT_SYMBOL(Dot11d_UpdateCountryIe);
 
 u8 DOT11D_GetMaxTxPwrInDbm(struct ieee80211_device *dev, u8 Channel)
 {
-	PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
+	struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(dev);
 	u8 MaxTxPwrInDbm = 255;
 
 	if (Channel > MAX_CHANNEL_NUMBER) {
@@ -117,7 +117,7 @@ EXPORT_SYMBOL(DOT11D_GetMaxTxPwrInDbm);
 
 void DOT11D_ScanComplete(struct ieee80211_device *dev)
 {
-	PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
+	struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(dev);
 
 	switch (pDot11dInfo->State) {
 	case DOT11D_STATE_LEARNED:
@@ -138,7 +138,7 @@ EXPORT_SYMBOL(DOT11D_ScanComplete);
 
 int IsLegalChannel(struct ieee80211_device *dev, u8 channel)
 {
-	PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
+	struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(dev);
 
 	if (channel > MAX_CHANNEL_NUMBER) {
 		netdev_err(dev->dev, "IsLegalChannel(): Invalid Channel\n");
@@ -152,7 +152,7 @@ EXPORT_SYMBOL(IsLegalChannel);
 
 int ToLegalChannel(struct ieee80211_device *dev, u8 channel)
 {
-	PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
+	struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(dev);
 	u8 default_chn = 0;
 	u32 i = 0;
 
diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.h b/drivers/staging/rtl8192u/ieee80211/dot11d.h
index 9402c05cb24f..8f7426333da5 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.h
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.h
@@ -16,8 +16,8 @@ enum dot11d_state {
 	DOT11D_STATE_DONE,
 };
 
-typedef struct _RT_DOT11D_INFO {
-	/* DECLARE_RT_OBJECT(RT_DOT11D_INFO); */
+struct rt_dot11d_info {
+	/* DECLARE_RT_OBJECT(rt_dot11d_info); */
 
 	bool bEnabled; /* dot11MultiDomainCapabilityEnabled */
 
@@ -30,15 +30,16 @@ typedef struct _RT_DOT11D_INFO {
 	u8  MaxTxPwrDbmList[MAX_CHANNEL_NUMBER+1];
 
 	enum dot11d_state State;
-} RT_DOT11D_INFO, *PRT_DOT11D_INFO;
-#define eqMacAddr(a, b)		(((a)[0] == (b)[0] && \
+};
+
+#define eqMacAddr(a, b)		(((a)[0] == (b)[0] &&		    \
 	(a)[1] == (b)[1] && (a)[2] == (b)[2] && (a)[3] == (b)[3] && \
 	(a)[4] == (b)[4] && (a)[5] == (b)[5]) ? 1 : 0)
 #define cpMacAddr(des, src)	      ((des)[0] = (src)[0], \
 	(des)[1] = (src)[1], (des)[2] = (src)[2], \
 	(des)[3] = (src)[3], (des)[4] = (src)[4], \
 	(des)[5] = (src)[5])
-#define GET_DOT11D_INFO(__pIeeeDev) ((PRT_DOT11D_INFO)((__pIeeeDev)->pDot11dInfo))
+#define GET_DOT11D_INFO(__pIeeeDev) ((struct rt_dot11d_info *)((__pIeeeDev)->pDot11dInfo))
 
 #define IS_DOT11D_ENABLE(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->bEnabled)
 #define IS_COUNTRY_IE_VALID(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->CountryIeLen > 0)
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
index 21874e78d8a1..590f2f2b3134 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
@@ -2684,7 +2684,7 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee)
 	for(i = 0; i < 5; i++) {
 	  ieee->seq_ctrl[i] = 0;
 	}
-	ieee->pDot11dInfo = kzalloc(sizeof(RT_DOT11D_INFO), GFP_KERNEL);
+	ieee->pDot11dInfo = kzalloc(sizeof(struct rt_dot11d_info), GFP_KERNEL);
 	if (!ieee->pDot11dInfo)
 		IEEE80211_DEBUG(IEEE80211_DL_ERR, "can't alloc memory for DOT11D\n");
 	//added for  AP roaming
-- 
2.18.0


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

* [PATCH 08/14] staging:rtl8192u: Rename bEnabled > enabled - Style
  2018-07-20 20:21 [PATCH 00/14] staging:rtl8192u: Coding style changes John Whitmore
                   ` (6 preceding siblings ...)
  2018-07-20 20:21 ` [PATCH 07/14] staging:rtl8192u: Remove typedef and rename struct RT_DOT11D_INFO " John Whitmore
@ 2018-07-20 20:21 ` John Whitmore
  2018-07-20 20:21 ` [PATCH 09/14] staging:rtl8192u: Rename CountryIeLen > country_ie_len " John Whitmore
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: John Whitmore @ 2018-07-20 20:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Rename the member variable bEnabled to enabled. This change clears the
checkpatch issue with CamelCase. Purely a coding style change which should not
impact runtime execution.

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

diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.c b/drivers/staging/rtl8192u/ieee80211/dot11d.c
index cd63e158c7c8..3d2eb19a7f48 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.c
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.c
@@ -7,7 +7,7 @@ void Dot11d_Init(struct ieee80211_device *ieee)
 {
 	struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(ieee);
 
-	pDot11dInfo->bEnabled = false;
+	pDot11dInfo->enabled = false;
 
 	pDot11dInfo->State = DOT11D_STATE_NONE;
 	pDot11dInfo->CountryIeLen = 0;
diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.h b/drivers/staging/rtl8192u/ieee80211/dot11d.h
index 8f7426333da5..cfe342d0b4bb 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.h
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.h
@@ -19,7 +19,7 @@ enum dot11d_state {
 struct rt_dot11d_info {
 	/* DECLARE_RT_OBJECT(rt_dot11d_info); */
 
-	bool bEnabled; /* dot11MultiDomainCapabilityEnabled */
+	bool enabled; /* dot11MultiDomainCapabilityEnabled */
 
 	u16 CountryIeLen; /* > 0 if CountryIeBuf[] contains valid country information element. */
 	u8  CountryIeBuf[MAX_IE_LEN];
@@ -41,7 +41,7 @@ struct rt_dot11d_info {
 	(des)[5] = (src)[5])
 #define GET_DOT11D_INFO(__pIeeeDev) ((struct rt_dot11d_info *)((__pIeeeDev)->pDot11dInfo))
 
-#define IS_DOT11D_ENABLE(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->bEnabled)
+#define IS_DOT11D_ENABLE(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->enabled)
 #define IS_COUNTRY_IE_VALID(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->CountryIeLen > 0)
 
 #define IS_EQUAL_CIE_SRC(__pIeeeDev, __pTa) eqMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 8b17400f6c13..038df372f4a8 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -211,7 +211,7 @@ static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv *priv)
 		/* this flag enabled to follow 11d country IE setting,
 		 * otherwise, it shall follow global domain settings.
 		 */
-		GET_DOT11D_INFO(ieee)->bEnabled = 0;
+		GET_DOT11D_INFO(ieee)->enabled = 0;
 		Dot11d_Reset(ieee);
 		ieee->bGlobalDomain = true;
 		break;
-- 
2.18.0


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

* [PATCH 09/14] staging:rtl8192u: Rename CountryIeLen > country_ie_len - Style
  2018-07-20 20:21 [PATCH 00/14] staging:rtl8192u: Coding style changes John Whitmore
                   ` (7 preceding siblings ...)
  2018-07-20 20:21 ` [PATCH 08/14] staging:rtl8192u: Rename bEnabled > enabled " John Whitmore
@ 2018-07-20 20:21 ` John Whitmore
  2018-07-20 20:21 ` [PATCH 10/14] staging:rtl8192u: Rename CountryIeBuf > country_ie_buf " John Whitmore
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: John Whitmore @ 2018-07-20 20:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Rename CountryIeLen to country_ie_len, coding style change to clear
checkpatch issue with CamelCase naming. The change should have no
impact on runtime code execution.

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

diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.c b/drivers/staging/rtl8192u/ieee80211/dot11d.c
index 3d2eb19a7f48..87af2ddae349 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.c
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.c
@@ -10,7 +10,7 @@ void Dot11d_Init(struct ieee80211_device *ieee)
 	pDot11dInfo->enabled = false;
 
 	pDot11dInfo->State = DOT11D_STATE_NONE;
-	pDot11dInfo->CountryIeLen = 0;
+	pDot11dInfo->country_ie_len = 0;
 	memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER + 1);
 	memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);
 	RESET_CIE_WATCHDOG(ieee);
@@ -35,7 +35,7 @@ void Dot11d_Reset(struct ieee80211_device *ieee)
 		(pDot11dInfo->channel_map)[i] = 2;
 
 	pDot11dInfo->State = DOT11D_STATE_NONE;
-	pDot11dInfo->CountryIeLen = 0;
+	pDot11dInfo->country_ie_len = 0;
 	RESET_CIE_WATCHDOG(ieee);
 }
 EXPORT_SYMBOL(Dot11d_Reset);
@@ -93,7 +93,7 @@ void Dot11d_UpdateCountryIe(struct ieee80211_device *dev, u8 *pTaddr,
 
 	UPDATE_CIE_SRC(dev, pTaddr);
 
-	pDot11dInfo->CountryIeLen = CoutryIeLen;
+	pDot11dInfo->country_ie_len = CoutryIeLen;
 	memcpy(pDot11dInfo->CountryIeBuf, pCoutryIe, CoutryIeLen);
 	pDot11dInfo->State = DOT11D_STATE_LEARNED;
 }
diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.h b/drivers/staging/rtl8192u/ieee80211/dot11d.h
index cfe342d0b4bb..a15b21456101 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.h
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.h
@@ -21,7 +21,7 @@ struct rt_dot11d_info {
 
 	bool enabled; /* dot11MultiDomainCapabilityEnabled */
 
-	u16 CountryIeLen; /* > 0 if CountryIeBuf[] contains valid country information element. */
+	u16 country_ie_len; /* > 0 if CountryIeBuf[] contains valid country information element. */
 	u8  CountryIeBuf[MAX_IE_LEN];
 	u8  CountryIeSrcAddr[6]; /* Source AP of the country IE. */
 	u8  CountryIeWatchdog;
@@ -42,13 +42,13 @@ struct rt_dot11d_info {
 #define GET_DOT11D_INFO(__pIeeeDev) ((struct rt_dot11d_info *)((__pIeeeDev)->pDot11dInfo))
 
 #define IS_DOT11D_ENABLE(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->enabled)
-#define IS_COUNTRY_IE_VALID(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->CountryIeLen > 0)
+#define IS_COUNTRY_IE_VALID(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->country_ie_len > 0)
 
 #define IS_EQUAL_CIE_SRC(__pIeeeDev, __pTa) eqMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa)
 #define UPDATE_CIE_SRC(__pIeeeDev, __pTa) cpMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa)
 
 #define IS_COUNTRY_IE_CHANGED(__pIeeeDev, __Ie) \
-	(((__Ie).Length == 0 || (__Ie).Length != GET_DOT11D_INFO(__pIeeeDev)->CountryIeLen) ? \
+	(((__Ie).Length == 0 || (__Ie).Length != GET_DOT11D_INFO(__pIeeeDev)->country_ie_len) ? \
 	FALSE : \
 	(!memcmp(GET_DOT11D_INFO(__pIeeeDev)->CountryIeBuf, (__Ie).Octet, (__Ie).Length)))
 
-- 
2.18.0


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

* [PATCH 10/14] staging:rtl8192u: Rename CountryIeBuf > country_ie_buf - Style
  2018-07-20 20:21 [PATCH 00/14] staging:rtl8192u: Coding style changes John Whitmore
                   ` (8 preceding siblings ...)
  2018-07-20 20:21 ` [PATCH 09/14] staging:rtl8192u: Rename CountryIeLen > country_ie_len " John Whitmore
@ 2018-07-20 20:21 ` John Whitmore
  2018-07-20 20:21 ` [PATCH 11/14] staging:rtl8192u: Rename CountryIeSrcAddr > country_ie_src_addr " John Whitmore
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: John Whitmore @ 2018-07-20 20:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Rename variable CountryIeBuf to country_ie_buf, this clears the
checkpatch issue with CamelCase naming. This change is a coding style
change which should not impact runtime code execution.

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

diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.c b/drivers/staging/rtl8192u/ieee80211/dot11d.c
index 87af2ddae349..b1205345a7e0 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.c
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.c
@@ -94,7 +94,7 @@ void Dot11d_UpdateCountryIe(struct ieee80211_device *dev, u8 *pTaddr,
 	UPDATE_CIE_SRC(dev, pTaddr);
 
 	pDot11dInfo->country_ie_len = CoutryIeLen;
-	memcpy(pDot11dInfo->CountryIeBuf, pCoutryIe, CoutryIeLen);
+	memcpy(pDot11dInfo->country_ie_buf, pCoutryIe, CoutryIeLen);
 	pDot11dInfo->State = DOT11D_STATE_LEARNED;
 }
 EXPORT_SYMBOL(Dot11d_UpdateCountryIe);
diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.h b/drivers/staging/rtl8192u/ieee80211/dot11d.h
index a15b21456101..109b82e69b5e 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.h
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.h
@@ -21,8 +21,8 @@ struct rt_dot11d_info {
 
 	bool enabled; /* dot11MultiDomainCapabilityEnabled */
 
-	u16 country_ie_len; /* > 0 if CountryIeBuf[] contains valid country information element. */
-	u8  CountryIeBuf[MAX_IE_LEN];
+	u16 country_ie_len; /* > 0 if country_ie_buf[] contains valid country information element. */
+	u8  country_ie_buf[MAX_IE_LEN];
 	u8  CountryIeSrcAddr[6]; /* Source AP of the country IE. */
 	u8  CountryIeWatchdog;
 
@@ -50,7 +50,7 @@ struct rt_dot11d_info {
 #define IS_COUNTRY_IE_CHANGED(__pIeeeDev, __Ie) \
 	(((__Ie).Length == 0 || (__Ie).Length != GET_DOT11D_INFO(__pIeeeDev)->country_ie_len) ? \
 	FALSE : \
-	(!memcmp(GET_DOT11D_INFO(__pIeeeDev)->CountryIeBuf, (__Ie).Octet, (__Ie).Length)))
+	(!memcmp(GET_DOT11D_INFO(__pIeeeDev)->country_ie_buf, (__Ie).Octet, (__Ie).Length)))
 
 #define CIE_WATCHDOG_TH 1
 #define GET_CIE_WATCHDOG(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->CountryIeWatchdog)
-- 
2.18.0


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

* [PATCH 11/14] staging:rtl8192u: Rename CountryIeSrcAddr > country_ie_src_addr - Style
  2018-07-20 20:21 [PATCH 00/14] staging:rtl8192u: Coding style changes John Whitmore
                   ` (9 preceding siblings ...)
  2018-07-20 20:21 ` [PATCH 10/14] staging:rtl8192u: Rename CountryIeBuf > country_ie_buf " John Whitmore
@ 2018-07-20 20:21 ` John Whitmore
  2018-07-20 20:21 ` [PATCH 12/14] staging:rtl8192u: Rename CountryIeWatchdog > country_ie_watchdog " John Whitmore
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: John Whitmore @ 2018-07-20 20:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Rename variable CountryIeSrcAddr to country_ie_src_addr, this change
clears the checkpatch issue with CamelCase naming. This coding style
change should not impact runtime code execution.

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

diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.h b/drivers/staging/rtl8192u/ieee80211/dot11d.h
index 109b82e69b5e..e5087291d64a 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.h
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.h
@@ -23,7 +23,7 @@ struct rt_dot11d_info {
 
 	u16 country_ie_len; /* > 0 if country_ie_buf[] contains valid country information element. */
 	u8  country_ie_buf[MAX_IE_LEN];
-	u8  CountryIeSrcAddr[6]; /* Source AP of the country IE. */
+	u8  country_ie_src_addr[6]; /* Source AP of the country IE. */
 	u8  CountryIeWatchdog;
 
 	u8  channel_map[MAX_CHANNEL_NUMBER+1];  /* !Value 0: Invalid, 1: Valid (active scan), 2: Valid (passive scan) */
@@ -44,8 +44,8 @@ struct rt_dot11d_info {
 #define IS_DOT11D_ENABLE(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->enabled)
 #define IS_COUNTRY_IE_VALID(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->country_ie_len > 0)
 
-#define IS_EQUAL_CIE_SRC(__pIeeeDev, __pTa) eqMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa)
-#define UPDATE_CIE_SRC(__pIeeeDev, __pTa) cpMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa)
+#define IS_EQUAL_CIE_SRC(__pIeeeDev, __pTa) eqMacAddr(GET_DOT11D_INFO(__pIeeeDev)->country_ie_src_addr, __pTa)
+#define UPDATE_CIE_SRC(__pIeeeDev, __pTa) cpMacAddr(GET_DOT11D_INFO(__pIeeeDev)->country_ie_src_addr, __pTa)
 
 #define IS_COUNTRY_IE_CHANGED(__pIeeeDev, __Ie) \
 	(((__Ie).Length == 0 || (__Ie).Length != GET_DOT11D_INFO(__pIeeeDev)->country_ie_len) ? \
-- 
2.18.0


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

* [PATCH 12/14] staging:rtl8192u: Rename CountryIeWatchdog > country_ie_watchdog - Style
  2018-07-20 20:21 [PATCH 00/14] staging:rtl8192u: Coding style changes John Whitmore
                   ` (10 preceding siblings ...)
  2018-07-20 20:21 ` [PATCH 11/14] staging:rtl8192u: Rename CountryIeSrcAddr > country_ie_src_addr " John Whitmore
@ 2018-07-20 20:21 ` John Whitmore
  2018-07-20 20:21 ` [PATCH 13/14] staging:rtl8192u: Rename MaxTxPwrDbmList > max_tx_pwr_dbm_list " John Whitmore
  2018-07-20 20:21 ` [PATCH 14/14] staging:rtl8192u: Rename variable State > state " John Whitmore
  13 siblings, 0 replies; 16+ messages in thread
From: John Whitmore @ 2018-07-20 20:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Rename the member variable CountryIeWatchdog to country_ie_watchdog, this
change clears the checkpatch issue with CamelCase naming of variables.
The change is a simple coding style change which should not impact runtime
code execution.

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

diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.h b/drivers/staging/rtl8192u/ieee80211/dot11d.h
index e5087291d64a..a7fa1a7f01bd 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.h
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.h
@@ -24,7 +24,7 @@ struct rt_dot11d_info {
 	u16 country_ie_len; /* > 0 if country_ie_buf[] contains valid country information element. */
 	u8  country_ie_buf[MAX_IE_LEN];
 	u8  country_ie_src_addr[6]; /* Source AP of the country IE. */
-	u8  CountryIeWatchdog;
+	u8  country_ie_watchdog;
 
 	u8  channel_map[MAX_CHANNEL_NUMBER+1];  /* !Value 0: Invalid, 1: Valid (active scan), 2: Valid (passive scan) */
 	u8  MaxTxPwrDbmList[MAX_CHANNEL_NUMBER+1];
@@ -53,7 +53,7 @@ struct rt_dot11d_info {
 	(!memcmp(GET_DOT11D_INFO(__pIeeeDev)->country_ie_buf, (__Ie).Octet, (__Ie).Length)))
 
 #define CIE_WATCHDOG_TH 1
-#define GET_CIE_WATCHDOG(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->CountryIeWatchdog)
+#define GET_CIE_WATCHDOG(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->country_ie_watchdog)
 #define RESET_CIE_WATCHDOG(__pIeeeDev) (GET_CIE_WATCHDOG(__pIeeeDev) = 0)
 #define UPDATE_CIE_WATCHDOG(__pIeeeDev) (++GET_CIE_WATCHDOG(__pIeeeDev))
 
-- 
2.18.0


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

* [PATCH 13/14] staging:rtl8192u: Rename MaxTxPwrDbmList > max_tx_pwr_dbm_list - Style
  2018-07-20 20:21 [PATCH 00/14] staging:rtl8192u: Coding style changes John Whitmore
                   ` (11 preceding siblings ...)
  2018-07-20 20:21 ` [PATCH 12/14] staging:rtl8192u: Rename CountryIeWatchdog > country_ie_watchdog " John Whitmore
@ 2018-07-20 20:21 ` John Whitmore
  2018-07-20 20:21 ` [PATCH 14/14] staging:rtl8192u: Rename variable State > state " John Whitmore
  13 siblings, 0 replies; 16+ messages in thread
From: John Whitmore @ 2018-07-20 20:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Rename the member variable MaxTxPwrDbmList to max_tx_pwr_dbm_list. This
change clears the checkpatch issue with CamelCase naming. The change is
a simple coding style change which should not impact runtime code execution.

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

diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.c b/drivers/staging/rtl8192u/ieee80211/dot11d.c
index b1205345a7e0..21912b2d728d 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.c
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.c
@@ -12,7 +12,7 @@ void Dot11d_Init(struct ieee80211_device *ieee)
 	pDot11dInfo->State = DOT11D_STATE_NONE;
 	pDot11dInfo->country_ie_len = 0;
 	memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER + 1);
-	memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);
+	memset(pDot11dInfo->max_tx_pwr_dbm_list, 0xFF, MAX_CHANNEL_NUMBER+1);
 	RESET_CIE_WATCHDOG(ieee);
 
 	netdev_info(ieee->dev, "Dot11d_Init()\n");
@@ -26,7 +26,7 @@ void Dot11d_Reset(struct ieee80211_device *ieee)
 	struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(ieee);
 	/* Clear old channel map */
 	memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1);
-	memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);
+	memset(pDot11dInfo->max_tx_pwr_dbm_list, 0xFF, MAX_CHANNEL_NUMBER+1);
 	/* Set new channel map */
 	for (i = 1; i <= 11; i++)
 		(pDot11dInfo->channel_map)[i] = 1;
@@ -57,7 +57,7 @@ void Dot11d_UpdateCountryIe(struct ieee80211_device *dev, u8 *pTaddr,
 	struct chnl_txpower_triple *pTriple;
 
 	memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1);
-	memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);
+	memset(pDot11dInfo->max_tx_pwr_dbm_list, 0xFF, MAX_CHANNEL_NUMBER+1);
 	MaxChnlNum = 0;
 	NumTriples = (CoutryIeLen - 3) / 3; /* skip 3-byte country string. */
 	pTriple = (struct chnl_txpower_triple *)(pCoutryIe + 3);
@@ -79,7 +79,7 @@ void Dot11d_UpdateCountryIe(struct ieee80211_device *dev, u8 *pTaddr,
 
 		for (j = 0; j < pTriple->num_channels; j++) {
 			pDot11dInfo->channel_map[pTriple->first_channel + j] = 1;
-			pDot11dInfo->MaxTxPwrDbmList[pTriple->first_channel + j] = pTriple->max_tx_pwr_dbm;
+			pDot11dInfo->max_tx_pwr_dbm_list[pTriple->first_channel + j] = pTriple->max_tx_pwr_dbm;
 			MaxChnlNum = pTriple->first_channel + j;
 		}
 
@@ -109,7 +109,7 @@ u8 DOT11D_GetMaxTxPwrInDbm(struct ieee80211_device *dev, u8 Channel)
 		return MaxTxPwrInDbm;
 	}
 	if (pDot11dInfo->channel_map[Channel])
-		MaxTxPwrInDbm = pDot11dInfo->MaxTxPwrDbmList[Channel];
+		MaxTxPwrInDbm = pDot11dInfo->max_tx_pwr_dbm_list[Channel];
 
 	return MaxTxPwrInDbm;
 }
diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.h b/drivers/staging/rtl8192u/ieee80211/dot11d.h
index a7fa1a7f01bd..0c7652a2ebb3 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.h
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.h
@@ -27,7 +27,7 @@ struct rt_dot11d_info {
 	u8  country_ie_watchdog;
 
 	u8  channel_map[MAX_CHANNEL_NUMBER+1];  /* !Value 0: Invalid, 1: Valid (active scan), 2: Valid (passive scan) */
-	u8  MaxTxPwrDbmList[MAX_CHANNEL_NUMBER+1];
+	u8  max_tx_pwr_dbm_list[MAX_CHANNEL_NUMBER+1];
 
 	enum dot11d_state State;
 };
-- 
2.18.0


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

* [PATCH 14/14] staging:rtl8192u: Rename variable State > state - Style
  2018-07-20 20:21 [PATCH 00/14] staging:rtl8192u: Coding style changes John Whitmore
                   ` (12 preceding siblings ...)
  2018-07-20 20:21 ` [PATCH 13/14] staging:rtl8192u: Rename MaxTxPwrDbmList > max_tx_pwr_dbm_list " John Whitmore
@ 2018-07-20 20:21 ` John Whitmore
  13 siblings, 0 replies; 16+ messages in thread
From: John Whitmore @ 2018-07-20 20:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Rename the variable State to state, this clears the checkpatch issue
with CamelCase naming. The change is purely coding style and should
not impact runtime code execution.

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

diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.c b/drivers/staging/rtl8192u/ieee80211/dot11d.c
index 21912b2d728d..2fb575a2b6ab 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.c
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.c
@@ -9,7 +9,7 @@ void Dot11d_Init(struct ieee80211_device *ieee)
 
 	pDot11dInfo->enabled = false;
 
-	pDot11dInfo->State = DOT11D_STATE_NONE;
+	pDot11dInfo->state = DOT11D_STATE_NONE;
 	pDot11dInfo->country_ie_len = 0;
 	memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER + 1);
 	memset(pDot11dInfo->max_tx_pwr_dbm_list, 0xFF, MAX_CHANNEL_NUMBER+1);
@@ -34,7 +34,7 @@ void Dot11d_Reset(struct ieee80211_device *ieee)
 	for (i = 12; i <= 14; i++)
 		(pDot11dInfo->channel_map)[i] = 2;
 
-	pDot11dInfo->State = DOT11D_STATE_NONE;
+	pDot11dInfo->state = DOT11D_STATE_NONE;
 	pDot11dInfo->country_ie_len = 0;
 	RESET_CIE_WATCHDOG(ieee);
 }
@@ -95,7 +95,7 @@ void Dot11d_UpdateCountryIe(struct ieee80211_device *dev, u8 *pTaddr,
 
 	pDot11dInfo->country_ie_len = CoutryIeLen;
 	memcpy(pDot11dInfo->country_ie_buf, pCoutryIe, CoutryIeLen);
-	pDot11dInfo->State = DOT11D_STATE_LEARNED;
+	pDot11dInfo->state = DOT11D_STATE_LEARNED;
 }
 EXPORT_SYMBOL(Dot11d_UpdateCountryIe);
 
@@ -119,9 +119,9 @@ void DOT11D_ScanComplete(struct ieee80211_device *dev)
 {
 	struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(dev);
 
-	switch (pDot11dInfo->State) {
+	switch (pDot11dInfo->state) {
 	case DOT11D_STATE_LEARNED:
-		pDot11dInfo->State = DOT11D_STATE_DONE;
+		pDot11dInfo->state = DOT11D_STATE_DONE;
 		break;
 
 	case DOT11D_STATE_DONE:
diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.h b/drivers/staging/rtl8192u/ieee80211/dot11d.h
index 0c7652a2ebb3..5639bb498865 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.h
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.h
@@ -29,7 +29,7 @@ struct rt_dot11d_info {
 	u8  channel_map[MAX_CHANNEL_NUMBER+1];  /* !Value 0: Invalid, 1: Valid (active scan), 2: Valid (passive scan) */
 	u8  max_tx_pwr_dbm_list[MAX_CHANNEL_NUMBER+1];
 
-	enum dot11d_state State;
+	enum dot11d_state state;
 };
 
 #define eqMacAddr(a, b)		(((a)[0] == (b)[0] &&		    \
-- 
2.18.0


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

* Re: [PATCH 07/14] staging:rtl8192u: Remove typedef and rename struct RT_DOT11D_INFO - Style
  2018-07-20 20:21 ` [PATCH 07/14] staging:rtl8192u: Remove typedef and rename struct RT_DOT11D_INFO " John Whitmore
@ 2018-07-21  7:00   ` Greg KH
  0 siblings, 0 replies; 16+ messages in thread
From: Greg KH @ 2018-07-21  7:00 UTC (permalink / raw)
  To: John Whitmore; +Cc: linux-kernel, devel, kstewart, pombredanne, tglx

On Fri, Jul 20, 2018 at 09:21:35PM +0100, John Whitmore wrote:
> Removed the typedef from structure RT_DOT11D_INFO. This change clears the
> checkpatch issue with declaring new types.
> 
> Rename the structure from RT_DOT11D_INFO to rt_dot11d_info.
> 
> Coding style changes which should not impact runtime execution of code.
> 
> Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
> ---
>  drivers/staging/rtl8192u/ieee80211/dot11d.c        | 14 +++++++-------
>  drivers/staging/rtl8192u/ieee80211/dot11d.h        | 11 ++++++-----
>  .../staging/rtl8192u/ieee80211/ieee80211_softmac.c |  2 +-
>  3 files changed, 14 insertions(+), 13 deletions(-)

This patch fails to apply as well.

I've applied the series up to here.  Please rebase what I didn't take
from this, and the last patch from the other series, and resend.

thanks,

greg k-h

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

end of thread, other threads:[~2018-07-21  7:00 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-20 20:21 [PATCH 00/14] staging:rtl8192u: Coding style changes John Whitmore
2018-07-20 20:21 ` [PATCH 01/14] staging:rtl8192u: Remove multiple blank lines - Style John Whitmore
2018-07-20 20:21 ` [PATCH 02/14] staging:rtl8192u: Remove typedef from structure " John Whitmore
2018-07-20 20:21 ` [PATCH 03/14] staging:rtl8192u: Rename structure member FirstChnl " John Whitmore
2018-07-20 20:21 ` [PATCH 04/14] staging:rtl8192u: Rename variable NumChnls " John Whitmore
2018-07-20 20:21 ` [PATCH 05/14] staging:rtl8192u: Rename variable MaxTxPowerInDbm " John Whitmore
2018-07-20 20:21 ` [PATCH 06/14] staging:rtl8192u: Remove typedef and rename DOT11D_STATE " John Whitmore
2018-07-20 20:21 ` [PATCH 07/14] staging:rtl8192u: Remove typedef and rename struct RT_DOT11D_INFO " John Whitmore
2018-07-21  7:00   ` Greg KH
2018-07-20 20:21 ` [PATCH 08/14] staging:rtl8192u: Rename bEnabled > enabled " John Whitmore
2018-07-20 20:21 ` [PATCH 09/14] staging:rtl8192u: Rename CountryIeLen > country_ie_len " John Whitmore
2018-07-20 20:21 ` [PATCH 10/14] staging:rtl8192u: Rename CountryIeBuf > country_ie_buf " John Whitmore
2018-07-20 20:21 ` [PATCH 11/14] staging:rtl8192u: Rename CountryIeSrcAddr > country_ie_src_addr " John Whitmore
2018-07-20 20:21 ` [PATCH 12/14] staging:rtl8192u: Rename CountryIeWatchdog > country_ie_watchdog " John Whitmore
2018-07-20 20:21 ` [PATCH 13/14] staging:rtl8192u: Rename MaxTxPwrDbmList > max_tx_pwr_dbm_list " John Whitmore
2018-07-20 20:21 ` [PATCH 14/14] staging:rtl8192u: Rename variable State > state " John Whitmore

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).