staging:rtl8192u: Coding style changes
v2 cover staging:rtl8192u: Coding style changes
These patches are previously failed patches from two seperate series of coding style changes. I've just combined the failed from both into this series.
I compiled the patches with 'format-patch -v2' Never used the '-v' option previously so hope it's not a mistake to do so. Guess I'll find out if it is.
Thanks
John Whitmore (10):
staging:rtl8192u: Rename TClasProc > t_clas_proc - Style staging:rtl8192u: Rename TClasNum > t_clas_num - 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 to country_ie_buf - Style staging:rtl8192u: Rename variable CountryIeSrcAddr - 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 | 44 +++++++++---------- drivers/staging/rtl8192u/ieee80211/dot11d.h | 39 ++++++++-------- .../rtl8192u/ieee80211/ieee80211_softmac.c | 2 +- .../staging/rtl8192u/ieee80211/rtl819x_TS.h | 4 +- .../rtl8192u/ieee80211/rtl819x_TSProc.c | 8 ++-- drivers/staging/rtl8192u/r8192U_core.c | 2 +- 6 files changed, 50 insertions(+), 49 deletions(-)
Signature · 1 line
2.18.0
PATCH v2 1/10 staging:rtl8192u: Rename TClasProc > t_clas_proc - Style
Rename the struct TS_COMMON_INFO member variable TClasProc to t_clas_proc. This change clears the checkpatch issue with CamelCase variable names. There should be no impact on runtime execution.
--- drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h +1 -1
@@ -22,7 +22,7 @@ struct ts_common_info {u8 addr[6 ];TSPEC_BODY t_spec;QOS_TCLAS t_class[TCLAS_NUM ]; -u8 TClasProc; +u8 t_clas_proc;u8 TClasNum; };
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +2 -2
@@ -106,7 +106,7 @@ static void ResetTsCommonInfo(struct ts_common_info *pTsCommonInfo)eth_zero_addr (pTsCommonInfo->addr);memset (&pTsCommonInfo->t_spec,0 ,sizeof (TSPEC_BODY ));memset (&pTsCommonInfo->t_class,0 ,sizeof (QOS_TCLAS )*TCLAS_NUM ); - pTsCommonInfo->TClasProc =0 ; + pTsCommonInfo->t_clas_proc =0 ; pTsCommonInfo->TClasNum =0 ; }
@@ -281,7 +281,7 @@ static void MakeTSEntry(struct ts_common_info *pTsCommonInfo, u8 *Addr,for (count =0 ; count < TCLAS_Num; count++)memcpy ((u8 *)(&(pTsCommonInfo->t_class[count])), (u8 *)pTCLAS,sizeof (QOS_TCLAS )); - pTsCommonInfo->TClasProc = TCLAS_Proc; + pTsCommonInfo->t_clas_proc = TCLAS_Proc; pTsCommonInfo->TClasNum = TCLAS_Num; }
Signature · 1 line
2.18.0
PATCH v2 2/10 staging:rtl8192u: Rename TClasNum > t_clas_num - Style
In reply to John WhitmoreRename the struct TS_COMMON_INFO member variable TClasNum to t_clas_num. This change clears the checkpatch issue with CamelCase naming. There should be no impact on runtime execution.
--- drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h +1 -1
@@ -23,7 +23,7 @@ struct ts_common_info {TSPEC_BODY t_spec;QOS_TCLAS t_class[TCLAS_NUM ];u8 t_clas_proc; -u8 TClasNum; +u8 t_clas_num; }; typedef struct _TX_TS_RECORD {
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +2 -2
@@ -107,7 +107,7 @@ static void ResetTsCommonInfo(struct ts_common_info *pTsCommonInfo)memset (&pTsCommonInfo->t_spec,0 ,sizeof (TSPEC_BODY ));memset (&pTsCommonInfo->t_class,0 ,sizeof (QOS_TCLAS )*TCLAS_NUM ); pTsCommonInfo->t_clas_proc =0 ; - pTsCommonInfo->TClasNum =0 ; + pTsCommonInfo->t_clas_num =0 ; }static void ResetTxTsEntry (PTX_TS_RECORD pTS)
@@ -282,7 +282,7 @@ static void MakeTSEntry(struct ts_common_info *pTsCommonInfo, u8 *Addr,memcpy ((u8 *)(&(pTsCommonInfo->t_class[count])), (u8 *)pTCLAS,sizeof (QOS_TCLAS )); pTsCommonInfo->t_clas_proc = TCLAS_Proc; - pTsCommonInfo->TClasNum = TCLAS_Num; + pTsCommonInfo->t_clas_num = TCLAS_Num; }
Signature · 1 line
2.18.0
PATCH v2 3/10 staging:rtl8192u: Remove typedef and rename struct RT_DOT11D_INFO - Style
In reply to John WhitmoreRemoved 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.
--- 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(-)
drivers/staging/rtl8192u/ieee80211/dot11d.c +7 -7
@@ -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 ;
drivers/staging/rtl8192u/ieee80211/dot11d.h +6 -5
@@ -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)
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +1 -1
@@ -2542,7 +2542,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
Signature · 1 line
2.18.0
PATCH v2 4/10 staging:rtl8192u: Rename bEnabled > enabled - Style
In reply to John WhitmoreRename 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.
--- 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(-)
drivers/staging/rtl8192u/ieee80211/dot11d.c +1 -1
@@ -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 ;
drivers/staging/rtl8192u/ieee80211/dot11d.h +2 -2
@@ -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)
drivers/staging/rtl8192u/r8192U_core.c +1 -1
@@ -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 ;
Signature · 1 line
2.18.0
PATCH v2 5/10 staging:rtl8192u: Rename CountryIeLen > country_ie_len - Style
In reply to John WhitmoreRename 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.
--- drivers/staging/rtl8192u/ieee80211/dot11d.c | 6 +++--- drivers/staging/rtl8192u/ieee80211/dot11d.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8192u/ieee80211/dot11d.c +3 -3
@@ -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 ; }
drivers/staging/rtl8192u/ieee80211/dot11d.h +3 -3
@@ -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)))
Signature · 1 line
2.18.0
PATCH v2 6/10 staging:rtl8192u: Rename CountryIeBuf to country_ie_buf - Style
In reply to John WhitmoreRename the member variable CountryIeBuf to country_ie_buf. This change clears the checkpatch issue with CamelCase. The change is purely coding style and should not impact runtime code execution.
--- drivers/staging/rtl8192u/ieee80211/dot11d.c | 2 +- drivers/staging/rtl8192u/ieee80211/dot11d.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8192u/ieee80211/dot11d.c +1 -1
@@ -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);
drivers/staging/rtl8192u/ieee80211/dot11d.h +3 -3
@@ -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)
Signature · 1 line
2.18.0
PATCH v2 7/10 staging:rtl8192u: Rename variable CountryIeSrcAddr - Style
In reply to John WhitmoreRename the member variable CountryIeSrcAddr to country_ie_src_addr, this clears the checkpatch issue with CamelCase naming. The change is purely a coding style change and should not impact runtime code execution.
--- drivers/staging/rtl8192u/ieee80211/dot11d.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8192u/ieee80211/dot11d.h +3 -3
@@ -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) ? \
Signature · 1 line
2.18.0
PATCH v2 8/10 staging:rtl8192u: Rename CountryIeWatchdog > country_ie_watchdog - Style
In reply to John WhitmoreRename 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.
--- drivers/staging/rtl8192u/ieee80211/dot11d.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/dot11d.h +2 -2
@@ -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))
Signature · 1 line
2.18.0
PATCH v2 9/10 staging:rtl8192u: Rename MaxTxPwrDbmList > max_tx_pwr_dbm_list - Style
In reply to John WhitmoreRename 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.
--- drivers/staging/rtl8192u/ieee80211/dot11d.c | 10 +++++----- drivers/staging/rtl8192u/ieee80211/dot11d.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8192u/ieee80211/dot11d.c +5 -5
@@ -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; }
drivers/staging/rtl8192u/ieee80211/dot11d.h +1 -1
@@ -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; };
Signature · 1 line
2.18.0
PATCH v2 10/10 staging:rtl8192u: Rename variable State > state - Style
In reply to John WhitmoreRename 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.
--- drivers/staging/rtl8192u/ieee80211/dot11d.c | 10 +++++----- drivers/staging/rtl8192u/ieee80211/dot11d.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8192u/ieee80211/dot11d.c +5 -5
@@ -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 :
drivers/staging/rtl8192u/ieee80211/dot11d.h +1 -1
@@ -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] && \
Signature · 1 line
2.18.0