staging:rtl8192u: Coding style changes
cover staging:rtl8192u: Coding style changes
This series includes a number of simple coding style changes.
There are a number of patches which rename symbols which are exported with EXPORT_SYMBOL. This may be a problem, as code using those symbols will have to be changed accordingly.
John Whitmore (17):
staging:rtl8192u: Remove stale comment - Style staging:rtl8192u: Add spaces around '+' operator - Style staging:rtl8192u: Remove unused macro definitions - Style staging:rtl8192u: Rename eqMacAddr macro - Style staging:rtl8192u: Rename cpMacAddr Macro - Style staging:rtl8192u: Rename macro parameter __pIeeeDev - Style staging:rtl8192u: Rename __pTa - Style
staging:rtl8192u: Lines should not end with a '(' - Style staging:rtl8192u: Rename Dot11d_Init - Style staging:rtl8192u: Rename Dot11d_Reset - Style staging:rtl8192u: Rename Dot11d_UpdateCountryIe - Style staging:rtl8192u: Rename dot11d_update_country_ie() parameters - Style staging:rtl8192u: Rename DOT11D_GetMaxTxPwrInDbm - Style staging:rtl8192u: Rename Channel - Style
staging:rtl8192u: Rename DOT11D_ScanComplete - Style staging:rtl8192u: Rename IsLegalChannel - Style staging:rtl8192u: Rename ToLegalChannel - Style
drivers/staging/rtl8192u/ieee80211/dot11d.c | 42 +++++----- drivers/staging/rtl8192u/ieee80211/dot11d.h | 81 +++++-------------- .../staging/rtl8192u/ieee80211/ieee80211_rx.c | 10 +-- .../rtl8192u/ieee80211/ieee80211_softmac.c | 6 +- drivers/staging/rtl8192u/r8192U_core.c | 10 +-- drivers/staging/rtl8192u/r819xU_phy.c | 2 +- 6 files changed, 57 insertions(+), 94 deletions(-)
Signature · 1 line
2.18.0
PATCH 1/17 staging:rtl8192u: Remove stale comment - Style
Remove a comment which appears to be from a previous version of code.
This is a coding style change which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/ieee80211/dot11d.h | 2 -- 1 file changed, 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/dot11d.h +0 -2
@@ -17,8 +17,6 @@ enum dot11d_state { };struct rt_dot11d_info { -/* DECLARE_RT_OBJECT(rt_dot11d_info); */ -bool enabled;/* dot11MultiDomainCapabilityEnabled */ u16 country_ie_len;/* > 0 if country_ie_buf[] contains valid country information element. */
Signature · 1 line
2.18.0
PATCH 2/17 staging:rtl8192u: Add spaces around '+' operator - Style
In reply to John WhitmoreAdd spaces around '+' operator as required by the coding standard. This clears the checkpatch issue.
This change is purely coding style in nature and should have not effect on 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,8 +24,8 @@ struct rt_dot11d_info {u8 country_ie_src_addr[6 ];/* Source AP of the country IE. */ u8 country_ie_watchdog; -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 ]; +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; };
Signature · 1 line
2.18.0
PATCH 3/17 staging:rtl8192u: Remove unused macro definitions - Style
In reply to John WhitmoreRemoved unused macro definitions as they add nothing to the code.
This is a coding style change which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/ieee80211/dot11d.h | 8 -------- 1 file changed, 8 deletions(-)
drivers/staging/rtl8192u/ieee80211/dot11d.h +0 -8
@@ -45,18 +45,10 @@ struct rt_dot11d_info {#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) ? \ - FALSE : \ - (!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)->country_ie_watchdog)#define RESET_CIE_WATCHDOG (__pIeeeDev) (GET_CIE_WATCHDOG(__pIeeeDev) = 0)#define UPDATE_CIE_WATCHDOG (__pIeeeDev) (++GET_CIE_WATCHDOG(__pIeeeDev)) -#define IS_DOT11D_STATE_DONE (__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->State == DOT11D_STATE_DONE) -void Dot11d_Init ( struct ieee80211_device *dev
Signature · 1 line
2.18.0
PATCH 4/17 staging:rtl8192u: Rename eqMacAddr macro - Style
In reply to John WhitmoreThe eqMacAddr(a, b) macro causes a checkpatch issue, due to CamelCase naming, so has been renamed to eq_mac_addr(a, b).
This is a coding style change which should not impact on runtime code execution.
--- drivers/staging/rtl8192u/ieee80211/dot11d.h | 4 ++-- drivers/staging/rtl8192u/r8192U_core.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/rtl8192u/ieee80211/dot11d.h +2 -2
@@ -30,7 +30,7 @@ struct rt_dot11d_info {enum dot11d_state state; }; -#define eqMacAddr (a, b) (((a)[0] == (b)[0] && \ +#define eq_mac_addr (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], \
@@ -42,7 +42,7 @@ 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)->country_ie_src_addr, __pTa) +#define IS_EQUAL_CIE_SRC (__pIeeeDev, __pTa) eq_mac_addr(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 GET_CIE_WATCHDOG (__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->country_ie_watchdog)
drivers/staging/rtl8192u/r8192U_core.c +3 -3
@@ -4460,15 +4460,15 @@ static void TranslateRxSignalStuff819xUsb(struct sk_buff *skb,/* Check if the received packet is acceptable. */ bpacket_match_bssid = (type !=IEEE80211_FTYPE_CTL ) && - (eqMacAddr (priv->ieee80211->current_network.bssid, (fc &IEEE80211_FCTL_TODS ) ? hdr->addr1 : (fc &IEEE80211_FCTL_FROMDS ) ? hdr->addr2 : hdr->addr3)) + (eq_mac_addr (priv->ieee80211->current_network.bssid, (fc &IEEE80211_FCTL_TODS ) ? hdr->addr1 : (fc &IEEE80211_FCTL_FROMDS ) ? hdr->addr2 : hdr->addr3)) && (!pstats->bHwError) && (!pstats->bCRC) && (!pstats->bICV); bpacket_toself = bpacket_match_bssid & - (eqMacAddr (praddr, priv->ieee80211->dev->dev_addr)); + (eq_mac_addr (praddr, priv->ieee80211->dev->dev_addr));if (WLAN_FC_GET_FRAMETYPE (fc) ==IEEE80211_STYPE_BEACON ) bPacketBeacon = true;if (WLAN_FC_GET_FRAMETYPE (fc) ==IEEE80211_STYPE_BLOCKACK ) { -if ((eqMacAddr (praddr, dev->dev_addr))) +if ((eq_mac_addr (praddr, dev->dev_addr))) bToSelfBA = true; }
Signature · 1 line
2.18.0
Re: [PATCH 04/17] staging:rtl8192u: Rename eqMacAddr macro - Style
Quoted 5 lines · John Whitmore
The
eqMacAddr(a, b)macro causes a checkpatch issue, due to CamelCase naming, so has been renamed toeq_mac_addr(a, b).This is a coding style change which should not impact on runtime code execution.
[]
drivers/staging/rtl8192u/ieee80211/dot11d.h
Quoted 1 line
drivers/staging/rtl8192u/ieee80211/dot11d.h +0
-0
[]
drivers/staging/rtl8192u/ieee80211/dot11d.h struct rt_dot11d_info { · line 35
Quoted 8 lines
drivers/staging/rtl8192u/ieee80211/dot11d.h +1
-1@@ -30,7 +30,7 @@ struct rt_dot11d_info {enum dot11d_state state; }; -#define eqMacAddr (a, b) (((a)[0] == (b)[0] && \ +#define eq_mac_addr (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)
I'd check to see if the etherdevice.h ether_addr_equal would be used instead of this macro.
Re: [PATCH 04/17] staging:rtl8192u: Rename eqMacAddr macro - Style
Quoted 13 lines · Joe Perches
Quoted 5 lines · John Whitmore
The
eqMacAddr(a, b)macro causes a checkpatch issue, due to CamelCase naming, so has been renamed toeq_mac_addr(a, b).This is a coding style change which should not impact on runtime code execution.
[]
drivers/staging/rtl8192u/ieee80211/dot11d.h
Quoted 1 line
drivers/staging/rtl8192u/ieee80211/dot11d.h +0
-0[]
Quoted 4 lines
drivers/staging/rtl8192u/ieee80211/dot11d.h +0
-0@@ -30,7 +30,7 @@ struct rt_dot11d_info {enum dot11d_state state; };
Quoted 8 lines
drivers/staging/rtl8192u/ieee80211/dot11d.h struct rt_dot11d_info { · line 35
Quoted 4 lines
drivers/staging/rtl8192u/ieee80211/dot11d.h +1
-1-#define eqMacAddr (a, b) (((a)[0] == (b)[0] && \ +#define eq_mac_addr (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)I'd check to see if the
etherdevice.hether_addr_equalwould be used instead of this macro.
Deadly thanks a million for that input! That Macro gives a checkpatch warning about the obvious side effects, which I have yet to tackle. I'm cherry picking the easy stuff ;) getting to know my way around.
I'll check that other macro later today and hopefully reissue a better v2 of the series. (same for your second email on the other macro)
thanks again.
PATCH 5/17 staging:rtl8192u: Rename cpMacAddr Macro - Style
In reply to John WhitmoreRename the Macro cpMacAddr(des, src), as it causes a checkpatch issue due its use of CamelCase naming, to cp_mac_addr(des, src).
This is a coding style change so should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/ieee80211/dot11d.h | 4 ++-- drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8192u/ieee80211/dot11d.h +2 -2
@@ -33,7 +33,7 @@ struct rt_dot11d_info {#define eq_mac_addr (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], \ +#define cp_mac_addr (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])
@@ -43,7 +43,7 @@ struct rt_dot11d_info {#define IS_COUNTRY_IE_VALID (__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->country_ie_len > 0)#define IS_EQUAL_CIE_SRC (__pIeeeDev, __pTa) eq_mac_addr(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 UPDATE_CIE_SRC (__pIeeeDev, __pTa) cp_mac_addr(GET_DOT11D_INFO(__pIeeeDev)->country_ie_src_addr, __pTa)#define GET_CIE_WATCHDOG (__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->country_ie_watchdog)#define RESET_CIE_WATCHDOG (__pIeeeDev) (GET_CIE_WATCHDOG(__pIeeeDev) = 0)
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c +1 -1
@@ -1944,7 +1944,7 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee, { network->bMBssidValid = true; network->MBssidMask =0xff << (network->MBssidMask); -cpMacAddr (network->MBssid, network->bssid); +cp_mac_addr (network->MBssid, network->bssid); network->MBssid[5 ] &= network->MBssidMask; } else
Signature · 1 line
2.18.0
Re: [PATCH 05/17] staging:rtl8192u: Rename cpMacAddr Macro - Style
Quoted 2 lines · John Whitmore
Rename the Macro
cpMacAddr(des, src), as it causes a checkpatch issue due its use of CamelCase naming, tocp_mac_addr(des, src).
[]
drivers/staging/rtl8192u/ieee80211/dot11d.h
Quoted 1 line
drivers/staging/rtl8192u/ieee80211/dot11d.h +0
-0
[]
drivers/staging/rtl8192u/ieee80211/dot11d.h struct rt_dot11d_info { · line 39
Quoted 9 lines
drivers/staging/rtl8192u/ieee80211/dot11d.h +1
-1@@ -33,7 +33,7 @@ struct rt_dot11d_info {#define eq_mac_addr (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], \ +#define cp_mac_addr (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])
And this could be ether_addr_copy
PATCH 6/17 staging:rtl8192u: Rename macro parameter __pIeeeDev - Style
In reply to John WhitmoreMultiple macros, defined in dot11d.h, use the variable __pIeeeDev as a parameter. This name causes a checkpatch issue due to its use of CamelCase naming. The parameter name has been changed to ieee_dev to clear this issue.
This is a coding style change which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/ieee80211/dot11d.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/staging/rtl8192u/ieee80211/dot11d.h +8 -8
@@ -37,17 +37,17 @@ struct rt_dot11d_info { (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) ((struct rt_dot11d_info *)((__pIeeeDev)->pDot11dInfo)) +#define GET_DOT11D_INFO (ieee_dev) ((struct rt_dot11d_info *)((ieee_dev)->pDot11dInfo)) -#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_DOT11D_ENABLE (ieee_dev) (GET_DOT11D_INFO(ieee_dev)->enabled) +#define IS_COUNTRY_IE_VALID (ieee_dev) (GET_DOT11D_INFO(ieee_dev)->country_ie_len > 0) -#define IS_EQUAL_CIE_SRC (__pIeeeDev, __pTa) eq_mac_addr(GET_DOT11D_INFO(__pIeeeDev)->country_ie_src_addr, __pTa) -#define UPDATE_CIE_SRC (__pIeeeDev, __pTa) cp_mac_addr(GET_DOT11D_INFO(__pIeeeDev)->country_ie_src_addr, __pTa) +#define IS_EQUAL_CIE_SRC (ieee_dev, __pTa) eq_mac_addr(GET_DOT11D_INFO(ieee_dev)->country_ie_src_addr, __pTa) +#define UPDATE_CIE_SRC (ieee_dev, __pTa) cp_mac_addr(GET_DOT11D_INFO(ieee_dev)->country_ie_src_addr, __pTa) -#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)) +#define GET_CIE_WATCHDOG (ieee_dev) (GET_DOT11D_INFO(ieee_dev)->country_ie_watchdog) +#define RESET_CIE_WATCHDOG (ieee_dev) (GET_CIE_WATCHDOG(ieee_dev) = 0) +#define UPDATE_CIE_WATCHDOG (ieee_dev) (++GET_CIE_WATCHDOG(ieee_dev))void Dot11d_Init(
Signature · 1 line
2.18.0
PATCH 7/17 staging:rtl8192u: Rename __pTa - Style
In reply to John WhitmoreThe macro parameter __pTa causes a checkpatch issue because of its use of CamelCase naming. The parameter has this been renamed to addr.
This is a coding style change which should have no impact on 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
@@ -42,8 +42,8 @@ struct rt_dot11d_info {#define IS_DOT11D_ENABLE (ieee_dev) (GET_DOT11D_INFO(ieee_dev)->enabled)#define IS_COUNTRY_IE_VALID (ieee_dev) (GET_DOT11D_INFO(ieee_dev)->country_ie_len > 0) -#define IS_EQUAL_CIE_SRC (ieee_dev, __pTa) eq_mac_addr(GET_DOT11D_INFO(ieee_dev)->country_ie_src_addr, __pTa) -#define UPDATE_CIE_SRC (ieee_dev, __pTa) cp_mac_addr(GET_DOT11D_INFO(ieee_dev)->country_ie_src_addr, __pTa) +#define IS_EQUAL_CIE_SRC (ieee_dev, addr) eq_mac_addr(GET_DOT11D_INFO(ieee_dev)->country_ie_src_addr, addr) +#define UPDATE_CIE_SRC (ieee_dev, addr) cp_mac_addr(GET_DOT11D_INFO(ieee_dev)->country_ie_src_addr, addr)#define GET_CIE_WATCHDOG (ieee_dev) (GET_DOT11D_INFO(ieee_dev)->country_ie_watchdog)#define RESET_CIE_WATCHDOG (ieee_dev) (GET_CIE_WATCHDOG(ieee_dev) = 0)
Signature · 1 line
2.18.0
PATCH 8/17 staging:rtl8192u: Lines should not end with a '(' - Style
In reply to John WhitmoreA number of function prototypes cause a checkpatch issue - "Lines should not end with a '(' ". This issue has been cleared by moving function prototype parameters to the same line as the function name.
This is a coding style change which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/ieee80211/dot11d.h | 47 +++++---------------- 1 file changed, 10 insertions(+), 37 deletions(-)
drivers/staging/rtl8192u/ieee80211/dot11d.h +10 -37
@@ -49,42 +49,15 @@ struct rt_dot11d_info {#define RESET_CIE_WATCHDOG (ieee_dev) (GET_CIE_WATCHDOG(ieee_dev) = 0)#define UPDATE_CIE_WATCHDOG (ieee_dev) (++GET_CIE_WATCHDOG(ieee_dev)) -void -Dot11d_Init ( -struct ieee80211_device *dev - ); +void Dot11d_Init (struct ieee80211_device *dev); +void Dot11d_Reset (struct ieee80211_device *dev); +void Dot11d_UpdateCountryIe (struct ieee80211_device *dev, +u8 *pTaddr, +u16 CoutryIeLen, +u8 *pCoutryIe); +u8 DOT11D_GetMaxTxPwrInDbm (struct ieee80211_device *dev,u8 Channel); +void DOT11D_ScanComplete (struct ieee80211_device *dev); +int IsLegalChannel (struct ieee80211_device *dev,u8 channel); +int ToLegalChannel (struct ieee80211_device *dev,u8 channel); -void -Dot11d_Reset ( -struct ieee80211_device *dev - ); - -void -Dot11d_UpdateCountryIe ( -struct ieee80211_device *dev, -u8 *pTaddr, -u16 CoutryIeLen, -u8 *pCoutryIe - ); - -u8 -DOT11D_GetMaxTxPwrInDbm ( -struct ieee80211_device *dev, -u8 Channel - ); - -void -DOT11D_ScanComplete ( -struct ieee80211_device *dev - ); - -int IsLegalChannel ( -struct ieee80211_device *dev, -u8 channel -); - -int ToLegalChannel ( -struct ieee80211_device *dev, -u8 channel -);#endif /* #ifndef __INC_DOT11D_H */
Signature · 1 line
2.18.0
PATCH 9/17 staging:rtl8192u: Rename Dot11d_Init - Style
In reply to John WhitmoreThe function Dot11d_Init() causes a checkpatch issue due to its use of CamelCase naming. The function has been renamed to dot11d_init.
This is a coding style change which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/ieee80211/dot11d.c | 6 +++--- drivers/staging/rtl8192u/ieee80211/dot11d.h | 2 +- drivers/staging/rtl8192u/r8192U_core.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/rtl8192u/ieee80211/dot11d.c +3 -3
@@ -3,7 +3,7 @@#include "dot11d.h" -void Dot11d_Init (struct ieee80211_device *ieee) +void dot11d_init (struct ieee80211_device *ieee) {struct rt_dot11d_info *pDot11dInfo =GET_DOT11D_INFO (ieee);
@@ -15,9 +15,9 @@ void Dot11d_Init(struct ieee80211_device *ieee)memset (pDot11dInfo->max_tx_pwr_dbm_list,0xFF ,MAX_CHANNEL_NUMBER +1 );RESET_CIE_WATCHDOG (ieee); -netdev_info (ieee->dev,"Dot11d_Init()\n" ); +netdev_info (ieee->dev,"dot11d_init()\n" ); } -EXPORT_SYMBOL (Dot11d_Init); +EXPORT_SYMBOL (dot11d_init);/* Reset to the state as we are just entering a regulatory domain. */ void Dot11d_Reset (struct ieee80211_device *ieee)
drivers/staging/rtl8192u/ieee80211/dot11d.h +1 -1
@@ -49,7 +49,7 @@ struct rt_dot11d_info {#define RESET_CIE_WATCHDOG (ieee_dev) (GET_CIE_WATCHDOG(ieee_dev) = 0)#define UPDATE_CIE_WATCHDOG (ieee_dev) (++GET_CIE_WATCHDOG(ieee_dev)) -void Dot11d_Init (struct ieee80211_device *dev); +void dot11d_init (struct ieee80211_device *dev);void Dot11d_Reset (struct ieee80211_device *dev); void Dot11d_UpdateCountryIe(struct ieee80211_device *dev, u8 *pTaddr,
drivers/staging/rtl8192u/r8192U_core.c +1 -1
@@ -183,7 +183,7 @@ static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv *priv)case COUNTRY_CODE_ISRAEL :case COUNTRY_CODE_TELEC :case COUNTRY_CODE_MIC : -Dot11d_Init (ieee); +dot11d_init (ieee); ieee->bGlobalDomain = false;/* actually 8225 & 8256 rf chips only support B,G,24N mode */ if ((priv->rf_chip ==RF_8225 ) || (priv->rf_chip ==RF_8256 )) {
Signature · 1 line
2.18.0
PATCH 10/17 staging:rtl8192u: Rename Dot11d_Reset - Style
In reply to John WhitmoreThe function Dot11d_Reset causes a checkpatch issue due to its use of CamelCase naming, so has been rename to dot11d_reset.
This is a coding style change which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/ieee80211/dot11d.c | 6 +++--- drivers/staging/rtl8192u/ieee80211/dot11d.h | 2 +- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 2 +- drivers/staging/rtl8192u/r8192U_core.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8192u/ieee80211/dot11d.c +3 -3
@@ -20,7 +20,7 @@ void dot11d_init(struct ieee80211_device *ieee)EXPORT_SYMBOL (dot11d_init);/* Reset to the state as we are just entering a regulatory domain. */ -void Dot11d_Reset (struct ieee80211_device *ieee) +void dot11d_reset (struct ieee80211_device *ieee) {u32 i;struct rt_dot11d_info *pDot11dInfo =GET_DOT11D_INFO (ieee);
@@ -38,7 +38,7 @@ void Dot11d_Reset(struct ieee80211_device *ieee) pDot11dInfo->country_ie_len =0 ;RESET_CIE_WATCHDOG (ieee); } -EXPORT_SYMBOL (Dot11d_Reset); +EXPORT_SYMBOL (dot11d_reset);/* * Update country IE from Beacon or Probe Resopnse and configure PHY for
@@ -127,7 +127,7 @@ void DOT11D_ScanComplete(struct ieee80211_device *dev)case DOT11D_STATE_DONE :if (GET_CIE_WATCHDOG (dev) ==0 ) {/* Reset country IE if previous one is gone. */ -Dot11d_Reset (dev); +dot11d_reset (dev); }break ;case DOT11D_STATE_NONE :
drivers/staging/rtl8192u/ieee80211/dot11d.h +1 -1
@@ -50,7 +50,7 @@ struct rt_dot11d_info {#define UPDATE_CIE_WATCHDOG (ieee_dev) (++GET_CIE_WATCHDOG(ieee_dev))void dot11d_init (struct ieee80211_device *dev); -void Dot11d_Reset (struct ieee80211_device *dev); +void dot11d_reset (struct ieee80211_device *dev); void Dot11d_UpdateCountryIe(struct ieee80211_device *dev, u8 *pTaddr, u16 CoutryIeLen,
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +1 -1
@@ -2357,7 +2357,7 @@ void ieee80211_disassociate(struct ieee80211_device *ieee)if (ieee->data_hard_stop) ieee->data_hard_stop (ieee->dev);if (IS_DOT11D_ENABLE (ieee)) -Dot11d_Reset (ieee); +dot11d_reset (ieee); ieee->state =IEEE80211_NOLINK ; ieee->is_set_key = false; ieee->link_change (ieee->dev);
drivers/staging/rtl8192u/r8192U_core.c +1 -1
@@ -212,7 +212,7 @@ static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv *priv)* otherwise, it shall follow global domain settings. */ GET_DOT11D_INFO (ieee)->enabled =0 ; -Dot11d_Reset (ieee); +dot11d_reset (ieee); ieee->bGlobalDomain = true;break ;
Signature · 1 line
2.18.0
PATCH 11/17 staging:rtl8192u: Rename Dot11d_UpdateCountryIe - Style
In reply to John WhitmoreThe function Dot11d_UpdateCountryIe causes a checkpatch issue due to its use of CamelCase naming, the function has been renamed to dot11d_update_country_ie.
This is a coding style change which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/ieee80211/dot11d.c | 8 ++++---- drivers/staging/rtl8192u/ieee80211/dot11d.h | 8 ++++---- drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-)
drivers/staging/rtl8192u/ieee80211/dot11d.c +4 -4
@@ -49,7 +49,7 @@ EXPORT_SYMBOL(dot11d_reset);* 1. IS_DOT11D_ENABLE() is TRUE. * 2. Input IE is an valid one. */ -void Dot11d_UpdateCountryIe (struct ieee80211_device *dev,u8 *pTaddr, +void dot11d_update_country_ie (struct ieee80211_device *dev,u8 *pTaddr,u16 CoutryIeLen,u8 *pCoutryIe) {struct rt_dot11d_info *pDot11dInfo =GET_DOT11D_INFO (dev);
@@ -66,14 +66,14 @@ void Dot11d_UpdateCountryIe(struct ieee80211_device *dev, u8 *pTaddr,/* It is not in a monotonically increasing order, so * stop processing. */ -netdev_err (dev->dev,"Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n" ); +netdev_err (dev->dev,"dot11d_update_country_ie(): Invalid country IE, skip it........1\n" );return ; }if (MAX_CHANNEL_NUMBER < (pTriple->first_channel + pTriple->num_channels)) {/* It is not a valid set of channel id, so stop * processing. */ -netdev_err (dev->dev,"Dot11d_UpdateCountryIe(): Invalid country IE, skip it........2\n" ); +netdev_err (dev->dev,"dot11d_update_country_ie(): Invalid country IE, skip it........2\n" );return ; }
@@ -97,7 +97,7 @@ void Dot11d_UpdateCountryIe(struct ieee80211_device *dev, u8 *pTaddr,memcpy (pDot11dInfo->country_ie_buf, pCoutryIe, CoutryIeLen); pDot11dInfo->state =DOT11D_STATE_LEARNED ; } -EXPORT_SYMBOL (Dot11d_UpdateCountryIe); +EXPORT_SYMBOL (dot11d_update_country_ie);u8 DOT11D_GetMaxTxPwrInDbm (struct ieee80211_device *dev,u8 Channel) {
drivers/staging/rtl8192u/ieee80211/dot11d.h +4 -4
@@ -51,10 +51,10 @@ struct rt_dot11d_info {void dot11d_init (struct ieee80211_device *dev);void dot11d_reset (struct ieee80211_device *dev); -void Dot11d_UpdateCountryIe (struct ieee80211_device *dev, -u8 *pTaddr, -u16 CoutryIeLen, -u8 *pCoutryIe); +void dot11d_update_country_ie (struct ieee80211_device *dev, +u8 *pTaddr, +u16 CoutryIeLen, +u8 *pCoutryIe);u8 DOT11D_GetMaxTxPwrInDbm (struct ieee80211_device *dev,u8 Channel);void DOT11D_ScanComplete (struct ieee80211_device *dev);int IsLegalChannel (struct ieee80211_device *dev,u8 channel);
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c +1 -1
@@ -1582,7 +1582,7 @@ static inline void ieee80211_extract_country_ie(if (!IS_COUNTRY_IE_VALID (ieee)) { -Dot11d_UpdateCountryIe (ieee, addr2, info_element->len, info_element->data); +dot11d_update_country_ie (ieee, addr2, info_element->len, info_element->data); } }
Signature · 1 line
2.18.0
PATCH 12/17 staging:rtl8192u: Rename dot11d_update_country_ie() parameters - Style
In reply to John WhitmoreThe function dot11d_update_country_ie() uses parameter names which cause a checkpatch issue de to the use of CamelCase naming.
This is a coding style change which should have no impact on 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
@@ -52,9 +52,9 @@ struct rt_dot11d_info {void dot11d_init (struct ieee80211_device *dev);void dot11d_reset (struct ieee80211_device *dev);void dot11d_update_country_ie (struct ieee80211_device *dev, -u8 *pTaddr, -u16 CoutryIeLen, -u8 *pCoutryIe); +u8 *addr, +u16 coutry_ie_len, +u8 *coutry_ie);u8 DOT11D_GetMaxTxPwrInDbm (struct ieee80211_device *dev,u8 Channel);void DOT11D_ScanComplete (struct ieee80211_device *dev);int IsLegalChannel (struct ieee80211_device *dev,u8 channel);
Signature · 1 line
2.18.0
PATCH 13/17 staging:rtl8192u: Rename DOT11D_GetMaxTxPwrInDbm - Style
In reply to John WhitmoreThe function DOT11D_GetMaxTxPwrInDbm causes a checkpatch issue due to its use of CamelCase naming. The function has been renamed to dot11d_get_max_tx_pwr_in_dbm.
This is a coding style change which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/ieee80211/dot11d.c | 6 +++--- drivers/staging/rtl8192u/ieee80211/dot11d.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8192u/ieee80211/dot11d.c +3 -3
@@ -99,13 +99,13 @@ void dot11d_update_country_ie(struct ieee80211_device *dev, u8 *pTaddr, }EXPORT_SYMBOL (dot11d_update_country_ie); -u8 DOT11D_GetMaxTxPwrInDbm (struct ieee80211_device *dev,u8 Channel) +u8 dot11d_get_max_tx_pwr_in_dbm (struct ieee80211_device *dev,u8 Channel) {struct rt_dot11d_info *pDot11dInfo =GET_DOT11D_INFO (dev);u8 MaxTxPwrInDbm =255 ;if (Channel >MAX_CHANNEL_NUMBER ) { -netdev_err (dev->dev,"DOT11D_GetMaxTxPwrInDbm(): Invalid Channel\n" ); +netdev_err (dev->dev,"dot11d_get_max_tx_pwr_in_dbm(): Invalid Channel\n" );return MaxTxPwrInDbm; }if (pDot11dInfo->channel_map[Channel])
@@ -113,7 +113,7 @@ u8 DOT11D_GetMaxTxPwrInDbm(struct ieee80211_device *dev, u8 Channel)return MaxTxPwrInDbm; } -EXPORT_SYMBOL (DOT11D_GetMaxTxPwrInDbm); +EXPORT_SYMBOL (dot11d_get_max_tx_pwr_in_dbm);void DOT11D_ScanComplete (struct ieee80211_device *dev) {
drivers/staging/rtl8192u/ieee80211/dot11d.h +1 -1
@@ -55,7 +55,7 @@ void dot11d_update_country_ie(struct ieee80211_device *dev,u8 *addr, u16 coutry_ie_len, u8 *coutry_ie); -u8 DOT11D_GetMaxTxPwrInDbm (struct ieee80211_device *dev,u8 Channel); +u8 dot11d_get_max_tx_pwr_in_dbm (struct ieee80211_device *dev,u8 Channel);void DOT11D_ScanComplete (struct ieee80211_device *dev);int IsLegalChannel (struct ieee80211_device *dev,u8 channel);int ToLegalChannel (struct ieee80211_device *dev,u8 channel);
Signature · 1 line
2.18.0
PATCH 14/17 staging:rtl8192u: Rename Channel - Style
In reply to John WhitmoreThe function dot11d_get_max_tx_pwr_in_dbm() uses a parameter name, Channel, which causes a checkpatch issue with CamelCase naming. The parameter has been renamed to channel.
The change is a coding style change which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/ieee80211/dot11d.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192u/ieee80211/dot11d.h +1 -1
@@ -55,7 +55,7 @@ void dot11d_update_country_ie(struct ieee80211_device *dev,u8 *addr, u16 coutry_ie_len, u8 *coutry_ie); -u8 dot11d_get_max_tx_pwr_in_dbm (struct ieee80211_device *dev,u8 Channel); +u8 dot11d_get_max_tx_pwr_in_dbm (struct ieee80211_device *dev,u8 channel);void DOT11D_ScanComplete (struct ieee80211_device *dev);int IsLegalChannel (struct ieee80211_device *dev,u8 channel);int ToLegalChannel (struct ieee80211_device *dev,u8 channel);
Signature · 1 line
2.18.0
PATCH 15/17 staging:rtl8192u: Rename DOT11D_ScanComplete - Style
In reply to John WhitmoreThe function DOT11D_ScanComplete causes a checkpatch issue due to its use of CamelCase naming. The function has been renamed to dot11d_scan_complete.
This is a coding style change which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/ieee80211/dot11d.c | 4 ++-- drivers/staging/rtl8192u/ieee80211/dot11d.h | 2 +- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/rtl8192u/ieee80211/dot11d.c +2 -2
@@ -115,7 +115,7 @@ u8 dot11d_get_max_tx_pwr_in_dbm(struct ieee80211_device *dev, u8 Channel) }EXPORT_SYMBOL (dot11d_get_max_tx_pwr_in_dbm); -void DOT11D_ScanComplete (struct ieee80211_device *dev) +void dot11d_scan_complete (struct ieee80211_device *dev) {struct rt_dot11d_info *pDot11dInfo =GET_DOT11D_INFO (dev);
@@ -134,7 +134,7 @@ void DOT11D_ScanComplete(struct ieee80211_device *dev)break ; } } -EXPORT_SYMBOL (DOT11D_ScanComplete); +EXPORT_SYMBOL (dot11d_scan_complete);int IsLegalChannel (struct ieee80211_device *dev,u8 channel) {
drivers/staging/rtl8192u/ieee80211/dot11d.h +1 -1
@@ -56,7 +56,7 @@ void dot11d_update_country_ie(struct ieee80211_device *dev,u16 coutry_ie_len, u8 *coutry_ie);u8 dot11d_get_max_tx_pwr_in_dbm (struct ieee80211_device *dev,u8 channel); -void DOT11D_ScanComplete (struct ieee80211_device *dev); +void dot11d_scan_complete (struct ieee80211_device *dev);int IsLegalChannel (struct ieee80211_device *dev,u8 channel);int ToLegalChannel (struct ieee80211_device *dev,u8 channel);
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +2 -2
@@ -464,7 +464,7 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee) }else { ieee->sync_scan_hurryup =0 ;if (IS_DOT11D_ENABLE (ieee)) -DOT11D_ScanComplete (ieee); +dot11d_scan_complete (ieee);mutex_unlock (&ieee->scan_mutex); } }
@@ -504,7 +504,7 @@ static void ieee80211_softmac_scan_wq(struct work_struct *work)return ; out:if (IS_DOT11D_ENABLE (ieee)) -DOT11D_ScanComplete (ieee); +dot11d_scan_complete (ieee); ieee->actscanning = false; watchdog =0 ; ieee->scanning =0 ;
Signature · 1 line
2.18.0
PATCH 16/17 staging:rtl8192u: Rename IsLegalChannel - Style
In reply to John WhitmoreThe function IsLegalChannel causes a checkpatch issue due to its use of CamelCase naming. The function has been renamed to is_legal_channel.
This is a coding style change which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/ieee80211/dot11d.c | 8 ++++---- drivers/staging/rtl8192u/ieee80211/dot11d.h | 2 +- drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 6 +++--- drivers/staging/rtl8192u/r819xU_phy.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-)
drivers/staging/rtl8192u/ieee80211/dot11d.c +4 -4
@@ -136,19 +136,19 @@ void dot11d_scan_complete(struct ieee80211_device *dev) }EXPORT_SYMBOL (dot11d_scan_complete); -int IsLegalChannel (struct ieee80211_device *dev,u8 channel) +int is_legal_channel (struct ieee80211_device *dev,u8 channel) {struct rt_dot11d_info *pDot11dInfo =GET_DOT11D_INFO (dev);if (channel >MAX_CHANNEL_NUMBER ) { -netdev_err (dev->dev,"IsLegalChannel(): Invalid Channel\n" ); +netdev_err (dev->dev,"is_legal_channel(): Invalid Channel\n" );return 0 ; }if (pDot11dInfo->channel_map[channel] >0 )return 1 ;return 0 ; } -EXPORT_SYMBOL (IsLegalChannel); +EXPORT_SYMBOL (is_legal_channel);int ToLegalChannel (struct ieee80211_device *dev,u8 channel) {
@@ -164,7 +164,7 @@ int ToLegalChannel(struct ieee80211_device *dev, u8 channel) }if (channel >MAX_CHANNEL_NUMBER ) { -netdev_err (dev->dev,"IsLegalChannel(): Invalid Channel\n" ); +netdev_err (dev->dev,"is_legal_channel(): Invalid Channel\n" );return default_chn; }
drivers/staging/rtl8192u/ieee80211/dot11d.h +1 -1
@@ -57,7 +57,7 @@ void dot11d_update_country_ie(struct ieee80211_device *dev, u8 *coutry_ie);u8 dot11d_get_max_tx_pwr_in_dbm (struct ieee80211_device *dev,u8 channel);void dot11d_scan_complete (struct ieee80211_device *dev); -int IsLegalChannel (struct ieee80211_device *dev,u8 channel); +int is_legal_channel (struct ieee80211_device *dev,u8 channel);int ToLegalChannel (struct ieee80211_device *dev,u8 channel);#endif /* #ifndef __INC_DOT11D_H */
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c +3 -3
@@ -2439,7 +2439,7 @@ static inline void ieee80211_process_probe_response(// then wireless adapter should do active scan from ch1~11 and // passive scan from ch12~14 -if (!IsLegalChannel (ieee, network->channel)) +if (!is_legal_channel (ieee, network->channel)) goto out;if (ieee->bGlobalDomain) {
@@ -2448,7 +2448,7 @@ static inline void ieee80211_process_probe_response(// Case 1: Country code if (IS_COUNTRY_IE_VALID (ieee) ) { -if (!IsLegalChannel (ieee, network->channel)) { +if (!is_legal_channel (ieee, network->channel)) {printk ("GetScanInfo(): For Country code, filter probe response at channel(%d).\n" , network->channel); goto out; }
@@ -2469,7 +2469,7 @@ static inline void ieee80211_process_probe_response(// Case 1: Country code if (IS_COUNTRY_IE_VALID (ieee) ) { -if (!IsLegalChannel (ieee, network->channel)) { +if (!is_legal_channel (ieee, network->channel)) {printk ("GetScanInfo(): For Country code, filter beacon at channel(%d).\n" ,network->channel); goto out; }
drivers/staging/rtl8192u/r819xU_phy.c +1 -1
@@ -1271,7 +1271,7 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,RT_TRACE (COMP_CH ,"%s() stage: %d, step: %d, channel: %d\n" , __func__, *stage, *step, channel); -if (!IsLegalChannel (priv->ieee80211, channel)) { +if (!is_legal_channel (priv->ieee80211, channel)) {RT_TRACE (COMP_ERR ,"set to illegal channel: %d\n" , channel);/* return true to tell upper caller function this channel * setting is finished! Or it will in while loop.
Signature · 1 line
2.18.0
PATCH 17/17 staging:rtl8192u: Rename ToLegalChannel - Style
In reply to John WhitmoreRename the function ToLegalChannel, which causes a checkpatch issue due to its use of CamelCase naming. The function has been renamed to to_legal_channel.
This is a coding style change which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/ieee80211/dot11d.c | 4 ++-- drivers/staging/rtl8192u/ieee80211/dot11d.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8192u/ieee80211/dot11d.c +2 -2
@@ -150,7 +150,7 @@ int is_legal_channel(struct ieee80211_device *dev, u8 channel) }EXPORT_SYMBOL (is_legal_channel); -int ToLegalChannel (struct ieee80211_device *dev,u8 channel) +int to_legal_channel (struct ieee80211_device *dev,u8 channel) {struct rt_dot11d_info *pDot11dInfo =GET_DOT11D_INFO (dev);u8 default_chn =0 ;
@@ -173,4 +173,4 @@ int ToLegalChannel(struct ieee80211_device *dev, u8 channel)return default_chn; } -EXPORT_SYMBOL (ToLegalChannel); +EXPORT_SYMBOL (to_legal_channel);
drivers/staging/rtl8192u/ieee80211/dot11d.h +1 -1
@@ -58,6 +58,6 @@ void dot11d_update_country_ie(struct ieee80211_device *dev,u8 dot11d_get_max_tx_pwr_in_dbm (struct ieee80211_device *dev,u8 channel);void dot11d_scan_complete (struct ieee80211_device *dev);int is_legal_channel (struct ieee80211_device *dev,u8 channel); -int ToLegalChannel (struct ieee80211_device *dev,u8 channel); +int to_legal_channel (struct ieee80211_device *dev,u8 channel);#endif /* #ifndef __INC_DOT11D_H */
Signature · 1 line
2.18.0