mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: alb3rt0.m3rciai@gmail.com, linuxfancy@googlegroups.com,
	Larry Finger <Larry.Finger@lwfinger.net>,
	Phillip Potter <phil@philpotter.co.uk>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Michael Straube <straube.linux@gmail.com>,
	Martin Kaiser <martin@kaiser.cx>,
	"Fabio M. De Francesco" <fmdefrancesco@gmail.com>,
	Nathan Chancellor <nathan@kernel.org>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Saurav Girepunje <saurav.girepunje@gmail.com>,
	Ivan Safonov <insafonov@gmail.com>,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	Yang Li <yang.lee@linux.alibaba.com>,
	Zameer Manji <zmanji@gmail.com>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 53/56] staging: r8188eu: rename camelcase GetAddr1Ptr to get_addr_1_ptr
Date: Mon,  3 Jan 2022 20:02:28 +0100	[thread overview]
Message-ID: <20220103190326.363960-54-alb3rt0.m3rciai@gmail.com> (raw)
In-Reply-To: <20220103190326.363960-1-alb3rt0.m3rciai@gmail.com>

Rename camel case macro GetAddr1Ptr into get_addr_1_ptr

Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_mlme_ext.c | 16 ++++++++--------
 drivers/staging/r8188eu/core/rtw_recv.c     | 14 +++++++-------
 drivers/staging/r8188eu/include/wifi.h      | 10 +++++-----
 3 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 6ec53f1039cc..af65774ed936 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -401,8 +401,8 @@ static void _mgt_dispatcher(struct adapter *padapter, struct mlme_handler *ptabl
 
 	if (ptable->func) {
 	/* receive the frames that ra(a1) is my address or ra(a1) is bc address. */
-		if (memcmp(GetAddr1Ptr(pframe), myid(&padapter->eeprompriv), ETH_ALEN) &&
-		    !is_broadcast_ether_addr(GetAddr1Ptr(pframe)))
+		if (memcmp(get_addr_1_ptr(pframe), myid(&padapter->eeprompriv), ETH_ALEN) &&
+		    !is_broadcast_ether_addr(get_addr_1_ptr(pframe)))
 			return;
 		ptable->func(padapter, precv_frame);
 	}
@@ -420,8 +420,8 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame)
 		return;
 
 	/* receive the frames that ra(a1) is my address or ra(a1) is bc address. */
-	if (memcmp(GetAddr1Ptr(pframe), myid(&padapter->eeprompriv), ETH_ALEN) &&
-	    !is_broadcast_ether_addr(GetAddr1Ptr(pframe)))
+	if (memcmp(get_addr_1_ptr(pframe), myid(&padapter->eeprompriv), ETH_ALEN) &&
+	    !is_broadcast_ether_addr(get_addr_1_ptr(pframe)))
 		return;
 
 	ptable = mlme_sta_tbl;
@@ -1679,7 +1679,7 @@ unsigned int OnAction_back(struct adapter *padapter, struct recv_frame *precv_fr
 	u8 *pframe = precv_frame->rx_data;
 	struct sta_priv *pstapriv = &padapter->stapriv;
 	/* check RA matches or not */
-	if (memcmp(myid(&padapter->eeprompriv), GetAddr1Ptr(pframe), ETH_ALEN))/* for if1, sta/ap mode */
+	if (memcmp(myid(&padapter->eeprompriv), get_addr_1_ptr(pframe), ETH_ALEN))/* for if1, sta/ap mode */
 		return _SUCCESS;
 
 	DBG_88E("%s\n", __func__);
@@ -4055,7 +4055,7 @@ unsigned int on_action_public(struct adapter *padapter, struct recv_frame *precv
 	u8 category, action;
 
 	/* check RA matches or not */
-	if (memcmp(myid(&padapter->eeprompriv), GetAddr1Ptr(pframe), ETH_ALEN))
+	if (memcmp(myid(&padapter->eeprompriv), get_addr_1_ptr(pframe), ETH_ALEN))
 		goto exit;
 
 	category = frame_body[0];
@@ -4097,7 +4097,7 @@ unsigned int OnAction_p2p(struct adapter *padapter, struct recv_frame *precv_fra
 	DBG_88E("%s\n", __func__);
 
 	/* check RA matches or not */
-	if (memcmp(myid(&padapter->eeprompriv), GetAddr1Ptr(pframe), ETH_ALEN))/* for if1, sta/ap mode */
+	if (memcmp(myid(&padapter->eeprompriv), get_addr_1_ptr(pframe), ETH_ALEN))/* for if1, sta/ap mode */
 		return _SUCCESS;
 
 	frame_body = (unsigned char *)(pframe + sizeof(struct rtw_ieee80211_hdr_3addr));
@@ -4964,7 +4964,7 @@ void issue_asocrsp(struct adapter *padapter, unsigned short status, struct sta_i
 	fctrl = &pwlanhdr->frame_ctl;
 	*(fctrl) = 0;
 
-	memcpy((void *)GetAddr1Ptr(pwlanhdr), pstat->hwaddr, ETH_ALEN);
+	memcpy((void *)get_addr_1_ptr(pwlanhdr), pstat->hwaddr, ETH_ALEN);
 	memcpy((void *)GetAddr2Ptr(pwlanhdr), myid(&padapter->eeprompriv), ETH_ALEN);
 	memcpy((void *)GetAddr3Ptr(pwlanhdr), get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
 
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 32e0bcce65a0..9d8da5ec8948 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -631,7 +631,7 @@ int sta2sta_data_frame(struct adapter *adapter, struct recv_frame *precv_frame,
 			sta_addr = pattrib->src;
 		}
 	} else if (check_fwstate(pmlmepriv, WIFI_MP_STATE)) {
-		memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN);
+		memcpy(pattrib->dst, get_addr_1_ptr(ptr), ETH_ALEN);
 		memcpy(pattrib->src, GetAddr2Ptr(ptr), ETH_ALEN);
 		memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN);
 		memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
@@ -718,7 +718,7 @@ static int ap2sta_data_frame(
 		}
 	} else if (check_fwstate(pmlmepriv, WIFI_MP_STATE) &&
 		   check_fwstate(pmlmepriv, _FW_LINKED)) {
-		memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN);
+		memcpy(pattrib->dst, get_addr_1_ptr(ptr), ETH_ALEN);
 		memcpy(pattrib->src, GetAddr2Ptr(ptr), ETH_ALEN);
 		memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN);
 		memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
@@ -823,7 +823,7 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
 		return _FAIL;
 
 	/* receive the frames that ra(a1) is my address */
-	if (memcmp(GetAddr1Ptr(pframe), myid(&padapter->eeprompriv), ETH_ALEN))
+	if (memcmp(get_addr_1_ptr(pframe), myid(&padapter->eeprompriv), ETH_ALEN))
 		return _FAIL;
 
 	/* only handle ps-poll */
@@ -949,10 +949,10 @@ static int validate_recv_mgnt_frame(struct adapter *padapter,
 		} else if (get_frame_subtype(precv_frame->rx_data) == WIFI_PROBEREQ) {
 			psta->sta_stats.rx_probereq_pkts++;
 		} else if (get_frame_subtype(precv_frame->rx_data) == WIFI_PROBERSP) {
-			if (!memcmp(padapter->eeprompriv.mac_addr, GetAddr1Ptr(precv_frame->rx_data), ETH_ALEN))
+			if (!memcmp(padapter->eeprompriv.mac_addr, get_addr_1_ptr(precv_frame->rx_data), ETH_ALEN))
 				psta->sta_stats.rx_probersp_pkts++;
-			else if (is_broadcast_mac_addr(GetAddr1Ptr(precv_frame->rx_data)) ||
-				 is_multicast_mac_addr(GetAddr1Ptr(precv_frame->rx_data)))
+			else if (is_broadcast_mac_addr(get_addr_1_ptr(precv_frame->rx_data)) ||
+				 is_multicast_mac_addr(get_addr_1_ptr(precv_frame->rx_data)))
 				psta->sta_stats.rx_probersp_bm_pkts++;
 			else
 				psta->sta_stats.rx_probersp_uo_pkts++;
@@ -1007,7 +1007,7 @@ static int validate_recv_data_frame(struct adapter *adapter,
 		ret = sta2ap_data_frame(adapter, precv_frame, &psta);
 		break;
 	case 3:
-		memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN);
+		memcpy(pattrib->ra, get_addr_1_ptr(ptr), ETH_ALEN);
 		memcpy(pattrib->ta, GetAddr2Ptr(ptr), ETH_ALEN);
 		ret = _FAIL;
 		break;
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 061d1aa18eed..4d4db68b967e 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -250,7 +250,7 @@ enum WIFI_REG_DOMAIN {
 
 #define get_aid(pbuf)	(le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 2)) & 0x3fff)
 
-#define GetAddr1Ptr(pbuf)	((unsigned char *)((size_t)(pbuf) + 4))
+#define get_addr_1_ptr(pbuf)	((unsigned char *)((size_t)(pbuf) + 4))
 
 #define GetAddr2Ptr(pbuf)	((unsigned char *)((size_t)(pbuf) + 10))
 
@@ -273,10 +273,10 @@ static inline unsigned char *get_da(unsigned char *pframe)
 
 	switch (to_fr_ds) {
 	case 0x00:	/*  ToDs=0, FromDs=0 */
-		da = GetAddr1Ptr(pframe);
+		da = get_addr_1_ptr(pframe);
 		break;
 	case 0x01:	/*  ToDs=0, FromDs=1 */
-		da = GetAddr1Ptr(pframe);
+		da = get_addr_1_ptr(pframe);
 		break;
 	case 0x02:	/*  ToDs=1, FromDs=0 */
 		da = GetAddr3Ptr(pframe);
@@ -323,10 +323,10 @@ static inline unsigned char *get_hdr_bssid(unsigned char *pframe)
 		sa = GetAddr2Ptr(pframe);
 		break;
 	case 0x02:	/*  ToDs=1, FromDs=0 */
-		sa = GetAddr1Ptr(pframe);
+		sa = get_addr_1_ptr(pframe);
 		break;
 	case 0x03:	/*  ToDs=1, FromDs=1 */
-		sa = GetAddr1Ptr(pframe);
+		sa = get_addr_1_ptr(pframe);
 		break;
 	default:
 		sa = NULL; /*  */
-- 
2.25.1


  parent reply	other threads:[~2022-01-03 19:55 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-03 19:01 [PATCH 00/56] staging: r8188eu: wifi.h macros refactoring Alberto Merciai
2022-01-03 19:01 ` [PATCH 01/56] staging: r8188eu: add parenthesis to macro SetToDs Alberto Merciai
2022-01-06 14:12   ` Greg Kroah-Hartman
2022-01-03 19:01 ` [PATCH 02/56] staging: r8188eu: rename camelcase SetToDs to set_to_ds Alberto Merciai
2022-01-06 14:13   ` Greg Kroah-Hartman
2022-01-03 19:01 ` [PATCH 03/56] staging: r8188eu: remove dead macro ClearToDs Alberto Merciai
2022-01-06 14:14   ` Greg Kroah-Hartman
2022-01-08 13:53     ` Alberto Merciai
2022-01-03 19:01 ` [PATCH 04/56] staging: r8188eu: add parenthesis to macro SetFrDs Alberto Merciai
2022-01-03 19:01 ` [PATCH 05/56] staging: r8188eu: rename camelcase SetFrDs to set_fr_ds Alberto Merciai
2022-01-03 19:01 ` [PATCH 06/56] staging: r8188eu: remove dead macro ClearFrDs Alberto Merciai
2022-01-03 19:01 ` [PATCH 07/56] staging: r8188eu: add parenthesis to macro SetMFrag Alberto Merciai
2022-01-03 19:01 ` [PATCH 08/56] staging: r8188eu: rename camelcase SetMFrag to set_m_frag Alberto Merciai
2022-01-03 19:01 ` [PATCH 09/56] staging: r8188eu: rename camelcase GetToDs to get_to_ds Alberto Merciai
2022-01-03 19:01 ` [PATCH 10/56] staging: r8188eu: rename camelcase GetFrDs to get_fr_ds Alberto Merciai
2022-01-03 19:01 ` [PATCH 11/56] staging: r8188eu: rename camelcase GetMFrag to get_m_frag Alberto Merciai
2022-01-03 19:01 ` [PATCH 12/56] staging: r8188eu: rename camelcase ClearMFrag to clear_m_frag Alberto Merciai
2022-01-03 19:01 ` [PATCH 13/56] staging: r8188eu: add parenthesis to macro clear_m_frag Alberto Merciai
2022-01-03 19:01 ` [PATCH 14/56] staging: r8188eu: remove dead macro SetRetry Alberto Merciai
2022-01-03 19:01 ` [PATCH 15/56] staging: r8188eu: rename camelcase GetRetry to get_retry Alberto Merciai
2022-01-03 19:01 ` [PATCH 16/56] staging: r8188eu: remove dead macro ClearRetry Alberto Merciai
2022-01-03 19:01 ` [PATCH 17/56] staging: r8188eu: rename camelcase SetPwrMgt to set_pwr_mgt Alberto Merciai
2022-01-03 19:01 ` [PATCH 18/56] staging: r8188eu: add parenthesis to macro set_pwr_mgt Alberto Merciai
2022-01-03 19:01 ` [PATCH 19/56] staging: r8188eu: rename camelcase GetPwrMgt to get_pwr_mgt Alberto Merciai
2022-01-03 19:01 ` [PATCH 20/56] staging: r8188eu: remove dead macro ClearPwrMgt Alberto Merciai
2022-01-03 19:01 ` [PATCH 21/56] staging: r8188eu: rename camelcase SetMData to set_m_data Alberto Merciai
2022-01-03 19:01 ` [PATCH 22/56] staging: r8188eu: add parenthesis to macro set_m_data Alberto Merciai
2022-01-03 19:01 ` [PATCH 23/56] staging: r8188eu: rename camelcase GetMData to get_m_data Alberto Merciai
2022-01-03 19:01 ` [PATCH 24/56] staging: r8188eu: remove dead macro ClearMData Alberto Merciai
2022-01-03 19:02 ` [PATCH 25/56] staging: r8188eu: rename camelcase SetPrivacy to set_privacy Alberto Merciai
2022-01-03 19:02 ` [PATCH 26/56] staging: r8188eu: add parenthesis to macro set_privacy Alberto Merciai
2022-01-03 19:02 ` [PATCH 27/56] staging: r8188eu: rename camelcase GetPrivacy to get_privacy Alberto Merciai
2022-01-03 19:02 ` [PATCH 28/56] staging: r8188eu: remove dead macro ClearPrivacy Alberto Merciai
2022-01-03 19:02 ` [PATCH 29/56] staging: r8188eu: rename camelcase GetOrder to get_order Alberto Merciai
2022-01-03 19:02 ` [PATCH 30/56] staging: r8188eu: rename camelcase GetFrameType to get_frame_type Alberto Merciai
2022-01-03 19:02 ` [PATCH 31/56] staging: r8188eu: remove dead macro SetFrameType Alberto Merciai
2022-01-03 19:02 ` [PATCH 32/56] staging: r8188eu: rename camelcase GetFrameSubType to get_frame_subtype Alberto Merciai
2022-01-03 19:02 ` [PATCH 33/56] staging: r8188eu: rename camelcase SetFrameSubType to set_frame_subtype Alberto Merciai
2022-01-03 19:02 ` [PATCH 34/56] staging: r8188eu: rename camelcase GetSequence to get_sequence Alberto Merciai
2022-01-03 19:02 ` [PATCH 35/56] staging: r8188eu: rename camelcase GetFragNum to get_frag_num Alberto Merciai
2022-01-03 19:02 ` [PATCH 36/56] staging: r8188eu: remove dead macro GetTupleCache Alberto Merciai
2022-01-03 19:02 ` [PATCH 37/56] staging: r8188eu: remove dead macro SetFragNum Alberto Merciai
2022-01-03 19:02 ` [PATCH 38/56] staging: r8188eu: rename camelcase SetSeqNum to set_seq_num Alberto Merciai
2022-01-03 19:02 ` [PATCH 39/56] staging: r8188eu: rename camelcase SetDuration to set_duration Alberto Merciai
2022-01-03 19:02 ` [PATCH 40/56] staging: r8188eu: rename camelcase SetPriority to set_priority Alberto Merciai
2022-01-03 19:02 ` [PATCH 41/56] staging: r8188eu: add parenthesis to macro set_duration Alberto Merciai
2022-01-03 19:02 ` [PATCH 42/56] staging: r8188eu: add parenthesis to macro set_priority Alberto Merciai
2022-01-03 19:02 ` [PATCH 43/56] staging: r8188eu: rename camelcase GetPriority to get_priority Alberto Merciai
2022-01-03 19:02 ` [PATCH 44/56] staging: r8188eu: rename camelcase SetEOSP to set_eosp Alberto Merciai
2022-01-03 19:02 ` [PATCH 45/56] staging: r8188eu: add parenthesis to macro set_eosp Alberto Merciai
2022-01-03 19:02 ` [PATCH 46/56] staging: r8188eu: remove dead macro GetTid Alberto Merciai
2022-01-03 19:02 ` [PATCH 47/56] staging: r8188eu: rename camelcase SetAckpolicy to set_ack_policy Alberto Merciai
2022-01-03 19:02 ` [PATCH 48/56] staging: r8188eu: add parenthesis to macro set_ack_policy Alberto Merciai
2022-01-03 19:02 ` [PATCH 49/56] staging: r8188eu: rename camelcase GetAckpolicy into get_ack_policy Alberto Merciai
2022-01-03 19:02 ` [PATCH 50/56] staging: r8188eu: rename camelcase GetAMsdu to get_a_msdu Alberto Merciai
2022-01-03 19:02 ` [PATCH 51/56] staging: r8188eu: remove dead macro SetAMsdu Alberto Merciai
2022-01-03 19:02 ` [PATCH 52/56] staging: r8188eu: rename camelcase GetAid to get_aid Alberto Merciai
2022-01-03 19:02 ` Alberto Merciai [this message]
2022-01-03 19:02 ` [PATCH 54/56] staging: r8188eu: rename camelcase GetAddr2Ptr to get_addr_2_ptr Alberto Merciai
2022-01-03 19:02 ` [PATCH 55/56] staging: r8188eu: rename camelcase GetAddr3Ptr to get_addr_3_ptr Alberto Merciai
2022-01-03 19:02 ` [PATCH 56/56] staging: r8188eu: rename camelcase GetAddr4Ptr to get_addr_4_ptr Alberto Merciai

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=20220103190326.363960-54-alb3rt0.m3rciai@gmail.com \
    --to=alb3rt0.m3rciai@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=dan.carpenter@oracle.com \
    --cc=fmdefrancesco@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=insafonov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=linuxfancy@googlegroups.com \
    --cc=martin@kaiser.cx \
    --cc=nathan@kernel.org \
    --cc=phil@philpotter.co.uk \
    --cc=saurav.girepunje@gmail.com \
    --cc=straube.linux@gmail.com \
    --cc=yang.lee@linux.alibaba.com \
    --cc=zmanji@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

all inboxes | Powered by JetHome®