[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210524135105.5550-3-chouhan.shreyansh630@gmail.com>
Date: Mon, 24 May 2021 19:21:04 +0530
From: Shreyansh Chouhan <chouhan.shreyansh630@...il.com>
To: gregkh@...uxfoundation.org, ross.schm.dev@...il.com,
straube.linux@...il.com, fabioaiuto83@...il.com
Cc: Shreyansh Chouhan <chouhan.shreyansh630@...il.com>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: [PATCH 2/3] staging: rtl8723bs: remove unnecessary braces from conditionals
Removed the braces from if else statements in core/rtw_wlan_util.c since
the previous commit (6a257dd6de516573) caused all conditional blocks to
have a single statement in the function check_assoc_AP.
Signed-off-by: Shreyansh Chouhan <chouhan.shreyansh630@...il.com>
---
.../staging/rtl8723bs/core/rtw_wlan_util.c | 35 +++++++++----------
1 file changed, 17 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index 36e515a7ab5c..dd965c810967 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -1532,25 +1532,24 @@ unsigned char check_assoc_AP(u8 *pframe, uint len)
switch (pIE->ElementID) {
case WLAN_EID_VENDOR_SPECIFIC:
- if ((!memcmp(pIE->data, ARTHEROS_OUI1, 3)) || (!memcmp(pIE->data, ARTHEROS_OUI2, 3))) {
+ if ((!memcmp(pIE->data, ARTHEROS_OUI1, 3)) || (!memcmp(pIE->data, ARTHEROS_OUI2, 3)))
return HT_IOT_PEER_ATHEROS;
- } else if ((!memcmp(pIE->data, BROADCOM_OUI1, 3)) ||
- (!memcmp(pIE->data, BROADCOM_OUI2, 3)) ||
- (!memcmp(pIE->data, BROADCOM_OUI3, 3))) {
- return HT_IOT_PEER_BROADCOM;
- } else if (!memcmp(pIE->data, MARVELL_OUI, 3)) {
- return HT_IOT_PEER_MARVELL;
- } else if (!memcmp(pIE->data, RALINK_OUI, 3)) {
- return HT_IOT_PEER_RALINK;
- } else if (!memcmp(pIE->data, CISCO_OUI, 3)) {
- return HT_IOT_PEER_CISCO;
- } else if (!memcmp(pIE->data, REALTEK_OUI, 3)) {
- return get_realtek_assoc_AP_vender(pIE);
- } else if (!memcmp(pIE->data, AIRGOCAP_OUI, 3)) {
- return HT_IOT_PEER_AIRGO;
- } else {
- break;
- }
+ else if ((!memcmp(pIE->data, BROADCOM_OUI1, 3)) ||
+ (!memcmp(pIE->data, BROADCOM_OUI2, 3)) ||
+ (!memcmp(pIE->data, BROADCOM_OUI3, 3)))
+ return HT_IOT_PEER_BROADCOM;
+ else if (!memcmp(pIE->data, MARVELL_OUI, 3))
+ return HT_IOT_PEER_MARVELL;
+ else if (!memcmp(pIE->data, RALINK_OUI, 3))
+ return HT_IOT_PEER_RALINK;
+ else if (!memcmp(pIE->data, CISCO_OUI, 3))
+ return HT_IOT_PEER_CISCO;
+ else if (!memcmp(pIE->data, REALTEK_OUI, 3))
+ return get_realtek_assoc_AP_vender(pIE);
+ else if (!memcmp(pIE->data, AIRGOCAP_OUI, 3))
+ return HT_IOT_PEER_AIRGO;
+ else
+ break;
default:
break;
--
2.31.1
Powered by blists - more mailing lists