public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Michael Straube <straube.linux@gmail.com>, gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: r8188eu: rename three functions
Date: Thu, 10 Nov 2022 21:19:23 +0100	[thread overview]
Message-ID: <188093c6-b67c-fa08-54e7-62d41ee2a19b@gmail.com> (raw)
In-Reply-To: <20221110090927.17274-1-straube.linux@gmail.com>

On 11/10/22 10:09, Michael Straube wrote:
> Prefix the names of the following functions with the driver name. The
> original names are bad for the global namespace. While at it, convert
> is_IBSS_empty() to all lower case to follow kernel coding style.
> 
> is_client_associated_to_ap()
> is_client_associated_to_ibss()
> is_IBSS_empty()
> 
> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Michael Straube <straube.linux@gmail.com>
> ---
>   drivers/staging/r8188eu/core/rtw_mlme_ext.c    | 14 +++++++-------
>   drivers/staging/r8188eu/core/rtw_wlan_util.c   |  8 ++++----
>   drivers/staging/r8188eu/include/rtw_mlme_ext.h |  6 +++---
>   3 files changed, 14 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> index be33489d3dfd..161cb67f7882 100644
> --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> @@ -5831,7 +5831,7 @@ void rtw_mlme_site_survey_done(struct adapter *adapter)
>   	int res;
>   	u8 reg;
>   
> -	if ((is_client_associated_to_ap(adapter)) ||
> +	if ((r8188eu_is_client_associated_to_ap(adapter)) ||
>   	    ((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE)) {
>   		/* enable to rx data frame */
>   		rtw_write16(adapter, REG_RXFLTMAP2, 0xFFFF);
> @@ -5982,7 +5982,7 @@ void site_survey(struct adapter *padapter)
>   			Restore_DM_Func_Flag(padapter);
>   			/* Switch_DM_Func(padapter, DYNAMIC_ALL_FUNC_ENABLE, true); */
>   
> -			if (is_client_associated_to_ap(padapter))
> +			if (r8188eu_is_client_associated_to_ap(padapter))
>   				issue_nulldata(padapter, NULL, 0, 3, 500);
>   
>   			rtw_mlme_site_survey_done(padapter);
> @@ -6952,7 +6952,7 @@ void mlmeext_sta_del_event_callback(struct adapter *padapter)
>   	struct mlme_ext_priv	*pmlmeext = &padapter->mlmeextpriv;
>   	struct mlme_ext_info	*pmlmeinfo = &pmlmeext->mlmext_info;
>   
> -	if (is_client_associated_to_ap(padapter) || is_IBSS_empty(padapter)) {
> +	if (r8188eu_is_client_associated_to_ap(padapter) || r8188eu_is_ibss_empty(padapter)) {
>   		mlme_disconnect(padapter);
>   		rtw_set_bssid(padapter, null_addr);
>   
> @@ -7025,7 +7025,7 @@ void linked_status_chk(struct adapter *padapter)
>   
>   	rtl8188e_sreset_linked_status_check(padapter);
>   
> -	if (is_client_associated_to_ap(padapter)) {
> +	if (r8188eu_is_client_associated_to_ap(padapter)) {
>   		/* linked infrastructure client mode */
>   
>   		int tx_chk = _SUCCESS, rx_chk = _SUCCESS;
> @@ -7097,7 +7097,7 @@ void linked_status_chk(struct adapter *padapter)
>   				pmlmeinfo->link_count = 0;
>   			}
>   		} /* end of if ((psta = rtw_get_stainfo(pstapriv, passoc_res->network.MacAddress)) != NULL) */
> -	} else if (is_client_associated_to_ibss(padapter)) {
> +	} else if (r8188eu_is_client_associated_to_ibss(padapter)) {
>   		/* linked IBSS mode */
>   		/* for each assoc list entry to check the rx pkt counter */
>   		for (i = IBSS_START_MAC_ID; i < NUM_STA; i++) {
> @@ -7415,7 +7415,7 @@ u8 disconnect_hdl(struct adapter *padapter, unsigned char *pbuf)
>   	u8 val8;
>   	int res;
>   
> -	if (is_client_associated_to_ap(padapter))
> +	if (r8188eu_is_client_associated_to_ap(padapter))
>   		issue_deauth_ex(padapter, pnetwork->MacAddress, WLAN_REASON_DEAUTH_LEAVING, param->deauth_timeout_ms / 100, 100);
>   
>   	mlme_disconnect(padapter);
> @@ -7527,7 +7527,7 @@ u8 sitesurvey_cmd_hdl(struct adapter *padapter, u8 *pbuf)
>   		pmlmeext->sitesurvey_res.scan_mode = pparm->scan_mode;
>   
>   		/* issue null data if associating to the AP */
> -		if (is_client_associated_to_ap(padapter)) {
> +		if (r8188eu_is_client_associated_to_ap(padapter)) {
>   			pmlmeext->sitesurvey_res.state = SCAN_TXNULL;
>   
>   			issue_nulldata(padapter, NULL, 1, 3, 500);
> diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging/r8188eu/core/rtw_wlan_util.c
> index c95438a12b59..965bb7da4cce 100644
> --- a/drivers/staging/r8188eu/core/rtw_wlan_util.c
> +++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c
> @@ -331,7 +331,7 @@ u16 get_beacon_interval(struct wlan_bssid_ex *bss)
>   	return le16_to_cpu(val);
>   }
>   
> -bool is_client_associated_to_ap(struct adapter *padapter)
> +bool r8188eu_is_client_associated_to_ap(struct adapter *padapter)
>   {
>   	struct mlme_ext_priv	*pmlmeext;
>   	struct mlme_ext_info	*pmlmeinfo;
> @@ -348,7 +348,7 @@ bool is_client_associated_to_ap(struct adapter *padapter)
>   	return false;
>   }
>   
> -bool is_client_associated_to_ibss(struct adapter *padapter)
> +bool r8188eu_is_client_associated_to_ibss(struct adapter *padapter)
>   {
>   	struct mlme_ext_priv	*pmlmeext = &padapter->mlmeextpriv;
>   	struct mlme_ext_info	*pmlmeinfo = &pmlmeext->mlmext_info;
> @@ -359,7 +359,7 @@ bool is_client_associated_to_ibss(struct adapter *padapter)
>   	return false;
>   }
>   
> -bool is_IBSS_empty(struct adapter *padapter)
> +bool r8188eu_is_ibss_empty(struct adapter *padapter)
>   {
>   	unsigned int i;
>   	struct mlme_ext_priv	*pmlmeext = &padapter->mlmeextpriv;
> @@ -893,7 +893,7 @@ int rtw_check_bcn_info(struct adapter  *Adapter, u8 *pframe, u32 packet_len)
>   	unsigned short	ht_cap_info;
>   	unsigned char	ht_info_infos_0;
>   
> -	if (!is_client_associated_to_ap(Adapter))
> +	if (!r8188eu_is_client_associated_to_ap(Adapter))
>   		return true;
>   
>   	len = packet_len - sizeof(struct ieee80211_hdr_3addr);
> diff --git a/drivers/staging/r8188eu/include/rtw_mlme_ext.h b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
> index 9c0af4704607..c46fc1a53085 100644
> --- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h
> +++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
> @@ -431,9 +431,9 @@ void update_network(struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src,
>   u8 *get_my_bssid(struct wlan_bssid_ex *pnetwork);
>   u16 get_beacon_interval(struct wlan_bssid_ex *bss);
>   
> -bool is_client_associated_to_ap(struct adapter *padapter);
> -bool is_client_associated_to_ibss(struct adapter *padapter);
> -bool is_IBSS_empty(struct adapter *padapter);
> +bool r8188eu_is_client_associated_to_ap(struct adapter *padapter);
> +bool r8188eu_is_client_associated_to_ibss(struct adapter *padapter);
> +bool r8188eu_is_ibss_empty(struct adapter *padapter);
>   
>   unsigned char check_assoc_AP(u8 *pframe, uint len);
>   

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150

      reply	other threads:[~2022-11-10 20:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-10  9:09 [PATCH] staging: r8188eu: rename three functions Michael Straube
2022-11-10 20:19 ` Philipp Hortmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=188093c6-b67c-fa08-54e7-62d41ee2a19b@gmail.com \
    --to=philipp.g.hortmann@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=phil@philpotter.co.uk \
    --cc=straube.linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox