staging: rtl8188eu: Fix comment formatting
PATCH 1/4 staging: rtl8188eu: Fix comment formatting
Fix the following checkpatch warnings:
WARNING: Block comments use * on subsequent lines
WARNING: Block comments use a trailing */ on a separate line
--- .../staging/rtl8188eu/core/rtw_ieee80211.c | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-)
drivers/staging/rtl8188eu/core/rtw_ieee80211.c +17 -9
@@ -139,9 +139,11 @@ u8 *rtw_set_iereturn pbuf + len +2 ; } -/*---------------------------------------------------------------------------- -index: the information element id index, limit is the limit for search ------------------------------------------------------------------------------*/ +/* +* ---------------------------------------------------------------------------- +* index: the information element id index, limit is the limit for search +* ---------------------------------------------------------------------------- +*/ u8 *rtw_get_ie (u8 *pbuf,int index,uint *len,int limit) {int tmp, i;
@@ -680,9 +682,11 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen, {unsigned int oui; -/* first 3 bytes in vendor specific information element are the IEEE +/* +* first 3 bytes in vendor specific information element are the IEEE * OUI of the vendor. The following byte is used a vendor specific -* sub-type. */ +* sub-type. +*/ if (elen <4 ) {if (show_errors) { DBG_88E("short vendor specific information element ignored (len=%lu)\n",
@@ -694,12 +698,16 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen, oui =RTW_GET_BE24 (pos);switch (oui) {case OUI_MICROSOFT : -/* Microsoft/Wi-Fi information elements are further typed and -* subtyped */ +/* +* Microsoft/Wi-Fi information elements are further typed and +* subtyped +*/ switch (pos[3 ]) {case 1 : -/* Microsoft OUI (00:50:F2) with OUI Type 1: -* real WPA information element */ +/* +* Microsoft OUI (00:50:F2) with OUI Type 1: +* real WPA information element +*/ elems->wpa_ie = pos; elems->wpa_ie_len = elen;break ;
Signature · 1 line
2.27.0
PATCH 2/4 staging: rtl8188eu: Fix strings split across lines
Fix the following checkpatch warning:
WARNING: quoted string split across lines
--- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8188eu/core/rtw_ieee80211.c +6 -6
@@ -381,8 +381,8 @@ int rtw_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwis left -=2 ;if (count ==0 || left < count *WPA_SELECTOR_LEN ) { -RT_TRACE (_module_rtl871x_mlme_c_, _drv_err_, ("%s: ie count botch (pairwise), " -"count %u left %u" , __func__, count, left)); +RT_TRACE (_module_rtl871x_mlme_c_, _drv_err_, ("%s: ie count botch (pairwise), count %u left %u" , + __func__, count, left));return _FAIL; }
@@ -448,8 +448,8 @@ int rtw_parse_wpa2_ie(u8 *rsn_ie, int rsn_ie_len, int *group_cipher, int *pairwi left -=2 ;if (count ==0 || left < count *RSN_SELECTOR_LEN ) { -RT_TRACE (_module_rtl871x_mlme_c_, _drv_err_, ("%s: ie count botch (pairwise), " -"count %u left %u" , __func__, count, left)); +RT_TRACE (_module_rtl871x_mlme_c_, _drv_err_, ("%s: ie count botch (pairwise), count %u left %u" , + __func__, count, left));return _FAIL; }
@@ -943,8 +943,8 @@ static int rtw_get_cipher_info(struct wlan_network *pnetwork) pnetwork->BcnInfo.pairwise_cipher = pairwise_cipher; pnetwork->BcnInfo.group_cipher = group_cipher; pnetwork->BcnInfo.is_8021x = is8021x; -RT_TRACE (_module_rtl871x_mlme_c_, _drv_info_, ("%s: pnetwork->pairwise_cipher: %d," -"pnetwork->group_cipher is %d, is_8021x is %d" , __func__, pnetwork->BcnInfo.pairwise_cipher, +RT_TRACE (_module_rtl871x_mlme_c_, _drv_info_, ("%s: pnetwork->pairwise_cipher: %d, pnetwork->group_cipher is %d, is_8021x is %d" , + __func__, pnetwork->BcnInfo.pairwise_cipher, pnetwork->BcnInfo.group_cipher, pnetwork->BcnInfo.is_8021x)); ret = _SUCCESS; }
Signature · 1 line
2.27.0
PATCH 3/4 staging: rtl8188eu: Fix indentation
Fix the following checkpatch warning:
WARNING: suspect code indent for conditional statements (16, 32)
--- .../staging/rtl8188eu/core/rtw_ieee80211.c | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-)
drivers/staging/rtl8188eu/core/rtw_ieee80211.c +15 -15
@@ -494,23 +494,23 @@ void rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie authmode = in_ie[cnt];if ((authmode == _WPA_IE_ID_) && (!memcmp (&in_ie[cnt +2 ], &wpa_oui[0 ],4 ))) { -RT_TRACE (_module_rtl871x_mlme_c_, _drv_info_, - ("\n rtw_get_wpa_ie: sec_idx =%d in_ie[cnt+1]+2 =%d\n" , - sec_idx, in_ie[cnt +1 ] +2 )); - -if (wpa_ie) { -memcpy (wpa_ie, &in_ie[cnt], in_ie[cnt +1 ] +2 ); - -for (i =0 ; i < (in_ie[cnt +1 ] +2 ); i +=8 ) { -RT_TRACE (_module_rtl871x_mlme_c_, _drv_info_, - ("\n %2x,%2x,%2x,%2x,%2x,%2x,%2x,%2x\n" , - wpa_ie[i], wpa_ie[i +1 ], wpa_ie[i +2 ], wpa_ie[i +3 ], wpa_ie[i +4 ], - wpa_ie[i +5 ], wpa_ie[i +6 ], wpa_ie[i +7 ])); - } +RT_TRACE (_module_rtl871x_mlme_c_, _drv_info_, + ("\n rtw_get_wpa_ie: sec_idx =%d in_ie[cnt+1]+2 =%d\n" , + sec_idx, in_ie[cnt +1 ] +2 )); + +if (wpa_ie) { +memcpy (wpa_ie, &in_ie[cnt], in_ie[cnt +1 ] +2 ); + +for (i =0 ; i < (in_ie[cnt +1 ] +2 ); i +=8 ) { +RT_TRACE (_module_rtl871x_mlme_c_, _drv_info_, + ("\n %2x,%2x,%2x,%2x,%2x,%2x,%2x,%2x\n" , + wpa_ie[i], wpa_ie[i +1 ], wpa_ie[i +2 ], wpa_ie[i +3 ], wpa_ie[i +4 ], + wpa_ie[i +5 ], wpa_ie[i +6 ], wpa_ie[i +7 ])); } + } - *wpa_len = in_ie[cnt +1 ] +2 ; - cnt += in_ie[cnt +1 ] +2 ;/* get next */ + *wpa_len = in_ie[cnt +1 ] +2 ; + cnt += in_ie[cnt +1 ] +2 ;/* get next */ }else {if (authmode == _WPA2_IE_ID_) { RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
Signature · 1 line
2.27.0
PATCH 4/4 staging: rtl8188eu: Replace function name with __func__
Fix the following checkpatch warning:
WARNING: Prefer using '"%s...", __func__' to using 'rtw_get_bcn_info', this function's name, in a string
--- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8188eu/core/rtw_ieee80211.c +4 -4
@@ -986,10 +986,10 @@ void rtw_get_bcn_info(struct wlan_network *pnetwork)if (bencrypt) pnetwork->BcnInfo.encryp_protocol =ENCRYP_PROTOCOL_WEP ; } -RT_TRACE (_module_rtl871x_mlme_c_, _drv_info_, ("rtw_get_bcn_info: pnetwork->encryp_protocol is %x\n" , - pnetwork->BcnInfo.encryp_protocol)); -RT_TRACE (_module_rtl871x_mlme_c_, _drv_info_, ("rtw_get_bcn_info: pnetwork->encryp_protocol is %x\n" , - pnetwork->BcnInfo.encryp_protocol)); +RT_TRACE (_module_rtl871x_mlme_c_, _drv_info_, ("%s: pnetwork->encryp_protocol is %x\n" , + __func__, pnetwork->BcnInfo.encryp_protocol)); +RT_TRACE (_module_rtl871x_mlme_c_, _drv_info_, ("%s: pnetwork->encryp_protocol is %x\n" , + __func__, pnetwork->BcnInfo.encryp_protocol));rtw_get_cipher_info (pnetwork);/* get bwmode and ch_offset */
Signature · 1 line
2.27.0
Greg KH
maintainerRe: [PATCH 4/4] staging: rtl8188eu: Replace function name with __func__
Quoted 17 lines · Brooke Basile
Fix the following checkpatch warning:
WARNING: Prefer using '"%s...",__func__' to using 'rtw_get_bcn_info', this function's name, in a stringSigned-off-by Brooke Basile <[email protected]>--- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/staging/rtl8188eu/core/rtw_ieee80211.c +0
-1@@ -986,10 +986,10 @@ void rtw_get_bcn_info(struct wlan_network *pnetwork)if (bencrypt) pnetwork->BcnInfo.encryp_protocol =ENCRYP_PROTOCOL_WEP ; } - RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_get_bcn_info: pnetwork->encryp_protocol is %x\n",
drivers/staging/rtl8188eu/core/rtw_ieee80211.c void rtw_get_bcn_info(struct wlan_network *pnetwork) · line 995
Quoted 10 lines
drivers/staging/rtl8188eu/core/rtw_ieee80211.c +4
-3- pnetwork->BcnInfo.encryp_protocol)); -RT_TRACE (_module_rtl871x_mlme_c_, _drv_info_, ("rtw_get_bcn_info: pnetwork->encryp_protocol is %x\n" , - pnetwork->BcnInfo.encryp_protocol)); +RT_TRACE (_module_rtl871x_mlme_c_, _drv_info_, ("%s: pnetwork->encryp_protocol is %x\n" , + __func__, pnetwork->BcnInfo.encryp_protocol)); +RT_TRACE (_module_rtl871x_mlme_c_, _drv_info_, ("%s: pnetwork->encryp_protocol is %x\n" , + __func__, pnetwork->BcnInfo.encryp_protocol));rtw_get_cipher_info (pnetwork);/* get bwmode and ch_offset */
This patch fails to apply to my latest branch, can you rebase it and resend if it is still needed?
thanks,
greg k-h