* [PATCH 00/56] staging: r8188eu: wifi.h macros refactoring
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Yang Li,
Zameer Manji, linux-staging, linux-kernel
This patch series refactors most of the macros inside
include/wifi.h making them compliant with linux coding style.
Main changes are related to the following issues:
- Avoid CamelCase
- Remove dead code
- Macros with complex values should be enclosed in parentheses
Alberto Merciai (56):
staging: r8188eu: add parenthesis to macro SetToDs
staging: r8188eu: rename camelcase SetToDs to set_to_ds
staging: r8188eu: remove dead macro ClearToDs
staging: r8188eu: add parenthesis to macro SetFrDs
staging: r8188eu: rename camelcase SetFrDs to set_fr_ds
staging: r8188eu: remove dead macro ClearFrDs
staging: r8188eu: add parenthesis to macro SetMFrag
staging: r8188eu: rename camelcase SetMFrag to set_m_frag
staging: r8188eu: rename camelcase GetToDs to get_to_ds
staging: r8188eu: rename camelcase GetFrDs to get_fr_ds
staging: r8188eu: rename camelcase GetMFrag to get_m_frag
staging: r8188eu: rename camelcase ClearMFrag to clear_m_frag
staging: r8188eu: add parenthesis to macro clear_m_frag
staging: r8188eu: remove dead macro SetRetry
staging: r8188eu: rename camelcase GetRetry to get_retry
staging: r8188eu: remove dead macro ClearRetry
staging: r8188eu: rename camelcase SetPwrMgt to set_pwr_mgt
staging: r8188eu: add parenthesis to macro set_pwr_mgt
staging: r8188eu: rename camelcase GetPwrMgt to get_pwr_mgt
staging: r8188eu: remove dead macro ClearPwrMgt
staging: r8188eu: rename camelcase SetMData to set_m_data
staging: r8188eu: add parenthesis to macro set_m_data
staging: r8188eu: rename camelcase GetMData to get_m_data
staging: r8188eu: remove dead macro ClearMData
staging: r8188eu: rename camelcase SetPrivacy to set_privacy
staging: r8188eu: add parenthesis to macro set_privacy
staging: r8188eu: rename camelcase GetPrivacy to get_privacy
staging: r8188eu: remove dead macro ClearPrivacy
staging: r8188eu: rename camelcase GetOrder to get_order
staging: r8188eu: rename camelcase GetFrameType to get_frame_type
staging: r8188eu: remove dead macro SetFrameType
staging: r8188eu: rename camelcase GetFrameSubType to
get_frame_subtype
staging: r8188eu: rename camelcase SetFrameSubType to
set_frame_subtype
staging: r8188eu: rename camelcase GetSequence to get_sequence
staging: r8188eu: rename camelcase GetFragNum to get_frag_num
staging: r8188eu: remove dead macro GetTupleCache
staging: r8188eu: remove dead macro SetFragNum
staging: r8188eu: rename camelcase SetSeqNum to set_seq_num
staging: r8188eu: rename camelcase SetDuration to set_duration
staging: r8188eu: rename camelcase SetPriority to set_priority
staging: r8188eu: add parenthesis to macro set_duration
staging: r8188eu: add parenthesis to macro set_priority
staging: r8188eu: rename camelcase GetPriority to get_priority
staging: r8188eu: rename camelcase SetEOSP to set_eosp
staging: r8188eu: add parenthesis to macro set_eosp
staging: r8188eu: remove dead macro GetTid
staging: r8188eu: rename camelcase SetAckpolicy to set_ack_policy
staging: r8188eu: add parenthesis to macro set_ack_policy
staging: r8188eu: rename camelcase GetAckpolicy into get_ack_policy
staging: r8188eu: rename camelcase GetAMsdu to get_a_msdu
staging: r8188eu: remove dead macro SetAMsdu
staging: r8188eu: rename camelcase GetAid to get_aid
staging: r8188eu: rename camelcase GetAddr1Ptr to get_addr_1_ptr
staging: r8188eu: rename camelcase GetAddr2Ptr to get_addr_2_ptr
staging: r8188eu: rename camelcase GetAddr3Ptr to get_addr_3_ptr
staging: r8188eu: rename camelcase GetAddr4Ptr to get_addr_4_ptr
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 190 +++++++++---------
drivers/staging/r8188eu/core/rtw_p2p.c | 24 +--
drivers/staging/r8188eu/core/rtw_recv.c | 78 +++----
drivers/staging/r8188eu/core/rtw_security.c | 8 +-
drivers/staging/r8188eu/core/rtw_wlan_util.c | 4 +-
drivers/staging/r8188eu/core/rtw_xmit.c | 22 +-
drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 30 +--
drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 167 ++++++---------
9 files changed, 240 insertions(+), 285 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 118+ messages in thread
* [PATCH 00/56] staging: r8188eu: wifi.h macros refactoring
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Yang Li,
Zameer Manji, linux-staging, linux-kernel
This patch series refactors most of the macros inside
include/wifi.h making them compliant with linux coding style.
Main changes are related to the following issues:
- Avoid CamelCase
- Remove dead code
- Macros with complex values should be enclosed in parentheses
Alberto Merciai (56):
staging: r8188eu: add parenthesis to macro SetToDs
staging: r8188eu: rename camelcase SetToDs to set_to_ds
staging: r8188eu: remove dead macro ClearToDs
staging: r8188eu: add parenthesis to macro SetFrDs
staging: r8188eu: rename camelcase SetFrDs to set_fr_ds
staging: r8188eu: remove dead macro ClearFrDs
staging: r8188eu: add parenthesis to macro SetMFrag
staging: r8188eu: rename camelcase SetMFrag to set_m_frag
staging: r8188eu: rename camelcase GetToDs to get_to_ds
staging: r8188eu: rename camelcase GetFrDs to get_fr_ds
staging: r8188eu: rename camelcase GetMFrag to get_m_frag
staging: r8188eu: rename camelcase ClearMFrag to clear_m_frag
staging: r8188eu: add parenthesis to macro clear_m_frag
staging: r8188eu: remove dead macro SetRetry
staging: r8188eu: rename camelcase GetRetry to get_retry
staging: r8188eu: remove dead macro ClearRetry
staging: r8188eu: rename camelcase SetPwrMgt to set_pwr_mgt
staging: r8188eu: add parenthesis to macro set_pwr_mgt
staging: r8188eu: rename camelcase GetPwrMgt to get_pwr_mgt
staging: r8188eu: remove dead macro ClearPwrMgt
staging: r8188eu: rename camelcase SetMData to set_m_data
staging: r8188eu: add parenthesis to macro set_m_data
staging: r8188eu: rename camelcase GetMData to get_m_data
staging: r8188eu: remove dead macro ClearMData
staging: r8188eu: rename camelcase SetPrivacy to set_privacy
staging: r8188eu: add parenthesis to macro set_privacy
staging: r8188eu: rename camelcase GetPrivacy to get_privacy
staging: r8188eu: remove dead macro ClearPrivacy
staging: r8188eu: rename camelcase GetOrder to get_order
staging: r8188eu: rename camelcase GetFrameType to get_frame_type
staging: r8188eu: remove dead macro SetFrameType
staging: r8188eu: rename camelcase GetFrameSubType to
get_frame_subtype
staging: r8188eu: rename camelcase SetFrameSubType to
set_frame_subtype
staging: r8188eu: rename camelcase GetSequence to get_sequence
staging: r8188eu: rename camelcase GetFragNum to get_frag_num
staging: r8188eu: remove dead macro GetTupleCache
staging: r8188eu: remove dead macro SetFragNum
staging: r8188eu: rename camelcase SetSeqNum to set_seq_num
staging: r8188eu: rename camelcase SetDuration to set_duration
staging: r8188eu: rename camelcase SetPriority to set_priority
staging: r8188eu: add parenthesis to macro set_duration
staging: r8188eu: add parenthesis to macro set_priority
staging: r8188eu: rename camelcase GetPriority to get_priority
staging: r8188eu: rename camelcase SetEOSP to set_eosp
staging: r8188eu: add parenthesis to macro set_eosp
staging: r8188eu: remove dead macro GetTid
staging: r8188eu: rename camelcase SetAckpolicy to set_ack_policy
staging: r8188eu: add parenthesis to macro set_ack_policy
staging: r8188eu: rename camelcase GetAckpolicy into get_ack_policy
staging: r8188eu: rename camelcase GetAMsdu to get_a_msdu
staging: r8188eu: remove dead macro SetAMsdu
staging: r8188eu: rename camelcase GetAid to get_aid
staging: r8188eu: rename camelcase GetAddr1Ptr to get_addr_1_ptr
staging: r8188eu: rename camelcase GetAddr2Ptr to get_addr_2_ptr
staging: r8188eu: rename camelcase GetAddr3Ptr to get_addr_3_ptr
staging: r8188eu: rename camelcase GetAddr4Ptr to get_addr_4_ptr
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 190 +++++++++---------
drivers/staging/r8188eu/core/rtw_p2p.c | 24 +--
drivers/staging/r8188eu/core/rtw_recv.c | 78 +++----
drivers/staging/r8188eu/core/rtw_security.c | 8 +-
drivers/staging/r8188eu/core/rtw_wlan_util.c | 4 +-
drivers/staging/r8188eu/core/rtw_xmit.c | 22 +-
drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 30 +--
drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 167 ++++++---------
9 files changed, 240 insertions(+), 285 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 118+ messages in thread
* [PATCH 01/56] staging: r8188eu: add parenthesis to macro SetToDs
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:01 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Yang Li, Christophe JAILLET,
Zameer Manji, linux-staging, linux-kernel
Enclose in parenthesis complex macro SetToDs
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 7cbc7015e90f..f16e9f44babe 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -164,7 +164,7 @@ enum WIFI_REG_DOMAIN {
#define _ORDER_ BIT(15)
#define SetToDs(pbuf) \
- *(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_)
+ (*(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_))
#define GetToDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 01/56] staging: r8188eu: add parenthesis to macro SetToDs
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Yang Li, Christophe JAILLET,
Zameer Manji, linux-staging, linux-kernel
Enclose in parenthesis complex macro SetToDs
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 7cbc7015e90f..f16e9f44babe 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -164,7 +164,7 @@ enum WIFI_REG_DOMAIN {
#define _ORDER_ BIT(15)
#define SetToDs(pbuf) \
- *(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_)
+ (*(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_))
#define GetToDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 02/56] staging: r8188eu: rename camelcase SetToDs to set_to_ds
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:01 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro SetToDs into set_to_ds.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 4 ++--
drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 0aa958f20cd6..6c784134d957 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -5409,7 +5409,7 @@ static int _issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned
if ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE)
SetFrDs(fctrl);
else if ((pmlmeinfo->state & 0x03) == WIFI_FW_STATION_STATE)
- SetToDs(fctrl);
+ set_to_ds(fctrl);
if (power_mode)
SetPwrMgt(fctrl);
@@ -5524,7 +5524,7 @@ static int _issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16
if ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE)
SetFrDs(fctrl);
else if ((pmlmeinfo->state & 0x03) == WIFI_FW_STATION_STATE)
- SetToDs(fctrl);
+ set_to_ds(fctrl);
qc = (unsigned short *)(pframe + pattrib->hdrlen - 2);
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index 8503059edc46..b528729cad76 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -729,7 +729,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
/* to_ds = 1, fr_ds = 0; */
/* Data transfer to AP */
- SetToDs(fctrl);
+ set_to_ds(fctrl);
memcpy(pwlanhdr->addr1, get_bssid(pmlmepriv), ETH_ALEN);
memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN);
memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN);
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
index ca24e17c369d..e452b257ccae 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
@@ -345,7 +345,7 @@ static void ConstructNullFunctionData(struct adapter *adapt, u8 *pframe,
switch (cur_network->network.InfrastructureMode) {
case Ndis802_11Infrastructure:
- SetToDs(fctrl);
+ set_to_ds(fctrl);
memcpy(pwlanhdr->addr1, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
memcpy(pwlanhdr->addr2, myid(&adapt->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, StaAddr, ETH_ALEN);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index f16e9f44babe..c556cf378c8a 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -163,7 +163,7 @@ enum WIFI_REG_DOMAIN {
#define _PRIVACY_ BIT(14)
#define _ORDER_ BIT(15)
-#define SetToDs(pbuf) \
+#define set_to_ds(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_))
#define GetToDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 02/56] staging: r8188eu: rename camelcase SetToDs to set_to_ds
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro SetToDs into set_to_ds.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 4 ++--
drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 0aa958f20cd6..6c784134d957 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -5409,7 +5409,7 @@ static int _issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned
if ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE)
SetFrDs(fctrl);
else if ((pmlmeinfo->state & 0x03) == WIFI_FW_STATION_STATE)
- SetToDs(fctrl);
+ set_to_ds(fctrl);
if (power_mode)
SetPwrMgt(fctrl);
@@ -5524,7 +5524,7 @@ static int _issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16
if ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE)
SetFrDs(fctrl);
else if ((pmlmeinfo->state & 0x03) == WIFI_FW_STATION_STATE)
- SetToDs(fctrl);
+ set_to_ds(fctrl);
qc = (unsigned short *)(pframe + pattrib->hdrlen - 2);
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index 8503059edc46..b528729cad76 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -729,7 +729,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
/* to_ds = 1, fr_ds = 0; */
/* Data transfer to AP */
- SetToDs(fctrl);
+ set_to_ds(fctrl);
memcpy(pwlanhdr->addr1, get_bssid(pmlmepriv), ETH_ALEN);
memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN);
memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN);
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
index ca24e17c369d..e452b257ccae 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
@@ -345,7 +345,7 @@ static void ConstructNullFunctionData(struct adapter *adapt, u8 *pframe,
switch (cur_network->network.InfrastructureMode) {
case Ndis802_11Infrastructure:
- SetToDs(fctrl);
+ set_to_ds(fctrl);
memcpy(pwlanhdr->addr1, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
memcpy(pwlanhdr->addr2, myid(&adapt->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, StaAddr, ETH_ALEN);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index f16e9f44babe..c556cf378c8a 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -163,7 +163,7 @@ enum WIFI_REG_DOMAIN {
#define _PRIVACY_ BIT(14)
#define _ORDER_ BIT(15)
-#define SetToDs(pbuf) \
+#define set_to_ds(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_))
#define GetToDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 03/56] staging: r8188eu: remove dead macro ClearToDs
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:01 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Yang Li, Christophe JAILLET,
Zameer Manji, linux-staging, linux-kernel
Remove dead macro ClearToDs.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index c556cf378c8a..487a4b7eafd6 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -168,9 +168,6 @@ enum WIFI_REG_DOMAIN {
#define GetToDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0)
-#define ClearToDs(pbuf) \
- *(__le16 *)(pbuf) &= (~cpu_to_le16(_TO_DS_))
-
#define SetFrDs(pbuf) \
*(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 03/56] staging: r8188eu: remove dead macro ClearToDs
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Yang Li, Christophe JAILLET,
Zameer Manji, linux-staging, linux-kernel
Remove dead macro ClearToDs.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index c556cf378c8a..487a4b7eafd6 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -168,9 +168,6 @@ enum WIFI_REG_DOMAIN {
#define GetToDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0)
-#define ClearToDs(pbuf) \
- *(__le16 *)(pbuf) &= (~cpu_to_le16(_TO_DS_))
-
#define SetFrDs(pbuf) \
*(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 04/56] staging: r8188eu: add parenthesis to macro SetFrDs
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:01 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Enclose in parenthesis complex macro SetFrDs
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 487a4b7eafd6..07195a11aa78 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -169,7 +169,7 @@ enum WIFI_REG_DOMAIN {
#define GetToDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0)
#define SetFrDs(pbuf) \
- *(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_)
+ (*(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_))
#define GetFrDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_FROM_DS_)) != 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 04/56] staging: r8188eu: add parenthesis to macro SetFrDs
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Enclose in parenthesis complex macro SetFrDs
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 487a4b7eafd6..07195a11aa78 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -169,7 +169,7 @@ enum WIFI_REG_DOMAIN {
#define GetToDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0)
#define SetFrDs(pbuf) \
- *(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_)
+ (*(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_))
#define GetFrDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_FROM_DS_)) != 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 05/56] staging: r8188eu: rename camelcase SetFrDs to set_fr_ds
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:01 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Yang Li, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro SetFrDs into set_fr_ds.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 4 ++--
drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 6c784134d957..b033705c0578 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -5407,7 +5407,7 @@ static int _issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned
*(fctrl) = 0;
if ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE)
- SetFrDs(fctrl);
+ set_fr_ds(fctrl);
else if ((pmlmeinfo->state & 0x03) == WIFI_FW_STATION_STATE)
set_to_ds(fctrl);
@@ -5522,7 +5522,7 @@ static int _issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16
*(fctrl) = 0;
if ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE)
- SetFrDs(fctrl);
+ set_fr_ds(fctrl);
else if ((pmlmeinfo->state & 0x03) == WIFI_FW_STATION_STATE)
set_to_ds(fctrl);
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index b528729cad76..b6a602060c91 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -738,7 +738,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
qos_option = true;
} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
/* to_ds = 0, fr_ds = 1; */
- SetFrDs(fctrl);
+ set_fr_ds(fctrl);
memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
memcpy(pwlanhdr->addr2, get_bssid(pmlmepriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, pattrib->src, ETH_ALEN);
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
index e452b257ccae..b7385ec7ce93 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
@@ -351,7 +351,7 @@ static void ConstructNullFunctionData(struct adapter *adapt, u8 *pframe,
memcpy(pwlanhdr->addr3, StaAddr, ETH_ALEN);
break;
case Ndis802_11APMode:
- SetFrDs(fctrl);
+ set_fr_ds(fctrl);
memcpy(pwlanhdr->addr1, StaAddr, ETH_ALEN);
memcpy(pwlanhdr->addr2, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
memcpy(pwlanhdr->addr3, myid(&adapt->eeprompriv), ETH_ALEN);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 07195a11aa78..fd70b9513329 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -168,7 +168,7 @@ enum WIFI_REG_DOMAIN {
#define GetToDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0)
-#define SetFrDs(pbuf) \
+#define set_fr_ds(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_))
#define GetFrDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_FROM_DS_)) != 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 05/56] staging: r8188eu: rename camelcase SetFrDs to set_fr_ds
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Yang Li, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro SetFrDs into set_fr_ds.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 4 ++--
drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 6c784134d957..b033705c0578 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -5407,7 +5407,7 @@ static int _issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned
*(fctrl) = 0;
if ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE)
- SetFrDs(fctrl);
+ set_fr_ds(fctrl);
else if ((pmlmeinfo->state & 0x03) == WIFI_FW_STATION_STATE)
set_to_ds(fctrl);
@@ -5522,7 +5522,7 @@ static int _issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16
*(fctrl) = 0;
if ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE)
- SetFrDs(fctrl);
+ set_fr_ds(fctrl);
else if ((pmlmeinfo->state & 0x03) == WIFI_FW_STATION_STATE)
set_to_ds(fctrl);
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index b528729cad76..b6a602060c91 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -738,7 +738,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
qos_option = true;
} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
/* to_ds = 0, fr_ds = 1; */
- SetFrDs(fctrl);
+ set_fr_ds(fctrl);
memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
memcpy(pwlanhdr->addr2, get_bssid(pmlmepriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, pattrib->src, ETH_ALEN);
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
index e452b257ccae..b7385ec7ce93 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
@@ -351,7 +351,7 @@ static void ConstructNullFunctionData(struct adapter *adapt, u8 *pframe,
memcpy(pwlanhdr->addr3, StaAddr, ETH_ALEN);
break;
case Ndis802_11APMode:
- SetFrDs(fctrl);
+ set_fr_ds(fctrl);
memcpy(pwlanhdr->addr1, StaAddr, ETH_ALEN);
memcpy(pwlanhdr->addr2, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
memcpy(pwlanhdr->addr3, myid(&adapt->eeprompriv), ETH_ALEN);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 07195a11aa78..fd70b9513329 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -168,7 +168,7 @@ enum WIFI_REG_DOMAIN {
#define GetToDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0)
-#define SetFrDs(pbuf) \
+#define set_fr_ds(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_))
#define GetFrDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_FROM_DS_)) != 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 06/56] staging: r8188eu: remove dead macro ClearFrDs
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:01 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Zameer Manji, linux-staging,
linux-kernel
Remove dead macro ClearFrDs.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index fd70b9513329..1d24d798c5f9 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -173,9 +173,6 @@ enum WIFI_REG_DOMAIN {
#define GetFrDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_FROM_DS_)) != 0)
-#define ClearFrDs(pbuf) \
- *(__le16 *)(pbuf) &= (~cpu_to_le16(_FROM_DS_))
-
#define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe))
#define SetMFrag(pbuf) \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 06/56] staging: r8188eu: remove dead macro ClearFrDs
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Zameer Manji, linux-staging,
linux-kernel
Remove dead macro ClearFrDs.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index fd70b9513329..1d24d798c5f9 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -173,9 +173,6 @@ enum WIFI_REG_DOMAIN {
#define GetFrDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_FROM_DS_)) != 0)
-#define ClearFrDs(pbuf) \
- *(__le16 *)(pbuf) &= (~cpu_to_le16(_FROM_DS_))
-
#define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe))
#define SetMFrag(pbuf) \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 07/56] staging: r8188eu: add parenthesis to macro SetMFrag
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:01 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Enclose in parenthesis complex macro SetMFrag
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 1d24d798c5f9..6e39a72e49db 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -176,7 +176,7 @@ enum WIFI_REG_DOMAIN {
#define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe))
#define SetMFrag(pbuf) \
- *(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_)
+ (*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_))
#define GetMFrag(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_FRAG_)) != 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 07/56] staging: r8188eu: add parenthesis to macro SetMFrag
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Enclose in parenthesis complex macro SetMFrag
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 1d24d798c5f9..6e39a72e49db 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -176,7 +176,7 @@ enum WIFI_REG_DOMAIN {
#define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe))
#define SetMFrag(pbuf) \
- *(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_)
+ (*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_))
#define GetMFrag(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_FRAG_)) != 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 08/56] staging: r8188eu: rename camelcase SetMFrag to set_m_frag
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:01 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro SetMFrag into set_m_frag.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index b6a602060c91..aa00e1711514 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -924,7 +924,7 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
pframe = mem_start;
- SetMFrag(mem_start);
+ set_m_frag(mem_start);
pframe += pattrib->hdrlen;
mpdu_len -= pattrib->hdrlen;
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 6e39a72e49db..fc5be22c5d2a 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -175,7 +175,7 @@ enum WIFI_REG_DOMAIN {
#define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe))
-#define SetMFrag(pbuf) \
+#define set_m_frag(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_))
#define GetMFrag(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_FRAG_)) != 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 08/56] staging: r8188eu: rename camelcase SetMFrag to set_m_frag
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro SetMFrag into set_m_frag.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index b6a602060c91..aa00e1711514 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -924,7 +924,7 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
pframe = mem_start;
- SetMFrag(mem_start);
+ set_m_frag(mem_start);
pframe += pattrib->hdrlen;
mpdu_len -= pattrib->hdrlen;
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 6e39a72e49db..fc5be22c5d2a 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -175,7 +175,7 @@ enum WIFI_REG_DOMAIN {
#define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe))
-#define SetMFrag(pbuf) \
+#define set_m_frag(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_))
#define GetMFrag(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_FRAG_)) != 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 09/56] staging: r8188eu: rename camelcase GetToDs to get_to_ds
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:01 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Zameer Manji, linux-staging, linux-kernel
Rename camel case macro GetToDs into get_to_ds.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index fc5be22c5d2a..0075b438027b 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -166,14 +166,14 @@ enum WIFI_REG_DOMAIN {
#define set_to_ds(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_))
-#define GetToDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0)
+#define get_to_ds(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0)
#define set_fr_ds(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_))
#define GetFrDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_FROM_DS_)) != 0)
-#define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe))
+#define get_tofr_ds(pframe) ((get_to_ds(pframe) << 1) | GetFrDs(pframe))
#define set_m_frag(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_))
@@ -286,7 +286,7 @@ enum WIFI_REG_DOMAIN {
#define GetAid(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 2)) & 0x3fff)
#define GetTid(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + \
- (((GetToDs(pbuf)<<1) | GetFrDs(pbuf)) == 3 ? \
+ (((get_to_ds(pbuf)<<1) | GetFrDs(pbuf)) == 3 ? \
30 : 24))) & 0x000f)
#define GetAddr1Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 4))
@@ -308,7 +308,7 @@ static inline int IS_MCAST(unsigned char *da)
static inline unsigned char *get_da(unsigned char *pframe)
{
unsigned char *da;
- unsigned int to_fr_ds = (GetToDs(pframe) << 1) | GetFrDs(pframe);
+ unsigned int to_fr_ds = (get_to_ds(pframe) << 1) | GetFrDs(pframe);
switch (to_fr_ds) {
case 0x00: /* ToDs=0, FromDs=0 */
@@ -330,7 +330,7 @@ static inline unsigned char *get_da(unsigned char *pframe)
static inline unsigned char *get_sa(unsigned char *pframe)
{
unsigned char *sa;
- unsigned int to_fr_ds = (GetToDs(pframe) << 1) | GetFrDs(pframe);
+ unsigned int to_fr_ds = (get_to_ds(pframe) << 1) | GetFrDs(pframe);
switch (to_fr_ds) {
case 0x00: /* ToDs=0, FromDs=0 */
@@ -352,7 +352,7 @@ static inline unsigned char *get_sa(unsigned char *pframe)
static inline unsigned char *get_hdr_bssid(unsigned char *pframe)
{
unsigned char *sa;
- unsigned int to_fr_ds = (GetToDs(pframe) << 1) | GetFrDs(pframe);
+ unsigned int to_fr_ds = (get_to_ds(pframe) << 1) | GetFrDs(pframe);
switch (to_fr_ds) {
case 0x00: /* ToDs=0, FromDs=0 */
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 09/56] staging: r8188eu: rename camelcase GetToDs to get_to_ds
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Zameer Manji, linux-staging, linux-kernel
Rename camel case macro GetToDs into get_to_ds.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index fc5be22c5d2a..0075b438027b 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -166,14 +166,14 @@ enum WIFI_REG_DOMAIN {
#define set_to_ds(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_))
-#define GetToDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0)
+#define get_to_ds(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0)
#define set_fr_ds(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_))
#define GetFrDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_FROM_DS_)) != 0)
-#define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe))
+#define get_tofr_ds(pframe) ((get_to_ds(pframe) << 1) | GetFrDs(pframe))
#define set_m_frag(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_))
@@ -286,7 +286,7 @@ enum WIFI_REG_DOMAIN {
#define GetAid(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 2)) & 0x3fff)
#define GetTid(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + \
- (((GetToDs(pbuf)<<1) | GetFrDs(pbuf)) == 3 ? \
+ (((get_to_ds(pbuf)<<1) | GetFrDs(pbuf)) == 3 ? \
30 : 24))) & 0x000f)
#define GetAddr1Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 4))
@@ -308,7 +308,7 @@ static inline int IS_MCAST(unsigned char *da)
static inline unsigned char *get_da(unsigned char *pframe)
{
unsigned char *da;
- unsigned int to_fr_ds = (GetToDs(pframe) << 1) | GetFrDs(pframe);
+ unsigned int to_fr_ds = (get_to_ds(pframe) << 1) | GetFrDs(pframe);
switch (to_fr_ds) {
case 0x00: /* ToDs=0, FromDs=0 */
@@ -330,7 +330,7 @@ static inline unsigned char *get_da(unsigned char *pframe)
static inline unsigned char *get_sa(unsigned char *pframe)
{
unsigned char *sa;
- unsigned int to_fr_ds = (GetToDs(pframe) << 1) | GetFrDs(pframe);
+ unsigned int to_fr_ds = (get_to_ds(pframe) << 1) | GetFrDs(pframe);
switch (to_fr_ds) {
case 0x00: /* ToDs=0, FromDs=0 */
@@ -352,7 +352,7 @@ static inline unsigned char *get_sa(unsigned char *pframe)
static inline unsigned char *get_hdr_bssid(unsigned char *pframe)
{
unsigned char *sa;
- unsigned int to_fr_ds = (GetToDs(pframe) << 1) | GetFrDs(pframe);
+ unsigned int to_fr_ds = (get_to_ds(pframe) << 1) | GetFrDs(pframe);
switch (to_fr_ds) {
case 0x00: /* ToDs=0, FromDs=0 */
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 10/56] staging: r8188eu: rename camelcase GetFrDs to get_fr_ds
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:01 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro GetFrDs into get_fr_ds.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 0075b438027b..355c8f854b08 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -171,9 +171,9 @@ enum WIFI_REG_DOMAIN {
#define set_fr_ds(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_))
-#define GetFrDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_FROM_DS_)) != 0)
+#define get_fr_ds(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_FROM_DS_)) != 0)
-#define get_tofr_ds(pframe) ((get_to_ds(pframe) << 1) | GetFrDs(pframe))
+#define get_tofr_ds(pframe) ((get_to_ds(pframe) << 1) | get_fr_ds(pframe))
#define set_m_frag(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_))
@@ -286,7 +286,7 @@ enum WIFI_REG_DOMAIN {
#define GetAid(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 2)) & 0x3fff)
#define GetTid(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + \
- (((get_to_ds(pbuf)<<1) | GetFrDs(pbuf)) == 3 ? \
+ (((get_to_ds(pbuf)<<1) | get_fr_ds(pbuf)) == 3 ? \
30 : 24))) & 0x000f)
#define GetAddr1Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 4))
@@ -308,7 +308,7 @@ static inline int IS_MCAST(unsigned char *da)
static inline unsigned char *get_da(unsigned char *pframe)
{
unsigned char *da;
- unsigned int to_fr_ds = (get_to_ds(pframe) << 1) | GetFrDs(pframe);
+ unsigned int to_fr_ds = (get_to_ds(pframe) << 1) | get_fr_ds(pframe);
switch (to_fr_ds) {
case 0x00: /* ToDs=0, FromDs=0 */
@@ -330,7 +330,7 @@ static inline unsigned char *get_da(unsigned char *pframe)
static inline unsigned char *get_sa(unsigned char *pframe)
{
unsigned char *sa;
- unsigned int to_fr_ds = (get_to_ds(pframe) << 1) | GetFrDs(pframe);
+ unsigned int to_fr_ds = (get_to_ds(pframe) << 1) | get_fr_ds(pframe);
switch (to_fr_ds) {
case 0x00: /* ToDs=0, FromDs=0 */
@@ -352,7 +352,7 @@ static inline unsigned char *get_sa(unsigned char *pframe)
static inline unsigned char *get_hdr_bssid(unsigned char *pframe)
{
unsigned char *sa;
- unsigned int to_fr_ds = (get_to_ds(pframe) << 1) | GetFrDs(pframe);
+ unsigned int to_fr_ds = (get_to_ds(pframe) << 1) | get_fr_ds(pframe);
switch (to_fr_ds) {
case 0x00: /* ToDs=0, FromDs=0 */
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 10/56] staging: r8188eu: rename camelcase GetFrDs to get_fr_ds
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro GetFrDs into get_fr_ds.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 0075b438027b..355c8f854b08 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -171,9 +171,9 @@ enum WIFI_REG_DOMAIN {
#define set_fr_ds(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_))
-#define GetFrDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_FROM_DS_)) != 0)
+#define get_fr_ds(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_FROM_DS_)) != 0)
-#define get_tofr_ds(pframe) ((get_to_ds(pframe) << 1) | GetFrDs(pframe))
+#define get_tofr_ds(pframe) ((get_to_ds(pframe) << 1) | get_fr_ds(pframe))
#define set_m_frag(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_))
@@ -286,7 +286,7 @@ enum WIFI_REG_DOMAIN {
#define GetAid(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 2)) & 0x3fff)
#define GetTid(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + \
- (((get_to_ds(pbuf)<<1) | GetFrDs(pbuf)) == 3 ? \
+ (((get_to_ds(pbuf)<<1) | get_fr_ds(pbuf)) == 3 ? \
30 : 24))) & 0x000f)
#define GetAddr1Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 4))
@@ -308,7 +308,7 @@ static inline int IS_MCAST(unsigned char *da)
static inline unsigned char *get_da(unsigned char *pframe)
{
unsigned char *da;
- unsigned int to_fr_ds = (get_to_ds(pframe) << 1) | GetFrDs(pframe);
+ unsigned int to_fr_ds = (get_to_ds(pframe) << 1) | get_fr_ds(pframe);
switch (to_fr_ds) {
case 0x00: /* ToDs=0, FromDs=0 */
@@ -330,7 +330,7 @@ static inline unsigned char *get_da(unsigned char *pframe)
static inline unsigned char *get_sa(unsigned char *pframe)
{
unsigned char *sa;
- unsigned int to_fr_ds = (get_to_ds(pframe) << 1) | GetFrDs(pframe);
+ unsigned int to_fr_ds = (get_to_ds(pframe) << 1) | get_fr_ds(pframe);
switch (to_fr_ds) {
case 0x00: /* ToDs=0, FromDs=0 */
@@ -352,7 +352,7 @@ static inline unsigned char *get_sa(unsigned char *pframe)
static inline unsigned char *get_hdr_bssid(unsigned char *pframe)
{
unsigned char *sa;
- unsigned int to_fr_ds = (get_to_ds(pframe) << 1) | GetFrDs(pframe);
+ unsigned int to_fr_ds = (get_to_ds(pframe) << 1) | get_fr_ds(pframe);
switch (to_fr_ds) {
case 0x00: /* ToDs=0, FromDs=0 */
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 11/56] staging: r8188eu: rename camelcase GetMFrag to get_m_frag
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:01 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro GetMFrag into get_m_frag.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 51a13262a226..0f87a01a39fb 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -1109,7 +1109,7 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv
pattrib->seq_num = GetSequence(ptr);
pattrib->pw_save = GetPwrMgt(ptr);
- pattrib->mfrag = GetMFrag(ptr);
+ pattrib->mfrag = get_m_frag(ptr);
pattrib->mdata = GetMData(ptr);
pattrib->privacy = GetPrivacy(ptr);
pattrib->order = GetOrder(ptr);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 355c8f854b08..a07729f79867 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -178,7 +178,7 @@ enum WIFI_REG_DOMAIN {
#define set_m_frag(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_))
-#define GetMFrag(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_FRAG_)) != 0)
+#define get_m_frag(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_FRAG_)) != 0)
#define ClearMFrag(pbuf) \
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_))
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 11/56] staging: r8188eu: rename camelcase GetMFrag to get_m_frag
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro GetMFrag into get_m_frag.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 51a13262a226..0f87a01a39fb 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -1109,7 +1109,7 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv
pattrib->seq_num = GetSequence(ptr);
pattrib->pw_save = GetPwrMgt(ptr);
- pattrib->mfrag = GetMFrag(ptr);
+ pattrib->mfrag = get_m_frag(ptr);
pattrib->mdata = GetMData(ptr);
pattrib->privacy = GetPrivacy(ptr);
pattrib->order = GetOrder(ptr);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 355c8f854b08..a07729f79867 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -178,7 +178,7 @@ enum WIFI_REG_DOMAIN {
#define set_m_frag(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_))
-#define GetMFrag(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_FRAG_)) != 0)
+#define get_m_frag(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_FRAG_)) != 0)
#define ClearMFrag(pbuf) \
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_))
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 12/56] staging: r8188eu: rename camelcase ClearMFrag to clear_m_frag
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:01 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Christophe JAILLET, Zameer Manji, linux-staging,
linux-kernel
Rename camel case macro ClearMFrag into get_m_frag.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index aa00e1711514..0deba46d3a23 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -991,7 +991,7 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
pattrib->last_txcmdsz = pattrib->hdrlen + pattrib->iv_len + ((pattrib->nr_frags == 1) ? llc_sz : 0) +
((pattrib->bswenc) ? pattrib->icv_len : 0) + mem_sz;
- ClearMFrag(mem_start);
+ clear_m_frag(mem_start);
break;
}
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index a07729f79867..e2ec9e630fbf 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -180,7 +180,7 @@ enum WIFI_REG_DOMAIN {
#define get_m_frag(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_FRAG_)) != 0)
-#define ClearMFrag(pbuf) \
+#define clear_m_frag(pbuf) \
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_))
#define SetRetry(pbuf) \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 12/56] staging: r8188eu: rename camelcase ClearMFrag to clear_m_frag
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Christophe JAILLET, Zameer Manji, linux-staging,
linux-kernel
Rename camel case macro ClearMFrag into get_m_frag.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index aa00e1711514..0deba46d3a23 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -991,7 +991,7 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
pattrib->last_txcmdsz = pattrib->hdrlen + pattrib->iv_len + ((pattrib->nr_frags == 1) ? llc_sz : 0) +
((pattrib->bswenc) ? pattrib->icv_len : 0) + mem_sz;
- ClearMFrag(mem_start);
+ clear_m_frag(mem_start);
break;
}
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index a07729f79867..e2ec9e630fbf 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -180,7 +180,7 @@ enum WIFI_REG_DOMAIN {
#define get_m_frag(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_FRAG_)) != 0)
-#define ClearMFrag(pbuf) \
+#define clear_m_frag(pbuf) \
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_))
#define SetRetry(pbuf) \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 13/56] staging: r8188eu: add parenthesis to macro clear_m_frag
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:01 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Enclose in parenthesis complex macro clear_m_frag
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index e2ec9e630fbf..30185d0dabec 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -181,7 +181,7 @@ enum WIFI_REG_DOMAIN {
#define get_m_frag(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_FRAG_)) != 0)
#define clear_m_frag(pbuf) \
- *(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_))
+ (*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_)))
#define SetRetry(pbuf) \
*(__le16 *)(pbuf) |= cpu_to_le16(_RETRY_)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 13/56] staging: r8188eu: add parenthesis to macro clear_m_frag
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Enclose in parenthesis complex macro clear_m_frag
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index e2ec9e630fbf..30185d0dabec 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -181,7 +181,7 @@ enum WIFI_REG_DOMAIN {
#define get_m_frag(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_FRAG_)) != 0)
#define clear_m_frag(pbuf) \
- *(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_))
+ (*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_)))
#define SetRetry(pbuf) \
*(__le16 *)(pbuf) |= cpu_to_le16(_RETRY_)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 14/56] staging: r8188eu: remove dead macro SetRetry
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:01 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Christophe JAILLET, Yang Li, Zameer Manji,
linux-staging, linux-kernel
Remove dead macro SetRetry.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 30185d0dabec..4b124376d263 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -183,9 +183,6 @@ enum WIFI_REG_DOMAIN {
#define clear_m_frag(pbuf) \
(*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_)))
-#define SetRetry(pbuf) \
- *(__le16 *)(pbuf) |= cpu_to_le16(_RETRY_)
-
#define GetRetry(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_RETRY_)) != 0)
#define ClearRetry(pbuf) \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 14/56] staging: r8188eu: remove dead macro SetRetry
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Christophe JAILLET, Yang Li, Zameer Manji,
linux-staging, linux-kernel
Remove dead macro SetRetry.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 30185d0dabec..4b124376d263 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -183,9 +183,6 @@ enum WIFI_REG_DOMAIN {
#define clear_m_frag(pbuf) \
(*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_)))
-#define SetRetry(pbuf) \
- *(__le16 *)(pbuf) |= cpu_to_le16(_RETRY_)
-
#define GetRetry(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_RETRY_)) != 0)
#define ClearRetry(pbuf) \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 15/56] staging: r8188eu: rename camelcase GetRetry to get_retry
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:01 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Zameer Manji, linux-staging,
linux-kernel
Rename camel case macro GetRetry into get_retry
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 4 ++--
drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index b033705c0578..885a6412738b 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -433,7 +433,7 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame)
ptable += index;
if (psta) {
- if (GetRetry(pframe)) {
+ if (get_retry(pframe)) {
if (precv_frame->attrib.seq_num == psta->RxMgmtFrameSeqNum) {
/* drop the duplicate management frame */
DBG_88E("Drop duplicate management frame with seq_num=%d.\n", precv_frame->attrib.seq_num);
@@ -3706,7 +3706,7 @@ static s32 rtw_action_public_decache(struct recv_frame *recv_frame, s32 token)
u16 seq_ctrl = ((recv_frame->attrib.seq_num & 0xffff) << 4) |
(recv_frame->attrib.frag_num & 0xf);
- if (GetRetry(frame)) {
+ if (get_retry(frame)) {
if (token >= 0) {
if ((seq_ctrl == mlmeext->action_public_rxseq) && (token == mlmeext->action_public_dialog_token)) {
DBG_88E(FUNC_ADPT_FMT" seq_ctrl = 0x%x, rxseq = 0x%x, token:%d\n",
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 0f87a01a39fb..ed2a563ab63c 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -975,7 +975,7 @@ static int validate_recv_data_frame(struct adapter *adapter,
struct security_priv *psecuritypriv = &adapter->securitypriv;
int ret = _SUCCESS;
- bretry = GetRetry(ptr);
+ bretry = get_retry(ptr);
pda = get_da(ptr);
psa = get_sa(ptr);
pbssid = get_hdr_bssid(ptr);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 4b124376d263..20a70cde2272 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -183,7 +183,7 @@ enum WIFI_REG_DOMAIN {
#define clear_m_frag(pbuf) \
(*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_)))
-#define GetRetry(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_RETRY_)) != 0)
+#define get_retry(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_RETRY_)) != 0)
#define ClearRetry(pbuf) \
*(__le16 *)(pbuf) &= (~cpu_to_le16(_RETRY_))
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 15/56] staging: r8188eu: rename camelcase GetRetry to get_retry
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Zameer Manji, linux-staging,
linux-kernel
Rename camel case macro GetRetry into get_retry
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 4 ++--
drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index b033705c0578..885a6412738b 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -433,7 +433,7 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame)
ptable += index;
if (psta) {
- if (GetRetry(pframe)) {
+ if (get_retry(pframe)) {
if (precv_frame->attrib.seq_num == psta->RxMgmtFrameSeqNum) {
/* drop the duplicate management frame */
DBG_88E("Drop duplicate management frame with seq_num=%d.\n", precv_frame->attrib.seq_num);
@@ -3706,7 +3706,7 @@ static s32 rtw_action_public_decache(struct recv_frame *recv_frame, s32 token)
u16 seq_ctrl = ((recv_frame->attrib.seq_num & 0xffff) << 4) |
(recv_frame->attrib.frag_num & 0xf);
- if (GetRetry(frame)) {
+ if (get_retry(frame)) {
if (token >= 0) {
if ((seq_ctrl == mlmeext->action_public_rxseq) && (token == mlmeext->action_public_dialog_token)) {
DBG_88E(FUNC_ADPT_FMT" seq_ctrl = 0x%x, rxseq = 0x%x, token:%d\n",
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 0f87a01a39fb..ed2a563ab63c 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -975,7 +975,7 @@ static int validate_recv_data_frame(struct adapter *adapter,
struct security_priv *psecuritypriv = &adapter->securitypriv;
int ret = _SUCCESS;
- bretry = GetRetry(ptr);
+ bretry = get_retry(ptr);
pda = get_da(ptr);
psa = get_sa(ptr);
pbssid = get_hdr_bssid(ptr);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 4b124376d263..20a70cde2272 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -183,7 +183,7 @@ enum WIFI_REG_DOMAIN {
#define clear_m_frag(pbuf) \
(*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_)))
-#define GetRetry(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_RETRY_)) != 0)
+#define get_retry(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_RETRY_)) != 0)
#define ClearRetry(pbuf) \
*(__le16 *)(pbuf) &= (~cpu_to_le16(_RETRY_))
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 16/56] staging: r8188eu: remove dead macro ClearRetry
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:01 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Christophe JAILLET, Zameer Manji, linux-staging,
linux-kernel
Remove dead macro ClearRetry.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 20a70cde2272..ab8ed3ce89f4 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -185,9 +185,6 @@ enum WIFI_REG_DOMAIN {
#define get_retry(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_RETRY_)) != 0)
-#define ClearRetry(pbuf) \
- *(__le16 *)(pbuf) &= (~cpu_to_le16(_RETRY_))
-
#define SetPwrMgt(pbuf) \
*(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 16/56] staging: r8188eu: remove dead macro ClearRetry
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Christophe JAILLET, Zameer Manji, linux-staging,
linux-kernel
Remove dead macro ClearRetry.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 20a70cde2272..ab8ed3ce89f4 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -185,9 +185,6 @@ enum WIFI_REG_DOMAIN {
#define get_retry(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_RETRY_)) != 0)
-#define ClearRetry(pbuf) \
- *(__le16 *)(pbuf) &= (~cpu_to_le16(_RETRY_))
-
#define SetPwrMgt(pbuf) \
*(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 17/56] staging: r8188eu: rename camelcase SetPwrMgt to set_pwr_mgt
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:01 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Yang Li,
Zameer Manji, linux-staging, linux-kernel
Rename camel case macro SetPwrMgt into set_pwr_mgt.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +-
drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 4 ++--
drivers/staging/r8188eu/include/wifi.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 885a6412738b..63e16f9deff4 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -5412,7 +5412,7 @@ static int _issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned
set_to_ds(fctrl);
if (power_mode)
- SetPwrMgt(fctrl);
+ set_pwr_mgt(fctrl);
memcpy(pwlanhdr->addr1, da, ETH_ALEN);
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
index b7385ec7ce93..8fb4789d9e65 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
@@ -305,7 +305,7 @@ static void ConstructPSPoll(struct adapter *adapt, u8 *pframe, u32 *pLength)
/* Frame control. */
fctrl = &pwlanhdr->frame_ctl;
*(fctrl) = 0;
- SetPwrMgt(fctrl);
+ set_pwr_mgt(fctrl);
SetFrameSubType(pframe, WIFI_PSPOLL);
/* AID. */
@@ -341,7 +341,7 @@ static void ConstructNullFunctionData(struct adapter *adapt, u8 *pframe,
fctrl = &pwlanhdr->frame_ctl;
*(fctrl) = 0;
if (bForcePowerSave)
- SetPwrMgt(fctrl);
+ set_pwr_mgt(fctrl);
switch (cur_network->network.InfrastructureMode) {
case Ndis802_11Infrastructure:
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index ab8ed3ce89f4..3f16e9b9c342 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -185,7 +185,7 @@ enum WIFI_REG_DOMAIN {
#define get_retry(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_RETRY_)) != 0)
-#define SetPwrMgt(pbuf) \
+#define set_pwr_mgt(pbuf) \
*(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_)
#define GetPwrMgt(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) != 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 17/56] staging: r8188eu: rename camelcase SetPwrMgt to set_pwr_mgt
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Yang Li,
Zameer Manji, linux-staging, linux-kernel
Rename camel case macro SetPwrMgt into set_pwr_mgt.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +-
drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 4 ++--
drivers/staging/r8188eu/include/wifi.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 885a6412738b..63e16f9deff4 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -5412,7 +5412,7 @@ static int _issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned
set_to_ds(fctrl);
if (power_mode)
- SetPwrMgt(fctrl);
+ set_pwr_mgt(fctrl);
memcpy(pwlanhdr->addr1, da, ETH_ALEN);
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
index b7385ec7ce93..8fb4789d9e65 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
@@ -305,7 +305,7 @@ static void ConstructPSPoll(struct adapter *adapt, u8 *pframe, u32 *pLength)
/* Frame control. */
fctrl = &pwlanhdr->frame_ctl;
*(fctrl) = 0;
- SetPwrMgt(fctrl);
+ set_pwr_mgt(fctrl);
SetFrameSubType(pframe, WIFI_PSPOLL);
/* AID. */
@@ -341,7 +341,7 @@ static void ConstructNullFunctionData(struct adapter *adapt, u8 *pframe,
fctrl = &pwlanhdr->frame_ctl;
*(fctrl) = 0;
if (bForcePowerSave)
- SetPwrMgt(fctrl);
+ set_pwr_mgt(fctrl);
switch (cur_network->network.InfrastructureMode) {
case Ndis802_11Infrastructure:
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index ab8ed3ce89f4..3f16e9b9c342 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -185,7 +185,7 @@ enum WIFI_REG_DOMAIN {
#define get_retry(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_RETRY_)) != 0)
-#define SetPwrMgt(pbuf) \
+#define set_pwr_mgt(pbuf) \
*(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_)
#define GetPwrMgt(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) != 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 18/56] staging: r8188eu: add parenthesis to macro set_pwr_mgt
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:01 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Enclose in parenthesis complex macro set_pwr_mgt
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 3f16e9b9c342..4b52c4205a2f 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -186,7 +186,7 @@ enum WIFI_REG_DOMAIN {
#define get_retry(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_RETRY_)) != 0)
#define set_pwr_mgt(pbuf) \
- *(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_)
+ (*(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_))
#define GetPwrMgt(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) != 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 18/56] staging: r8188eu: add parenthesis to macro set_pwr_mgt
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Enclose in parenthesis complex macro set_pwr_mgt
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 3f16e9b9c342..4b52c4205a2f 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -186,7 +186,7 @@ enum WIFI_REG_DOMAIN {
#define get_retry(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_RETRY_)) != 0)
#define set_pwr_mgt(pbuf) \
- *(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_)
+ (*(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_))
#define GetPwrMgt(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) != 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 19/56] staging: r8188eu: rename camelcase GetPwrMgt to get_pwr_mgt
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:01 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro GetPwrMgt into get_pwr_mgt.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_recv.c | 4 ++--
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index ed2a563ab63c..844369531639 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -474,7 +474,7 @@ void process_pwrbit_data(struct adapter *padapter, struct recv_frame *precv_fram
psta = rtw_get_stainfo(pstapriv, pattrib->src);
- pwrbit = GetPwrMgt(ptr);
+ pwrbit = get_pwr_mgt(ptr);
if (psta) {
if (pwrbit) {
@@ -1108,7 +1108,7 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv
pattrib->frag_num = GetFragNum(ptr);
pattrib->seq_num = GetSequence(ptr);
- pattrib->pw_save = GetPwrMgt(ptr);
+ pattrib->pw_save = get_pwr_mgt(ptr);
pattrib->mfrag = get_m_frag(ptr);
pattrib->mdata = GetMData(ptr);
pattrib->privacy = GetPrivacy(ptr);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 4b52c4205a2f..10f7c2b6e138 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -188,7 +188,7 @@ enum WIFI_REG_DOMAIN {
#define set_pwr_mgt(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_))
-#define GetPwrMgt(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) != 0)
+#define get_pwr_mgt(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) != 0)
#define ClearPwrMgt(pbuf) \
*(__le16 *)(pbuf) &= (~cpu_to_le16(_PWRMGT_))
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 19/56] staging: r8188eu: rename camelcase GetPwrMgt to get_pwr_mgt
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro GetPwrMgt into get_pwr_mgt.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_recv.c | 4 ++--
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index ed2a563ab63c..844369531639 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -474,7 +474,7 @@ void process_pwrbit_data(struct adapter *padapter, struct recv_frame *precv_fram
psta = rtw_get_stainfo(pstapriv, pattrib->src);
- pwrbit = GetPwrMgt(ptr);
+ pwrbit = get_pwr_mgt(ptr);
if (psta) {
if (pwrbit) {
@@ -1108,7 +1108,7 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv
pattrib->frag_num = GetFragNum(ptr);
pattrib->seq_num = GetSequence(ptr);
- pattrib->pw_save = GetPwrMgt(ptr);
+ pattrib->pw_save = get_pwr_mgt(ptr);
pattrib->mfrag = get_m_frag(ptr);
pattrib->mdata = GetMData(ptr);
pattrib->privacy = GetPrivacy(ptr);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 4b52c4205a2f..10f7c2b6e138 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -188,7 +188,7 @@ enum WIFI_REG_DOMAIN {
#define set_pwr_mgt(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_))
-#define GetPwrMgt(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) != 0)
+#define get_pwr_mgt(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) != 0)
#define ClearPwrMgt(pbuf) \
*(__le16 *)(pbuf) &= (~cpu_to_le16(_PWRMGT_))
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 20/56] staging: r8188eu: remove dead macro ClearPwrMgt
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:01 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Yang Li, Zameer Manji,
linux-staging, linux-kernel
Remove dead macro ClearPwrMgt.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 10f7c2b6e138..c6b9cd37219a 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -190,9 +190,6 @@ enum WIFI_REG_DOMAIN {
#define get_pwr_mgt(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) != 0)
-#define ClearPwrMgt(pbuf) \
- *(__le16 *)(pbuf) &= (~cpu_to_le16(_PWRMGT_))
-
#define SetMData(pbuf) \
*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 20/56] staging: r8188eu: remove dead macro ClearPwrMgt
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Yang Li, Zameer Manji,
linux-staging, linux-kernel
Remove dead macro ClearPwrMgt.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 10f7c2b6e138..c6b9cd37219a 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -190,9 +190,6 @@ enum WIFI_REG_DOMAIN {
#define get_pwr_mgt(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) != 0)
-#define ClearPwrMgt(pbuf) \
- *(__le16 *)(pbuf) &= (~cpu_to_le16(_PWRMGT_))
-
#define SetMData(pbuf) \
*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 21/56] staging: r8188eu: rename camelcase SetMData to set_m_data
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:01 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Christophe JAILLET, Zameer Manji, linux-staging,
linux-kernel
Rename camel case macro SetMData into set_m_data.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index 0deba46d3a23..3a28c02da7c8 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -759,7 +759,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
}
if (pattrib->mdata)
- SetMData(fctrl);
+ set_m_data(fctrl);
if (pattrib->encrypt)
SetPrivacy(fctrl);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index c6b9cd37219a..7a87fac66e43 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -190,7 +190,7 @@ enum WIFI_REG_DOMAIN {
#define get_pwr_mgt(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) != 0)
-#define SetMData(pbuf) \
+#define set_m_data(pbuf) \
*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_)
#define GetMData(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_DATA_)) != 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 21/56] staging: r8188eu: rename camelcase SetMData to set_m_data
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Christophe JAILLET, Zameer Manji, linux-staging,
linux-kernel
Rename camel case macro SetMData into set_m_data.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index 0deba46d3a23..3a28c02da7c8 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -759,7 +759,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
}
if (pattrib->mdata)
- SetMData(fctrl);
+ set_m_data(fctrl);
if (pattrib->encrypt)
SetPrivacy(fctrl);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index c6b9cd37219a..7a87fac66e43 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -190,7 +190,7 @@ enum WIFI_REG_DOMAIN {
#define get_pwr_mgt(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) != 0)
-#define SetMData(pbuf) \
+#define set_m_data(pbuf) \
*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_)
#define GetMData(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_DATA_)) != 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 22/56] staging: r8188eu: add parenthesis to macro set_m_data
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:01 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Yang Li, Christophe JAILLET,
Zameer Manji, linux-staging, linux-kernel
Enclose in parenthesis complex macro set_m_data
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 7a87fac66e43..869a38ec9ba5 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -191,7 +191,7 @@ enum WIFI_REG_DOMAIN {
#define get_pwr_mgt(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) != 0)
#define set_m_data(pbuf) \
- *(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_)
+ (*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_))
#define GetMData(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_DATA_)) != 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 22/56] staging: r8188eu: add parenthesis to macro set_m_data
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Yang Li, Christophe JAILLET,
Zameer Manji, linux-staging, linux-kernel
Enclose in parenthesis complex macro set_m_data
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 7a87fac66e43..869a38ec9ba5 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -191,7 +191,7 @@ enum WIFI_REG_DOMAIN {
#define get_pwr_mgt(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) != 0)
#define set_m_data(pbuf) \
- *(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_)
+ (*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_))
#define GetMData(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_DATA_)) != 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 23/56] staging: r8188eu: rename camelcase GetMData to get_m_data
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:01 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Zameer Manji, linux-staging, linux-kernel
Rename camel case macro GetMData into get_m_data.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 844369531639..59560a3c87df 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -1110,7 +1110,7 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv
pattrib->pw_save = get_pwr_mgt(ptr);
pattrib->mfrag = get_m_frag(ptr);
- pattrib->mdata = GetMData(ptr);
+ pattrib->mdata = get_m_data(ptr);
pattrib->privacy = GetPrivacy(ptr);
pattrib->order = GetOrder(ptr);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 869a38ec9ba5..d42ed74c8469 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -193,7 +193,7 @@ enum WIFI_REG_DOMAIN {
#define set_m_data(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_))
-#define GetMData(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_DATA_)) != 0)
+#define get_m_data(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_DATA_)) != 0)
#define ClearMData(pbuf) \
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_))
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 23/56] staging: r8188eu: rename camelcase GetMData to get_m_data
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Zameer Manji, linux-staging, linux-kernel
Rename camel case macro GetMData into get_m_data.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 844369531639..59560a3c87df 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -1110,7 +1110,7 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv
pattrib->pw_save = get_pwr_mgt(ptr);
pattrib->mfrag = get_m_frag(ptr);
- pattrib->mdata = GetMData(ptr);
+ pattrib->mdata = get_m_data(ptr);
pattrib->privacy = GetPrivacy(ptr);
pattrib->order = GetOrder(ptr);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 869a38ec9ba5..d42ed74c8469 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -193,7 +193,7 @@ enum WIFI_REG_DOMAIN {
#define set_m_data(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_))
-#define GetMData(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_DATA_)) != 0)
+#define get_m_data(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_DATA_)) != 0)
#define ClearMData(pbuf) \
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_))
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 24/56] staging: r8188eu: remove dead macro ClearMData
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:01 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Remove dead macro ClearMData
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index d42ed74c8469..73465becf1e4 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -195,9 +195,6 @@ enum WIFI_REG_DOMAIN {
#define get_m_data(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_DATA_)) != 0)
-#define ClearMData(pbuf) \
- *(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_))
-
#define SetPrivacy(pbuf) \
*(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 24/56] staging: r8188eu: remove dead macro ClearMData
@ 2022-01-03 19:01 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:01 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Remove dead macro ClearMData
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index d42ed74c8469..73465becf1e4 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -195,9 +195,6 @@ enum WIFI_REG_DOMAIN {
#define get_m_data(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_DATA_)) != 0)
-#define ClearMData(pbuf) \
- *(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_))
-
#define SetPrivacy(pbuf) \
*(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 25/56] staging: r8188eu: rename camelcase SetPrivacy to set_privacy
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Zameer Manji, linux-staging, linux-kernel
Rename camel case macro SetPrivacy into set_privacy.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +-
drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 63e16f9deff4..f605e4a6d8a7 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -4910,7 +4910,7 @@ void issue_auth(struct adapter *padapter, struct sta_info *psta, unsigned short
if ((pmlmeinfo->auth_seq == 3) && (pmlmeinfo->state & WIFI_FW_AUTH_STATE) && (use_shared_key == 1)) {
pframe = rtw_set_ie(pframe, _CHLGETXT_IE_, 128, pmlmeinfo->chg_txt, &pattrib->pktlen);
- SetPrivacy(fctrl);
+ set_privacy(fctrl);
pattrib->hdrlen = sizeof(struct rtw_ieee80211_hdr_3addr);
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index 3a28c02da7c8..e182f63b6c6b 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -762,7 +762,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
set_m_data(fctrl);
if (pattrib->encrypt)
- SetPrivacy(fctrl);
+ set_privacy(fctrl);
if (qos_option) {
qc = (unsigned short *)(hdr + pattrib->hdrlen - 2);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 73465becf1e4..32ff5b2aed34 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -195,7 +195,7 @@ enum WIFI_REG_DOMAIN {
#define get_m_data(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_DATA_)) != 0)
-#define SetPrivacy(pbuf) \
+#define set_privacy(pbuf) \
*(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_)
#define GetPrivacy(pbuf) \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 25/56] staging: r8188eu: rename camelcase SetPrivacy to set_privacy
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Zameer Manji, linux-staging, linux-kernel
Rename camel case macro SetPrivacy into set_privacy.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +-
drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 63e16f9deff4..f605e4a6d8a7 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -4910,7 +4910,7 @@ void issue_auth(struct adapter *padapter, struct sta_info *psta, unsigned short
if ((pmlmeinfo->auth_seq == 3) && (pmlmeinfo->state & WIFI_FW_AUTH_STATE) && (use_shared_key == 1)) {
pframe = rtw_set_ie(pframe, _CHLGETXT_IE_, 128, pmlmeinfo->chg_txt, &pattrib->pktlen);
- SetPrivacy(fctrl);
+ set_privacy(fctrl);
pattrib->hdrlen = sizeof(struct rtw_ieee80211_hdr_3addr);
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index 3a28c02da7c8..e182f63b6c6b 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -762,7 +762,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
set_m_data(fctrl);
if (pattrib->encrypt)
- SetPrivacy(fctrl);
+ set_privacy(fctrl);
if (qos_option) {
qc = (unsigned short *)(hdr + pattrib->hdrlen - 2);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 73465becf1e4..32ff5b2aed34 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -195,7 +195,7 @@ enum WIFI_REG_DOMAIN {
#define get_m_data(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_DATA_)) != 0)
-#define SetPrivacy(pbuf) \
+#define set_privacy(pbuf) \
*(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_)
#define GetPrivacy(pbuf) \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 26/56] staging: r8188eu: add parenthesis to macro set_privacy
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Yang Li, Zameer Manji,
linux-staging, linux-kernel
Enclose in parenthesis complex macro set_privacy
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 32ff5b2aed34..75a69323e787 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -196,7 +196,7 @@ enum WIFI_REG_DOMAIN {
#define get_m_data(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_DATA_)) != 0)
#define set_privacy(pbuf) \
- *(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_)
+ (*(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_))
#define GetPrivacy(pbuf) \
(((*(__le16 *)(pbuf)) & cpu_to_le16(_PRIVACY_)) != 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 26/56] staging: r8188eu: add parenthesis to macro set_privacy
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Yang Li, Zameer Manji,
linux-staging, linux-kernel
Enclose in parenthesis complex macro set_privacy
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 32ff5b2aed34..75a69323e787 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -196,7 +196,7 @@ enum WIFI_REG_DOMAIN {
#define get_m_data(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_DATA_)) != 0)
#define set_privacy(pbuf) \
- *(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_)
+ (*(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_))
#define GetPrivacy(pbuf) \
(((*(__le16 *)(pbuf)) & cpu_to_le16(_PRIVACY_)) != 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 27/56] staging: r8188eu: rename camelcase GetPrivacy to get_privacy
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro GetPrivacy into get_privacy.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +-
drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index f605e4a6d8a7..763f46dd1b5a 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -886,7 +886,7 @@ unsigned int OnAuthClient(struct adapter *padapter, struct recv_frame *precv_fra
if (!(pmlmeinfo->state & WIFI_FW_AUTH_STATE))
return _SUCCESS;
- offset = (GetPrivacy(pframe)) ? 4 : 0;
+ offset = (get_privacy(pframe)) ? 4 : 0;
seq = le16_to_cpu(*(__le16 *)((size_t)pframe + WLAN_HDR_A3_LEN + offset + 2));
status = le16_to_cpu(*(__le16 *)((size_t)pframe + WLAN_HDR_A3_LEN + offset + 4));
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 59560a3c87df..81f1ed9b5186 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -1111,7 +1111,7 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv
pattrib->pw_save = get_pwr_mgt(ptr);
pattrib->mfrag = get_m_frag(ptr);
pattrib->mdata = get_m_data(ptr);
- pattrib->privacy = GetPrivacy(ptr);
+ pattrib->privacy = get_privacy(ptr);
pattrib->order = GetOrder(ptr);
/* Dump rx packets */
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 75a69323e787..da8a5bd12646 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -198,7 +198,7 @@ enum WIFI_REG_DOMAIN {
#define set_privacy(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_))
-#define GetPrivacy(pbuf) \
+#define get_privacy(pbuf) \
(((*(__le16 *)(pbuf)) & cpu_to_le16(_PRIVACY_)) != 0)
#define ClearPrivacy(pbuf) \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 27/56] staging: r8188eu: rename camelcase GetPrivacy to get_privacy
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro GetPrivacy into get_privacy.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +-
drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index f605e4a6d8a7..763f46dd1b5a 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -886,7 +886,7 @@ unsigned int OnAuthClient(struct adapter *padapter, struct recv_frame *precv_fra
if (!(pmlmeinfo->state & WIFI_FW_AUTH_STATE))
return _SUCCESS;
- offset = (GetPrivacy(pframe)) ? 4 : 0;
+ offset = (get_privacy(pframe)) ? 4 : 0;
seq = le16_to_cpu(*(__le16 *)((size_t)pframe + WLAN_HDR_A3_LEN + offset + 2));
status = le16_to_cpu(*(__le16 *)((size_t)pframe + WLAN_HDR_A3_LEN + offset + 4));
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 59560a3c87df..81f1ed9b5186 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -1111,7 +1111,7 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv
pattrib->pw_save = get_pwr_mgt(ptr);
pattrib->mfrag = get_m_frag(ptr);
pattrib->mdata = get_m_data(ptr);
- pattrib->privacy = GetPrivacy(ptr);
+ pattrib->privacy = get_privacy(ptr);
pattrib->order = GetOrder(ptr);
/* Dump rx packets */
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 75a69323e787..da8a5bd12646 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -198,7 +198,7 @@ enum WIFI_REG_DOMAIN {
#define set_privacy(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_))
-#define GetPrivacy(pbuf) \
+#define get_privacy(pbuf) \
(((*(__le16 *)(pbuf)) & cpu_to_le16(_PRIVACY_)) != 0)
#define ClearPrivacy(pbuf) \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 28/56] staging: r8188eu: remove dead macro ClearPrivacy
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Yang Li, Christophe JAILLET,
Zameer Manji, linux-staging, linux-kernel
Remove dead macro ClearPrivacy.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index da8a5bd12646..7eb4da42d5a7 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -201,9 +201,6 @@ enum WIFI_REG_DOMAIN {
#define get_privacy(pbuf) \
(((*(__le16 *)(pbuf)) & cpu_to_le16(_PRIVACY_)) != 0)
-#define ClearPrivacy(pbuf) \
- *(__le16 *)(pbuf) &= (~cpu_to_le16(_PRIVACY_))
-
#define GetOrder(pbuf) \
(((*(__le16 *)(pbuf)) & cpu_to_le16(_ORDER_)) != 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 28/56] staging: r8188eu: remove dead macro ClearPrivacy
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Yang Li, Christophe JAILLET,
Zameer Manji, linux-staging, linux-kernel
Remove dead macro ClearPrivacy.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index da8a5bd12646..7eb4da42d5a7 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -201,9 +201,6 @@ enum WIFI_REG_DOMAIN {
#define get_privacy(pbuf) \
(((*(__le16 *)(pbuf)) & cpu_to_le16(_PRIVACY_)) != 0)
-#define ClearPrivacy(pbuf) \
- *(__le16 *)(pbuf) &= (~cpu_to_le16(_PRIVACY_))
-
#define GetOrder(pbuf) \
(((*(__le16 *)(pbuf)) & cpu_to_le16(_ORDER_)) != 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 29/56] staging: r8188eu: rename camelcase GetOrder to get_order
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Yang Li, Christophe JAILLET,
Zameer Manji, linux-staging, linux-kernel
Rename camel case macro GetOrder into get_order.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 81f1ed9b5186..230c8198ed84 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -1112,7 +1112,7 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv
pattrib->mfrag = get_m_frag(ptr);
pattrib->mdata = get_m_data(ptr);
pattrib->privacy = get_privacy(ptr);
- pattrib->order = GetOrder(ptr);
+ pattrib->order = get_order(ptr);
/* Dump rx packets */
GetHalDefVar8188EUsb(adapter, HAL_DEF_DBG_DUMP_RXPKT, &bDumpRxPkt);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 7eb4da42d5a7..1f65309aa1fe 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -201,7 +201,7 @@ enum WIFI_REG_DOMAIN {
#define get_privacy(pbuf) \
(((*(__le16 *)(pbuf)) & cpu_to_le16(_PRIVACY_)) != 0)
-#define GetOrder(pbuf) \
+#define get_order(pbuf) \
(((*(__le16 *)(pbuf)) & cpu_to_le16(_ORDER_)) != 0)
#define GetFrameType(pbuf) \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 29/56] staging: r8188eu: rename camelcase GetOrder to get_order
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Yang Li, Christophe JAILLET,
Zameer Manji, linux-staging, linux-kernel
Rename camel case macro GetOrder into get_order.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 81f1ed9b5186..230c8198ed84 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -1112,7 +1112,7 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv
pattrib->mfrag = get_m_frag(ptr);
pattrib->mdata = get_m_data(ptr);
pattrib->privacy = get_privacy(ptr);
- pattrib->order = GetOrder(ptr);
+ pattrib->order = get_order(ptr);
/* Dump rx packets */
GetHalDefVar8188EUsb(adapter, HAL_DEF_DBG_DUMP_RXPKT, &bDumpRxPkt);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 7eb4da42d5a7..1f65309aa1fe 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -201,7 +201,7 @@ enum WIFI_REG_DOMAIN {
#define get_privacy(pbuf) \
(((*(__le16 *)(pbuf)) & cpu_to_le16(_PRIVACY_)) != 0)
-#define GetOrder(pbuf) \
+#define get_order(pbuf) \
(((*(__le16 *)(pbuf)) & cpu_to_le16(_ORDER_)) != 0)
#define GetFrameType(pbuf) \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 30/56] staging: r8188eu: rename camelcase GetFrameType to get_frame_type
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Christophe JAILLET, Zameer Manji, linux-staging,
linux-kernel
Rename camel case macro GetFrameType into get_frame_type.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +-
drivers/staging/r8188eu/core/rtw_recv.c | 6 +++---
drivers/staging/r8188eu/core/rtw_security.c | 4 ++--
drivers/staging/r8188eu/include/wifi.h | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 763f46dd1b5a..5d0901f72cd8 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -416,7 +416,7 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame)
u8 *pframe = precv_frame->rx_data;
struct sta_info *psta = rtw_get_stainfo(&padapter->stapriv, GetAddr2Ptr(pframe));
- if (GetFrameType(pframe) != WIFI_MGT_TYPE)
+ if (get_frame_type(pframe) != WIFI_MGT_TYPE)
return;
/* receive the frames that ra(a1) is my address or ra(a1) is bc address. */
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 230c8198ed84..9902adf99142 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -819,7 +819,7 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
u8 *pframe = precv_frame->rx_data;
/* uint len = precv_frame->len; */
- if (GetFrameType(pframe) != WIFI_CTRL_TYPE)
+ if (get_frame_type(pframe) != WIFI_CTRL_TYPE)
return _FAIL;
/* receive the frames that ra(a1) is my address */
@@ -1100,7 +1100,7 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv
goto exit;
}
- type = GetFrameType(ptr);
+ type = get_frame_type(ptr);
subtype = GetFrameSubType(ptr); /* bit(7)~bit(2) */
pattrib->to_fr_ds = get_tofr_ds(ptr);
@@ -1345,7 +1345,7 @@ struct recv_frame *recvframe_chk_defrag(struct adapter *padapter, struct recv_fr
psta_addr = pfhdr->attrib.ta;
psta = rtw_get_stainfo(pstapriv, psta_addr);
if (!psta) {
- u8 type = GetFrameType(pfhdr->rx_data);
+ u8 type = get_frame_type(pfhdr->rx_data);
if (type != WIFI_DATA_TYPE) {
psta = rtw_get_bcmc_stainfo(padapter);
pdefrag_q = &psta->sta_recvpriv.defrag_q;
diff --git a/drivers/staging/r8188eu/core/rtw_security.c b/drivers/staging/r8188eu/core/rtw_security.c
index 4e93c720c1b6..42ff5fd5ddad 100644
--- a/drivers/staging/r8188eu/core/rtw_security.c
+++ b/drivers/staging/r8188eu/core/rtw_security.c
@@ -972,7 +972,7 @@ static int aes_cipher(u8 *key, uint hdrlen, u8 *pframe, uint plen)
u8 aes_out[16];
u8 padded_buffer[16];
u8 mic[8];
- uint frtype = GetFrameType(pframe);
+ uint frtype = get_frame_type(pframe);
uint frsubtype = GetFrameSubType(pframe);
frsubtype = frsubtype >> 4;
@@ -1166,7 +1166,7 @@ static int aes_decipher(struct adapter *padapter, u8 *key, uint hdrlen,
u8 mic[8];
/* uint offset = 0; */
- uint frtype = GetFrameType(pframe);
+ uint frtype = get_frame_type(pframe);
uint frsubtype = GetFrameSubType(pframe);
frsubtype = frsubtype >> 4;
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 1f65309aa1fe..bd22f74e425b 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -204,7 +204,7 @@ enum WIFI_REG_DOMAIN {
#define get_order(pbuf) \
(((*(__le16 *)(pbuf)) & cpu_to_le16(_ORDER_)) != 0)
-#define GetFrameType(pbuf) \
+#define get_frame_type(pbuf) \
(le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(3) | BIT(2)))
#define SetFrameType(pbuf, type) \
@@ -361,7 +361,7 @@ static inline unsigned char *get_hdr_bssid(unsigned char *pframe)
static inline int IsFrameTypeCtrl(unsigned char *pframe)
{
- if (WIFI_CTRL_TYPE == GetFrameType(pframe))
+ if (WIFI_CTRL_TYPE == get_frame_type(pframe))
return true;
else
return false;
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 30/56] staging: r8188eu: rename camelcase GetFrameType to get_frame_type
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Christophe JAILLET, Zameer Manji, linux-staging,
linux-kernel
Rename camel case macro GetFrameType into get_frame_type.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +-
drivers/staging/r8188eu/core/rtw_recv.c | 6 +++---
drivers/staging/r8188eu/core/rtw_security.c | 4 ++--
drivers/staging/r8188eu/include/wifi.h | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 763f46dd1b5a..5d0901f72cd8 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -416,7 +416,7 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame)
u8 *pframe = precv_frame->rx_data;
struct sta_info *psta = rtw_get_stainfo(&padapter->stapriv, GetAddr2Ptr(pframe));
- if (GetFrameType(pframe) != WIFI_MGT_TYPE)
+ if (get_frame_type(pframe) != WIFI_MGT_TYPE)
return;
/* receive the frames that ra(a1) is my address or ra(a1) is bc address. */
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 230c8198ed84..9902adf99142 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -819,7 +819,7 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
u8 *pframe = precv_frame->rx_data;
/* uint len = precv_frame->len; */
- if (GetFrameType(pframe) != WIFI_CTRL_TYPE)
+ if (get_frame_type(pframe) != WIFI_CTRL_TYPE)
return _FAIL;
/* receive the frames that ra(a1) is my address */
@@ -1100,7 +1100,7 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv
goto exit;
}
- type = GetFrameType(ptr);
+ type = get_frame_type(ptr);
subtype = GetFrameSubType(ptr); /* bit(7)~bit(2) */
pattrib->to_fr_ds = get_tofr_ds(ptr);
@@ -1345,7 +1345,7 @@ struct recv_frame *recvframe_chk_defrag(struct adapter *padapter, struct recv_fr
psta_addr = pfhdr->attrib.ta;
psta = rtw_get_stainfo(pstapriv, psta_addr);
if (!psta) {
- u8 type = GetFrameType(pfhdr->rx_data);
+ u8 type = get_frame_type(pfhdr->rx_data);
if (type != WIFI_DATA_TYPE) {
psta = rtw_get_bcmc_stainfo(padapter);
pdefrag_q = &psta->sta_recvpriv.defrag_q;
diff --git a/drivers/staging/r8188eu/core/rtw_security.c b/drivers/staging/r8188eu/core/rtw_security.c
index 4e93c720c1b6..42ff5fd5ddad 100644
--- a/drivers/staging/r8188eu/core/rtw_security.c
+++ b/drivers/staging/r8188eu/core/rtw_security.c
@@ -972,7 +972,7 @@ static int aes_cipher(u8 *key, uint hdrlen, u8 *pframe, uint plen)
u8 aes_out[16];
u8 padded_buffer[16];
u8 mic[8];
- uint frtype = GetFrameType(pframe);
+ uint frtype = get_frame_type(pframe);
uint frsubtype = GetFrameSubType(pframe);
frsubtype = frsubtype >> 4;
@@ -1166,7 +1166,7 @@ static int aes_decipher(struct adapter *padapter, u8 *key, uint hdrlen,
u8 mic[8];
/* uint offset = 0; */
- uint frtype = GetFrameType(pframe);
+ uint frtype = get_frame_type(pframe);
uint frsubtype = GetFrameSubType(pframe);
frsubtype = frsubtype >> 4;
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 1f65309aa1fe..bd22f74e425b 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -204,7 +204,7 @@ enum WIFI_REG_DOMAIN {
#define get_order(pbuf) \
(((*(__le16 *)(pbuf)) & cpu_to_le16(_ORDER_)) != 0)
-#define GetFrameType(pbuf) \
+#define get_frame_type(pbuf) \
(le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(3) | BIT(2)))
#define SetFrameType(pbuf, type) \
@@ -361,7 +361,7 @@ static inline unsigned char *get_hdr_bssid(unsigned char *pframe)
static inline int IsFrameTypeCtrl(unsigned char *pframe)
{
- if (WIFI_CTRL_TYPE == GetFrameType(pframe))
+ if (WIFI_CTRL_TYPE == get_frame_type(pframe))
return true;
else
return false;
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 31/56] staging: r8188eu: remove dead macro SetFrameType
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Remove dead macro SetFrameType.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index bd22f74e425b..7053185667a5 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -207,12 +207,6 @@ enum WIFI_REG_DOMAIN {
#define get_frame_type(pbuf) \
(le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(3) | BIT(2)))
-#define SetFrameType(pbuf, type) \
- do { \
- *(unsigned short *)(pbuf) &= __constant_cpu_to_le16(~(BIT(3) | BIT(2))); \
- *(unsigned short *)(pbuf) |= __constant_cpu_to_le16(type); \
- } while (0)
-
#define GetFrameSubType(pbuf) (le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(7) |\
BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2)))
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 31/56] staging: r8188eu: remove dead macro SetFrameType
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Remove dead macro SetFrameType.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index bd22f74e425b..7053185667a5 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -207,12 +207,6 @@ enum WIFI_REG_DOMAIN {
#define get_frame_type(pbuf) \
(le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(3) | BIT(2)))
-#define SetFrameType(pbuf, type) \
- do { \
- *(unsigned short *)(pbuf) &= __constant_cpu_to_le16(~(BIT(3) | BIT(2))); \
- *(unsigned short *)(pbuf) |= __constant_cpu_to_le16(type); \
- } while (0)
-
#define GetFrameSubType(pbuf) (le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(7) |\
BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2)))
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 32/56] staging: r8188eu: rename camelcase GetFrameSubType to get_frame_subtype
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro GetFrameSubType into get_frame_subtype.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 8 ++++----
drivers/staging/r8188eu/core/rtw_p2p.c | 2 +-
drivers/staging/r8188eu/core/rtw_recv.c | 18 +++++++++---------
drivers/staging/r8188eu/core/rtw_security.c | 4 ++--
drivers/staging/r8188eu/core/rtw_wlan_util.c | 2 +-
drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
7 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 5d0901f72cd8..0e7e7143b5fc 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -426,7 +426,7 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame)
ptable = mlme_sta_tbl;
- index = GetFrameSubType(pframe) >> 4;
+ index = get_frame_subtype(pframe) >> 4;
if (index > 13)
return;
@@ -443,7 +443,7 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame)
psta->RxMgmtFrameSeqNum = precv_frame->attrib.seq_num;
}
- switch (GetFrameSubType(pframe)) {
+ switch (get_frame_subtype(pframe)) {
case WIFI_AUTH:
if (check_fwstate(pmlmepriv, WIFI_AP_STATE))
ptable->func = &OnAuth;
@@ -970,7 +970,7 @@ unsigned int OnAssocReq(struct adapter *padapter, struct recv_frame *precv_frame
if ((pmlmeinfo->state & 0x03) != WIFI_FW_AP_STATE)
return _FAIL;
- frame_type = GetFrameSubType(pframe);
+ frame_type = get_frame_subtype(pframe);
if (frame_type == WIFI_ASSOCREQ) {
reassoc = 0;
ie_offset = _ASOCREQ_IE_OFFSET_;
@@ -6217,7 +6217,7 @@ u8 collect_bss_info(struct adapter *padapter, struct recv_frame *precv_frame, st
memset(bssid, 0, sizeof(struct wlan_bssid_ex));
- subtype = GetFrameSubType(pframe);
+ subtype = get_frame_subtype(pframe);
if (subtype == WIFI_BEACON) {
bssid->Reserved[0] = 1;
diff --git a/drivers/staging/r8188eu/core/rtw_p2p.c b/drivers/staging/r8188eu/core/rtw_p2p.c
index 7b30b9b64b41..aa739ae86d22 100644
--- a/drivers/staging/r8188eu/core/rtw_p2p.c
+++ b/drivers/staging/r8188eu/core/rtw_p2p.c
@@ -815,7 +815,7 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
if (!rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO))
return P2P_STATUS_FAIL_REQUEST_UNABLE;
- frame_type = GetFrameSubType(pframe);
+ frame_type = get_frame_subtype(pframe);
if (frame_type == WIFI_ASSOCREQ)
ie_offset = _ASOCREQ_IE_OFFSET_;
else /* WIFI_REASSOCREQ */
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 9902adf99142..8fd2ae89d7eb 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -707,10 +707,10 @@ static int ap2sta_data_frame(
goto exit;
}
- /* if ((GetFrameSubType(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE) { */
+ /* if ((get_frame_subtype(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE) { */
/* */
- if (GetFrameSubType(ptr) & BIT(6)) {
+ if (get_frame_subtype(ptr) & BIT(6)) {
/* No data, will not indicate to upper layer, temporily count it here */
count_rx_stats(adapter, precv_frame, *psta);
ret = RTW_RX_HANDLED;
@@ -784,11 +784,11 @@ static int sta2ap_data_frame(struct adapter *adapter,
process_pwrbit_data(adapter, precv_frame);
- if ((GetFrameSubType(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE) {
+ if ((get_frame_subtype(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE) {
process_wmmps_data(adapter, precv_frame);
}
- if (GetFrameSubType(ptr) & BIT(6)) {
+ if (get_frame_subtype(ptr) & BIT(6)) {
/* No data, will not indicate to upper layer, temporily count it here */
count_rx_stats(adapter, precv_frame, *psta);
ret = RTW_RX_HANDLED;
@@ -827,7 +827,7 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
return _FAIL;
/* only handle ps-poll */
- if (GetFrameSubType(pframe) == WIFI_PSPOLL) {
+ if (get_frame_subtype(pframe) == WIFI_PSPOLL) {
u16 aid;
u8 wmmps_ac = 0;
struct sta_info *psta = NULL;
@@ -944,11 +944,11 @@ static int validate_recv_mgnt_frame(struct adapter *padapter,
psta = rtw_get_stainfo(&padapter->stapriv, GetAddr2Ptr(precv_frame->rx_data));
if (psta) {
psta->sta_stats.rx_mgnt_pkts++;
- if (GetFrameSubType(precv_frame->rx_data) == WIFI_BEACON) {
+ if (get_frame_subtype(precv_frame->rx_data) == WIFI_BEACON) {
psta->sta_stats.rx_beacon_pkts++;
- } else if (GetFrameSubType(precv_frame->rx_data) == WIFI_PROBEREQ) {
+ } else if (get_frame_subtype(precv_frame->rx_data) == WIFI_PROBEREQ) {
psta->sta_stats.rx_probereq_pkts++;
- } else if (GetFrameSubType(precv_frame->rx_data) == WIFI_PROBERSP) {
+ } else if (get_frame_subtype(precv_frame->rx_data) == WIFI_PROBERSP) {
if (!memcmp(padapter->eeprompriv.mac_addr, GetAddr1Ptr(precv_frame->rx_data), ETH_ALEN))
psta->sta_stats.rx_probersp_pkts++;
else if (is_broadcast_mac_addr(GetAddr1Ptr(precv_frame->rx_data)) ||
@@ -1101,7 +1101,7 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv
}
type = get_frame_type(ptr);
- subtype = GetFrameSubType(ptr); /* bit(7)~bit(2) */
+ subtype = get_frame_subtype(ptr); /* bit(7)~bit(2) */
pattrib->to_fr_ds = get_tofr_ds(ptr);
diff --git a/drivers/staging/r8188eu/core/rtw_security.c b/drivers/staging/r8188eu/core/rtw_security.c
index 42ff5fd5ddad..e8d2242b92ea 100644
--- a/drivers/staging/r8188eu/core/rtw_security.c
+++ b/drivers/staging/r8188eu/core/rtw_security.c
@@ -973,7 +973,7 @@ static int aes_cipher(u8 *key, uint hdrlen, u8 *pframe, uint plen)
u8 padded_buffer[16];
u8 mic[8];
uint frtype = get_frame_type(pframe);
- uint frsubtype = GetFrameSubType(pframe);
+ uint frsubtype = get_frame_subtype(pframe);
frsubtype = frsubtype >> 4;
@@ -1167,7 +1167,7 @@ static int aes_decipher(struct adapter *padapter, u8 *key, uint hdrlen,
/* uint offset = 0; */
uint frtype = get_frame_type(pframe);
- uint frsubtype = GetFrameSubType(pframe);
+ uint frsubtype = get_frame_subtype(pframe);
frsubtype = frsubtype >> 4;
diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging/r8188eu/core/rtw_wlan_util.c
index d40669c21fc1..5f4c9d61511e 100644
--- a/drivers/staging/r8188eu/core/rtw_wlan_util.c
+++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c
@@ -872,7 +872,7 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
if (!bssid)
return _FAIL;
- subtype = GetFrameSubType(pframe) >> 4;
+ subtype = get_frame_subtype(pframe) >> 4;
if (subtype == WIFI_BEACON)
bssid->Reserved[0] = 1;
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c b/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c
index 90d426199f52..9ffb1af5d846 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c
@@ -150,7 +150,7 @@ void update_recvframe_phyinfo_88e(struct recv_frame *precvframe, struct phy_stat
myid(&padapter->eeprompriv), ETH_ALEN));
pkt_info.bPacketBeacon = pkt_info.bPacketMatchBSSID &&
- (GetFrameSubType(wlanhdr) == WIFI_BEACON);
+ (get_frame_subtype(wlanhdr) == WIFI_BEACON);
if (pkt_info.bPacketBeacon) {
if (check_fwstate(&padapter->mlmepriv, WIFI_STATION_STATE))
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 7053185667a5..4e000ff8d58a 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -207,7 +207,7 @@ enum WIFI_REG_DOMAIN {
#define get_frame_type(pbuf) \
(le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(3) | BIT(2)))
-#define GetFrameSubType(pbuf) (le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(7) |\
+#define get_frame_subtype(pbuf) (le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(7) |\
BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2)))
#define SetFrameSubType(pbuf, type) \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 32/56] staging: r8188eu: rename camelcase GetFrameSubType to get_frame_subtype
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro GetFrameSubType into get_frame_subtype.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 8 ++++----
drivers/staging/r8188eu/core/rtw_p2p.c | 2 +-
drivers/staging/r8188eu/core/rtw_recv.c | 18 +++++++++---------
drivers/staging/r8188eu/core/rtw_security.c | 4 ++--
drivers/staging/r8188eu/core/rtw_wlan_util.c | 2 +-
drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
7 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 5d0901f72cd8..0e7e7143b5fc 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -426,7 +426,7 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame)
ptable = mlme_sta_tbl;
- index = GetFrameSubType(pframe) >> 4;
+ index = get_frame_subtype(pframe) >> 4;
if (index > 13)
return;
@@ -443,7 +443,7 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame)
psta->RxMgmtFrameSeqNum = precv_frame->attrib.seq_num;
}
- switch (GetFrameSubType(pframe)) {
+ switch (get_frame_subtype(pframe)) {
case WIFI_AUTH:
if (check_fwstate(pmlmepriv, WIFI_AP_STATE))
ptable->func = &OnAuth;
@@ -970,7 +970,7 @@ unsigned int OnAssocReq(struct adapter *padapter, struct recv_frame *precv_frame
if ((pmlmeinfo->state & 0x03) != WIFI_FW_AP_STATE)
return _FAIL;
- frame_type = GetFrameSubType(pframe);
+ frame_type = get_frame_subtype(pframe);
if (frame_type == WIFI_ASSOCREQ) {
reassoc = 0;
ie_offset = _ASOCREQ_IE_OFFSET_;
@@ -6217,7 +6217,7 @@ u8 collect_bss_info(struct adapter *padapter, struct recv_frame *precv_frame, st
memset(bssid, 0, sizeof(struct wlan_bssid_ex));
- subtype = GetFrameSubType(pframe);
+ subtype = get_frame_subtype(pframe);
if (subtype == WIFI_BEACON) {
bssid->Reserved[0] = 1;
diff --git a/drivers/staging/r8188eu/core/rtw_p2p.c b/drivers/staging/r8188eu/core/rtw_p2p.c
index 7b30b9b64b41..aa739ae86d22 100644
--- a/drivers/staging/r8188eu/core/rtw_p2p.c
+++ b/drivers/staging/r8188eu/core/rtw_p2p.c
@@ -815,7 +815,7 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
if (!rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO))
return P2P_STATUS_FAIL_REQUEST_UNABLE;
- frame_type = GetFrameSubType(pframe);
+ frame_type = get_frame_subtype(pframe);
if (frame_type == WIFI_ASSOCREQ)
ie_offset = _ASOCREQ_IE_OFFSET_;
else /* WIFI_REASSOCREQ */
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 9902adf99142..8fd2ae89d7eb 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -707,10 +707,10 @@ static int ap2sta_data_frame(
goto exit;
}
- /* if ((GetFrameSubType(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE) { */
+ /* if ((get_frame_subtype(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE) { */
/* */
- if (GetFrameSubType(ptr) & BIT(6)) {
+ if (get_frame_subtype(ptr) & BIT(6)) {
/* No data, will not indicate to upper layer, temporily count it here */
count_rx_stats(adapter, precv_frame, *psta);
ret = RTW_RX_HANDLED;
@@ -784,11 +784,11 @@ static int sta2ap_data_frame(struct adapter *adapter,
process_pwrbit_data(adapter, precv_frame);
- if ((GetFrameSubType(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE) {
+ if ((get_frame_subtype(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE) {
process_wmmps_data(adapter, precv_frame);
}
- if (GetFrameSubType(ptr) & BIT(6)) {
+ if (get_frame_subtype(ptr) & BIT(6)) {
/* No data, will not indicate to upper layer, temporily count it here */
count_rx_stats(adapter, precv_frame, *psta);
ret = RTW_RX_HANDLED;
@@ -827,7 +827,7 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
return _FAIL;
/* only handle ps-poll */
- if (GetFrameSubType(pframe) == WIFI_PSPOLL) {
+ if (get_frame_subtype(pframe) == WIFI_PSPOLL) {
u16 aid;
u8 wmmps_ac = 0;
struct sta_info *psta = NULL;
@@ -944,11 +944,11 @@ static int validate_recv_mgnt_frame(struct adapter *padapter,
psta = rtw_get_stainfo(&padapter->stapriv, GetAddr2Ptr(precv_frame->rx_data));
if (psta) {
psta->sta_stats.rx_mgnt_pkts++;
- if (GetFrameSubType(precv_frame->rx_data) == WIFI_BEACON) {
+ if (get_frame_subtype(precv_frame->rx_data) == WIFI_BEACON) {
psta->sta_stats.rx_beacon_pkts++;
- } else if (GetFrameSubType(precv_frame->rx_data) == WIFI_PROBEREQ) {
+ } else if (get_frame_subtype(precv_frame->rx_data) == WIFI_PROBEREQ) {
psta->sta_stats.rx_probereq_pkts++;
- } else if (GetFrameSubType(precv_frame->rx_data) == WIFI_PROBERSP) {
+ } else if (get_frame_subtype(precv_frame->rx_data) == WIFI_PROBERSP) {
if (!memcmp(padapter->eeprompriv.mac_addr, GetAddr1Ptr(precv_frame->rx_data), ETH_ALEN))
psta->sta_stats.rx_probersp_pkts++;
else if (is_broadcast_mac_addr(GetAddr1Ptr(precv_frame->rx_data)) ||
@@ -1101,7 +1101,7 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv
}
type = get_frame_type(ptr);
- subtype = GetFrameSubType(ptr); /* bit(7)~bit(2) */
+ subtype = get_frame_subtype(ptr); /* bit(7)~bit(2) */
pattrib->to_fr_ds = get_tofr_ds(ptr);
diff --git a/drivers/staging/r8188eu/core/rtw_security.c b/drivers/staging/r8188eu/core/rtw_security.c
index 42ff5fd5ddad..e8d2242b92ea 100644
--- a/drivers/staging/r8188eu/core/rtw_security.c
+++ b/drivers/staging/r8188eu/core/rtw_security.c
@@ -973,7 +973,7 @@ static int aes_cipher(u8 *key, uint hdrlen, u8 *pframe, uint plen)
u8 padded_buffer[16];
u8 mic[8];
uint frtype = get_frame_type(pframe);
- uint frsubtype = GetFrameSubType(pframe);
+ uint frsubtype = get_frame_subtype(pframe);
frsubtype = frsubtype >> 4;
@@ -1167,7 +1167,7 @@ static int aes_decipher(struct adapter *padapter, u8 *key, uint hdrlen,
/* uint offset = 0; */
uint frtype = get_frame_type(pframe);
- uint frsubtype = GetFrameSubType(pframe);
+ uint frsubtype = get_frame_subtype(pframe);
frsubtype = frsubtype >> 4;
diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging/r8188eu/core/rtw_wlan_util.c
index d40669c21fc1..5f4c9d61511e 100644
--- a/drivers/staging/r8188eu/core/rtw_wlan_util.c
+++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c
@@ -872,7 +872,7 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
if (!bssid)
return _FAIL;
- subtype = GetFrameSubType(pframe) >> 4;
+ subtype = get_frame_subtype(pframe) >> 4;
if (subtype == WIFI_BEACON)
bssid->Reserved[0] = 1;
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c b/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c
index 90d426199f52..9ffb1af5d846 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c
@@ -150,7 +150,7 @@ void update_recvframe_phyinfo_88e(struct recv_frame *precvframe, struct phy_stat
myid(&padapter->eeprompriv), ETH_ALEN));
pkt_info.bPacketBeacon = pkt_info.bPacketMatchBSSID &&
- (GetFrameSubType(wlanhdr) == WIFI_BEACON);
+ (get_frame_subtype(wlanhdr) == WIFI_BEACON);
if (pkt_info.bPacketBeacon) {
if (check_fwstate(&padapter->mlmepriv, WIFI_STATION_STATE))
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 7053185667a5..4e000ff8d58a 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -207,7 +207,7 @@ enum WIFI_REG_DOMAIN {
#define get_frame_type(pbuf) \
(le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(3) | BIT(2)))
-#define GetFrameSubType(pbuf) (le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(7) |\
+#define get_frame_subtype(pbuf) (le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(7) |\
BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2)))
#define SetFrameSubType(pbuf, type) \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 33/56] staging: r8188eu: rename camelcase SetFrameSubType to set_frame_subtype
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Christophe JAILLET, Zameer Manji, linux-staging,
linux-kernel
Rename camel case macro SetFrameSubType into set_frame_subtype.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 38 ++++++++++-----------
drivers/staging/r8188eu/core/rtw_p2p.c | 8 ++---
drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 10 +++---
drivers/staging/r8188eu/include/wifi.h | 2 +-
5 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 0e7e7143b5fc..d11d9a21a0e1 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -1797,7 +1797,7 @@ void issue_p2p_GO_request(struct adapter *padapter, u8 *raddr)
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ACTION);
+ set_frame_subtype(pframe, WIFI_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -2133,7 +2133,7 @@ static void issue_p2p_GO_response(struct adapter *padapter, u8 *raddr, u8 *frame
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ACTION);
+ set_frame_subtype(pframe, WIFI_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -2491,7 +2491,7 @@ static void issue_p2p_GO_confirm(struct adapter *padapter, u8 *raddr, u8 result)
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ACTION);
+ set_frame_subtype(pframe, WIFI_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -2653,7 +2653,7 @@ void issue_p2p_invitation_request(struct adapter *padapter, u8 *raddr)
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ACTION);
+ set_frame_subtype(pframe, WIFI_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -2899,7 +2899,7 @@ void issue_p2p_invitation_response(struct adapter *padapter, u8 *raddr, u8 dialo
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ACTION);
+ set_frame_subtype(pframe, WIFI_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -3091,7 +3091,7 @@ void issue_p2p_provision_request(struct adapter *padapter, u8 *pssid, u8 ussidle
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ACTION);
+ set_frame_subtype(pframe, WIFI_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -3205,7 +3205,7 @@ void issue_probersp_p2p(struct adapter *padapter, unsigned char *da)
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(fctrl, WIFI_PROBERSP);
+ set_frame_subtype(fctrl, WIFI_PROBERSP);
pattrib->hdrlen = sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = pattrib->hdrlen;
@@ -3461,7 +3461,7 @@ static int _issue_probereq_p2p(struct adapter *padapter, u8 *da, int wait_ack)
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_PROBEREQ);
+ set_frame_subtype(pframe, WIFI_PROBEREQ);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -4349,7 +4349,7 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/);
/* pmlmeext->mgnt_seq++; */
- SetFrameSubType(pframe, WIFI_BEACON);
+ set_frame_subtype(pframe, WIFI_BEACON);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -4565,7 +4565,7 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(fctrl, WIFI_PROBERSP);
+ set_frame_subtype(fctrl, WIFI_PROBERSP);
pattrib->hdrlen = sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = pattrib->hdrlen;
@@ -4718,7 +4718,7 @@ static int _issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *ps
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_PROBEREQ);
+ set_frame_subtype(pframe, WIFI_PROBEREQ);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -4835,7 +4835,7 @@ void issue_auth(struct adapter *padapter, struct sta_info *psta, unsigned short
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_AUTH);
+ set_frame_subtype(pframe, WIFI_AUTH);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -4971,7 +4971,7 @@ void issue_asocrsp(struct adapter *padapter, unsigned short status, struct sta_i
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
if ((pkt_type == WIFI_ASSOCRSP) || (pkt_type == WIFI_REASSOCRSP))
- SetFrameSubType(pwlanhdr, pkt_type);
+ set_frame_subtype(pwlanhdr, pkt_type);
else
return;
@@ -5101,7 +5101,7 @@ void issue_assocreq(struct adapter *padapter)
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ASSOCREQ);
+ set_frame_subtype(pframe, WIFI_ASSOCREQ);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -5420,7 +5420,7 @@ static int _issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_DATA_NULL);
+ set_frame_subtype(pframe, WIFI_DATA_NULL);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -5540,7 +5540,7 @@ static int _issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_QOS_DATA_NULL);
+ set_frame_subtype(pframe, WIFI_QOS_DATA_NULL);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr_qos);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr_qos);
@@ -5645,7 +5645,7 @@ static int _issue_deauth(struct adapter *padapter, unsigned char *da, unsigned s
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_DEAUTH);
+ set_frame_subtype(pframe, WIFI_DEAUTH);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -5757,7 +5757,7 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ACTION);
+ set_frame_subtype(pframe, WIFI_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -5895,7 +5895,7 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ACTION);
+ set_frame_subtype(pframe, WIFI_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
diff --git a/drivers/staging/r8188eu/core/rtw_p2p.c b/drivers/staging/r8188eu/core/rtw_p2p.c
index aa739ae86d22..98b9d38ee59f 100644
--- a/drivers/staging/r8188eu/core/rtw_p2p.c
+++ b/drivers/staging/r8188eu/core/rtw_p2p.c
@@ -147,7 +147,7 @@ static void issue_group_disc_req(struct wifidirect_info *pwdinfo, u8 *da)
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ACTION);
+ set_frame_subtype(pframe, WIFI_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -206,7 +206,7 @@ static void issue_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 s
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ACTION);
+ set_frame_subtype(pframe, WIFI_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -276,7 +276,7 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8 *raddr,
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ACTION);
+ set_frame_subtype(pframe, WIFI_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -353,7 +353,7 @@ static void issue_p2p_presence_resp(struct wifidirect_info *pwdinfo, u8 *da, u8
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ACTION);
+ set_frame_subtype(pframe, WIFI_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index e182f63b6c6b..16760806bd65 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -723,7 +723,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
memset(hdr, 0, WLANHDR_OFFSET);
- SetFrameSubType(fctrl, pattrib->subtype);
+ set_frame_subtype(fctrl, pattrib->subtype);
if (pattrib->subtype & WIFI_DATA_TYPE) {
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
index 8fb4789d9e65..50b9fd72f6ff 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
@@ -228,7 +228,7 @@ static void ConstructBeacon(struct adapter *adapt, u8 *pframe, u32 *pLength)
memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN);
SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/);
- SetFrameSubType(pframe, WIFI_BEACON);
+ set_frame_subtype(pframe, WIFI_BEACON);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -306,7 +306,7 @@ static void ConstructPSPoll(struct adapter *adapt, u8 *pframe, u32 *pLength)
fctrl = &pwlanhdr->frame_ctl;
*(fctrl) = 0;
set_pwr_mgt(fctrl);
- SetFrameSubType(pframe, WIFI_PSPOLL);
+ set_frame_subtype(pframe, WIFI_PSPOLL);
/* AID. */
SetDuration(pframe, (pmlmeinfo->aid | 0xc000));
@@ -369,7 +369,7 @@ static void ConstructNullFunctionData(struct adapter *adapt, u8 *pframe,
if (bQoS) {
struct rtw_ieee80211_hdr_3addr_qos *pwlanqoshdr;
- SetFrameSubType(pframe, WIFI_QOS_DATA_NULL);
+ set_frame_subtype(pframe, WIFI_QOS_DATA_NULL);
pwlanqoshdr = (struct rtw_ieee80211_hdr_3addr_qos *)pframe;
SetPriority(&pwlanqoshdr->qc, AC);
@@ -377,7 +377,7 @@ static void ConstructNullFunctionData(struct adapter *adapt, u8 *pframe,
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr_qos);
} else {
- SetFrameSubType(pframe, WIFI_DATA_NULL);
+ set_frame_subtype(pframe, WIFI_DATA_NULL);
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
}
@@ -407,7 +407,7 @@ static void ConstructProbeRsp(struct adapter *adapt, u8 *pframe, u32 *pLength, u
memcpy(pwlanhdr->addr3, bssid, ETH_ALEN);
SetSeqNum(pwlanhdr, 0);
- SetFrameSubType(fctrl, WIFI_PROBERSP);
+ set_frame_subtype(fctrl, WIFI_PROBERSP);
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
pframe += pktlen;
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 4e000ff8d58a..7997eb290b4f 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -210,7 +210,7 @@ enum WIFI_REG_DOMAIN {
#define get_frame_subtype(pbuf) (le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(7) |\
BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2)))
-#define SetFrameSubType(pbuf, type) \
+#define set_frame_subtype(pbuf, type) \
do { \
*(__le16 *)(pbuf) &= cpu_to_le16(~(BIT(7) | BIT(6) | \
BIT(5) | BIT(4) | BIT(3) | BIT(2))); \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 33/56] staging: r8188eu: rename camelcase SetFrameSubType to set_frame_subtype
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Christophe JAILLET, Zameer Manji, linux-staging,
linux-kernel
Rename camel case macro SetFrameSubType into set_frame_subtype.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 38 ++++++++++-----------
drivers/staging/r8188eu/core/rtw_p2p.c | 8 ++---
drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 10 +++---
drivers/staging/r8188eu/include/wifi.h | 2 +-
5 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 0e7e7143b5fc..d11d9a21a0e1 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -1797,7 +1797,7 @@ void issue_p2p_GO_request(struct adapter *padapter, u8 *raddr)
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ACTION);
+ set_frame_subtype(pframe, WIFI_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -2133,7 +2133,7 @@ static void issue_p2p_GO_response(struct adapter *padapter, u8 *raddr, u8 *frame
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ACTION);
+ set_frame_subtype(pframe, WIFI_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -2491,7 +2491,7 @@ static void issue_p2p_GO_confirm(struct adapter *padapter, u8 *raddr, u8 result)
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ACTION);
+ set_frame_subtype(pframe, WIFI_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -2653,7 +2653,7 @@ void issue_p2p_invitation_request(struct adapter *padapter, u8 *raddr)
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ACTION);
+ set_frame_subtype(pframe, WIFI_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -2899,7 +2899,7 @@ void issue_p2p_invitation_response(struct adapter *padapter, u8 *raddr, u8 dialo
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ACTION);
+ set_frame_subtype(pframe, WIFI_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -3091,7 +3091,7 @@ void issue_p2p_provision_request(struct adapter *padapter, u8 *pssid, u8 ussidle
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ACTION);
+ set_frame_subtype(pframe, WIFI_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -3205,7 +3205,7 @@ void issue_probersp_p2p(struct adapter *padapter, unsigned char *da)
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(fctrl, WIFI_PROBERSP);
+ set_frame_subtype(fctrl, WIFI_PROBERSP);
pattrib->hdrlen = sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = pattrib->hdrlen;
@@ -3461,7 +3461,7 @@ static int _issue_probereq_p2p(struct adapter *padapter, u8 *da, int wait_ack)
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_PROBEREQ);
+ set_frame_subtype(pframe, WIFI_PROBEREQ);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -4349,7 +4349,7 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/);
/* pmlmeext->mgnt_seq++; */
- SetFrameSubType(pframe, WIFI_BEACON);
+ set_frame_subtype(pframe, WIFI_BEACON);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -4565,7 +4565,7 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(fctrl, WIFI_PROBERSP);
+ set_frame_subtype(fctrl, WIFI_PROBERSP);
pattrib->hdrlen = sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = pattrib->hdrlen;
@@ -4718,7 +4718,7 @@ static int _issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *ps
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_PROBEREQ);
+ set_frame_subtype(pframe, WIFI_PROBEREQ);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -4835,7 +4835,7 @@ void issue_auth(struct adapter *padapter, struct sta_info *psta, unsigned short
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_AUTH);
+ set_frame_subtype(pframe, WIFI_AUTH);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -4971,7 +4971,7 @@ void issue_asocrsp(struct adapter *padapter, unsigned short status, struct sta_i
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
if ((pkt_type == WIFI_ASSOCRSP) || (pkt_type == WIFI_REASSOCRSP))
- SetFrameSubType(pwlanhdr, pkt_type);
+ set_frame_subtype(pwlanhdr, pkt_type);
else
return;
@@ -5101,7 +5101,7 @@ void issue_assocreq(struct adapter *padapter)
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ASSOCREQ);
+ set_frame_subtype(pframe, WIFI_ASSOCREQ);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -5420,7 +5420,7 @@ static int _issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_DATA_NULL);
+ set_frame_subtype(pframe, WIFI_DATA_NULL);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -5540,7 +5540,7 @@ static int _issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_QOS_DATA_NULL);
+ set_frame_subtype(pframe, WIFI_QOS_DATA_NULL);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr_qos);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr_qos);
@@ -5645,7 +5645,7 @@ static int _issue_deauth(struct adapter *padapter, unsigned char *da, unsigned s
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_DEAUTH);
+ set_frame_subtype(pframe, WIFI_DEAUTH);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -5757,7 +5757,7 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ACTION);
+ set_frame_subtype(pframe, WIFI_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -5895,7 +5895,7 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ACTION);
+ set_frame_subtype(pframe, WIFI_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
diff --git a/drivers/staging/r8188eu/core/rtw_p2p.c b/drivers/staging/r8188eu/core/rtw_p2p.c
index aa739ae86d22..98b9d38ee59f 100644
--- a/drivers/staging/r8188eu/core/rtw_p2p.c
+++ b/drivers/staging/r8188eu/core/rtw_p2p.c
@@ -147,7 +147,7 @@ static void issue_group_disc_req(struct wifidirect_info *pwdinfo, u8 *da)
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ACTION);
+ set_frame_subtype(pframe, WIFI_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -206,7 +206,7 @@ static void issue_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 s
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ACTION);
+ set_frame_subtype(pframe, WIFI_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -276,7 +276,7 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8 *raddr,
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ACTION);
+ set_frame_subtype(pframe, WIFI_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -353,7 +353,7 @@ static void issue_p2p_presence_resp(struct wifidirect_info *pwdinfo, u8 *da, u8
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ACTION);
+ set_frame_subtype(pframe, WIFI_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index e182f63b6c6b..16760806bd65 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -723,7 +723,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
memset(hdr, 0, WLANHDR_OFFSET);
- SetFrameSubType(fctrl, pattrib->subtype);
+ set_frame_subtype(fctrl, pattrib->subtype);
if (pattrib->subtype & WIFI_DATA_TYPE) {
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
index 8fb4789d9e65..50b9fd72f6ff 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
@@ -228,7 +228,7 @@ static void ConstructBeacon(struct adapter *adapt, u8 *pframe, u32 *pLength)
memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN);
SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/);
- SetFrameSubType(pframe, WIFI_BEACON);
+ set_frame_subtype(pframe, WIFI_BEACON);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -306,7 +306,7 @@ static void ConstructPSPoll(struct adapter *adapt, u8 *pframe, u32 *pLength)
fctrl = &pwlanhdr->frame_ctl;
*(fctrl) = 0;
set_pwr_mgt(fctrl);
- SetFrameSubType(pframe, WIFI_PSPOLL);
+ set_frame_subtype(pframe, WIFI_PSPOLL);
/* AID. */
SetDuration(pframe, (pmlmeinfo->aid | 0xc000));
@@ -369,7 +369,7 @@ static void ConstructNullFunctionData(struct adapter *adapt, u8 *pframe,
if (bQoS) {
struct rtw_ieee80211_hdr_3addr_qos *pwlanqoshdr;
- SetFrameSubType(pframe, WIFI_QOS_DATA_NULL);
+ set_frame_subtype(pframe, WIFI_QOS_DATA_NULL);
pwlanqoshdr = (struct rtw_ieee80211_hdr_3addr_qos *)pframe;
SetPriority(&pwlanqoshdr->qc, AC);
@@ -377,7 +377,7 @@ static void ConstructNullFunctionData(struct adapter *adapt, u8 *pframe,
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr_qos);
} else {
- SetFrameSubType(pframe, WIFI_DATA_NULL);
+ set_frame_subtype(pframe, WIFI_DATA_NULL);
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
}
@@ -407,7 +407,7 @@ static void ConstructProbeRsp(struct adapter *adapt, u8 *pframe, u32 *pLength, u
memcpy(pwlanhdr->addr3, bssid, ETH_ALEN);
SetSeqNum(pwlanhdr, 0);
- SetFrameSubType(fctrl, WIFI_PROBERSP);
+ set_frame_subtype(fctrl, WIFI_PROBERSP);
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
pframe += pktlen;
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 4e000ff8d58a..7997eb290b4f 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -210,7 +210,7 @@ enum WIFI_REG_DOMAIN {
#define get_frame_subtype(pbuf) (le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(7) |\
BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2)))
-#define SetFrameSubType(pbuf, type) \
+#define set_frame_subtype(pbuf, type) \
do { \
*(__le16 *)(pbuf) &= cpu_to_le16(~(BIT(7) | BIT(6) | \
BIT(5) | BIT(4) | BIT(3) | BIT(2))); \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 34/56] staging: r8188eu: rename camelcase GetSequence to get_sequence
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Christophe JAILLET, Yang Li, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro GetSequence into get_sequence.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 8fd2ae89d7eb..6224e4631bf9 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -1106,7 +1106,7 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv
pattrib->to_fr_ds = get_tofr_ds(ptr);
pattrib->frag_num = GetFragNum(ptr);
- pattrib->seq_num = GetSequence(ptr);
+ pattrib->seq_num = get_sequence(ptr);
pattrib->pw_save = get_pwr_mgt(ptr);
pattrib->mfrag = get_m_frag(ptr);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 7997eb290b4f..1b2545cba279 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -217,7 +217,7 @@ enum WIFI_REG_DOMAIN {
*(__le16 *)(pbuf) |= cpu_to_le16(type); \
} while (0)
-#define GetSequence(pbuf) \
+#define get_sequence(pbuf) \
(le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 22)) >> 4)
#define GetFragNum(pbuf) \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 34/56] staging: r8188eu: rename camelcase GetSequence to get_sequence
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Christophe JAILLET, Yang Li, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro GetSequence into get_sequence.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 8fd2ae89d7eb..6224e4631bf9 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -1106,7 +1106,7 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv
pattrib->to_fr_ds = get_tofr_ds(ptr);
pattrib->frag_num = GetFragNum(ptr);
- pattrib->seq_num = GetSequence(ptr);
+ pattrib->seq_num = get_sequence(ptr);
pattrib->pw_save = get_pwr_mgt(ptr);
pattrib->mfrag = get_m_frag(ptr);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 7997eb290b4f..1b2545cba279 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -217,7 +217,7 @@ enum WIFI_REG_DOMAIN {
*(__le16 *)(pbuf) |= cpu_to_le16(type); \
} while (0)
-#define GetSequence(pbuf) \
+#define get_sequence(pbuf) \
(le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 22)) >> 4)
#define GetFragNum(pbuf) \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 35/56] staging: r8188eu: rename camelcase GetFragNum to get_frag_num
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Yang Li,
Zameer Manji, linux-staging, linux-kernel
Rename camel case macro GetFragNum to get_frag_num
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 6224e4631bf9..8bda34f87849 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -1105,7 +1105,7 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv
pattrib->to_fr_ds = get_tofr_ds(ptr);
- pattrib->frag_num = GetFragNum(ptr);
+ pattrib->frag_num = get_frag_num(ptr);
pattrib->seq_num = get_sequence(ptr);
pattrib->pw_save = get_pwr_mgt(ptr);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 1b2545cba279..ec9fe081dbb4 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -220,7 +220,7 @@ enum WIFI_REG_DOMAIN {
#define get_sequence(pbuf) \
(le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 22)) >> 4)
-#define GetFragNum(pbuf) \
+#define get_frag_num(pbuf) \
(le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 22)) & 0x0f)
#define GetTupleCache(pbuf) \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 35/56] staging: r8188eu: rename camelcase GetFragNum to get_frag_num
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Yang Li,
Zameer Manji, linux-staging, linux-kernel
Rename camel case macro GetFragNum to get_frag_num
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 6224e4631bf9..8bda34f87849 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -1105,7 +1105,7 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv
pattrib->to_fr_ds = get_tofr_ds(ptr);
- pattrib->frag_num = GetFragNum(ptr);
+ pattrib->frag_num = get_frag_num(ptr);
pattrib->seq_num = get_sequence(ptr);
pattrib->pw_save = get_pwr_mgt(ptr);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 1b2545cba279..ec9fe081dbb4 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -220,7 +220,7 @@ enum WIFI_REG_DOMAIN {
#define get_sequence(pbuf) \
(le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 22)) >> 4)
-#define GetFragNum(pbuf) \
+#define get_frag_num(pbuf) \
(le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 22)) & 0x0f)
#define GetTupleCache(pbuf) \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 36/56] staging: r8188eu: remove dead macro GetTupleCache
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Zameer Manji, linux-staging,
linux-kernel
Remove dead macro GetTupleCache.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index ec9fe081dbb4..652a31da0556 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -223,9 +223,6 @@ enum WIFI_REG_DOMAIN {
#define get_frag_num(pbuf) \
(le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 22)) & 0x0f)
-#define GetTupleCache(pbuf) \
- (cpu_to_le16(*(unsigned short *)((size_t)(pbuf) + 22)))
-
#define SetFragNum(pbuf, num) \
do { \
*(unsigned short *)((size_t)(pbuf) + 22) = \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 36/56] staging: r8188eu: remove dead macro GetTupleCache
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Zameer Manji, linux-staging,
linux-kernel
Remove dead macro GetTupleCache.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index ec9fe081dbb4..652a31da0556 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -223,9 +223,6 @@ enum WIFI_REG_DOMAIN {
#define get_frag_num(pbuf) \
(le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 22)) & 0x0f)
-#define GetTupleCache(pbuf) \
- (cpu_to_le16(*(unsigned short *)((size_t)(pbuf) + 22)))
-
#define SetFragNum(pbuf, num) \
do { \
*(unsigned short *)((size_t)(pbuf) + 22) = \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 37/56] staging: r8188eu: remove dead macro SetFragNum
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Zameer Manji, linux-staging, linux-kernel
Remove dead macro SetFragNum.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 652a31da0556..4b5dd73c391e 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -223,14 +223,6 @@ enum WIFI_REG_DOMAIN {
#define get_frag_num(pbuf) \
(le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 22)) & 0x0f)
-#define SetFragNum(pbuf, num) \
- do { \
- *(unsigned short *)((size_t)(pbuf) + 22) = \
- ((*(unsigned short *)((size_t)(pbuf) + 22)) & \
- le16_to_cpu(~(0x000f))) | \
- cpu_to_le16(0x0f & (num)); \
- } while (0)
-
#define SetSeqNum(pbuf, num) \
do { \
*(__le16 *)((size_t)(pbuf) + 22) = \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 37/56] staging: r8188eu: remove dead macro SetFragNum
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Zameer Manji, linux-staging, linux-kernel
Remove dead macro SetFragNum.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 652a31da0556..4b5dd73c391e 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -223,14 +223,6 @@ enum WIFI_REG_DOMAIN {
#define get_frag_num(pbuf) \
(le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 22)) & 0x0f)
-#define SetFragNum(pbuf, num) \
- do { \
- *(unsigned short *)((size_t)(pbuf) + 22) = \
- ((*(unsigned short *)((size_t)(pbuf) + 22)) & \
- le16_to_cpu(~(0x000f))) | \
- cpu_to_le16(0x0f & (num)); \
- } while (0)
-
#define SetSeqNum(pbuf, num) \
do { \
*(__le16 *)((size_t)(pbuf) + 22) = \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 38/56] staging: r8188eu: rename camelcase SetSeqNum to set_seq_num
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro SetSeqNum into set_seq_num.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 38 ++++++++++-----------
drivers/staging/r8188eu/core/rtw_p2p.c | 8 ++---
drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 6 ++--
drivers/staging/r8188eu/include/wifi.h | 2 +-
5 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index d11d9a21a0e1..e0cd1779d0c8 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -1795,7 +1795,7 @@ void issue_p2p_GO_request(struct adapter *padapter, u8 *raddr)
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, myid(&padapter->eeprompriv), ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ACTION);
@@ -2131,7 +2131,7 @@ static void issue_p2p_GO_response(struct adapter *padapter, u8 *raddr, u8 *frame
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, myid(&padapter->eeprompriv), ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ACTION);
@@ -2489,7 +2489,7 @@ static void issue_p2p_GO_confirm(struct adapter *padapter, u8 *raddr, u8 result)
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, myid(&padapter->eeprompriv), ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ACTION);
@@ -2651,7 +2651,7 @@ void issue_p2p_invitation_request(struct adapter *padapter, u8 *raddr)
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, raddr, ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ACTION);
@@ -2897,7 +2897,7 @@ void issue_p2p_invitation_response(struct adapter *padapter, u8 *raddr, u8 dialo
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, raddr, ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ACTION);
@@ -3089,7 +3089,7 @@ void issue_p2p_provision_request(struct adapter *padapter, u8 *pssid, u8 ussidle
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, pdev_raddr, ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ACTION);
@@ -3203,7 +3203,7 @@ void issue_probersp_p2p(struct adapter *padapter, unsigned char *da)
/* Use the device address for BSSID field. */
memcpy(pwlanhdr->addr3, mac, ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(fctrl, WIFI_PROBERSP);
@@ -3459,7 +3459,7 @@ static int _issue_probereq_p2p(struct adapter *padapter, u8 *da, int wait_ack)
}
memcpy(pwlanhdr->addr2, mac, ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_PROBEREQ);
@@ -4347,7 +4347,7 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN);
- SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/);
+ set_seq_num(pwlanhdr, 0/*pmlmeext->mgnt_seq*/);
/* pmlmeext->mgnt_seq++; */
set_frame_subtype(pframe, WIFI_BEACON);
@@ -4563,7 +4563,7 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
memcpy(pwlanhdr->addr2, mac, ETH_ALEN);
memcpy(pwlanhdr->addr3, bssid, ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(fctrl, WIFI_PROBERSP);
@@ -4716,7 +4716,7 @@ static int _issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *ps
memcpy(pwlanhdr->addr2, mac, ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_PROBEREQ);
@@ -4833,7 +4833,7 @@ void issue_auth(struct adapter *padapter, struct sta_info *psta, unsigned short
fctrl = &pwlanhdr->frame_ctl;
*(fctrl) = 0;
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_AUTH);
@@ -4968,7 +4968,7 @@ void issue_asocrsp(struct adapter *padapter, unsigned short status, struct sta_i
memcpy((void *)GetAddr2Ptr(pwlanhdr), myid(&padapter->eeprompriv), ETH_ALEN);
memcpy((void *)GetAddr3Ptr(pwlanhdr), get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
if ((pkt_type == WIFI_ASSOCRSP) || (pkt_type == WIFI_REASSOCRSP))
set_frame_subtype(pwlanhdr, pkt_type);
@@ -5099,7 +5099,7 @@ void issue_assocreq(struct adapter *padapter)
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ASSOCREQ);
@@ -5418,7 +5418,7 @@ static int _issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_DATA_NULL);
@@ -5538,7 +5538,7 @@ static int _issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_QOS_DATA_NULL);
@@ -5643,7 +5643,7 @@ static int _issue_deauth(struct adapter *padapter, unsigned char *da, unsigned s
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_DEAUTH);
@@ -5755,7 +5755,7 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ACTION);
@@ -5893,7 +5893,7 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ACTION);
diff --git a/drivers/staging/r8188eu/core/rtw_p2p.c b/drivers/staging/r8188eu/core/rtw_p2p.c
index 98b9d38ee59f..558646db06b3 100644
--- a/drivers/staging/r8188eu/core/rtw_p2p.c
+++ b/drivers/staging/r8188eu/core/rtw_p2p.c
@@ -145,7 +145,7 @@ static void issue_group_disc_req(struct wifidirect_info *pwdinfo, u8 *da)
memcpy(pwlanhdr->addr2, pwdinfo->interface_addr, ETH_ALEN);
memcpy(pwlanhdr->addr3, pwdinfo->interface_addr, ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ACTION);
@@ -204,7 +204,7 @@ static void issue_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 s
memcpy(pwlanhdr->addr2, pwdinfo->device_addr, ETH_ALEN);
memcpy(pwlanhdr->addr3, pwdinfo->device_addr, ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ACTION);
@@ -274,7 +274,7 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8 *raddr,
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, myid(&padapter->eeprompriv), ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ACTION);
@@ -351,7 +351,7 @@ static void issue_p2p_presence_resp(struct wifidirect_info *pwdinfo, u8 *da, u8
memcpy(pwlanhdr->addr2, pwdinfo->interface_addr, ETH_ALEN);
memcpy(pwlanhdr->addr3, pwdinfo->interface_addr, ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ACTION);
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index 16760806bd65..cb189758a2b1 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -784,7 +784,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
pattrib->seqnum = psta->sta_xmitpriv.txseq_tid[pattrib->priority];
- SetSeqNum(hdr, pattrib->seqnum);
+ set_seq_num(hdr, pattrib->seqnum);
/* check if enable ampdu */
if (pattrib->ht_en && psta->htpriv.ampdu_enable) {
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
index 50b9fd72f6ff..502b3ee523be 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
@@ -227,7 +227,7 @@ static void ConstructBeacon(struct adapter *adapt, u8 *pframe, u32 *pLength)
memcpy(pwlanhdr->addr2, myid(&adapt->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN);
- SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/);
+ set_seq_num(pwlanhdr, 0/*pmlmeext->mgnt_seq*/);
set_frame_subtype(pframe, WIFI_BEACON);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -364,7 +364,7 @@ static void ConstructNullFunctionData(struct adapter *adapt, u8 *pframe,
break;
}
- SetSeqNum(pwlanhdr, 0);
+ set_seq_num(pwlanhdr, 0);
if (bQoS) {
struct rtw_ieee80211_hdr_3addr_qos *pwlanqoshdr;
@@ -406,7 +406,7 @@ static void ConstructProbeRsp(struct adapter *adapt, u8 *pframe, u32 *pLength, u
memcpy(pwlanhdr->addr2, mac, ETH_ALEN);
memcpy(pwlanhdr->addr3, bssid, ETH_ALEN);
- SetSeqNum(pwlanhdr, 0);
+ set_seq_num(pwlanhdr, 0);
set_frame_subtype(fctrl, WIFI_PROBERSP);
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 4b5dd73c391e..5894d10c1652 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -223,7 +223,7 @@ enum WIFI_REG_DOMAIN {
#define get_frag_num(pbuf) \
(le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 22)) & 0x0f)
-#define SetSeqNum(pbuf, num) \
+#define set_seq_num(pbuf, num) \
do { \
*(__le16 *)((size_t)(pbuf) + 22) = \
((*(__le16 *)((size_t)(pbuf) + 22)) & cpu_to_le16((unsigned short)0x000f)) | \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 38/56] staging: r8188eu: rename camelcase SetSeqNum to set_seq_num
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro SetSeqNum into set_seq_num.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 38 ++++++++++-----------
drivers/staging/r8188eu/core/rtw_p2p.c | 8 ++---
drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 6 ++--
drivers/staging/r8188eu/include/wifi.h | 2 +-
5 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index d11d9a21a0e1..e0cd1779d0c8 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -1795,7 +1795,7 @@ void issue_p2p_GO_request(struct adapter *padapter, u8 *raddr)
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, myid(&padapter->eeprompriv), ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ACTION);
@@ -2131,7 +2131,7 @@ static void issue_p2p_GO_response(struct adapter *padapter, u8 *raddr, u8 *frame
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, myid(&padapter->eeprompriv), ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ACTION);
@@ -2489,7 +2489,7 @@ static void issue_p2p_GO_confirm(struct adapter *padapter, u8 *raddr, u8 result)
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, myid(&padapter->eeprompriv), ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ACTION);
@@ -2651,7 +2651,7 @@ void issue_p2p_invitation_request(struct adapter *padapter, u8 *raddr)
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, raddr, ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ACTION);
@@ -2897,7 +2897,7 @@ void issue_p2p_invitation_response(struct adapter *padapter, u8 *raddr, u8 dialo
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, raddr, ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ACTION);
@@ -3089,7 +3089,7 @@ void issue_p2p_provision_request(struct adapter *padapter, u8 *pssid, u8 ussidle
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, pdev_raddr, ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ACTION);
@@ -3203,7 +3203,7 @@ void issue_probersp_p2p(struct adapter *padapter, unsigned char *da)
/* Use the device address for BSSID field. */
memcpy(pwlanhdr->addr3, mac, ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(fctrl, WIFI_PROBERSP);
@@ -3459,7 +3459,7 @@ static int _issue_probereq_p2p(struct adapter *padapter, u8 *da, int wait_ack)
}
memcpy(pwlanhdr->addr2, mac, ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_PROBEREQ);
@@ -4347,7 +4347,7 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN);
- SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/);
+ set_seq_num(pwlanhdr, 0/*pmlmeext->mgnt_seq*/);
/* pmlmeext->mgnt_seq++; */
set_frame_subtype(pframe, WIFI_BEACON);
@@ -4563,7 +4563,7 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
memcpy(pwlanhdr->addr2, mac, ETH_ALEN);
memcpy(pwlanhdr->addr3, bssid, ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(fctrl, WIFI_PROBERSP);
@@ -4716,7 +4716,7 @@ static int _issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *ps
memcpy(pwlanhdr->addr2, mac, ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_PROBEREQ);
@@ -4833,7 +4833,7 @@ void issue_auth(struct adapter *padapter, struct sta_info *psta, unsigned short
fctrl = &pwlanhdr->frame_ctl;
*(fctrl) = 0;
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_AUTH);
@@ -4968,7 +4968,7 @@ void issue_asocrsp(struct adapter *padapter, unsigned short status, struct sta_i
memcpy((void *)GetAddr2Ptr(pwlanhdr), myid(&padapter->eeprompriv), ETH_ALEN);
memcpy((void *)GetAddr3Ptr(pwlanhdr), get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
if ((pkt_type == WIFI_ASSOCRSP) || (pkt_type == WIFI_REASSOCRSP))
set_frame_subtype(pwlanhdr, pkt_type);
@@ -5099,7 +5099,7 @@ void issue_assocreq(struct adapter *padapter)
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ASSOCREQ);
@@ -5418,7 +5418,7 @@ static int _issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_DATA_NULL);
@@ -5538,7 +5538,7 @@ static int _issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_QOS_DATA_NULL);
@@ -5643,7 +5643,7 @@ static int _issue_deauth(struct adapter *padapter, unsigned char *da, unsigned s
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_DEAUTH);
@@ -5755,7 +5755,7 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ACTION);
@@ -5893,7 +5893,7 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ACTION);
diff --git a/drivers/staging/r8188eu/core/rtw_p2p.c b/drivers/staging/r8188eu/core/rtw_p2p.c
index 98b9d38ee59f..558646db06b3 100644
--- a/drivers/staging/r8188eu/core/rtw_p2p.c
+++ b/drivers/staging/r8188eu/core/rtw_p2p.c
@@ -145,7 +145,7 @@ static void issue_group_disc_req(struct wifidirect_info *pwdinfo, u8 *da)
memcpy(pwlanhdr->addr2, pwdinfo->interface_addr, ETH_ALEN);
memcpy(pwlanhdr->addr3, pwdinfo->interface_addr, ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ACTION);
@@ -204,7 +204,7 @@ static void issue_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 s
memcpy(pwlanhdr->addr2, pwdinfo->device_addr, ETH_ALEN);
memcpy(pwlanhdr->addr3, pwdinfo->device_addr, ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ACTION);
@@ -274,7 +274,7 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8 *raddr,
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, myid(&padapter->eeprompriv), ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ACTION);
@@ -351,7 +351,7 @@ static void issue_p2p_presence_resp(struct wifidirect_info *pwdinfo, u8 *da, u8
memcpy(pwlanhdr->addr2, pwdinfo->interface_addr, ETH_ALEN);
memcpy(pwlanhdr->addr3, pwdinfo->interface_addr, ETH_ALEN);
- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
+ set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
set_frame_subtype(pframe, WIFI_ACTION);
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index 16760806bd65..cb189758a2b1 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -784,7 +784,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
pattrib->seqnum = psta->sta_xmitpriv.txseq_tid[pattrib->priority];
- SetSeqNum(hdr, pattrib->seqnum);
+ set_seq_num(hdr, pattrib->seqnum);
/* check if enable ampdu */
if (pattrib->ht_en && psta->htpriv.ampdu_enable) {
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
index 50b9fd72f6ff..502b3ee523be 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
@@ -227,7 +227,7 @@ static void ConstructBeacon(struct adapter *adapt, u8 *pframe, u32 *pLength)
memcpy(pwlanhdr->addr2, myid(&adapt->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN);
- SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/);
+ set_seq_num(pwlanhdr, 0/*pmlmeext->mgnt_seq*/);
set_frame_subtype(pframe, WIFI_BEACON);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
@@ -364,7 +364,7 @@ static void ConstructNullFunctionData(struct adapter *adapt, u8 *pframe,
break;
}
- SetSeqNum(pwlanhdr, 0);
+ set_seq_num(pwlanhdr, 0);
if (bQoS) {
struct rtw_ieee80211_hdr_3addr_qos *pwlanqoshdr;
@@ -406,7 +406,7 @@ static void ConstructProbeRsp(struct adapter *adapt, u8 *pframe, u32 *pLength, u
memcpy(pwlanhdr->addr2, mac, ETH_ALEN);
memcpy(pwlanhdr->addr3, bssid, ETH_ALEN);
- SetSeqNum(pwlanhdr, 0);
+ set_seq_num(pwlanhdr, 0);
set_frame_subtype(fctrl, WIFI_PROBERSP);
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 4b5dd73c391e..5894d10c1652 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -223,7 +223,7 @@ enum WIFI_REG_DOMAIN {
#define get_frag_num(pbuf) \
(le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 22)) & 0x0f)
-#define SetSeqNum(pbuf, num) \
+#define set_seq_num(pbuf, num) \
do { \
*(__le16 *)((size_t)(pbuf) + 22) = \
((*(__le16 *)((size_t)(pbuf) + 22)) & cpu_to_le16((unsigned short)0x000f)) | \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 39/56] staging: r8188eu: rename camelcase SetDuration to set_duration
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro SetDuration into set_duration.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
index 502b3ee523be..45cc7cbed156 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
@@ -309,7 +309,7 @@ static void ConstructPSPoll(struct adapter *adapt, u8 *pframe, u32 *pLength)
set_frame_subtype(pframe, WIFI_PSPOLL);
/* AID. */
- SetDuration(pframe, (pmlmeinfo->aid | 0xc000));
+ set_duration(pframe, (pmlmeinfo->aid | 0xc000));
/* BSSID. */
memcpy(pwlanhdr->addr1, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 5894d10c1652..275c6fb0cfc1 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -230,7 +230,7 @@ enum WIFI_REG_DOMAIN {
cpu_to_le16((unsigned short)(0xfff0 & (num << 4))); \
} while (0)
-#define SetDuration(pbuf, dur) \
+#define set_duration(pbuf, dur) \
*(__le16 *)((size_t)(pbuf) + 2) = cpu_to_le16(0xffff & (dur))
#define SetPriority(pbuf, tid) \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 39/56] staging: r8188eu: rename camelcase SetDuration to set_duration
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro SetDuration into set_duration.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
index 502b3ee523be..45cc7cbed156 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
@@ -309,7 +309,7 @@ static void ConstructPSPoll(struct adapter *adapt, u8 *pframe, u32 *pLength)
set_frame_subtype(pframe, WIFI_PSPOLL);
/* AID. */
- SetDuration(pframe, (pmlmeinfo->aid | 0xc000));
+ set_duration(pframe, (pmlmeinfo->aid | 0xc000));
/* BSSID. */
memcpy(pwlanhdr->addr1, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 5894d10c1652..275c6fb0cfc1 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -230,7 +230,7 @@ enum WIFI_REG_DOMAIN {
cpu_to_le16((unsigned short)(0xfff0 & (num << 4))); \
} while (0)
-#define SetDuration(pbuf, dur) \
+#define set_duration(pbuf, dur) \
*(__le16 *)((size_t)(pbuf) + 2) = cpu_to_le16(0xffff & (dur))
#define SetPriority(pbuf, tid) \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 40/56] staging: r8188eu: rename camelcase SetPriority to set_priority
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Yang Li, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro SetPriority into set_priority.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +-
drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index e0cd1779d0c8..29075d7516ec 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -5528,7 +5528,7 @@ static int _issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16
qc = (unsigned short *)(pframe + pattrib->hdrlen - 2);
- SetPriority(qc, tid);
+ set_priority(qc, tid);
SetEOSP(qc, pattrib->eosp);
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index cb189758a2b1..a13ef82b41f1 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -768,7 +768,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
qc = (unsigned short *)(hdr + pattrib->hdrlen - 2);
if (pattrib->priority)
- SetPriority(qc, pattrib->priority);
+ set_priority(qc, pattrib->priority);
SetEOSP(qc, pattrib->eosp);
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
index 45cc7cbed156..e4f5b877c559 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
@@ -372,7 +372,7 @@ static void ConstructNullFunctionData(struct adapter *adapt, u8 *pframe,
set_frame_subtype(pframe, WIFI_QOS_DATA_NULL);
pwlanqoshdr = (struct rtw_ieee80211_hdr_3addr_qos *)pframe;
- SetPriority(&pwlanqoshdr->qc, AC);
+ set_priority(&pwlanqoshdr->qc, AC);
SetEOSP(&pwlanqoshdr->qc, bEosp);
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr_qos);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 275c6fb0cfc1..f1955ddb6460 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -233,7 +233,7 @@ enum WIFI_REG_DOMAIN {
#define set_duration(pbuf, dur) \
*(__le16 *)((size_t)(pbuf) + 2) = cpu_to_le16(0xffff & (dur))
-#define SetPriority(pbuf, tid) \
+#define set_priority(pbuf, tid) \
*(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf)
#define GetPriority(pbuf) ((le16_to_cpu(*(__le16 *)(pbuf))) & 0xf)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 40/56] staging: r8188eu: rename camelcase SetPriority to set_priority
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Yang Li, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro SetPriority into set_priority.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +-
drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index e0cd1779d0c8..29075d7516ec 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -5528,7 +5528,7 @@ static int _issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16
qc = (unsigned short *)(pframe + pattrib->hdrlen - 2);
- SetPriority(qc, tid);
+ set_priority(qc, tid);
SetEOSP(qc, pattrib->eosp);
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index cb189758a2b1..a13ef82b41f1 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -768,7 +768,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
qc = (unsigned short *)(hdr + pattrib->hdrlen - 2);
if (pattrib->priority)
- SetPriority(qc, pattrib->priority);
+ set_priority(qc, pattrib->priority);
SetEOSP(qc, pattrib->eosp);
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
index 45cc7cbed156..e4f5b877c559 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
@@ -372,7 +372,7 @@ static void ConstructNullFunctionData(struct adapter *adapt, u8 *pframe,
set_frame_subtype(pframe, WIFI_QOS_DATA_NULL);
pwlanqoshdr = (struct rtw_ieee80211_hdr_3addr_qos *)pframe;
- SetPriority(&pwlanqoshdr->qc, AC);
+ set_priority(&pwlanqoshdr->qc, AC);
SetEOSP(&pwlanqoshdr->qc, bEosp);
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr_qos);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 275c6fb0cfc1..f1955ddb6460 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -233,7 +233,7 @@ enum WIFI_REG_DOMAIN {
#define set_duration(pbuf, dur) \
*(__le16 *)((size_t)(pbuf) + 2) = cpu_to_le16(0xffff & (dur))
-#define SetPriority(pbuf, tid) \
+#define set_priority(pbuf, tid) \
*(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf)
#define GetPriority(pbuf) ((le16_to_cpu(*(__le16 *)(pbuf))) & 0xf)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 41/56] staging: r8188eu: add parenthesis to macro set_duration
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Christophe JAILLET, Zameer Manji, linux-staging,
linux-kernel
Enclose in parenthesis complex macro set_duration
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index f1955ddb6460..c2edeefe452b 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -231,7 +231,7 @@ enum WIFI_REG_DOMAIN {
} while (0)
#define set_duration(pbuf, dur) \
- *(__le16 *)((size_t)(pbuf) + 2) = cpu_to_le16(0xffff & (dur))
+ (*(__le16 *)((size_t)(pbuf) + 2) = cpu_to_le16(0xffff & (dur)))
#define set_priority(pbuf, tid) \
*(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 41/56] staging: r8188eu: add parenthesis to macro set_duration
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Christophe JAILLET, Zameer Manji, linux-staging,
linux-kernel
Enclose in parenthesis complex macro set_duration
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index f1955ddb6460..c2edeefe452b 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -231,7 +231,7 @@ enum WIFI_REG_DOMAIN {
} while (0)
#define set_duration(pbuf, dur) \
- *(__le16 *)((size_t)(pbuf) + 2) = cpu_to_le16(0xffff & (dur))
+ (*(__le16 *)((size_t)(pbuf) + 2) = cpu_to_le16(0xffff & (dur)))
#define set_priority(pbuf, tid) \
*(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 42/56] staging: r8188eu: add parenthesis to macro set_priority
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Enclose in parenthesis complex macro set_priority
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index c2edeefe452b..f6323767d659 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -234,7 +234,7 @@ enum WIFI_REG_DOMAIN {
(*(__le16 *)((size_t)(pbuf) + 2) = cpu_to_le16(0xffff & (dur)))
#define set_priority(pbuf, tid) \
- *(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf)
+ (*(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf))
#define GetPriority(pbuf) ((le16_to_cpu(*(__le16 *)(pbuf))) & 0xf)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 42/56] staging: r8188eu: add parenthesis to macro set_priority
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Enclose in parenthesis complex macro set_priority
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index c2edeefe452b..f6323767d659 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -234,7 +234,7 @@ enum WIFI_REG_DOMAIN {
(*(__le16 *)((size_t)(pbuf) + 2) = cpu_to_le16(0xffff & (dur)))
#define set_priority(pbuf, tid) \
- *(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf)
+ (*(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf))
#define GetPriority(pbuf) ((le16_to_cpu(*(__le16 *)(pbuf))) & 0xf)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 43/56] staging: r8188eu: rename camelcase GetPriority to get_priority
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Christophe JAILLET, Yang Li, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro GetPriority into get_priority.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 8bda34f87849..d187bb73f539 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -1035,7 +1035,7 @@ static int validate_recv_data_frame(struct adapter *adapter,
pattrib->ack_policy = 0;
/* parsing QC field */
if (pattrib->qos == 1) {
- pattrib->priority = GetPriority((ptr + 24));
+ pattrib->priority = get_priority((ptr + 24));
pattrib->ack_policy = GetAckpolicy((ptr + 24));
pattrib->amsdu = GetAMsdu((ptr + 24));
pattrib->hdrlen = pattrib->to_fr_ds == 3 ? 32 : 26;
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index f6323767d659..6c5ca5b409d2 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -236,7 +236,7 @@ enum WIFI_REG_DOMAIN {
#define set_priority(pbuf, tid) \
(*(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf))
-#define GetPriority(pbuf) ((le16_to_cpu(*(__le16 *)(pbuf))) & 0xf)
+#define get_priority(pbuf) ((le16_to_cpu(*(__le16 *)(pbuf))) & 0xf)
#define SetEOSP(pbuf, eosp) \
*(__le16 *)(pbuf) |= cpu_to_le16((eosp & 1) << 4)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 43/56] staging: r8188eu: rename camelcase GetPriority to get_priority
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Christophe JAILLET, Yang Li, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro GetPriority into get_priority.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 8bda34f87849..d187bb73f539 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -1035,7 +1035,7 @@ static int validate_recv_data_frame(struct adapter *adapter,
pattrib->ack_policy = 0;
/* parsing QC field */
if (pattrib->qos == 1) {
- pattrib->priority = GetPriority((ptr + 24));
+ pattrib->priority = get_priority((ptr + 24));
pattrib->ack_policy = GetAckpolicy((ptr + 24));
pattrib->amsdu = GetAMsdu((ptr + 24));
pattrib->hdrlen = pattrib->to_fr_ds == 3 ? 32 : 26;
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index f6323767d659..6c5ca5b409d2 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -236,7 +236,7 @@ enum WIFI_REG_DOMAIN {
#define set_priority(pbuf, tid) \
(*(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf))
-#define GetPriority(pbuf) ((le16_to_cpu(*(__le16 *)(pbuf))) & 0xf)
+#define get_priority(pbuf) ((le16_to_cpu(*(__le16 *)(pbuf))) & 0xf)
#define SetEOSP(pbuf, eosp) \
*(__le16 *)(pbuf) |= cpu_to_le16((eosp & 1) << 4)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 44/56] staging: r8188eu: rename camelcase SetEOSP to set_eosp
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro SetEOSP into set_eosp
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +-
drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 29075d7516ec..13f6831fb53b 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -5530,7 +5530,7 @@ static int _issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16
set_priority(qc, tid);
- SetEOSP(qc, pattrib->eosp);
+ set_eosp(qc, pattrib->eosp);
SetAckpolicy(qc, pattrib->ack_policy);
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index a13ef82b41f1..1d22f6dc2cdc 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -770,7 +770,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
if (pattrib->priority)
set_priority(qc, pattrib->priority);
- SetEOSP(qc, pattrib->eosp);
+ set_eosp(qc, pattrib->eosp);
SetAckpolicy(qc, pattrib->ack_policy);
}
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
index e4f5b877c559..60b80ce144df 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
@@ -373,7 +373,7 @@ static void ConstructNullFunctionData(struct adapter *adapt, u8 *pframe,
pwlanqoshdr = (struct rtw_ieee80211_hdr_3addr_qos *)pframe;
set_priority(&pwlanqoshdr->qc, AC);
- SetEOSP(&pwlanqoshdr->qc, bEosp);
+ set_eosp(&pwlanqoshdr->qc, bEosp);
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr_qos);
} else {
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 6c5ca5b409d2..45774d7a6429 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -238,7 +238,7 @@ enum WIFI_REG_DOMAIN {
#define get_priority(pbuf) ((le16_to_cpu(*(__le16 *)(pbuf))) & 0xf)
-#define SetEOSP(pbuf, eosp) \
+#define set_eosp(pbuf, eosp) \
*(__le16 *)(pbuf) |= cpu_to_le16((eosp & 1) << 4)
#define SetAckpolicy(pbuf, ack) \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 44/56] staging: r8188eu: rename camelcase SetEOSP to set_eosp
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro SetEOSP into set_eosp
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +-
drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 29075d7516ec..13f6831fb53b 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -5530,7 +5530,7 @@ static int _issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16
set_priority(qc, tid);
- SetEOSP(qc, pattrib->eosp);
+ set_eosp(qc, pattrib->eosp);
SetAckpolicy(qc, pattrib->ack_policy);
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index a13ef82b41f1..1d22f6dc2cdc 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -770,7 +770,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
if (pattrib->priority)
set_priority(qc, pattrib->priority);
- SetEOSP(qc, pattrib->eosp);
+ set_eosp(qc, pattrib->eosp);
SetAckpolicy(qc, pattrib->ack_policy);
}
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
index e4f5b877c559..60b80ce144df 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
@@ -373,7 +373,7 @@ static void ConstructNullFunctionData(struct adapter *adapt, u8 *pframe,
pwlanqoshdr = (struct rtw_ieee80211_hdr_3addr_qos *)pframe;
set_priority(&pwlanqoshdr->qc, AC);
- SetEOSP(&pwlanqoshdr->qc, bEosp);
+ set_eosp(&pwlanqoshdr->qc, bEosp);
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr_qos);
} else {
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 6c5ca5b409d2..45774d7a6429 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -238,7 +238,7 @@ enum WIFI_REG_DOMAIN {
#define get_priority(pbuf) ((le16_to_cpu(*(__le16 *)(pbuf))) & 0xf)
-#define SetEOSP(pbuf, eosp) \
+#define set_eosp(pbuf, eosp) \
*(__le16 *)(pbuf) |= cpu_to_le16((eosp & 1) << 4)
#define SetAckpolicy(pbuf, ack) \
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 45/56] staging: r8188eu: add parenthesis to macro set_eosp
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Christophe JAILLET, Zameer Manji, linux-staging,
linux-kernel
Enclose in parenthesis complex macro set_eosp
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 45774d7a6429..8364b16dfd36 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -239,7 +239,7 @@ enum WIFI_REG_DOMAIN {
#define get_priority(pbuf) ((le16_to_cpu(*(__le16 *)(pbuf))) & 0xf)
#define set_eosp(pbuf, eosp) \
- *(__le16 *)(pbuf) |= cpu_to_le16((eosp & 1) << 4)
+ (*(__le16 *)(pbuf) |= cpu_to_le16((eosp & 1) << 4))
#define SetAckpolicy(pbuf, ack) \
*(__le16 *)(pbuf) |= cpu_to_le16((ack & 3) << 5)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 45/56] staging: r8188eu: add parenthesis to macro set_eosp
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Christophe JAILLET, Zameer Manji, linux-staging,
linux-kernel
Enclose in parenthesis complex macro set_eosp
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 45774d7a6429..8364b16dfd36 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -239,7 +239,7 @@ enum WIFI_REG_DOMAIN {
#define get_priority(pbuf) ((le16_to_cpu(*(__le16 *)(pbuf))) & 0xf)
#define set_eosp(pbuf, eosp) \
- *(__le16 *)(pbuf) |= cpu_to_le16((eosp & 1) << 4)
+ (*(__le16 *)(pbuf) |= cpu_to_le16((eosp & 1) << 4))
#define SetAckpolicy(pbuf, ack) \
*(__le16 *)(pbuf) |= cpu_to_le16((ack & 3) << 5)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 46/56] staging: r8188eu: remove dead macro GetTid
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Yang Li, Zameer Manji,
linux-staging, linux-kernel
Remove dead macro GetTid
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 8364b16dfd36..16acf7df0144 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -253,10 +253,6 @@ enum WIFI_REG_DOMAIN {
#define GetAid(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 2)) & 0x3fff)
-#define GetTid(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + \
- (((get_to_ds(pbuf)<<1) | get_fr_ds(pbuf)) == 3 ? \
- 30 : 24))) & 0x000f)
-
#define GetAddr1Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 4))
#define GetAddr2Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 10))
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 46/56] staging: r8188eu: remove dead macro GetTid
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Yang Li, Zameer Manji,
linux-staging, linux-kernel
Remove dead macro GetTid
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 8364b16dfd36..16acf7df0144 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -253,10 +253,6 @@ enum WIFI_REG_DOMAIN {
#define GetAid(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 2)) & 0x3fff)
-#define GetTid(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + \
- (((get_to_ds(pbuf)<<1) | get_fr_ds(pbuf)) == 3 ? \
- 30 : 24))) & 0x000f)
-
#define GetAddr1Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 4))
#define GetAddr2Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 10))
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 47/56] staging: r8188eu: rename camelcase SetAckpolicy to set_ack_policy
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro SetAckpolicy into set_ack_policy
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +-
drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 13f6831fb53b..6ec53f1039cc 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -5532,7 +5532,7 @@ static int _issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16
set_eosp(qc, pattrib->eosp);
- SetAckpolicy(qc, pattrib->ack_policy);
+ set_ack_policy(qc, pattrib->ack_policy);
memcpy(pwlanhdr->addr1, da, ETH_ALEN);
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index 1d22f6dc2cdc..eed9a2efa21b 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -772,7 +772,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
set_eosp(qc, pattrib->eosp);
- SetAckpolicy(qc, pattrib->ack_policy);
+ set_ack_policy(qc, pattrib->ack_policy);
}
/* TODO: fill HT Control Field */
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 16acf7df0144..75b54ab0fe9c 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -241,7 +241,7 @@ enum WIFI_REG_DOMAIN {
#define set_eosp(pbuf, eosp) \
(*(__le16 *)(pbuf) |= cpu_to_le16((eosp & 1) << 4))
-#define SetAckpolicy(pbuf, ack) \
+#define set_ack_policy(pbuf, ack) \
*(__le16 *)(pbuf) |= cpu_to_le16((ack & 3) << 5)
#define GetAckpolicy(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 5) & 0x3)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 47/56] staging: r8188eu: rename camelcase SetAckpolicy to set_ack_policy
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro SetAckpolicy into set_ack_policy
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +-
drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 13f6831fb53b..6ec53f1039cc 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -5532,7 +5532,7 @@ static int _issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16
set_eosp(qc, pattrib->eosp);
- SetAckpolicy(qc, pattrib->ack_policy);
+ set_ack_policy(qc, pattrib->ack_policy);
memcpy(pwlanhdr->addr1, da, ETH_ALEN);
memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index 1d22f6dc2cdc..eed9a2efa21b 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -772,7 +772,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
set_eosp(qc, pattrib->eosp);
- SetAckpolicy(qc, pattrib->ack_policy);
+ set_ack_policy(qc, pattrib->ack_policy);
}
/* TODO: fill HT Control Field */
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 16acf7df0144..75b54ab0fe9c 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -241,7 +241,7 @@ enum WIFI_REG_DOMAIN {
#define set_eosp(pbuf, eosp) \
(*(__le16 *)(pbuf) |= cpu_to_le16((eosp & 1) << 4))
-#define SetAckpolicy(pbuf, ack) \
+#define set_ack_policy(pbuf, ack) \
*(__le16 *)(pbuf) |= cpu_to_le16((ack & 3) << 5)
#define GetAckpolicy(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 5) & 0x3)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 48/56] staging: r8188eu: add parenthesis to macro set_ack_policy
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Zameer Manji, linux-staging, linux-kernel
Enclose in parenthesis complex macro set_ack_policy
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 75b54ab0fe9c..584161c9b5c5 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -242,7 +242,7 @@ enum WIFI_REG_DOMAIN {
(*(__le16 *)(pbuf) |= cpu_to_le16((eosp & 1) << 4))
#define set_ack_policy(pbuf, ack) \
- *(__le16 *)(pbuf) |= cpu_to_le16((ack & 3) << 5)
+ (*(__le16 *)(pbuf) |= cpu_to_le16((ack & 3) << 5))
#define GetAckpolicy(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 5) & 0x3)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 48/56] staging: r8188eu: add parenthesis to macro set_ack_policy
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Yang Li, Zameer Manji, linux-staging, linux-kernel
Enclose in parenthesis complex macro set_ack_policy
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 75b54ab0fe9c..584161c9b5c5 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -242,7 +242,7 @@ enum WIFI_REG_DOMAIN {
(*(__le16 *)(pbuf) |= cpu_to_le16((eosp & 1) << 4))
#define set_ack_policy(pbuf, ack) \
- *(__le16 *)(pbuf) |= cpu_to_le16((ack & 3) << 5)
+ (*(__le16 *)(pbuf) |= cpu_to_le16((ack & 3) << 5))
#define GetAckpolicy(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 5) & 0x3)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 49/56] staging: r8188eu: rename camelcase GetAckpolicy into get_ack_policy
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Yang Li, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro GetAckpolicy into get_ack_policy.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index d187bb73f539..4aa295ad4a27 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -1036,7 +1036,7 @@ static int validate_recv_data_frame(struct adapter *adapter,
/* parsing QC field */
if (pattrib->qos == 1) {
pattrib->priority = get_priority((ptr + 24));
- pattrib->ack_policy = GetAckpolicy((ptr + 24));
+ pattrib->ack_policy = get_ack_policy((ptr + 24));
pattrib->amsdu = GetAMsdu((ptr + 24));
pattrib->hdrlen = pattrib->to_fr_ds == 3 ? 32 : 26;
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 584161c9b5c5..2de7addd1fbf 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -244,7 +244,7 @@ enum WIFI_REG_DOMAIN {
#define set_ack_policy(pbuf, ack) \
(*(__le16 *)(pbuf) |= cpu_to_le16((ack & 3) << 5))
-#define GetAckpolicy(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 5) & 0x3)
+#define get_ack_policy(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 5) & 0x3)
#define GetAMsdu(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 7) & 0x1)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 49/56] staging: r8188eu: rename camelcase GetAckpolicy into get_ack_policy
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Yang Li, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro GetAckpolicy into get_ack_policy.
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index d187bb73f539..4aa295ad4a27 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -1036,7 +1036,7 @@ static int validate_recv_data_frame(struct adapter *adapter,
/* parsing QC field */
if (pattrib->qos == 1) {
pattrib->priority = get_priority((ptr + 24));
- pattrib->ack_policy = GetAckpolicy((ptr + 24));
+ pattrib->ack_policy = get_ack_policy((ptr + 24));
pattrib->amsdu = GetAMsdu((ptr + 24));
pattrib->hdrlen = pattrib->to_fr_ds == 3 ? 32 : 26;
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 584161c9b5c5..2de7addd1fbf 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -244,7 +244,7 @@ enum WIFI_REG_DOMAIN {
#define set_ack_policy(pbuf, ack) \
(*(__le16 *)(pbuf) |= cpu_to_le16((ack & 3) << 5))
-#define GetAckpolicy(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 5) & 0x3)
+#define get_ack_policy(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 5) & 0x3)
#define GetAMsdu(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 7) & 0x1)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 50/56] staging: r8188eu: rename camelcase GetAMsdu to get_a_msdu
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro GetAMsdu into get_a_msdu
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 4aa295ad4a27..81dcb482ff22 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -1037,7 +1037,7 @@ static int validate_recv_data_frame(struct adapter *adapter,
if (pattrib->qos == 1) {
pattrib->priority = get_priority((ptr + 24));
pattrib->ack_policy = get_ack_policy((ptr + 24));
- pattrib->amsdu = GetAMsdu((ptr + 24));
+ pattrib->amsdu = get_a_msdu((ptr + 24));
pattrib->hdrlen = pattrib->to_fr_ds == 3 ? 32 : 26;
if (pattrib->priority != 0 && pattrib->priority != 3)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 2de7addd1fbf..7a42031ebc15 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -246,7 +246,7 @@ enum WIFI_REG_DOMAIN {
#define get_ack_policy(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 5) & 0x3)
-#define GetAMsdu(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 7) & 0x1)
+#define get_a_msdu(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 7) & 0x1)
#define SetAMsdu(pbuf, amsdu) \
*(__le16 *)(pbuf) |= cpu_to_le16((amsdu & 1) << 7)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 50/56] staging: r8188eu: rename camelcase GetAMsdu to get_a_msdu
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro GetAMsdu into get_a_msdu
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 4aa295ad4a27..81dcb482ff22 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -1037,7 +1037,7 @@ static int validate_recv_data_frame(struct adapter *adapter,
if (pattrib->qos == 1) {
pattrib->priority = get_priority((ptr + 24));
pattrib->ack_policy = get_ack_policy((ptr + 24));
- pattrib->amsdu = GetAMsdu((ptr + 24));
+ pattrib->amsdu = get_a_msdu((ptr + 24));
pattrib->hdrlen = pattrib->to_fr_ds == 3 ? 32 : 26;
if (pattrib->priority != 0 && pattrib->priority != 3)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 2de7addd1fbf..7a42031ebc15 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -246,7 +246,7 @@ enum WIFI_REG_DOMAIN {
#define get_ack_policy(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 5) & 0x3)
-#define GetAMsdu(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 7) & 0x1)
+#define get_a_msdu(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 7) & 0x1)
#define SetAMsdu(pbuf, amsdu) \
*(__le16 *)(pbuf) |= cpu_to_le16((amsdu & 1) << 7)
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 51/56] staging: r8188eu: remove dead macro SetAMsdu
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Yang Li,
Zameer Manji, linux-staging, linux-kernel
Remove dead macro SetAMsdu
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 7a42031ebc15..63f1b0a974f4 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -248,9 +248,6 @@ enum WIFI_REG_DOMAIN {
#define get_a_msdu(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 7) & 0x1)
-#define SetAMsdu(pbuf, amsdu) \
- *(__le16 *)(pbuf) |= cpu_to_le16((amsdu & 1) << 7)
-
#define GetAid(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 2)) & 0x3fff)
#define GetAddr1Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 4))
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 51/56] staging: r8188eu: remove dead macro SetAMsdu
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Yang Li,
Zameer Manji, linux-staging, linux-kernel
Remove dead macro SetAMsdu
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 7a42031ebc15..63f1b0a974f4 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -248,9 +248,6 @@ enum WIFI_REG_DOMAIN {
#define get_a_msdu(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 7) & 0x1)
-#define SetAMsdu(pbuf, amsdu) \
- *(__le16 *)(pbuf) |= cpu_to_le16((amsdu & 1) << 7)
-
#define GetAid(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 2)) & 0x3fff)
#define GetAddr1Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 4))
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 52/56] staging: r8188eu: rename camelcase GetAid to get_aid
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Yang Li, Christophe JAILLET,
Zameer Manji, linux-staging, linux-kernel
Rename camel case macro GetAid into get_aid
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 81dcb482ff22..32e0bcce65a0 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -832,7 +832,7 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
u8 wmmps_ac = 0;
struct sta_info *psta = NULL;
- aid = GetAid(pframe);
+ aid = get_aid(pframe);
psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
if (!psta || psta->aid != aid)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 63f1b0a974f4..061d1aa18eed 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -248,7 +248,7 @@ enum WIFI_REG_DOMAIN {
#define get_a_msdu(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 7) & 0x1)
-#define GetAid(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 2)) & 0x3fff)
+#define get_aid(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 2)) & 0x3fff)
#define GetAddr1Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 4))
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 52/56] staging: r8188eu: rename camelcase GetAid to get_aid
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Yang Li, Christophe JAILLET,
Zameer Manji, linux-staging, linux-kernel
Rename camel case macro GetAid into get_aid
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 81dcb482ff22..32e0bcce65a0 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -832,7 +832,7 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
u8 wmmps_ac = 0;
struct sta_info *psta = NULL;
- aid = GetAid(pframe);
+ aid = get_aid(pframe);
psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
if (!psta || psta->aid != aid)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 63f1b0a974f4..061d1aa18eed 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -248,7 +248,7 @@ enum WIFI_REG_DOMAIN {
#define get_a_msdu(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 7) & 0x1)
-#define GetAid(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 2)) & 0x3fff)
+#define get_aid(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 2)) & 0x3fff)
#define GetAddr1Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 4))
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 53/56] staging: r8188eu: rename camelcase GetAddr1Ptr to get_addr_1_ptr
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Yang Li,
Zameer Manji, linux-staging, linux-kernel
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
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 53/56] staging: r8188eu: rename camelcase GetAddr1Ptr to get_addr_1_ptr
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Yang Li,
Zameer Manji, linux-staging, linux-kernel
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
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 54/56] staging: r8188eu: rename camelcase GetAddr2Ptr to get_addr_2_ptr
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro GetAddr2Ptr into get_addr_2_ptr
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 46 ++++++++++-----------
drivers/staging/r8188eu/core/rtw_p2p.c | 6 +--
drivers/staging/r8188eu/core/rtw_recv.c | 10 ++---
drivers/staging/r8188eu/include/wifi.h | 8 ++--
4 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index af65774ed936..491cba1a007a 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -414,7 +414,7 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame)
struct mlme_handler *ptable;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
u8 *pframe = precv_frame->rx_data;
- struct sta_info *psta = rtw_get_stainfo(&padapter->stapriv, GetAddr2Ptr(pframe));
+ struct sta_info *psta = rtw_get_stainfo(&padapter->stapriv, get_addr_2_ptr(pframe));
if (get_frame_type(pframe) != WIFI_MGT_TYPE)
return;
@@ -569,7 +569,7 @@ unsigned int OnProbeRsp(struct adapter *padapter, struct recv_frame *precv_frame
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_PROVISION_DIS_REQ)) {
if (pwdinfo->tx_prov_disc_info.benable) {
- if (!memcmp(pwdinfo->tx_prov_disc_info.peerIFAddr, GetAddr2Ptr(pframe), ETH_ALEN)) {
+ if (!memcmp(pwdinfo->tx_prov_disc_info.peerIFAddr, get_addr_2_ptr(pframe), ETH_ALEN)) {
if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_CLIENT)) {
pwdinfo->tx_prov_disc_info.benable = false;
issue_p2p_provision_request(padapter,
@@ -587,7 +587,7 @@ unsigned int OnProbeRsp(struct adapter *padapter, struct recv_frame *precv_frame
} else if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_ING)) {
if (pwdinfo->nego_req_info.benable) {
DBG_88E("[%s] P2P State is GONEGO ING!\n", __func__);
- if (!memcmp(pwdinfo->nego_req_info.peerDevAddr, GetAddr2Ptr(pframe), ETH_ALEN)) {
+ if (!memcmp(pwdinfo->nego_req_info.peerDevAddr, get_addr_2_ptr(pframe), ETH_ALEN)) {
pwdinfo->nego_req_info.benable = false;
issue_p2p_GO_request(padapter, pwdinfo->nego_req_info.peerDevAddr);
}
@@ -595,7 +595,7 @@ unsigned int OnProbeRsp(struct adapter *padapter, struct recv_frame *precv_frame
} else if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_INVITE_REQ)) {
if (pwdinfo->invitereq_info.benable) {
DBG_88E("[%s] P2P_STATE_TX_INVITE_REQ!\n", __func__);
- if (!memcmp(pwdinfo->invitereq_info.peer_macaddr, GetAddr2Ptr(pframe), ETH_ALEN)) {
+ if (!memcmp(pwdinfo->invitereq_info.peer_macaddr, get_addr_2_ptr(pframe), ETH_ALEN)) {
pwdinfo->invitereq_info.benable = false;
issue_p2p_invitation_request(padapter, pwdinfo->invitereq_info.peer_macaddr);
}
@@ -652,7 +652,7 @@ unsigned int OnBeacon(struct adapter *padapter, struct recv_frame *precv_frame)
}
if (((pmlmeinfo->state & 0x03) == WIFI_FW_STATION_STATE) && (pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS)) {
- psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
+ psta = rtw_get_stainfo(pstapriv, get_addr_2_ptr(pframe));
if (psta) {
ret = rtw_check_bcn_info(padapter, pframe, len);
if (!ret) {
@@ -669,7 +669,7 @@ unsigned int OnBeacon(struct adapter *padapter, struct recv_frame *precv_frame)
process_p2p_ps_ie(padapter, (pframe + WLAN_HDR_A3_LEN), (len - WLAN_HDR_A3_LEN));
}
} else if ((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) {
- psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
+ psta = rtw_get_stainfo(pstapriv, get_addr_2_ptr(pframe));
if (psta) {
/* update WMM, ERP in the beacon */
/* todo: the timer is used instead of the number of the beacon received */
@@ -691,7 +691,7 @@ unsigned int OnBeacon(struct adapter *padapter, struct recv_frame *precv_frame)
update_TSF(pmlmeext, pframe, len);
/* report sta add event */
- report_add_sta_event(padapter, GetAddr2Ptr(pframe), cam_idx);
+ report_add_sta_event(padapter, get_addr_2_ptr(pframe), cam_idx);
}
}
}
@@ -722,7 +722,7 @@ unsigned int OnAuth(struct adapter *padapter, struct recv_frame *precv_frame)
DBG_88E("+OnAuth\n");
- sa = GetAddr2Ptr(pframe);
+ sa = get_addr_2_ptr(pframe);
auth_mode = psecuritypriv->dot11AuthAlgrthm;
seq = le16_to_cpu(*(__le16 *)((size_t)pframe + WLAN_HDR_A3_LEN + 2));
@@ -985,7 +985,7 @@ unsigned int OnAssocReq(struct adapter *padapter, struct recv_frame *precv_frame
return _FAIL;
}
- pstat = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
+ pstat = rtw_get_stainfo(pstapriv, get_addr_2_ptr(pframe));
if (pstat == (struct sta_info *)NULL) {
status = _RSON_CLS2_;
goto asoc_class2_error;
@@ -1375,7 +1375,7 @@ unsigned int OnAssocReq(struct adapter *padapter, struct recv_frame *precv_frame
asoc_class2_error:
- issue_deauth(padapter, (void *)GetAddr2Ptr(pframe), status);
+ issue_deauth(padapter, (void *)get_addr_2_ptr(pframe), status);
return _FAIL;
@@ -1508,9 +1508,9 @@ unsigned int OnDeAuth(struct adapter *padapter, struct recv_frame *precv_frame)
netdev_dbg(padapter->pnetdev,
"ap recv deauth reason code(%d) sta:%pM\n",
- reason, GetAddr2Ptr(pframe));
+ reason, get_addr_2_ptr(pframe));
- psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
+ psta = rtw_get_stainfo(pstapriv, get_addr_2_ptr(pframe));
if (psta) {
u8 updated = 0;
@@ -1583,9 +1583,9 @@ unsigned int OnDisassoc(struct adapter *padapter, struct recv_frame *precv_frame
netdev_dbg(padapter->pnetdev,
"ap recv disassoc reason code(%d) sta:%pM\n",
- reason, GetAddr2Ptr(pframe));
+ reason, get_addr_2_ptr(pframe));
- psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
+ psta = rtw_get_stainfo(pstapriv, get_addr_2_ptr(pframe));
if (psta) {
u8 updated = 0;
@@ -1630,7 +1630,7 @@ unsigned int on_action_spct(struct adapter *padapter, struct recv_frame *precv_f
DBG_88E(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(padapter->pnetdev));
- psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
+ psta = rtw_get_stainfo(pstapriv, get_addr_2_ptr(pframe));
if (!psta)
goto exit;
@@ -1688,7 +1688,7 @@ unsigned int OnAction_back(struct adapter *padapter, struct recv_frame *precv_fr
if (!(pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS))
return _SUCCESS;
- addr = GetAddr2Ptr(pframe);
+ addr = get_addr_2_ptr(pframe);
psta = rtw_get_stainfo(pstapriv, addr);
if (!psta)
@@ -3782,10 +3782,10 @@ static unsigned int on_action_public_p2p(struct recv_frame *precv_frame)
/* Commented by Kurt 20120113 */
/* Get peer_dev_addr here if peer doesn't issue prov_disc frame. */
if (!memcmp(pwdinfo->rx_prov_disc_info.peerDevAddr, empty_addr, ETH_ALEN))
- memcpy(pwdinfo->rx_prov_disc_info.peerDevAddr, GetAddr2Ptr(pframe), ETH_ALEN);
+ memcpy(pwdinfo->rx_prov_disc_info.peerDevAddr, get_addr_2_ptr(pframe), ETH_ALEN);
result = process_p2p_group_negotation_req(pwdinfo, frame_body, len);
- issue_p2p_GO_response(padapter, GetAddr2Ptr(pframe), frame_body, len, result);
+ issue_p2p_GO_response(padapter, get_addr_2_ptr(pframe), frame_body, len, result);
/* Commented by Albert 20110718 */
/* No matter negotiating or negotiation failure, the driver should set up the restore P2P state timer. */
@@ -3800,7 +3800,7 @@ static unsigned int on_action_public_p2p(struct recv_frame *precv_frame)
_cancel_timer_ex(&pwdinfo->restore_p2p_state_timer);
pwdinfo->nego_req_info.benable = false;
result = process_p2p_group_negotation_resp(pwdinfo, frame_body, len);
- issue_p2p_GO_confirm(pwdinfo->padapter, GetAddr2Ptr(pframe), result);
+ issue_p2p_GO_confirm(pwdinfo->padapter, get_addr_2_ptr(pframe), result);
if (P2P_STATUS_SUCCESS == result) {
if (rtw_p2p_role(pwdinfo) == P2P_ROLE_CLIENT) {
pwdinfo->p2p_info.operation_ch[0] = pwdinfo->peer_operating_ch;
@@ -3940,7 +3940,7 @@ static unsigned int on_action_public_p2p(struct recv_frame *precv_frame)
DBG_88E("[%s] status_code = %d\n", __func__, status_code);
pwdinfo->inviteresp_info.token = frame_body[7];
- issue_p2p_invitation_response(padapter, GetAddr2Ptr(pframe), pwdinfo->inviteresp_info.token, status_code);
+ issue_p2p_invitation_response(padapter, get_addr_2_ptr(pframe), pwdinfo->inviteresp_info.token, status_code);
}
break;
case P2P_INVIT_RESP: {
@@ -3990,7 +3990,7 @@ static unsigned int on_action_public_p2p(struct recv_frame *precv_frame)
case P2P_PROVISION_DISC_REQ:
DBG_88E("[%s] Got Provisioning Discovery Request Frame\n", __func__);
process_p2p_provdisc_req(pwdinfo, pframe, len);
- memcpy(pwdinfo->rx_prov_disc_info.peerDevAddr, GetAddr2Ptr(pframe), ETH_ALEN);
+ memcpy(pwdinfo->rx_prov_disc_info.peerDevAddr, get_addr_2_ptr(pframe), ETH_ALEN);
/* 20110902 Kurt */
/* Add the following statement to avoid receiving duplicate prov disc req. such that pre_p2p_state would be covered. */
@@ -4965,7 +4965,7 @@ void issue_asocrsp(struct adapter *padapter, unsigned short status, struct sta_i
*(fctrl) = 0;
memcpy((void *)get_addr_1_ptr(pwlanhdr), pstat->hwaddr, ETH_ALEN);
- memcpy((void *)GetAddr2Ptr(pwlanhdr), myid(&padapter->eeprompriv), ETH_ALEN);
+ memcpy((void *)get_addr_2_ptr(pwlanhdr), myid(&padapter->eeprompriv), ETH_ALEN);
memcpy((void *)GetAddr3Ptr(pwlanhdr), get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
@@ -6321,7 +6321,7 @@ u8 collect_bss_info(struct adapter *padapter, struct recv_frame *precv_frame, st
if (val16 & BIT(0)) {
bssid->InfrastructureMode = Ndis802_11Infrastructure;
- memcpy(bssid->MacAddress, GetAddr2Ptr(pframe), ETH_ALEN);
+ memcpy(bssid->MacAddress, get_addr_2_ptr(pframe), ETH_ALEN);
} else {
bssid->InfrastructureMode = Ndis802_11IBSS;
memcpy(bssid->MacAddress, GetAddr3Ptr(pframe), ETH_ALEN);
diff --git a/drivers/staging/r8188eu/core/rtw_p2p.c b/drivers/staging/r8188eu/core/rtw_p2p.c
index 558646db06b3..4723c66ec18b 100644
--- a/drivers/staging/r8188eu/core/rtw_p2p.c
+++ b/drivers/staging/r8188eu/core/rtw_p2p.c
@@ -963,7 +963,7 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
}
/* issue Device Discoverability Response */
- issue_p2p_devdisc_resp(pwdinfo, GetAddr2Ptr(pframe), status, dialogToken);
+ issue_p2p_devdisc_resp(pwdinfo, get_addr_2_ptr(pframe), status, dialogToken);
return (status == P2P_STATUS_SUCCESS) ? true : false;
}
@@ -1001,7 +1001,7 @@ u8 process_p2p_provdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "pad", 3);
break;
}
- issue_p2p_provision_resp(pwdinfo, GetAddr2Ptr(pframe), frame_body, uconfig_method);
+ issue_p2p_provision_resp(pwdinfo, get_addr_2_ptr(pframe), frame_body, uconfig_method);
}
}
DBG_88E("[%s] config method = %s\n", __func__, pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req);
@@ -1439,7 +1439,7 @@ u8 process_p2p_presence_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
/* todo: check NoA attribute */
- issue_p2p_presence_resp(pwdinfo, GetAddr2Ptr(pframe), status, dialogToken);
+ issue_p2p_presence_resp(pwdinfo, get_addr_2_ptr(pframe), status, dialogToken);
return true;
}
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 9d8da5ec8948..3aad16af3a60 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -632,7 +632,7 @@ int sta2sta_data_frame(struct adapter *adapter, struct recv_frame *precv_frame,
}
} else if (check_fwstate(pmlmepriv, WIFI_MP_STATE)) {
memcpy(pattrib->dst, get_addr_1_ptr(ptr), ETH_ALEN);
- memcpy(pattrib->src, GetAddr2Ptr(ptr), ETH_ALEN);
+ memcpy(pattrib->src, get_addr_2_ptr(ptr), ETH_ALEN);
memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN);
memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
@@ -719,7 +719,7 @@ static int ap2sta_data_frame(
} else if (check_fwstate(pmlmepriv, WIFI_MP_STATE) &&
check_fwstate(pmlmepriv, _FW_LINKED)) {
memcpy(pattrib->dst, get_addr_1_ptr(ptr), ETH_ALEN);
- memcpy(pattrib->src, GetAddr2Ptr(ptr), ETH_ALEN);
+ memcpy(pattrib->src, get_addr_2_ptr(ptr), ETH_ALEN);
memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN);
memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
@@ -833,7 +833,7 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
struct sta_info *psta = NULL;
aid = get_aid(pframe);
- psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
+ psta = rtw_get_stainfo(pstapriv, get_addr_2_ptr(pframe));
if (!psta || psta->aid != aid)
return _FAIL;
@@ -941,7 +941,7 @@ static int validate_recv_mgnt_frame(struct adapter *padapter,
return _SUCCESS;
/* for rx pkt statistics */
- psta = rtw_get_stainfo(&padapter->stapriv, GetAddr2Ptr(precv_frame->rx_data));
+ psta = rtw_get_stainfo(&padapter->stapriv, get_addr_2_ptr(precv_frame->rx_data));
if (psta) {
psta->sta_stats.rx_mgnt_pkts++;
if (get_frame_subtype(precv_frame->rx_data) == WIFI_BEACON) {
@@ -1008,7 +1008,7 @@ static int validate_recv_data_frame(struct adapter *adapter,
break;
case 3:
memcpy(pattrib->ra, get_addr_1_ptr(ptr), ETH_ALEN);
- memcpy(pattrib->ta, GetAddr2Ptr(ptr), ETH_ALEN);
+ memcpy(pattrib->ta, get_addr_2_ptr(ptr), ETH_ALEN);
ret = _FAIL;
break;
default:
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 4d4db68b967e..9ce45d31e16d 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -252,7 +252,7 @@ enum WIFI_REG_DOMAIN {
#define get_addr_1_ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 4))
-#define GetAddr2Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 10))
+#define get_addr_2_ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 10))
#define GetAddr3Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 16))
@@ -295,13 +295,13 @@ static inline unsigned char *get_sa(unsigned char *pframe)
switch (to_fr_ds) {
case 0x00: /* ToDs=0, FromDs=0 */
- sa = GetAddr2Ptr(pframe);
+ sa = get_addr_2_ptr(pframe);
break;
case 0x01: /* ToDs=0, FromDs=1 */
sa = GetAddr3Ptr(pframe);
break;
case 0x02: /* ToDs=1, FromDs=0 */
- sa = GetAddr2Ptr(pframe);
+ sa = get_addr_2_ptr(pframe);
break;
default: /* ToDs=1, FromDs=1 */
sa = GetAddr4Ptr(pframe);
@@ -320,7 +320,7 @@ static inline unsigned char *get_hdr_bssid(unsigned char *pframe)
sa = GetAddr3Ptr(pframe);
break;
case 0x01: /* ToDs=0, FromDs=1 */
- sa = GetAddr2Ptr(pframe);
+ sa = get_addr_2_ptr(pframe);
break;
case 0x02: /* ToDs=1, FromDs=0 */
sa = get_addr_1_ptr(pframe);
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 54/56] staging: r8188eu: rename camelcase GetAddr2Ptr to get_addr_2_ptr
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Zameer Manji,
linux-staging, linux-kernel
Rename camel case macro GetAddr2Ptr into get_addr_2_ptr
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 46 ++++++++++-----------
drivers/staging/r8188eu/core/rtw_p2p.c | 6 +--
drivers/staging/r8188eu/core/rtw_recv.c | 10 ++---
drivers/staging/r8188eu/include/wifi.h | 8 ++--
4 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index af65774ed936..491cba1a007a 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -414,7 +414,7 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame)
struct mlme_handler *ptable;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
u8 *pframe = precv_frame->rx_data;
- struct sta_info *psta = rtw_get_stainfo(&padapter->stapriv, GetAddr2Ptr(pframe));
+ struct sta_info *psta = rtw_get_stainfo(&padapter->stapriv, get_addr_2_ptr(pframe));
if (get_frame_type(pframe) != WIFI_MGT_TYPE)
return;
@@ -569,7 +569,7 @@ unsigned int OnProbeRsp(struct adapter *padapter, struct recv_frame *precv_frame
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_PROVISION_DIS_REQ)) {
if (pwdinfo->tx_prov_disc_info.benable) {
- if (!memcmp(pwdinfo->tx_prov_disc_info.peerIFAddr, GetAddr2Ptr(pframe), ETH_ALEN)) {
+ if (!memcmp(pwdinfo->tx_prov_disc_info.peerIFAddr, get_addr_2_ptr(pframe), ETH_ALEN)) {
if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_CLIENT)) {
pwdinfo->tx_prov_disc_info.benable = false;
issue_p2p_provision_request(padapter,
@@ -587,7 +587,7 @@ unsigned int OnProbeRsp(struct adapter *padapter, struct recv_frame *precv_frame
} else if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_ING)) {
if (pwdinfo->nego_req_info.benable) {
DBG_88E("[%s] P2P State is GONEGO ING!\n", __func__);
- if (!memcmp(pwdinfo->nego_req_info.peerDevAddr, GetAddr2Ptr(pframe), ETH_ALEN)) {
+ if (!memcmp(pwdinfo->nego_req_info.peerDevAddr, get_addr_2_ptr(pframe), ETH_ALEN)) {
pwdinfo->nego_req_info.benable = false;
issue_p2p_GO_request(padapter, pwdinfo->nego_req_info.peerDevAddr);
}
@@ -595,7 +595,7 @@ unsigned int OnProbeRsp(struct adapter *padapter, struct recv_frame *precv_frame
} else if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_INVITE_REQ)) {
if (pwdinfo->invitereq_info.benable) {
DBG_88E("[%s] P2P_STATE_TX_INVITE_REQ!\n", __func__);
- if (!memcmp(pwdinfo->invitereq_info.peer_macaddr, GetAddr2Ptr(pframe), ETH_ALEN)) {
+ if (!memcmp(pwdinfo->invitereq_info.peer_macaddr, get_addr_2_ptr(pframe), ETH_ALEN)) {
pwdinfo->invitereq_info.benable = false;
issue_p2p_invitation_request(padapter, pwdinfo->invitereq_info.peer_macaddr);
}
@@ -652,7 +652,7 @@ unsigned int OnBeacon(struct adapter *padapter, struct recv_frame *precv_frame)
}
if (((pmlmeinfo->state & 0x03) == WIFI_FW_STATION_STATE) && (pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS)) {
- psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
+ psta = rtw_get_stainfo(pstapriv, get_addr_2_ptr(pframe));
if (psta) {
ret = rtw_check_bcn_info(padapter, pframe, len);
if (!ret) {
@@ -669,7 +669,7 @@ unsigned int OnBeacon(struct adapter *padapter, struct recv_frame *precv_frame)
process_p2p_ps_ie(padapter, (pframe + WLAN_HDR_A3_LEN), (len - WLAN_HDR_A3_LEN));
}
} else if ((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) {
- psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
+ psta = rtw_get_stainfo(pstapriv, get_addr_2_ptr(pframe));
if (psta) {
/* update WMM, ERP in the beacon */
/* todo: the timer is used instead of the number of the beacon received */
@@ -691,7 +691,7 @@ unsigned int OnBeacon(struct adapter *padapter, struct recv_frame *precv_frame)
update_TSF(pmlmeext, pframe, len);
/* report sta add event */
- report_add_sta_event(padapter, GetAddr2Ptr(pframe), cam_idx);
+ report_add_sta_event(padapter, get_addr_2_ptr(pframe), cam_idx);
}
}
}
@@ -722,7 +722,7 @@ unsigned int OnAuth(struct adapter *padapter, struct recv_frame *precv_frame)
DBG_88E("+OnAuth\n");
- sa = GetAddr2Ptr(pframe);
+ sa = get_addr_2_ptr(pframe);
auth_mode = psecuritypriv->dot11AuthAlgrthm;
seq = le16_to_cpu(*(__le16 *)((size_t)pframe + WLAN_HDR_A3_LEN + 2));
@@ -985,7 +985,7 @@ unsigned int OnAssocReq(struct adapter *padapter, struct recv_frame *precv_frame
return _FAIL;
}
- pstat = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
+ pstat = rtw_get_stainfo(pstapriv, get_addr_2_ptr(pframe));
if (pstat == (struct sta_info *)NULL) {
status = _RSON_CLS2_;
goto asoc_class2_error;
@@ -1375,7 +1375,7 @@ unsigned int OnAssocReq(struct adapter *padapter, struct recv_frame *precv_frame
asoc_class2_error:
- issue_deauth(padapter, (void *)GetAddr2Ptr(pframe), status);
+ issue_deauth(padapter, (void *)get_addr_2_ptr(pframe), status);
return _FAIL;
@@ -1508,9 +1508,9 @@ unsigned int OnDeAuth(struct adapter *padapter, struct recv_frame *precv_frame)
netdev_dbg(padapter->pnetdev,
"ap recv deauth reason code(%d) sta:%pM\n",
- reason, GetAddr2Ptr(pframe));
+ reason, get_addr_2_ptr(pframe));
- psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
+ psta = rtw_get_stainfo(pstapriv, get_addr_2_ptr(pframe));
if (psta) {
u8 updated = 0;
@@ -1583,9 +1583,9 @@ unsigned int OnDisassoc(struct adapter *padapter, struct recv_frame *precv_frame
netdev_dbg(padapter->pnetdev,
"ap recv disassoc reason code(%d) sta:%pM\n",
- reason, GetAddr2Ptr(pframe));
+ reason, get_addr_2_ptr(pframe));
- psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
+ psta = rtw_get_stainfo(pstapriv, get_addr_2_ptr(pframe));
if (psta) {
u8 updated = 0;
@@ -1630,7 +1630,7 @@ unsigned int on_action_spct(struct adapter *padapter, struct recv_frame *precv_f
DBG_88E(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(padapter->pnetdev));
- psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
+ psta = rtw_get_stainfo(pstapriv, get_addr_2_ptr(pframe));
if (!psta)
goto exit;
@@ -1688,7 +1688,7 @@ unsigned int OnAction_back(struct adapter *padapter, struct recv_frame *precv_fr
if (!(pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS))
return _SUCCESS;
- addr = GetAddr2Ptr(pframe);
+ addr = get_addr_2_ptr(pframe);
psta = rtw_get_stainfo(pstapriv, addr);
if (!psta)
@@ -3782,10 +3782,10 @@ static unsigned int on_action_public_p2p(struct recv_frame *precv_frame)
/* Commented by Kurt 20120113 */
/* Get peer_dev_addr here if peer doesn't issue prov_disc frame. */
if (!memcmp(pwdinfo->rx_prov_disc_info.peerDevAddr, empty_addr, ETH_ALEN))
- memcpy(pwdinfo->rx_prov_disc_info.peerDevAddr, GetAddr2Ptr(pframe), ETH_ALEN);
+ memcpy(pwdinfo->rx_prov_disc_info.peerDevAddr, get_addr_2_ptr(pframe), ETH_ALEN);
result = process_p2p_group_negotation_req(pwdinfo, frame_body, len);
- issue_p2p_GO_response(padapter, GetAddr2Ptr(pframe), frame_body, len, result);
+ issue_p2p_GO_response(padapter, get_addr_2_ptr(pframe), frame_body, len, result);
/* Commented by Albert 20110718 */
/* No matter negotiating or negotiation failure, the driver should set up the restore P2P state timer. */
@@ -3800,7 +3800,7 @@ static unsigned int on_action_public_p2p(struct recv_frame *precv_frame)
_cancel_timer_ex(&pwdinfo->restore_p2p_state_timer);
pwdinfo->nego_req_info.benable = false;
result = process_p2p_group_negotation_resp(pwdinfo, frame_body, len);
- issue_p2p_GO_confirm(pwdinfo->padapter, GetAddr2Ptr(pframe), result);
+ issue_p2p_GO_confirm(pwdinfo->padapter, get_addr_2_ptr(pframe), result);
if (P2P_STATUS_SUCCESS == result) {
if (rtw_p2p_role(pwdinfo) == P2P_ROLE_CLIENT) {
pwdinfo->p2p_info.operation_ch[0] = pwdinfo->peer_operating_ch;
@@ -3940,7 +3940,7 @@ static unsigned int on_action_public_p2p(struct recv_frame *precv_frame)
DBG_88E("[%s] status_code = %d\n", __func__, status_code);
pwdinfo->inviteresp_info.token = frame_body[7];
- issue_p2p_invitation_response(padapter, GetAddr2Ptr(pframe), pwdinfo->inviteresp_info.token, status_code);
+ issue_p2p_invitation_response(padapter, get_addr_2_ptr(pframe), pwdinfo->inviteresp_info.token, status_code);
}
break;
case P2P_INVIT_RESP: {
@@ -3990,7 +3990,7 @@ static unsigned int on_action_public_p2p(struct recv_frame *precv_frame)
case P2P_PROVISION_DISC_REQ:
DBG_88E("[%s] Got Provisioning Discovery Request Frame\n", __func__);
process_p2p_provdisc_req(pwdinfo, pframe, len);
- memcpy(pwdinfo->rx_prov_disc_info.peerDevAddr, GetAddr2Ptr(pframe), ETH_ALEN);
+ memcpy(pwdinfo->rx_prov_disc_info.peerDevAddr, get_addr_2_ptr(pframe), ETH_ALEN);
/* 20110902 Kurt */
/* Add the following statement to avoid receiving duplicate prov disc req. such that pre_p2p_state would be covered. */
@@ -4965,7 +4965,7 @@ void issue_asocrsp(struct adapter *padapter, unsigned short status, struct sta_i
*(fctrl) = 0;
memcpy((void *)get_addr_1_ptr(pwlanhdr), pstat->hwaddr, ETH_ALEN);
- memcpy((void *)GetAddr2Ptr(pwlanhdr), myid(&padapter->eeprompriv), ETH_ALEN);
+ memcpy((void *)get_addr_2_ptr(pwlanhdr), myid(&padapter->eeprompriv), ETH_ALEN);
memcpy((void *)GetAddr3Ptr(pwlanhdr), get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
@@ -6321,7 +6321,7 @@ u8 collect_bss_info(struct adapter *padapter, struct recv_frame *precv_frame, st
if (val16 & BIT(0)) {
bssid->InfrastructureMode = Ndis802_11Infrastructure;
- memcpy(bssid->MacAddress, GetAddr2Ptr(pframe), ETH_ALEN);
+ memcpy(bssid->MacAddress, get_addr_2_ptr(pframe), ETH_ALEN);
} else {
bssid->InfrastructureMode = Ndis802_11IBSS;
memcpy(bssid->MacAddress, GetAddr3Ptr(pframe), ETH_ALEN);
diff --git a/drivers/staging/r8188eu/core/rtw_p2p.c b/drivers/staging/r8188eu/core/rtw_p2p.c
index 558646db06b3..4723c66ec18b 100644
--- a/drivers/staging/r8188eu/core/rtw_p2p.c
+++ b/drivers/staging/r8188eu/core/rtw_p2p.c
@@ -963,7 +963,7 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
}
/* issue Device Discoverability Response */
- issue_p2p_devdisc_resp(pwdinfo, GetAddr2Ptr(pframe), status, dialogToken);
+ issue_p2p_devdisc_resp(pwdinfo, get_addr_2_ptr(pframe), status, dialogToken);
return (status == P2P_STATUS_SUCCESS) ? true : false;
}
@@ -1001,7 +1001,7 @@ u8 process_p2p_provdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "pad", 3);
break;
}
- issue_p2p_provision_resp(pwdinfo, GetAddr2Ptr(pframe), frame_body, uconfig_method);
+ issue_p2p_provision_resp(pwdinfo, get_addr_2_ptr(pframe), frame_body, uconfig_method);
}
}
DBG_88E("[%s] config method = %s\n", __func__, pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req);
@@ -1439,7 +1439,7 @@ u8 process_p2p_presence_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
/* todo: check NoA attribute */
- issue_p2p_presence_resp(pwdinfo, GetAddr2Ptr(pframe), status, dialogToken);
+ issue_p2p_presence_resp(pwdinfo, get_addr_2_ptr(pframe), status, dialogToken);
return true;
}
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 9d8da5ec8948..3aad16af3a60 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -632,7 +632,7 @@ int sta2sta_data_frame(struct adapter *adapter, struct recv_frame *precv_frame,
}
} else if (check_fwstate(pmlmepriv, WIFI_MP_STATE)) {
memcpy(pattrib->dst, get_addr_1_ptr(ptr), ETH_ALEN);
- memcpy(pattrib->src, GetAddr2Ptr(ptr), ETH_ALEN);
+ memcpy(pattrib->src, get_addr_2_ptr(ptr), ETH_ALEN);
memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN);
memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
@@ -719,7 +719,7 @@ static int ap2sta_data_frame(
} else if (check_fwstate(pmlmepriv, WIFI_MP_STATE) &&
check_fwstate(pmlmepriv, _FW_LINKED)) {
memcpy(pattrib->dst, get_addr_1_ptr(ptr), ETH_ALEN);
- memcpy(pattrib->src, GetAddr2Ptr(ptr), ETH_ALEN);
+ memcpy(pattrib->src, get_addr_2_ptr(ptr), ETH_ALEN);
memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN);
memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
@@ -833,7 +833,7 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
struct sta_info *psta = NULL;
aid = get_aid(pframe);
- psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
+ psta = rtw_get_stainfo(pstapriv, get_addr_2_ptr(pframe));
if (!psta || psta->aid != aid)
return _FAIL;
@@ -941,7 +941,7 @@ static int validate_recv_mgnt_frame(struct adapter *padapter,
return _SUCCESS;
/* for rx pkt statistics */
- psta = rtw_get_stainfo(&padapter->stapriv, GetAddr2Ptr(precv_frame->rx_data));
+ psta = rtw_get_stainfo(&padapter->stapriv, get_addr_2_ptr(precv_frame->rx_data));
if (psta) {
psta->sta_stats.rx_mgnt_pkts++;
if (get_frame_subtype(precv_frame->rx_data) == WIFI_BEACON) {
@@ -1008,7 +1008,7 @@ static int validate_recv_data_frame(struct adapter *adapter,
break;
case 3:
memcpy(pattrib->ra, get_addr_1_ptr(ptr), ETH_ALEN);
- memcpy(pattrib->ta, GetAddr2Ptr(ptr), ETH_ALEN);
+ memcpy(pattrib->ta, get_addr_2_ptr(ptr), ETH_ALEN);
ret = _FAIL;
break;
default:
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 4d4db68b967e..9ce45d31e16d 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -252,7 +252,7 @@ enum WIFI_REG_DOMAIN {
#define get_addr_1_ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 4))
-#define GetAddr2Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 10))
+#define get_addr_2_ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 10))
#define GetAddr3Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 16))
@@ -295,13 +295,13 @@ static inline unsigned char *get_sa(unsigned char *pframe)
switch (to_fr_ds) {
case 0x00: /* ToDs=0, FromDs=0 */
- sa = GetAddr2Ptr(pframe);
+ sa = get_addr_2_ptr(pframe);
break;
case 0x01: /* ToDs=0, FromDs=1 */
sa = GetAddr3Ptr(pframe);
break;
case 0x02: /* ToDs=1, FromDs=0 */
- sa = GetAddr2Ptr(pframe);
+ sa = get_addr_2_ptr(pframe);
break;
default: /* ToDs=1, FromDs=1 */
sa = GetAddr4Ptr(pframe);
@@ -320,7 +320,7 @@ static inline unsigned char *get_hdr_bssid(unsigned char *pframe)
sa = GetAddr3Ptr(pframe);
break;
case 0x01: /* ToDs=0, FromDs=1 */
- sa = GetAddr2Ptr(pframe);
+ sa = get_addr_2_ptr(pframe);
break;
case 0x02: /* ToDs=1, FromDs=0 */
sa = get_addr_1_ptr(pframe);
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 55/56] staging: r8188eu: rename camelcase GetAddr3Ptr to get_addr_3_ptr
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Christophe JAILLET, Zameer Manji, linux-staging,
linux-kernel
Rename camel case macro GetAddr3Ptr into get_addr_3_ptr
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 18 +++++++++---------
drivers/staging/r8188eu/core/rtw_recv.c | 4 ++--
drivers/staging/r8188eu/core/rtw_wlan_util.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 10 +++++-----
4 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 491cba1a007a..00c56ae5d1b1 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -627,7 +627,7 @@ unsigned int OnBeacon(struct adapter *padapter, struct recv_frame *precv_frame)
return _SUCCESS;
}
- if (!memcmp(GetAddr3Ptr(pframe), get_my_bssid(&pmlmeinfo->network), ETH_ALEN)) {
+ if (!memcmp(get_addr_3_ptr(pframe), get_my_bssid(&pmlmeinfo->network), ETH_ALEN)) {
if (pmlmeinfo->state & WIFI_FW_AUTH_NULL) {
/* we should update current network before auth, or some IE is wrong */
pbss = kmalloc(sizeof(struct wlan_bssid_ex), GFP_ATOMIC);
@@ -1490,7 +1490,7 @@ unsigned int OnDeAuth(struct adapter *padapter, struct recv_frame *precv_frame)
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
/* check A3 */
- if (!(!memcmp(GetAddr3Ptr(pframe), get_my_bssid(&pmlmeinfo->network), ETH_ALEN)))
+ if (!(!memcmp(get_addr_3_ptr(pframe), get_my_bssid(&pmlmeinfo->network), ETH_ALEN)))
return _SUCCESS;
if (pwdinfo->rx_invitereq_info.scan_op_ch_only) {
@@ -1546,10 +1546,10 @@ unsigned int OnDeAuth(struct adapter *padapter, struct recv_frame *precv_frame)
netdev_dbg(padapter->pnetdev,
"sta recv deauth reason code(%d) sta:%pM, ignore = %d\n",
- reason, GetAddr3Ptr(pframe), ignore_received_deauth);
+ reason, get_addr_3_ptr(pframe), ignore_received_deauth);
if (!ignore_received_deauth)
- receive_disconnect(padapter, GetAddr3Ptr(pframe), reason);
+ receive_disconnect(padapter, get_addr_3_ptr(pframe), reason);
}
pmlmepriv->LinkDetectInfo.bBusyTraffic = false;
return _SUCCESS;
@@ -1565,7 +1565,7 @@ unsigned int OnDisassoc(struct adapter *padapter, struct recv_frame *precv_frame
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
/* check A3 */
- if (!(!memcmp(GetAddr3Ptr(pframe), get_my_bssid(&pmlmeinfo->network), ETH_ALEN)))
+ if (!(!memcmp(get_addr_3_ptr(pframe), get_my_bssid(&pmlmeinfo->network), ETH_ALEN)))
return _SUCCESS;
if (pwdinfo->rx_invitereq_info.scan_op_ch_only) {
@@ -1604,9 +1604,9 @@ unsigned int OnDisassoc(struct adapter *padapter, struct recv_frame *precv_frame
} else {
netdev_dbg(padapter->pnetdev,
"ap recv disassoc reason code(%d) sta:%pM\n",
- reason, GetAddr3Ptr(pframe));
+ reason, get_addr_3_ptr(pframe));
- receive_disconnect(padapter, GetAddr3Ptr(pframe), reason);
+ receive_disconnect(padapter, get_addr_3_ptr(pframe), reason);
}
pmlmepriv->LinkDetectInfo.bBusyTraffic = false;
return _SUCCESS;
@@ -4966,7 +4966,7 @@ void issue_asocrsp(struct adapter *padapter, unsigned short status, struct sta_i
memcpy((void *)get_addr_1_ptr(pwlanhdr), pstat->hwaddr, ETH_ALEN);
memcpy((void *)get_addr_2_ptr(pwlanhdr), myid(&padapter->eeprompriv), ETH_ALEN);
- memcpy((void *)GetAddr3Ptr(pwlanhdr), get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
+ memcpy((void *)get_addr_3_ptr(pwlanhdr), get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
@@ -6324,7 +6324,7 @@ u8 collect_bss_info(struct adapter *padapter, struct recv_frame *precv_frame, st
memcpy(bssid->MacAddress, get_addr_2_ptr(pframe), ETH_ALEN);
} else {
bssid->InfrastructureMode = Ndis802_11IBSS;
- memcpy(bssid->MacAddress, GetAddr3Ptr(pframe), ETH_ALEN);
+ memcpy(bssid->MacAddress, get_addr_3_ptr(pframe), ETH_ALEN);
}
if (val16 & BIT(4))
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 3aad16af3a60..a6ee7dd9b3e4 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -633,7 +633,7 @@ int sta2sta_data_frame(struct adapter *adapter, struct recv_frame *precv_frame,
} else if (check_fwstate(pmlmepriv, WIFI_MP_STATE)) {
memcpy(pattrib->dst, get_addr_1_ptr(ptr), ETH_ALEN);
memcpy(pattrib->src, get_addr_2_ptr(ptr), ETH_ALEN);
- memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN);
+ memcpy(pattrib->bssid, get_addr_3_ptr(ptr), ETH_ALEN);
memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
@@ -720,7 +720,7 @@ static int ap2sta_data_frame(
check_fwstate(pmlmepriv, _FW_LINKED)) {
memcpy(pattrib->dst, get_addr_1_ptr(ptr), ETH_ALEN);
memcpy(pattrib->src, get_addr_2_ptr(ptr), ETH_ALEN);
- memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN);
+ memcpy(pattrib->bssid, get_addr_3_ptr(ptr), ETH_ALEN);
memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging/r8188eu/core/rtw_wlan_util.c
index 5f4c9d61511e..8f0cd8c85391 100644
--- a/drivers/staging/r8188eu/core/rtw_wlan_util.c
+++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c
@@ -844,7 +844,7 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
int group_cipher = 0, pairwise_cipher = 0, is_8021x = 0;
unsigned char *pbuf;
u32 wpa_ielen = 0;
- u8 *pbssid = GetAddr3Ptr(pframe);
+ u8 *pbssid = get_addr_3_ptr(pframe);
u32 hidden_ssid = 0;
struct HT_info_element *pht_info = NULL;
struct ieee80211_ht_cap *pht_cap = NULL;
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 9ce45d31e16d..9d8d69cc562a 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -254,7 +254,7 @@ enum WIFI_REG_DOMAIN {
#define get_addr_2_ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 10))
-#define GetAddr3Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 16))
+#define get_addr_3_ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 16))
#define GetAddr4Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 24))
@@ -279,10 +279,10 @@ static inline unsigned char *get_da(unsigned char *pframe)
da = get_addr_1_ptr(pframe);
break;
case 0x02: /* ToDs=1, FromDs=0 */
- da = GetAddr3Ptr(pframe);
+ da = get_addr_3_ptr(pframe);
break;
default: /* ToDs=1, FromDs=1 */
- da = GetAddr3Ptr(pframe);
+ da = get_addr_3_ptr(pframe);
break;
}
return da;
@@ -298,7 +298,7 @@ static inline unsigned char *get_sa(unsigned char *pframe)
sa = get_addr_2_ptr(pframe);
break;
case 0x01: /* ToDs=0, FromDs=1 */
- sa = GetAddr3Ptr(pframe);
+ sa = get_addr_3_ptr(pframe);
break;
case 0x02: /* ToDs=1, FromDs=0 */
sa = get_addr_2_ptr(pframe);
@@ -317,7 +317,7 @@ static inline unsigned char *get_hdr_bssid(unsigned char *pframe)
switch (to_fr_ds) {
case 0x00: /* ToDs=0, FromDs=0 */
- sa = GetAddr3Ptr(pframe);
+ sa = get_addr_3_ptr(pframe);
break;
case 0x01: /* ToDs=0, FromDs=1 */
sa = get_addr_2_ptr(pframe);
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 55/56] staging: r8188eu: rename camelcase GetAddr3Ptr to get_addr_3_ptr
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Dan Carpenter, Saurav Girepunje,
Ivan Safonov, Christophe JAILLET, Zameer Manji, linux-staging,
linux-kernel
Rename camel case macro GetAddr3Ptr into get_addr_3_ptr
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 18 +++++++++---------
drivers/staging/r8188eu/core/rtw_recv.c | 4 ++--
drivers/staging/r8188eu/core/rtw_wlan_util.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 10 +++++-----
4 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 491cba1a007a..00c56ae5d1b1 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -627,7 +627,7 @@ unsigned int OnBeacon(struct adapter *padapter, struct recv_frame *precv_frame)
return _SUCCESS;
}
- if (!memcmp(GetAddr3Ptr(pframe), get_my_bssid(&pmlmeinfo->network), ETH_ALEN)) {
+ if (!memcmp(get_addr_3_ptr(pframe), get_my_bssid(&pmlmeinfo->network), ETH_ALEN)) {
if (pmlmeinfo->state & WIFI_FW_AUTH_NULL) {
/* we should update current network before auth, or some IE is wrong */
pbss = kmalloc(sizeof(struct wlan_bssid_ex), GFP_ATOMIC);
@@ -1490,7 +1490,7 @@ unsigned int OnDeAuth(struct adapter *padapter, struct recv_frame *precv_frame)
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
/* check A3 */
- if (!(!memcmp(GetAddr3Ptr(pframe), get_my_bssid(&pmlmeinfo->network), ETH_ALEN)))
+ if (!(!memcmp(get_addr_3_ptr(pframe), get_my_bssid(&pmlmeinfo->network), ETH_ALEN)))
return _SUCCESS;
if (pwdinfo->rx_invitereq_info.scan_op_ch_only) {
@@ -1546,10 +1546,10 @@ unsigned int OnDeAuth(struct adapter *padapter, struct recv_frame *precv_frame)
netdev_dbg(padapter->pnetdev,
"sta recv deauth reason code(%d) sta:%pM, ignore = %d\n",
- reason, GetAddr3Ptr(pframe), ignore_received_deauth);
+ reason, get_addr_3_ptr(pframe), ignore_received_deauth);
if (!ignore_received_deauth)
- receive_disconnect(padapter, GetAddr3Ptr(pframe), reason);
+ receive_disconnect(padapter, get_addr_3_ptr(pframe), reason);
}
pmlmepriv->LinkDetectInfo.bBusyTraffic = false;
return _SUCCESS;
@@ -1565,7 +1565,7 @@ unsigned int OnDisassoc(struct adapter *padapter, struct recv_frame *precv_frame
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
/* check A3 */
- if (!(!memcmp(GetAddr3Ptr(pframe), get_my_bssid(&pmlmeinfo->network), ETH_ALEN)))
+ if (!(!memcmp(get_addr_3_ptr(pframe), get_my_bssid(&pmlmeinfo->network), ETH_ALEN)))
return _SUCCESS;
if (pwdinfo->rx_invitereq_info.scan_op_ch_only) {
@@ -1604,9 +1604,9 @@ unsigned int OnDisassoc(struct adapter *padapter, struct recv_frame *precv_frame
} else {
netdev_dbg(padapter->pnetdev,
"ap recv disassoc reason code(%d) sta:%pM\n",
- reason, GetAddr3Ptr(pframe));
+ reason, get_addr_3_ptr(pframe));
- receive_disconnect(padapter, GetAddr3Ptr(pframe), reason);
+ receive_disconnect(padapter, get_addr_3_ptr(pframe), reason);
}
pmlmepriv->LinkDetectInfo.bBusyTraffic = false;
return _SUCCESS;
@@ -4966,7 +4966,7 @@ void issue_asocrsp(struct adapter *padapter, unsigned short status, struct sta_i
memcpy((void *)get_addr_1_ptr(pwlanhdr), pstat->hwaddr, ETH_ALEN);
memcpy((void *)get_addr_2_ptr(pwlanhdr), myid(&padapter->eeprompriv), ETH_ALEN);
- memcpy((void *)GetAddr3Ptr(pwlanhdr), get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
+ memcpy((void *)get_addr_3_ptr(pwlanhdr), get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
set_seq_num(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
@@ -6324,7 +6324,7 @@ u8 collect_bss_info(struct adapter *padapter, struct recv_frame *precv_frame, st
memcpy(bssid->MacAddress, get_addr_2_ptr(pframe), ETH_ALEN);
} else {
bssid->InfrastructureMode = Ndis802_11IBSS;
- memcpy(bssid->MacAddress, GetAddr3Ptr(pframe), ETH_ALEN);
+ memcpy(bssid->MacAddress, get_addr_3_ptr(pframe), ETH_ALEN);
}
if (val16 & BIT(4))
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 3aad16af3a60..a6ee7dd9b3e4 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -633,7 +633,7 @@ int sta2sta_data_frame(struct adapter *adapter, struct recv_frame *precv_frame,
} else if (check_fwstate(pmlmepriv, WIFI_MP_STATE)) {
memcpy(pattrib->dst, get_addr_1_ptr(ptr), ETH_ALEN);
memcpy(pattrib->src, get_addr_2_ptr(ptr), ETH_ALEN);
- memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN);
+ memcpy(pattrib->bssid, get_addr_3_ptr(ptr), ETH_ALEN);
memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
@@ -720,7 +720,7 @@ static int ap2sta_data_frame(
check_fwstate(pmlmepriv, _FW_LINKED)) {
memcpy(pattrib->dst, get_addr_1_ptr(ptr), ETH_ALEN);
memcpy(pattrib->src, get_addr_2_ptr(ptr), ETH_ALEN);
- memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN);
+ memcpy(pattrib->bssid, get_addr_3_ptr(ptr), ETH_ALEN);
memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging/r8188eu/core/rtw_wlan_util.c
index 5f4c9d61511e..8f0cd8c85391 100644
--- a/drivers/staging/r8188eu/core/rtw_wlan_util.c
+++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c
@@ -844,7 +844,7 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
int group_cipher = 0, pairwise_cipher = 0, is_8021x = 0;
unsigned char *pbuf;
u32 wpa_ielen = 0;
- u8 *pbssid = GetAddr3Ptr(pframe);
+ u8 *pbssid = get_addr_3_ptr(pframe);
u32 hidden_ssid = 0;
struct HT_info_element *pht_info = NULL;
struct ieee80211_ht_cap *pht_cap = NULL;
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 9ce45d31e16d..9d8d69cc562a 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -254,7 +254,7 @@ enum WIFI_REG_DOMAIN {
#define get_addr_2_ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 10))
-#define GetAddr3Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 16))
+#define get_addr_3_ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 16))
#define GetAddr4Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 24))
@@ -279,10 +279,10 @@ static inline unsigned char *get_da(unsigned char *pframe)
da = get_addr_1_ptr(pframe);
break;
case 0x02: /* ToDs=1, FromDs=0 */
- da = GetAddr3Ptr(pframe);
+ da = get_addr_3_ptr(pframe);
break;
default: /* ToDs=1, FromDs=1 */
- da = GetAddr3Ptr(pframe);
+ da = get_addr_3_ptr(pframe);
break;
}
return da;
@@ -298,7 +298,7 @@ static inline unsigned char *get_sa(unsigned char *pframe)
sa = get_addr_2_ptr(pframe);
break;
case 0x01: /* ToDs=0, FromDs=1 */
- sa = GetAddr3Ptr(pframe);
+ sa = get_addr_3_ptr(pframe);
break;
case 0x02: /* ToDs=1, FromDs=0 */
sa = get_addr_2_ptr(pframe);
@@ -317,7 +317,7 @@ static inline unsigned char *get_hdr_bssid(unsigned char *pframe)
switch (to_fr_ds) {
case 0x00: /* ToDs=0, FromDs=0 */
- sa = GetAddr3Ptr(pframe);
+ sa = get_addr_3_ptr(pframe);
break;
case 0x01: /* ToDs=0, FromDs=1 */
sa = get_addr_2_ptr(pframe);
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 56/56] staging: r8188eu: rename camelcase GetAddr4Ptr to get_addr_4_ptr
2022-01-03 19:01 ` Alberto Merciai
@ 2022-01-03 19:02 ` Alberto Merciai
-1 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Yang Li,
Zameer Manji, linux-staging, linux-kernel
Rename camel case macro GetAddr4Ptr into get_addr_4_ptr
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 9d8d69cc562a..d464938a12b6 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -256,7 +256,7 @@ enum WIFI_REG_DOMAIN {
#define get_addr_3_ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 16))
-#define GetAddr4Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 24))
+#define get_addr_4_ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 24))
static inline int IS_MCAST(unsigned char *da)
{
@@ -304,7 +304,7 @@ static inline unsigned char *get_sa(unsigned char *pframe)
sa = get_addr_2_ptr(pframe);
break;
default: /* ToDs=1, FromDs=1 */
- sa = GetAddr4Ptr(pframe);
+ sa = get_addr_4_ptr(pframe);
break;
}
return sa;
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* [PATCH 56/56] staging: r8188eu: rename camelcase GetAddr4Ptr to get_addr_4_ptr
@ 2022-01-03 19:02 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-03 19:02 UTC (permalink / raw)
Cc: alb3rt0.m3rciai, linuxfancy, Larry Finger, Phillip Potter,
Greg Kroah-Hartman, Michael Straube, Martin Kaiser,
Fabio M. De Francesco, Nathan Chancellor, Dan Carpenter,
Saurav Girepunje, Ivan Safonov, Christophe JAILLET, Yang Li,
Zameer Manji, linux-staging, linux-kernel
Rename camel case macro GetAddr4Ptr into get_addr_4_ptr
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
---
drivers/staging/r8188eu/include/wifi.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 9d8d69cc562a..d464938a12b6 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -256,7 +256,7 @@ enum WIFI_REG_DOMAIN {
#define get_addr_3_ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 16))
-#define GetAddr4Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 24))
+#define get_addr_4_ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 24))
static inline int IS_MCAST(unsigned char *da)
{
@@ -304,7 +304,7 @@ static inline unsigned char *get_sa(unsigned char *pframe)
sa = get_addr_2_ptr(pframe);
break;
default: /* ToDs=1, FromDs=1 */
- sa = GetAddr4Ptr(pframe);
+ sa = get_addr_4_ptr(pframe);
break;
}
return sa;
--
2.25.1
^ permalink raw reply related [flat|nested] 118+ messages in thread
* Re: [PATCH 01/56] staging: r8188eu: add parenthesis to macro SetToDs
2022-01-03 19:01 ` Alberto Merciai
(?)
@ 2022-01-06 14:12 ` Greg Kroah-Hartman
-1 siblings, 0 replies; 118+ messages in thread
From: Greg Kroah-Hartman @ 2022-01-06 14:12 UTC (permalink / raw)
To: Alberto Merciai
Cc: linuxfancy, Larry Finger, Phillip Potter, Michael Straube,
Martin Kaiser, Fabio M. De Francesco, Nathan Chancellor,
Dan Carpenter, Saurav Girepunje, Ivan Safonov, Yang Li,
Christophe JAILLET, Zameer Manji, linux-staging, linux-kernel
On Mon, Jan 03, 2022 at 08:01:36PM +0100, Alberto Merciai wrote:
> Enclose in parenthesis complex macro SetToDs
Why?
You are saying what you are doing (which is easy to see by looking at
the patch itself), but not _why_ you are doing this. Please read the
documentation in the kernel source tree for how to write a good kernel
commit message. It is in the section entitled "The canonical patch
format" in the kernel file, Documentation/SubmittingPatches.
> Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
> ---
> drivers/staging/r8188eu/include/wifi.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
> index 7cbc7015e90f..f16e9f44babe 100644
> --- a/drivers/staging/r8188eu/include/wifi.h
> +++ b/drivers/staging/r8188eu/include/wifi.h
> @@ -164,7 +164,7 @@ enum WIFI_REG_DOMAIN {
> #define _ORDER_ BIT(15)
>
> #define SetToDs(pbuf) \
> - *(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_)
> + (*(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_))
The cast here should not be happening as odds are it hides other endian
issues.
Also the name is horrid, but really, the lack of () is is fine as-is as
it is used as a "function call" in the driver. Wrapping it in () does
nothing to it at all from what I can tell so this change isn't even
helping :(
Why not fix this up properly by replacing the places where it is called
with the code here instead?
For example, these lines:
else if ((pmlmeinfo->state & 0x03) == WIFI_FW_STATION_STATE)
SetToDs(fctrl);
would be:
else if ((pmlmeinfo->state & 0x03) == WIFI_FW_STATION_STATE)
fctrl |= cpu_to_le16(_TO_DS_);
Isn't that now much more readable and easier to understand what is
happening here?
Then there's the crazyness of a bit field being called "_TO_DS_", but
that can be cleaned up later...
I hate to reject patch 1 of a 50+ patch series, but next time try
sending smaller series so that you don't have to redo a bunch of work
like now has to happen here (the same comments apply to your other ()
patches in this series.)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 118+ messages in thread
* Re: [PATCH 02/56] staging: r8188eu: rename camelcase SetToDs to set_to_ds
2022-01-03 19:01 ` Alberto Merciai
(?)
@ 2022-01-06 14:13 ` Greg Kroah-Hartman
-1 siblings, 0 replies; 118+ messages in thread
From: Greg Kroah-Hartman @ 2022-01-06 14:13 UTC (permalink / raw)
To: Alberto Merciai
Cc: linuxfancy, Larry Finger, Phillip Potter, Michael Straube,
Martin Kaiser, Fabio M. De Francesco, Nathan Chancellor,
Dan Carpenter, Saurav Girepunje, Ivan Safonov,
Christophe JAILLET, Zameer Manji, linux-staging, linux-kernel
On Mon, Jan 03, 2022 at 08:01:37PM +0100, Alberto Merciai wrote:
> Rename camel case macro SetToDs into set_to_ds.
>
> Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
> ---
> drivers/staging/r8188eu/core/rtw_mlme_ext.c | 4 ++--
> drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
> drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 2 +-
> drivers/staging/r8188eu/include/wifi.h | 2 +-
> 4 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> index 0aa958f20cd6..6c784134d957 100644
> --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> @@ -5409,7 +5409,7 @@ static int _issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned
> if ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE)
> SetFrDs(fctrl);
> else if ((pmlmeinfo->state & 0x03) == WIFI_FW_STATION_STATE)
> - SetToDs(fctrl);
> + set_to_ds(fctrl);
This patch will not be needed at all if you take my advice from patch
01.
The goal is to make readable code, not just rename things to pass a perl
script's suggestions :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 118+ messages in thread
* Re: [PATCH 03/56] staging: r8188eu: remove dead macro ClearToDs
2022-01-03 19:01 ` Alberto Merciai
(?)
@ 2022-01-06 14:14 ` Greg Kroah-Hartman
2022-01-08 13:53 ` Alberto Merciai
-1 siblings, 1 reply; 118+ messages in thread
From: Greg Kroah-Hartman @ 2022-01-06 14:14 UTC (permalink / raw)
To: Alberto Merciai
Cc: linuxfancy, Larry Finger, Phillip Potter, Michael Straube,
Martin Kaiser, Fabio M. De Francesco, Nathan Chancellor,
Dan Carpenter, Saurav Girepunje, Ivan Safonov, Yang Li,
Christophe JAILLET, Zameer Manji, linux-staging, linux-kernel
On Mon, Jan 03, 2022 at 08:01:38PM +0100, Alberto Merciai wrote:
> Remove dead macro ClearToDs.
"dead"? Was it ever alive?
I think you mean to write something like:
The #define ClearToDs() is not used anywhere in the r8188eu
driver, so it can be safely removed.
right?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 118+ messages in thread
* Re: [PATCH 03/56] staging: r8188eu: remove dead macro ClearToDs
2022-01-06 14:14 ` Greg Kroah-Hartman
@ 2022-01-08 13:53 ` Alberto Merciai
0 siblings, 0 replies; 118+ messages in thread
From: Alberto Merciai @ 2022-01-08 13:53 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linuxfancy, Larry Finger, Phillip Potter, Michael Straube,
Martin Kaiser, Fabio M. De Francesco, Nathan Chancellor,
Dan Carpenter, Saurav Girepunje, Ivan Safonov, Yang Li,
Christophe JAILLET, Zameer Manji, linux-staging, linux-kernel
> > Remove dead macro ClearToDs.
>
> "dead"? Was it ever alive?
>
> I think you mean to write something like:
>
> The #define ClearToDs() is not used anywhere in the r8188eu
> driver, so it can be safely removed.
>
> right?
Yes, correct.
Thanks,
Alberto
^ permalink raw reply [flat|nested] 118+ messages in thread
end of thread, other threads:[~2022-01-08 13:53 UTC | newest]
Thread overview: 118+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-03 19:01 [PATCH 00/56] staging: r8188eu: wifi.h macros refactoring Alberto Merciai
2022-01-03 19:01 ` Alberto Merciai
2022-01-03 19:01 ` [PATCH 01/56] staging: r8188eu: add parenthesis to macro SetToDs Alberto Merciai
2022-01-03 19:01 ` 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-03 19:01 ` 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-03 19:01 ` 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 ` 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 ` Alberto Merciai
2022-01-03 19:01 ` [PATCH 06/56] staging: r8188eu: remove dead macro ClearFrDs Alberto Merciai
2022-01-03 19:01 ` Alberto Merciai
2022-01-03 19:01 ` [PATCH 07/56] staging: r8188eu: add parenthesis to macro SetMFrag Alberto Merciai
2022-01-03 19:01 ` 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 ` 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 ` 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 ` 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 ` 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 ` 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 ` Alberto Merciai
2022-01-03 19:01 ` [PATCH 14/56] staging: r8188eu: remove dead macro SetRetry Alberto Merciai
2022-01-03 19:01 ` 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 ` Alberto Merciai
2022-01-03 19:01 ` [PATCH 16/56] staging: r8188eu: remove dead macro ClearRetry Alberto Merciai
2022-01-03 19:01 ` 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 ` 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 ` 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 ` Alberto Merciai
2022-01-03 19:01 ` [PATCH 20/56] staging: r8188eu: remove dead macro ClearPwrMgt Alberto Merciai
2022-01-03 19:01 ` 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 ` 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 ` 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 ` Alberto Merciai
2022-01-03 19:01 ` [PATCH 24/56] staging: r8188eu: remove dead macro ClearMData Alberto Merciai
2022-01-03 19:01 ` 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 ` 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 ` 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 ` Alberto Merciai
2022-01-03 19:02 ` [PATCH 28/56] staging: r8188eu: remove dead macro ClearPrivacy Alberto Merciai
2022-01-03 19:02 ` 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 ` 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 ` Alberto Merciai
2022-01-03 19:02 ` [PATCH 31/56] staging: r8188eu: remove dead macro SetFrameType Alberto Merciai
2022-01-03 19:02 ` 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 ` 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 ` 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 ` 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 ` Alberto Merciai
2022-01-03 19:02 ` [PATCH 36/56] staging: r8188eu: remove dead macro GetTupleCache Alberto Merciai
2022-01-03 19:02 ` Alberto Merciai
2022-01-03 19:02 ` [PATCH 37/56] staging: r8188eu: remove dead macro SetFragNum Alberto Merciai
2022-01-03 19:02 ` 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 ` 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 ` 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 ` 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 ` 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 ` 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 ` 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 ` 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 ` Alberto Merciai
2022-01-03 19:02 ` [PATCH 46/56] staging: r8188eu: remove dead macro GetTid Alberto Merciai
2022-01-03 19:02 ` 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 ` 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 ` 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 ` 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 ` Alberto Merciai
2022-01-03 19:02 ` [PATCH 51/56] staging: r8188eu: remove dead macro SetAMsdu Alberto Merciai
2022-01-03 19:02 ` 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
2022-01-03 19:02 ` [PATCH 53/56] staging: r8188eu: rename camelcase GetAddr1Ptr to get_addr_1_ptr Alberto Merciai
2022-01-03 19:02 ` Alberto Merciai
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 ` 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 ` Alberto Merciai
2022-01-03 19:02 ` [PATCH 56/56] staging: r8188eu: rename camelcase GetAddr4Ptr to get_addr_4_ptr Alberto Merciai
2022-01-03 19:02 ` Alberto Merciai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.