staging: rtl8188eu: remove all DBG_88E calls from core/rtw_ieee80211.c
authorPhillip Potter <phil@philpotter.co.uk>
Tue, 15 Jun 2021 00:14:46 +0000 (01:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Jun 2021 11:56:10 +0000 (13:56 +0200)
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@philpotter.co.uk>
Link: https://lore.kernel.org/r/20210615001507.1171-8-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_ieee80211.c

index e88ebe8..7a0544c 100644 (file)
@@ -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)