[PATCH 07/28] staging: rtl8188eu: remove all DBG_88E calls from core/rtw_ieee80211.c

From: Phillip Potter
Date: Mon Jun 14 2021 - 20:16:00 EST


Remove all DBG_88E calls from core/rtw_ieee80211.c as this macro is
unnecessary, and many of these calls are dubious in terms of necessity.
Removing all calls will ultimately allow the removal of the macro
itself.

Signed-off-by: Phillip Potter <phil@xxxxxxxxxxxxxxxx>
---
.../staging/rtl8188eu/core/rtw_ieee80211.c | 38 +++----------------
1 file changed, 5 insertions(+), 33 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c
index e88ebe8891fc..7a0544cba4bf 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c
@@ -686,13 +686,8 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
* OUI of the vendor. The following byte is used a vendor specific
* sub-type.
*/
- if (elen < 4) {
- if (show_errors) {
- DBG_88E("short vendor specific information element ignored (len=%lu)\n",
- (unsigned long)elen);
- }
+ if (elen < 4)
return -1;
- }

oui = RTW_GET_BE24(pos);
switch (oui) {
@@ -711,11 +706,9 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
elems->wpa_ie_len = elen;
break;
case WME_OUI_TYPE: /* this is a Wi-Fi WME info. element */
- if (elen < 5) {
- DBG_88E("short WME information element ignored (len=%lu)\n",
- (unsigned long)elen);
+ if (elen < 5)
return -1;
- }
+
switch (pos[4]) {
case WME_OUI_SUBTYPE_INFORMATION_ELEMENT:
case WME_OUI_SUBTYPE_PARAMETER_ELEMENT:
@@ -727,8 +720,6 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
elems->wme_tspec_len = elen;
break;
default:
- DBG_88E("unknown WME information element ignored (subtype=%d len=%lu)\n",
- pos[4], (unsigned long)elen);
return -1;
}
break;
@@ -738,8 +729,6 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
elems->wps_ie_len = elen;
break;
default:
- DBG_88E("Unknown Microsoft information element ignored (type=%d len=%lu)\n",
- pos[3], (unsigned long)elen);
return -1;
}
break;
@@ -751,14 +740,10 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
elems->vendor_ht_cap_len = elen;
break;
default:
- DBG_88E("Unknown Broadcom information element ignored (type=%d len=%lu)\n",
- pos[3], (unsigned long)elen);
return -1;
}
break;
default:
- DBG_88E("unknown vendor specific information element ignored (vendor OUI %3phC len=%lu)\n",
- pos, (unsigned long)elen);
return -1;
}
return 0;
@@ -789,13 +774,8 @@ enum parse_res rtw_ieee802_11_parse_elems(u8 *start, uint len,
elen = *pos++;
left -= 2;

- if (elen > left) {
- if (show_errors) {
- DBG_88E("IEEE 802.11 element parse failed (id=%d elen=%d left=%lu)\n",
- id, elen, (unsigned long)left);
- }
+ if (elen > left)
return ParseFailed;
- }

switch (id) {
case WLAN_EID_SSID:
@@ -876,10 +856,6 @@ enum parse_res rtw_ieee802_11_parse_elems(u8 *start, uint len,
break;
default:
unknown++;
- if (!show_errors)
- break;
- DBG_88E("IEEE 802.11 element parse ignored unknown element (id=%d elen=%d)\n",
- id, elen);
break;
}
left -= elen;
@@ -905,12 +881,8 @@ void rtw_macaddr_cfg(u8 *mac_addr)
ether_addr_copy(mac, mac_addr);
}

- if (is_broadcast_ether_addr(mac) || is_zero_ether_addr(mac)) {
+ if (is_broadcast_ether_addr(mac) || is_zero_ether_addr(mac))
eth_random_addr(mac_addr);
- DBG_88E("MAC Address from efuse error, assign random one !!!\n");
- }
-
- DBG_88E("%s MAC Address = %pM\n", __func__, mac_addr);
}

static int rtw_get_cipher_info(struct wlan_network *pnetwork)
--
2.30.2