From nobody Sun Jun 28 02:50:42 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4580C433EF for ; Wed, 16 Feb 2022 01:07:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245274AbiBPBH1 (ORCPT ); Tue, 15 Feb 2022 20:07:27 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:52992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245264AbiBPBHZ (ORCPT ); Tue, 15 Feb 2022 20:07:25 -0500 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18D74C7916 for ; Tue, 15 Feb 2022 17:07:13 -0800 (PST) Received: by mail-wr1-x42a.google.com with SMTP id f3so666880wrh.7 for ; Tue, 15 Feb 2022 17:07:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philpotter-co-uk.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/AmcKAI7S4CQwFP9krb3eotpVDb6rQ2naruRhtvDnjM=; b=ZQ2i3XHrfP/PCkNXEU/wMocjfDNRHM8WPUvo4DjL17KrQKnlEWyQXduWgtpxhjmvxI eXm6+YbS1qmucRMD9r8c4dTGLobdgdnT5v8xPN/8d8sKkzQnjIoqhSjgFhgxA7mNE+fj aPehSKNj9DuNaCDR8LXPabwJyrW5FR2M1HFvnSRMZ3iJg9YGWvFTcY5EctyUYUNAa4xJ 25QBrZ/Yyp0Wqe8PatKuJVBrYtK8V+qduQEVQeEVp7t8W67iBdemRBont2yhNb7Xx/J/ t5iJsal00Fi8agueBRTzKPxqiibH4nHz497NXReOILptHhLPj2gY1y6ELupRP5rg28dv aOxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/AmcKAI7S4CQwFP9krb3eotpVDb6rQ2naruRhtvDnjM=; b=6uRPqDxKANdgsYshO3i3PQ1FqbQur6F6dQ1lnQ+IM8zPV05ayMsOKn9gpVkaUJIweM vyv6rCSquz1rQjkVF0r37OHJGhKDTH5Oxc7HVc25B2/KvbsSVyhDlK39ncJ1ruNTPH7m w78hVVmr9XZv2hVPbEkrIEGglZJKnZbQHPI+0wMHDX8E8oBx1oWnwk8z2RB6gPes1H3c p+ul701e0PKHSbp58bN/sbtP02tCZPxCDFeN/ww0sL7DXS/skzvPObt6FWl1xdfqSmIW Rl0fcBbtfVfyJ31m7OqGD0qhGJ9dIe+a7MpB/aTTKT44d217h9QrdMg8TsKbSF9v3kCK 15TQ== X-Gm-Message-State: AOAM5312gHAlI+Y+ecUWVKjy8bGwzxHMM0X8ScJlVQROs1wEszr6QfIu X3ZB41fVgEtXZKkU1N7B65VoLA== X-Google-Smtp-Source: ABdhPJyzfn0LMXOINo64Ga1HiFahm9rJZenR7v5E9TqXbH2ICOIu19aG3E4u8Ir4EFLRlM8FpRcTqQ== X-Received: by 2002:a5d:4bc8:0:b0:1e4:a4a2:63b0 with SMTP id l8-20020a5d4bc8000000b001e4a4a263b0mr376575wrt.596.1644973631654; Tue, 15 Feb 2022 17:07:11 -0800 (PST) Received: from localhost.localdomain (3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.1.f.d.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:df16::3]) by smtp.gmail.com with ESMTPSA id m8sm10551185wms.4.2022.02.15.17.07.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 17:07:11 -0800 (PST) From: Phillip Potter To: gregkh@linuxfoundation.org Cc: dan.carpenter@oracle.com, Larry.Finger@lwfinger.net, straube.linux@gmail.com, martin@kaiser.cx, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, paskripkin@gmail.com Subject: [PATCH v2 01/15] staging: r8188eu: remove previously converted DBG_88E_LEVEL calls Date: Wed, 16 Feb 2022 01:06:55 +0000 Message-Id: <20220216010709.791-2-phil@philpotter.co.uk> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220216010709.791-1-phil@philpotter.co.uk> References: <20220216010709.791-1-phil@philpotter.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove all netdev_dbg and dev_dbg calls that were previously converted from DBG_88E_LEVEL. After some thought, it makes more sense to just entirely strip all of these calls, so that debugging code in the driver can be more consistent and useful going forwards. Signed-off-by: Phillip Potter --- drivers/staging/r8188eu/core/rtw_fw.c | 1 - drivers/staging/r8188eu/core/rtw_ioctl_set.c | 5 ---- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 28 -------------------- drivers/staging/r8188eu/core/rtw_pwrctrl.c | 8 ------ drivers/staging/r8188eu/core/rtw_xmit.c | 1 - drivers/staging/r8188eu/os_dep/ioctl_linux.c | 2 -- 6 files changed, 45 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_fw.c b/drivers/staging/r8188e= u/core/rtw_fw.c index f591b091b8af..ce0e4e3b21f9 100644 --- a/drivers/staging/r8188eu/core/rtw_fw.c +++ b/drivers/staging/r8188eu/core/rtw_fw.c @@ -243,7 +243,6 @@ static int load_firmware(struct rt_firmware *rtfw, stru= ct device *device) goto exit; } rtfw->size =3D fw->size; - dev_dbg(device, "!bUsedWoWLANFw, FmrmwareLen:%d+\n", rtfw->size); =20 exit: release_firmware(fw); diff --git a/drivers/staging/r8188eu/core/rtw_ioctl_set.c b/drivers/staging= /r8188eu/core/rtw_ioctl_set.c index c95ca471ae55..e7f35370b69c 100644 --- a/drivers/staging/r8188eu/core/rtw_ioctl_set.c +++ b/drivers/staging/r8188eu/core/rtw_ioctl_set.c @@ -110,8 +110,6 @@ u8 rtw_set_802_11_bssid(struct adapter *padapter, u8 *b= ssid) u32 cur_time =3D 0; struct mlme_priv *pmlmepriv =3D &padapter->mlmepriv; =20 - netdev_dbg(padapter->pnetdev, "set bssid:%pM\n", bssid); - if ((bssid[0] =3D=3D 0x00 && bssid[1] =3D=3D 0x00 && bssid[2] =3D=3D 0x00= && bssid[3] =3D=3D 0x00 && bssid[4] =3D=3D 0x00 && bssid[5] =3D=3D 0x00= ) || (bssid[0] =3D=3D 0xFF && bssid[1] =3D=3D 0xFF && bssid[2] =3D=3D 0xFF= && @@ -186,9 +184,6 @@ u8 rtw_set_802_11_ssid(struct adapter *padapter, struct= ndis_802_11_ssid *ssid) struct mlme_priv *pmlmepriv =3D &padapter->mlmepriv; struct wlan_network *pnetwork =3D &pmlmepriv->cur_network; =20 - netdev_dbg(padapter->pnetdev, "set ssid [%s] fw_state=3D0x%08x\n", - ssid->Ssid, get_fwstate(pmlmepriv)); - if (!padapter->hw_init_completed) { status =3D _FAIL; goto exit; diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/= r8188eu/core/rtw_mlme_ext.c index ceca6751cdee..6c354383c1d2 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -649,8 +649,6 @@ unsigned int OnBeacon(struct adapter *padapter, struct = recv_frame *precv_frame) if (psta) { ret =3D rtw_check_bcn_info(padapter, pframe, len); if (!ret) { - netdev_dbg(padapter->pnetdev, - "ap has changed, disconnect now\n"); receive_disconnect(padapter, pmlmeinfo->network.MacAddress, 0); return _SUCCESS; @@ -932,7 +930,6 @@ unsigned int OnAuthClient(struct adapter *padapter, str= uct recv_frame *precv_fra } =20 if (go2asoc) { - netdev_dbg(padapter->pnetdev, "auth success, start assoc\n"); start_clnt_assoc(padapter); return _SUCCESS; } @@ -1507,10 +1504,6 @@ unsigned int OnDeAuth(struct adapter *padapter, stru= ct recv_frame *precv_frame) struct sta_info *psta; struct sta_priv *pstapriv =3D &padapter->stapriv; =20 - netdev_dbg(padapter->pnetdev, - "ap recv deauth reason code(%d) sta:%pM\n", - reason, GetAddr2Ptr(pframe)); - psta =3D rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe)); if (psta) { u8 updated =3D 0; @@ -1545,10 +1538,6 @@ unsigned int OnDeAuth(struct adapter *padapter, stru= ct recv_frame *precv_frame) } } =20 - netdev_dbg(padapter->pnetdev, - "sta recv deauth reason code(%d) sta:%pM, ignore =3D %d\n", - reason, GetAddr3Ptr(pframe), ignore_received_deauth); - if (!ignore_received_deauth) receive_disconnect(padapter, GetAddr3Ptr(pframe), reason); } @@ -1582,10 +1571,6 @@ unsigned int OnDisassoc(struct adapter *padapter, st= ruct recv_frame *precv_frame struct sta_info *psta; struct sta_priv *pstapriv =3D &padapter->stapriv; =20 - netdev_dbg(padapter->pnetdev, - "ap recv disassoc reason code(%d) sta:%pM\n", - reason, GetAddr2Ptr(pframe)); - psta =3D rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe)); if (psta) { u8 updated =3D 0; @@ -1603,10 +1588,6 @@ unsigned int OnDisassoc(struct adapter *padapter, st= ruct recv_frame *precv_frame =20 return _SUCCESS; } else { - netdev_dbg(padapter->pnetdev, - "ap recv disassoc reason code(%d) sta:%pM\n", - reason, GetAddr3Ptr(pframe)); - receive_disconnect(padapter, GetAddr3Ptr(pframe), reason); } pmlmepriv->LinkDetectInfo.bBusyTraffic =3D false; @@ -6506,7 +6487,6 @@ void start_clnt_auth(struct adapter *padapter) /* For the Win8 P2P connection, it will be hard to have a successful conn= ection if this Wi-Fi doesn't connect to it. */ issue_deauth(padapter, (&pmlmeinfo->network)->MacAddress, WLAN_REASON_DEA= UTH_LEAVING); =20 - netdev_dbg(padapter->pnetdev, "start auth\n"); issue_auth(padapter, NULL, 0); =20 set_link_timer(pmlmeext, REAUTH_TO); @@ -7266,8 +7246,6 @@ void linked_status_chk(struct adapter *padapter) if (rx_chk =3D=3D _FAIL) { pmlmeext->retry++; if (pmlmeext->retry > rx_chk_limit) { - netdev_dbg(padapter->pnetdev, - "disconnect or roaming\n"); receive_disconnect(padapter, pmlmeinfo->network.MacAddress, WLAN_REASON_EXPIRATION_CHK); return; @@ -7793,9 +7771,6 @@ u8 setkey_hdl(struct adapter *padapter, u8 *pbuf) /* write cam */ ctrl =3D BIT(15) | ((pparm->algorithm) << 2) | pparm->keyid; =20 - netdev_dbg(padapter->pnetdev, - "set group key to hw: alg:%d(WEP40-1 WEP104-5 TKIP-2 AES-4) keyid:%d\= n", - pparm->algorithm, pparm->keyid); write_cam(padapter, pparm->keyid, ctrl, null_sta, pparm->key); =20 return H2C_SUCCESS; @@ -7824,9 +7799,6 @@ u8 set_stakey_hdl(struct adapter *padapter, u8 *pbuf) =20 cam_id =3D 4; =20 - netdev_dbg(padapter->pnetdev, - "set pairwise key to hw: alg:%d(WEP40-1 WEP104-5 TKIP-2 AES-4) camid:= %d\n", - pparm->algorithm, cam_id); if ((pmlmeinfo->state & 0x03) =3D=3D WIFI_FW_AP_STATE) { struct sta_info *psta; struct sta_priv *pstapriv =3D &padapter->stapriv; diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r= 8188eu/core/rtw_pwrctrl.c index 46e44aee587f..ff35685eaa12 100644 --- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c +++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c @@ -15,12 +15,6 @@ void ips_enter(struct adapter *padapter) =20 if (pxmit_priv->free_xmitbuf_cnt !=3D NR_XMITBUFF || pxmit_priv->free_xmit_extbuf_cnt !=3D NR_XMIT_EXTBUFF) { - netdev_dbg(padapter->pnetdev, - "There are some pkts to transmit\n"); - netdev_dbg(padapter->pnetdev, - "free_xmitbuf_cnt: %d, free_xmit_extbuf_cnt: %d\n", - pxmit_priv->free_xmitbuf_cnt, - pxmit_priv->free_xmit_extbuf_cnt); return; } =20 @@ -35,7 +29,6 @@ void ips_enter(struct adapter *padapter) DBG_88E("=3D=3D>ips_enter cnts:%d\n", pwrpriv->ips_enter_cnts); if (rf_off =3D=3D pwrpriv->change_rfpwrstate) { pwrpriv->bpower_saving =3D true; - netdev_dbg(padapter->pnetdev, "nolinked power save enter\n"); =20 if (pwrpriv->ips_mode =3D=3D IPS_LEVEL_2) pwrpriv->bkeepfwalive =3D true; @@ -68,7 +61,6 @@ int ips_leave(struct adapter *padapter) if (result =3D=3D _SUCCESS) { pwrpriv->rf_pwrstate =3D rf_on; } - netdev_dbg(padapter->pnetdev, "nolinked power save leave\n"); =20 if ((_WEP40_ =3D=3D psecuritypriv->dot11PrivacyAlgrthm) || (_WEP104_ =3D= =3D psecuritypriv->dot11PrivacyAlgrthm)) { DBG_88E("=3D=3D>%s, channel(%d), processing(%x)\n", __func__, padapter-= >mlmeextpriv.cur_channel, pwrpriv->bips_processing); diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r818= 8eu/core/rtw_xmit.c index f3e788e42b18..30714fee1921 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -460,7 +460,6 @@ static s32 update_attrib(struct adapter *padapter, stru= ct sk_buff *pkt, struct p } } } else if (0x888e =3D=3D pattrib->ether_type) { - netdev_dbg(padapter->pnetdev, "send eapol packet\n"); } =20 if ((pattrib->ether_type =3D=3D 0x888e) || (pattrib->dhcp_pkt =3D=3D 1)) diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging= /r8188eu/os_dep/ioctl_linux.c index f6a683cda614..3bb2714a6a54 100644 --- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c +++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c @@ -58,7 +58,6 @@ void rtw_indicate_wx_assoc_event(struct adapter *padapter) =20 memcpy(wrqu.ap_addr.sa_data, pmlmepriv->cur_network.network.MacAddress, E= TH_ALEN); =20 - netdev_dbg(padapter->pnetdev, "assoc success\n"); wireless_send_event(padapter->pnetdev, SIOCGIWAP, &wrqu, NULL); } =20 @@ -71,7 +70,6 @@ void rtw_indicate_wx_disassoc_event(struct adapter *padap= ter) wrqu.ap_addr.sa_family =3D ARPHRD_ETHER; memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN); =20 - netdev_dbg(padapter->pnetdev, "indicate disassoc\n"); wireless_send_event(padapter->pnetdev, SIOCGIWAP, &wrqu, NULL); } =20 --=20 2.34.1 From nobody Sun Jun 28 02:50:42 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D52BBC433EF for ; Wed, 16 Feb 2022 01:07:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240141AbiBPBHe (ORCPT ); Tue, 15 Feb 2022 20:07:34 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:53058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245268AbiBPBH0 (ORCPT ); Tue, 15 Feb 2022 20:07:26 -0500 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30ABBED941 for ; Tue, 15 Feb 2022 17:07:14 -0800 (PST) Received: by mail-wr1-x434.google.com with SMTP id w11so844484wra.4 for ; Tue, 15 Feb 2022 17:07:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philpotter-co-uk.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=p/TDwugZ5mbD8UvFyeCHWaqjYIqieiYST57lq5R6MpQ=; b=t0coWrJjZXKBN319xUcQkT35zOgyl6xHdBHml7zYue2Zbkyye6PGHxxnTVw5ISLsM/ euRpRiZ8qgSM3w5/tbGbP96dbOlX7ORtGf7ltNqSeNglntxfmZV6nR3+vb7dQvRKkvYI psUUSajLl+N291HnySOkBZLCg/Q8Omow9hE7S5pX/efYcazo5KU11fq+ofR7cOqASPgX bXClw89RGdkFIneTWa/AgPBesrrEuw0J/GU7NME7VAMuzS3iWaDMsVBSDCfxVVMlyOn0 Ox8zb/EPjAr/pJhZ/oiBcb/vQSW6IVMQMDXZhpC30wb6Cz1qsPipL4jLR+Bi7NcLhxqB nxjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=p/TDwugZ5mbD8UvFyeCHWaqjYIqieiYST57lq5R6MpQ=; b=1fPYeON91DPA9UykAWvf6aTQRIp3LaowNacmSt/GPxhpoOFSNe2xhw6GwtD8ITOhLk VEjfw8Qf1SWWlZlnpmndEa8TzEAr42upCIWJ6ldX185D/dDN8jTT/4p+DpoFdV2oN5YH Y2yGQgA6g7NEabVpj1jw6FhC+TSn7DEKBetbIadi3G05NZtLb6ofjymRyZEhneClIn0J JSfhQ7ax9JVssBYSbzNI/BHfC0ho0i3AcqnYkssu0q5VOZPxv6aRghJqUd3vZV2uVmqS EKpfUy1B7CMPm3MvWb8oGyQ3YE911vbzVZh66LOtADTpfsq2QeR5v3yL56Vxo6oioEaE jWxg== X-Gm-Message-State: AOAM5305g0OD3Jig3fBfZHEN+glF/+wjr+HEMY4va1dOKoqACR/uiPaA NmiSAXsslVUkaE+HYegL7Hk3Ig== X-Google-Smtp-Source: ABdhPJxAAsZYVai7pHXoOhjsMcrRQGpqIbNTJuP0wAWvTJvDYSGYmlYmq4fTYRzGN5yxl+9ZMAOyPg== X-Received: by 2002:a05:6000:1b04:b0:1e7:3a09:6468 with SMTP id f4-20020a0560001b0400b001e73a096468mr355713wrz.383.1644973632481; Tue, 15 Feb 2022 17:07:12 -0800 (PST) Received: from localhost.localdomain (3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.1.f.d.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:df16::3]) by smtp.gmail.com with ESMTPSA id m8sm10551185wms.4.2022.02.15.17.07.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 17:07:12 -0800 (PST) From: Phillip Potter To: gregkh@linuxfoundation.org Cc: dan.carpenter@oracle.com, Larry.Finger@lwfinger.net, straube.linux@gmail.com, martin@kaiser.cx, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, paskripkin@gmail.com Subject: [PATCH v2 02/15] staging: r8188eu: remove smaller sets of converted DBG_88E calls Date: Wed, 16 Feb 2022 01:06:56 +0000 Message-Id: <20220216010709.791-3-phil@philpotter.co.uk> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220216010709.791-1-phil@philpotter.co.uk> References: <20220216010709.791-1-phil@philpotter.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove all the smaller sets of dev_dbg/netdev_dbg/pr_debug calls that were previously converted from DBG_88E. After some thought, it makes more sense to just entirely strip all of these calls, so that debugging code in the driver can be more consistent and useful going forwards. Signed-off-by: Phillip Potter --- drivers/staging/r8188eu/core/rtw_ap.c | 65 ------------------- drivers/staging/r8188eu/core/rtw_cmd.c | 8 --- drivers/staging/r8188eu/core/rtw_ieee80211.c | 19 ------ drivers/staging/r8188eu/core/rtw_ioctl_set.c | 5 -- drivers/staging/r8188eu/core/rtw_iol.c | 6 -- drivers/staging/r8188eu/core/rtw_mlme.c | 57 +--------------- drivers/staging/r8188eu/core/rtw_security.c | 12 ---- drivers/staging/r8188eu/core/rtw_sta_mgt.c | 4 +- drivers/staging/r8188eu/core/rtw_xmit.c | 17 +---- .../staging/r8188eu/os_dep/usb_ops_linux.c | 12 ---- drivers/staging/r8188eu/os_dep/xmit_linux.c | 3 - 11 files changed, 4 insertions(+), 204 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_ap.c b/drivers/staging/r8188e= u/core/rtw_ap.c index 5e22b1baf9a5..505517dbbf8c 100644 --- a/drivers/staging/r8188eu/core/rtw_ap.c +++ b/drivers/staging/r8188eu/core/rtw_ap.c @@ -179,10 +179,6 @@ void expire_timeout_chk(struct adapter *padapter) list_del_init(&psta->auth_list); pstapriv->auth_list_cnt--; =20 - netdev_dbg(padapter->pnetdev, - "auth expire %6ph\n", - psta->hwaddr); - spin_unlock_bh(&pstapriv->auth_list_lock); =20 spin_lock_bh(&pstapriv->sta_hash_lock); @@ -250,19 +246,11 @@ void expire_timeout_chk(struct adapter *padapter) list_del_init(&psta->asoc_list); pstapriv->asoc_list_cnt--; =20 - netdev_dbg(padapter->pnetdev, - "asoc expire %pM, state =3D 0x%x\n", - (psta->hwaddr), psta->state); updated =3D ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVIN= G); } else { /* TODO: Aging mechanism to digest frames in sleep_q to avoid running o= ut of xmitframe */ if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt) && padapter->xmitpriv.free_xmitframe_cnt < (NR_XMITFRAME / pstapriv->a= soc_list_cnt / 2)) { - netdev_dbg(padapter->pnetdev, - "sta:%pM, sleepq_len:%u, free_xmitframe_cnt:%u, asoc_list_cnt:%u, = clear sleep_q\n", - (psta->hwaddr), psta->sleepq_len, - padapter->xmitpriv.free_xmitframe_cnt, - pstapriv->asoc_list_cnt); wakeup_sta_to_xmit(padapter, psta); } } @@ -292,25 +280,16 @@ void expire_timeout_chk(struct adapter *padapter) =20 psta->keep_alive_trycnt++; if (ret =3D=3D _SUCCESS) { - netdev_dbg(padapter->pnetdev, - "asoc check, sta(%pM) is alive\n", - (psta->hwaddr)); psta->expire_to =3D pstapriv->expire_to; psta->keep_alive_trycnt =3D 0; continue; } else if (psta->keep_alive_trycnt <=3D 3) { - netdev_dbg(padapter->pnetdev, - "ack check for asoc expire, keep_alive_trycnt =3D%d\n", - psta->keep_alive_trycnt); psta->expire_to =3D 1; continue; } =20 psta->keep_alive_trycnt =3D 0; =20 - netdev_dbg(padapter->pnetdev, - "asoc expire %pM, state =3D 0x%x\n", - (psta->hwaddr), psta->state); spin_lock_bh(&pstapriv->asoc_list_lock); list_del_init(&psta->asoc_list); pstapriv->asoc_list_cnt--; @@ -390,10 +369,6 @@ void add_RATid(struct adapter *padapter, struct sta_in= fo *psta, u8 rssi_level) =20 tx_ra_bitmap |=3D ((raid << 28) & 0xf0000000); =20 - netdev_dbg(padapter->pnetdev, - "mac_id:%d, raid:%d, bitmap =3D 0x%x, arg =3D 0x%x\n", - psta->mac_id, raid, tx_ra_bitmap, arg); - /* bitmap[0:27] =3D tx_rate_bitmap */ /* bitmap[28:31]=3D Rate Adaptive id */ /* arg[0:4] =3D macid */ @@ -408,9 +383,6 @@ void add_RATid(struct adapter *padapter, struct sta_inf= o *psta, u8 rssi_level) psta->init_rate =3D init_rate; =20 } else { - netdev_dbg(padapter->pnetdev, - "station aid %d exceed the max number\n", - psta->aid); } } =20 @@ -468,9 +440,6 @@ void update_bmc_sta(struct adapter *padapter) arg =3D psta->mac_id & 0x1f; arg |=3D BIT(7); tx_ra_bitmap |=3D ((raid << 28) & 0xf0000000); - netdev_dbg(padapter->pnetdev, - "mask =3D 0x%x, arg =3D 0x%x\n", - tx_ra_bitmap, arg); =20 /* bitmap[0:27] =3D tx_rate_bitmap */ /* bitmap[28:31]=3D Rate Adaptive id */ @@ -489,7 +458,6 @@ void update_bmc_sta(struct adapter *padapter) spin_unlock_bh(&psta->lock); =20 } else { - netdev_dbg(padapter->pnetdev, "add_RATid_bmc_sta error!\n"); } } =20 @@ -575,8 +543,6 @@ static void update_bcn_erpinfo_ie(struct adapter *padap= ter) unsigned char *p, *ie =3D pnetwork->IEs; u32 len =3D 0; =20 - netdev_dbg(padapter->pnetdev, "ERP_enable =3D %d\n", pmlmeinfo->ERP_enabl= e); - if (!pmlmeinfo->ERP_enable) return; =20 @@ -659,8 +625,6 @@ static void update_bcn_vendor_spec_ie(struct adapter *p= adapter, u8 *oui) update_bcn_wps_ie(padapter); else if (!memcmp(P2P_OUI, oui, 4)) update_bcn_p2p_ie(padapter); - else - netdev_dbg(padapter->pnetdev, "unknown/unused OUI type!\n"); } =20 void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx) @@ -723,10 +687,6 @@ static int rtw_ht_operation_update(struct adapter *pad= apter) if (pmlmepriv->htpriv.ht_option) return 0; =20 - netdev_dbg(padapter->pnetdev, - "current operation mode =3D 0x%X\n", - pmlmepriv->ht_op_mode); - if (!(pmlmepriv->ht_op_mode & HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT)= && pmlmepriv->num_sta_ht_no_gf) { pmlmepriv->ht_op_mode |=3D @@ -776,10 +736,6 @@ static int rtw_ht_operation_update(struct adapter *pad= apter) op_mode_changes++; } =20 - netdev_dbg(padapter->pnetdev, - "new operation mode =3D 0x%X changes =3D %d\n", - pmlmepriv->ht_op_mode, op_mode_changes); - return op_mode_changes; } =20 @@ -894,10 +850,6 @@ void bss_cap_update_on_sta_join(struct adapter *padapt= er, struct sta_info *psta) if (psta->flags & WLAN_STA_HT) { u16 ht_capab =3D le16_to_cpu(psta->htpriv.ht_cap.cap_info); =20 - netdev_dbg(padapter->pnetdev, - "HT: STA %pM HT Capabilities Info: 0x%04x\n", - (psta->hwaddr), ht_capab); - if (psta->no_ht_set) { psta->no_ht_set =3D 0; pmlmepriv->num_sta_no_ht--; @@ -908,9 +860,6 @@ void bss_cap_update_on_sta_join(struct adapter *padapte= r, struct sta_info *psta) psta->no_ht_gf_set =3D 1; pmlmepriv->num_sta_ht_no_gf++; } - netdev_dbg(padapter->pnetdev, - "STA %pM - no greenfield, num of non-gf stations %d\n", - (psta->hwaddr), pmlmepriv->num_sta_ht_no_gf); } =20 if ((ht_capab & IEEE80211_HT_CAP_SUP_WIDTH_20_40) =3D=3D 0) { @@ -918,9 +867,6 @@ void bss_cap_update_on_sta_join(struct adapter *padapte= r, struct sta_info *psta) psta->ht_20mhz_set =3D 1; pmlmepriv->num_sta_ht_20mhz++; } - netdev_dbg(padapter->pnetdev, - "STA %pM - 20 MHz HT, num of 20MHz HT STAs %d\n", - (psta->hwaddr), pmlmepriv->num_sta_ht_20mhz); } } else { if (!psta->no_ht_set) { @@ -928,9 +874,6 @@ void bss_cap_update_on_sta_join(struct adapter *padapte= r, struct sta_info *psta) pmlmepriv->num_sta_no_ht++; } if (pmlmepriv->htpriv.ht_option) { - netdev_dbg(padapter->pnetdev, - "STA %pM - no HT, num of non-HT stations %d\n", - (psta->hwaddr), pmlmepriv->num_sta_no_ht); } } =20 @@ -941,8 +884,6 @@ void bss_cap_update_on_sta_join(struct adapter *padapte= r, struct sta_info *psta) =20 /* update associated stations cap. */ associated_clients_update(padapter, beacon_updated); - - netdev_dbg(padapter->pnetdev, "updated =3D %d\n", beacon_updated); } =20 u8 bss_cap_update_on_sta_leave(struct adapter *padapter, struct sta_info *= psta) @@ -1005,8 +946,6 @@ u8 bss_cap_update_on_sta_leave(struct adapter *padapte= r, struct sta_info *psta) =20 /* update associated stations cap. */ =20 - netdev_dbg(padapter->pnetdev, "updated =3D %d\n", beacon_updated); - return beacon_updated; } =20 @@ -1201,10 +1140,6 @@ void stop_ap_mode(struct adapter *padapter) } spin_unlock_bh(&pacl_node_q->lock); =20 - netdev_dbg(padapter->pnetdev, - "free acl_node_queue, num =3D %d\n", - pacl_list->num); - rtw_sta_flush(padapter); =20 /* free_assoc_sta_resources */ diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188= eu/core/rtw_cmd.c index c7e8602d2097..0ef74eb47893 100644 --- a/drivers/staging/r8188eu/core/rtw_cmd.c +++ b/drivers/staging/r8188eu/core/rtw_cmd.c @@ -253,9 +253,6 @@ int rtw_cmd_thread(void *context) _next: if (padapter->bDriverStopped || padapter->bSurpriseRemoved) { - netdev_dbg(padapter->pnetdev, - "DriverStopped(%d) SurpriseRemoved(%d) break\n", - padapter->bDriverStopped, padapter->bSurpriseRemoved); break; } =20 @@ -574,8 +571,6 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wl= an_network *pnetwork) else padapter->pwrctrlpriv.smart_ps =3D padapter->registrypriv.smart_ps; =20 - netdev_dbg(padapter->pnetdev, "smart_ps =3D %d\n", padapter->pwrctrlpriv.= smart_ps); - pcmd->cmdsz =3D get_wlan_bssid_ex_sz(psecnetwork);/* get cmdsz before end= ian conversion */ =20 INIT_LIST_HEAD(&pcmd->list); @@ -944,9 +939,6 @@ static void rtl8188e_sreset_xmit_status_check(struct ad= apter *padapter) =20 txdma_status =3D rtw_read32(padapter, REG_TXDMA_STATUS); if (txdma_status !=3D 0x00) { - netdev_dbg(padapter->pnetdev, - "REG_TXDMA_STATUS: 0x%08x\n", - txdma_status); rtw_write32(padapter, REG_TXDMA_STATUS, txdma_status); } /* total xmit irp =3D 4 */ diff --git a/drivers/staging/r8188eu/core/rtw_ieee80211.c b/drivers/staging= /r8188eu/core/rtw_ieee80211.c index 25445f3ab4a3..c8998cb276be 100644 --- a/drivers/staging/r8188eu/core/rtw_ieee80211.c +++ b/drivers/staging/r8188eu/core/rtw_ieee80211.c @@ -655,8 +655,6 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos= , uint elen, * sub-type. */ if (elen < 4) { if (show_errors) { - pr_debug("short vendor specific information element ignored (len=3D%lu)= \n", - (unsigned long)elen); } return -1; } @@ -675,8 +673,6 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos= , uint elen, break; case WME_OUI_TYPE: /* this is a Wi-Fi WME info. element */ if (elen < 5) { - pr_debug("short WME information element ignored (len=3D%lu)\n", - (unsigned long)elen); return -1; } switch (pos[4]) { @@ -690,8 +686,6 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos= , uint elen, elems->wme_tspec_len =3D elen; break; default: - pr_debug("unknown WME information element ignored (subtype=3D%d len=3D= %lu)\n", - pos[4], (unsigned long)elen); return -1; } break; @@ -701,8 +695,6 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos= , uint elen, elems->wps_ie_len =3D elen; break; default: - pr_debug("Unknown Microsoft information element ignored (type=3D%d len= =3D%lu)\n", - pos[3], (unsigned long)elen); return -1; } break; @@ -714,14 +706,10 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *p= os, uint elen, elems->vendor_ht_cap_len =3D elen; break; default: - pr_debug("Unknown Broadcom information element ignored (type=3D%d len= =3D%lu)\n", - pos[3], (unsigned long)elen); return -1; } break; default: - pr_debug("unknown vendor specific information element ignored (vendor OU= I %02x:%02x:%02x len=3D%lu)\n", - pos[0], pos[1], pos[2], (unsigned long)elen); return -1; } return 0; @@ -754,8 +742,6 @@ enum parse_res rtw_ieee802_11_parse_elems(u8 *start, ui= nt len, =20 if (elen > left) { if (show_errors) { - pr_debug("IEEE 802.11 element parse failed (id=3D%d elen=3D%d left=3D%= lu)\n", - id, elen, (unsigned long)left); } return ParseFailed; } @@ -841,8 +827,6 @@ enum parse_res rtw_ieee802_11_parse_elems(u8 *start, ui= nt len, unknown++; if (!show_errors) break; - pr_debug("IEEE 802.11 element parse ignored unknown element (id=3D%d el= en=3D%d)\n", - id, elen); break; } left -=3D elen; @@ -892,10 +876,7 @@ void rtw_macaddr_cfg(u8 *mac_addr) =20 if (is_broadcast_ether_addr(mac) || is_zero_ether_addr(mac)) { eth_random_addr(mac_addr); - pr_debug("MAC Address from efuse error, assign random one !!!\n"); } - - pr_debug("MAC Address =3D %pM\n", mac_addr); } =20 /** diff --git a/drivers/staging/r8188eu/core/rtw_ioctl_set.c b/drivers/staging= /r8188eu/core/rtw_ioctl_set.c index e7f35370b69c..4b78e42d180d 100644 --- a/drivers/staging/r8188eu/core/rtw_ioctl_set.c +++ b/drivers/staging/r8188eu/core/rtw_ioctl_set.c @@ -120,8 +120,6 @@ u8 rtw_set_802_11_bssid(struct adapter *padapter, u8 *b= ssid) =20 spin_lock_bh(&pmlmepriv->lock); =20 - netdev_dbg(padapter->pnetdev, "Set BSSID under fw_state =3D 0x%08x\n", - get_fwstate(pmlmepriv)); if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)) goto handle_tkip_countermeasure; else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) @@ -191,8 +189,6 @@ u8 rtw_set_802_11_ssid(struct adapter *padapter, struct= ndis_802_11_ssid *ssid) =20 spin_lock_bh(&pmlmepriv->lock); =20 - netdev_dbg(padapter->pnetdev, "Set SSID under fw_state =3D 0x%08x\n", - get_fwstate(pmlmepriv)); if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)) { goto handle_tkip_countermeasure; } else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) { @@ -359,7 +355,6 @@ u8 rtw_set_802_11_bssid_list_scan(struct adapter *padap= ter, struct ndis_802_11_s res =3D true; } else { if (rtw_is_scan_deny(padapter)) { - netdev_dbg(padapter->pnetdev, "scan deny\n"); indicate_wx_scan_complete_event(padapter); return _SUCCESS; } diff --git a/drivers/staging/r8188eu/core/rtw_iol.c b/drivers/staging/r8188= eu/core/rtw_iol.c index f5f03160759c..5f73413a4511 100644 --- a/drivers/staging/r8188eu/core/rtw_iol.c +++ b/drivers/staging/r8188eu/core/rtw_iol.c @@ -12,15 +12,11 @@ struct xmit_frame *rtw_IOL_accquire_xmit_frame(struct a= dapter *adapter) =20 xmit_frame =3D rtw_alloc_xmitframe(pxmitpriv); if (!xmit_frame) { - netdev_dbg(adapter->pnetdev, - "rtw_alloc_xmitframe return null\n"); return NULL; } =20 xmitbuf =3D rtw_alloc_xmitbuf(pxmitpriv); if (!xmitbuf) { - netdev_dbg(adapter->pnetdev, - "rtw_alloc_xmitbuf return null\n"); rtw_free_xmitframe(pxmitpriv, xmit_frame); return NULL; } @@ -51,8 +47,6 @@ int rtw_IOL_append_cmds(struct xmit_frame *xmit_frame, u8= *IOL_cmds, u32 cmd_len =20 /* check if the io_buf can accommodate new cmds */ if (ori_len + cmd_len + 8 > MAX_XMITBUF_SZ) { - pr_debug("%u is larger than MAX_XMITBUF_SZ:%u, can't accommodate new cmd= s\n", - ori_len + cmd_len + 8, MAX_XMITBUF_SZ); return _FAIL; } =20 diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r818= 8eu/core/rtw_mlme.c index 557f6b96e99c..d7494d820756 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme.c +++ b/drivers/staging/r8188eu/core/rtw_mlme.c @@ -611,9 +611,6 @@ static int rtw_is_desired_network(struct adapter *adapt= er, struct wlan_network * } =20 if ((desired_encmode !=3D Ndis802_11EncryptionDisabled) && (privacy =3D= =3D 0)) { - netdev_dbg(adapter->pnetdev, - "desired_encmode: %d, privacy: %d\n", - desired_encmode, privacy); bselected =3D false; } =20 @@ -725,9 +722,6 @@ void rtw_surveydone_event_callback(struct adapter *adap= ter, u8 *pbuf) _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING); rtw_indicate_connect(adapter); } else { - netdev_dbg(adapter->pnetdev, - "try_to_join, but select scanning queue fail, to_roaming:%d\n", - pmlmepriv->to_roaming); if (rtw_to_roaming(adapter) !=3D 0) { if (--pmlmepriv->to_roaming =3D=3D 0 || _SUCCESS !=3D rtw_sitesurvey_cmd(adapter, &pmlmepriv->assoc_ssid,= 1, NULL, 0)) { @@ -1225,10 +1219,6 @@ void rtw_stadel_event_callback(struct adapter *adapt= er, u8 *pbuf) else mac_id =3D pstadel->mac_id; =20 - netdev_dbg(adapter->pnetdev, - "(mac_id=3D%d)=3D%pM\n", - mac_id, pstadel->macaddr); - if (mac_id >=3D 0) { u16 media_status; media_status =3D (mac_id << 8) | 0; /* MACID|OPMODE:0 means disconnect= */ @@ -1318,8 +1308,6 @@ void _rtw_join_timeout_handler (struct adapter *adapt= er) struct mlme_priv *pmlmepriv =3D &adapter->mlmepriv; int do_join_r; =20 - netdev_dbg(adapter->pnetdev, "fw_state=3D%x\n", get_fwstate(pmlmepriv)); - if (adapter->bDriverStopped || adapter->bSurpriseRemoved) return; =20 @@ -1329,19 +1317,12 @@ void _rtw_join_timeout_handler (struct adapter *ada= pter) while (1) { pmlmepriv->to_roaming--; if (rtw_to_roaming(adapter) !=3D 0) { /* try another */ - netdev_dbg(adapter->pnetdev, - "try another roaming\n"); do_join_r =3D rtw_do_join(adapter); if (_SUCCESS !=3D do_join_r) { - netdev_dbg(adapter->pnetdev, - "roaming do_join return %d\n", - do_join_r); continue; } break; } else { - netdev_dbg(adapter->pnetdev, - "We've tried roaming but failed\n"); rtw_indicate_disconnect(adapter); break; } @@ -1362,7 +1343,6 @@ void rtw_scan_timeout_handler (struct adapter *adapte= r) { struct mlme_priv *pmlmepriv =3D &adapter->mlmepriv; =20 - netdev_dbg(adapter->pnetdev, "fw_state=3D%x\n", get_fwstate(pmlmepriv)); spin_lock_bh(&pmlmepriv->lock); _clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY); spin_unlock_bh(&pmlmepriv->lock); @@ -1467,15 +1447,6 @@ static int rtw_check_join_candidate(struct mlme_priv= *pmlmepriv updated =3D true; } if (updated) { - netdev_dbg(adapter->pnetdev, - "[by_bssid:%u][assoc_ssid:%s]new candidate: %s(%pM rssi:%d\n", - pmlmepriv->assoc_by_bssid, - pmlmepriv->assoc_ssid.Ssid, - (*candidate)->network.Ssid.Ssid, - (*candidate)->network.MacAddress, - (int)(*candidate)->network.Rssi); - netdev_dbg(adapter->pnetdev, - "[to_roaming:%u]\n", rtw_to_roaming(adapter)); } =20 exit: @@ -1513,21 +1484,13 @@ int rtw_select_and_join_from_scanned_queue(struct m= lme_priv *pmlmepriv) rtw_check_join_candidate(pmlmepriv, &candidate, pnetwork); } if (!candidate) { - netdev_dbg(adapter->pnetdev, - "return _FAIL(candidate=3D=3DNULL)\n"); ret =3D _FAIL; goto exit; } else { - netdev_dbg(adapter->pnetdev, "candidate: %s(%pM ch:%u)\n", - candidate->network.Ssid.Ssid, candidate->network.MacAddress, - candidate->network.Configuration.DSConfig); } =20 /* check for situation of _FW_LINKED */ if (check_fwstate(pmlmepriv, _FW_LINKED)) { - netdev_dbg(adapter->pnetdev, - "_FW_LINKED while ask_for_joinbss!!!\n"); - rtw_disassoc_cmd(adapter, 0, true); rtw_indicate_disconnect(adapter); rtw_free_assoc_resources(adapter, 0); @@ -1537,9 +1500,6 @@ int rtw_select_and_join_from_scanned_queue(struct mlm= e_priv *pmlmepriv) if (supp_ant_div) { u8 cur_ant; GetHalDefVar8188EUsb(adapter, HAL_DEF_CURRENT_ANTENNA, &cur_ant); - netdev_dbg(adapter->pnetdev, "Opt_Ant_(%s), cur_Ant(%s)\n", - (candidate->network.PhyInfo.Optimum_antenna =3D=3D 2) ? "A" : "B", - (cur_ant =3D=3D 2) ? "A" : "B"); } =20 ret =3D rtw_joinbss_cmd(adapter, candidate); @@ -1611,10 +1571,6 @@ int rtw_set_key(struct adapter *adapter, struct secu= rity_priv *psecuritypriv, in psetkeyparm->keyid =3D (u8)keyid;/* 0~3 */ psetkeyparm->set_tx =3D set_tx; pmlmepriv->key_mask |=3D BIT(psetkeyparm->keyid); - netdev_dbg(adapter->pnetdev, - "algorithm(%x), keyid(%x), key_mask(%x)\n", - psetkeyparm->algorithm, psetkeyparm->keyid, - pmlmepriv->key_mask); =20 switch (psetkeyparm->algorithm) { case _WEP40_: @@ -2005,7 +1961,7 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 *= pie, uint ie_len) /* Config SM Power Save setting */ pmlmeinfo->SM_PS =3D (le16_to_cpu(pmlmeinfo->HT_caps.u.HT_cap_element.HT_= caps_info) & 0x0C) >> 2; if (pmlmeinfo->SM_PS =3D=3D WLAN_HT_CAP_SM_PS_STATIC) - netdev_dbg(padapter->pnetdev, "WLAN_HT_CAP_SM_PS_STATIC\n"); + ; =20 /* Config current HT Protection mode. */ pmlmeinfo->HT_protection =3D pmlmeinfo->HT_info.infos[1] & 0x3; @@ -2040,7 +1996,6 @@ void rtw_issue_addbareq_cmd(struct adapter *padapter,= struct xmit_frame *pxmitfr issued |=3D (phtpriv->candidate_tid_bitmap >> priority) & 0x1; =20 if (0 =3D=3D issued) { - netdev_dbg(padapter->pnetdev, "p=3D%d\n", priority); psta->htpriv.candidate_tid_bitmap |=3D BIT((u8)priority); rtw_addbareq_cmd(padapter, (u8)priority, pattrib->ra); } @@ -2068,11 +2023,6 @@ void _rtw_roaming(struct adapter *padapter, struct w= lan_network *tgt_network) pnetwork =3D &pmlmepriv->cur_network; =20 if (0 < rtw_to_roaming(padapter)) { - netdev_dbg(padapter->pnetdev, - "roaming from %s(%pM length:%d\n", - pnetwork->network.Ssid.Ssid, - pnetwork->network.MacAddress, - pnetwork->network.Ssid.SsidLength); memcpy(&pmlmepriv->assoc_ssid, &pnetwork->network.Ssid, sizeof(struct nd= is_802_11_ssid)); =20 pmlmepriv->assoc_by_bssid =3D false; @@ -2082,16 +2032,11 @@ void _rtw_roaming(struct adapter *padapter, struct = wlan_network *tgt_network) if (_SUCCESS =3D=3D do_join_r) { break; } else { - netdev_dbg(padapter->pnetdev, - "roaming do_join return %d\n", - do_join_r); pmlmepriv->to_roaming--; =20 if (0 < pmlmepriv->to_roaming) { continue; } else { - netdev_dbg(padapter->pnetdev, - "-to roaming fail, indicate_disconnect\n"); rtw_indicate_disconnect(padapter); break; } diff --git a/drivers/staging/r8188eu/core/rtw_security.c b/drivers/staging/= r8188eu/core/rtw_security.c index 4e93c720c1b6..fdd2dbf65eb7 100644 --- a/drivers/staging/r8188eu/core/rtw_security.c +++ b/drivers/staging/r8188eu/core/rtw_security.c @@ -545,8 +545,6 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, struct r= ecv_frame *precvframe) if (is_multicast_ether_addr(prxattrib->ra)) { if (!psecuritypriv->binstallGrpkey) { res =3D _FAIL; - netdev_dbg(padapter->pnetdev, - "rx bc/mc packets, but didn't install group key!\n"); goto exit; } prwskey =3D psecuritypriv->dot118021XGrpKey[prxattrib->key_index].skey; @@ -1330,10 +1328,6 @@ static int aes_decipher(struct adapter *padapter, u8= *key, uint hdrlen, /* compare the mic */ for (i =3D 0; i < 8; i++) { if (pframe[hdrlen + 8 + plen - 8 + i] !=3D message[hdrlen + 8 + plen - 8= + i]) { - netdev_dbg(padapter->pnetdev, - "mic check error mic[%d]: pframe(%x)!=3Dmessage(%x)\n", - i, pframe[hdrlen + 8 + plen - 8 + i], - message[hdrlen + 8 + plen - 8 + i]); res =3D _FAIL; } } @@ -1361,16 +1355,10 @@ u32 rtw_aes_decrypt(struct adapter *padapter, struc= t recv_frame *precvframe) /* in concurrent we should use sw descrypt in group key, so we remove = this message */ if (!psecuritypriv->binstallGrpkey) { res =3D _FAIL; - netdev_dbg(padapter->pnetdev, - "rx bc/mc packets, but didn't install group key!\n"); goto exit; } prwskey =3D psecuritypriv->dot118021XGrpKey[prxattrib->key_index].skey; if (psecuritypriv->dot118021XGrpKeyid !=3D prxattrib->key_index) { - netdev_dbg(padapter->pnetdev, - "not match packet_index=3D%d, install_index=3D%d\n", - prxattrib->key_index, - psecuritypriv->dot118021XGrpKeyid); res =3D _FAIL; goto exit; } diff --git a/drivers/staging/r8188eu/core/rtw_sta_mgt.c b/drivers/staging/r= 8188eu/core/rtw_sta_mgt.c index 79b49a13fe61..1fb9b6cc7eda 100644 --- a/drivers/staging/r8188eu/core/rtw_sta_mgt.c +++ b/drivers/staging/r8188eu/core/rtw_sta_mgt.c @@ -104,7 +104,7 @@ inline int rtw_stainfo_offset(struct sta_priv *stapriv,= struct sta_info *sta) int offset =3D (((u8 *)sta) - stapriv->pstainfo_buf) / sizeof(struct sta_= info); =20 if (!stainfo_offset_valid(offset)) - pr_debug("invalid offset(%d), out of range!!!", offset); + ; =20 return offset; } @@ -112,7 +112,7 @@ inline int rtw_stainfo_offset(struct sta_priv *stapriv,= struct sta_info *sta) inline struct sta_info *rtw_get_stainfo_by_offset(struct sta_priv *stapriv= , int offset) { if (!stainfo_offset_valid(offset)) - pr_debug("invalid offset(%d), out of range!!!", offset); + ; =20 return (struct sta_info *)(stapriv->pstainfo_buf + offset * sizeof(struct= sta_info)); } diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r818= 8eu/core/rtw_xmit.c index 30714fee1921..7d616a409c0c 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -371,7 +371,6 @@ u8 qos_acm(u8 acm_mask, u8 priority) change_priority =3D 5; break; default: - pr_debug("invalid pattrib->priority: %d!!!\n", priority); break; } =20 @@ -889,7 +888,6 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, st= ruct sk_buff *pkt, struct return _FAIL; =20 if (!pxmitframe->buf_addr) { - netdev_dbg(padapter->pnetdev, "buf_addr =3D=3D NULL\n"); return _FAIL; } =20 @@ -900,8 +898,6 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, st= ruct sk_buff *pkt, struct mem_start =3D pbuf_start + hw_hdr_offset; =20 if (rtw_make_wlanhdr(padapter, mem_start, pattrib) =3D=3D _FAIL) { - netdev_dbg(padapter->pnetdev, - "rtw_make_wlanhdr fail; drop pkt\n"); res =3D _FAIL; goto exit; } @@ -998,8 +994,6 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, st= ruct sk_buff *pkt, struct } =20 if (xmitframe_addmic(padapter, pxmitframe) =3D=3D _FAIL) { - netdev_dbg(padapter->pnetdev, - "xmitframe_addmic(padapter, pxmitframe) =3D=3D _FAIL\n"); res =3D _FAIL; goto exit; } @@ -1130,7 +1124,6 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_pr= iv *pxmitpriv) /* pxmitbuf->ext_tag =3D true; */ =20 if (pxmitbuf->sctx) { - pr_debug("pxmitbuf->sctx is not NULL\n"); rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_BUF_ALLOC); } } @@ -1185,7 +1178,6 @@ struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *= pxmitpriv) pxmitpriv->free_xmitbuf_cnt--; pxmitbuf->priv_data =3D NULL; if (pxmitbuf->sctx) { - pr_debug("pxmitbuf->sctx is not NULL\n"); rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_BUF_ALLOC); } } @@ -1203,7 +1195,6 @@ s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, str= uct xmit_buf *pxmitbuf) return _FAIL; =20 if (pxmitbuf->sctx) { - pr_debug("pxmitbuf->sctx is not NULL\n"); rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_BUF_FREE); } =20 @@ -1472,7 +1463,6 @@ s32 rtw_xmit_classifier(struct adapter *padapter, str= uct xmit_frame *pxmitframe) =20 if (!psta) { res =3D _FAIL; - netdev_dbg(padapter->pnetdev, "psta =3D=3D NULL\n"); goto exit; } =20 @@ -1718,8 +1708,6 @@ s32 rtw_xmit(struct adapter *padapter, struct sk_buff= **ppkt) =20 pxmitframe =3D rtw_alloc_xmitframe(pxmitpriv); if (!pxmitframe) { - netdev_dbg(padapter->pnetdev, - "DBG_TX_DROP_FRAME no more pxmitframe\n"); return -1; } =20 @@ -2144,7 +2132,6 @@ int rtw_sctx_wait(struct submit_ctx *sctx) if (!wait_for_completion_timeout(&sctx->done, expire)) { /* timeout, do something?? */ status =3D RTW_SCTX_DONE_TIMEOUT; - pr_debug("timeout\n"); } else { status =3D sctx->status; } @@ -2174,7 +2161,7 @@ void rtw_sctx_done_err(struct submit_ctx **sctx, int = status) { if (*sctx) { if (rtw_sctx_chk_waring_status(status)) - pr_debug("status:%d\n", status); + ; (*sctx)->status =3D status; complete(&((*sctx)->done)); *sctx =3D NULL; @@ -2198,6 +2185,4 @@ void rtw_ack_tx_done(struct xmit_priv *pxmitpriv, int= status) =20 if (pxmitpriv->ack_tx) rtw_sctx_done_err(&pack_tx_ops, status); - else - pr_debug("ack_tx not set\n"); } diff --git a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c b/drivers/stagi= ng/r8188eu/os_dep/usb_ops_linux.c index d75933c73946..82e680abcd61 100644 --- a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c @@ -63,32 +63,21 @@ static void usb_write_port_complete(struct urb *purb, s= truct pt_regs *regs) =20 if (padapter->bSurpriseRemoved || padapter->bDriverStopped || padapter->bWritePortCancel) { - netdev_dbg(padapter->pnetdev, - "TX Warning! bDriverStopped(%d) OR bSurpriseRemoved(%d)\n", - padapter->bDriverStopped, padapter->bSurpriseRemoved); - netdev_dbg(padapter->pnetdev, - "TX Warning! bWritePortCancel(%d) pxmitbuf->ext_tag(%x)\n", - padapter->bReadPortCancel, pxmitbuf->ext_tag); - goto check_completion; } =20 if (purb->status) { - netdev_dbg(padapter->pnetdev, "status(%d)\n", purb->status); if (purb->status =3D=3D -EINPROGRESS) { goto check_completion; } else if (purb->status =3D=3D -ENOENT) { - netdev_dbg(padapter->pnetdev, "-ENOENT\n"); goto check_completion; } else if (purb->status =3D=3D -ECONNRESET) { - netdev_dbg(padapter->pnetdev, "-ECONNRESET\n"); goto check_completion; } else if (purb->status =3D=3D -ESHUTDOWN) { padapter->bDriverStopped =3D true; goto check_completion; } else if ((purb->status !=3D -EPIPE) && (purb->status !=3D -EPROTO)) { padapter->bSurpriseRemoved =3D true; - netdev_dbg(padapter->pnetdev, "bSurpriseRemoved =3D true\n"); =20 goto check_completion; } @@ -167,7 +156,6 @@ u32 rtw_write_port(struct adapter *padapter, u32 addr, = u32 cnt, u8 *wmem) status =3D usb_submit_urb(purb, GFP_ATOMIC); if (status) { rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_WRITE_PORT_ERR); - netdev_dbg(padapter->pnetdev, "usb_write_port, status =3D %d\n", status); =20 switch (status) { case -ENODEV: diff --git a/drivers/staging/r8188eu/os_dep/xmit_linux.c b/drivers/staging/= r8188eu/os_dep/xmit_linux.c index 7287897b3f65..6032831364c4 100644 --- a/drivers/staging/r8188eu/os_dep/xmit_linux.c +++ b/drivers/staging/r8188eu/os_dep/xmit_linux.c @@ -79,7 +79,6 @@ int rtw_os_xmit_resource_alloc(struct adapter *padapter, = struct xmit_buf *pxmitb for (i =3D 0; i < 8; i++) { pxmitbuf->pxmit_urb[i] =3D usb_alloc_urb(0, GFP_KERNEL); if (!pxmitbuf->pxmit_urb[i]) { - netdev_dbg(padapter->pnetdev, "pxmitbuf->pxmit_urb[i]=3D=3DNULL"); return _FAIL; } } @@ -188,14 +187,12 @@ static int rtw_mlcst2unicst(struct adapter *padapter,= struct sk_buff *skb) memcpy(newskb->data, psta->hwaddr, 6); res =3D rtw_xmit(padapter, &newskb); if (res < 0) { - netdev_dbg(padapter->pnetdev, "rtw_xmit() return error!\n"); pxmitpriv->tx_drop++; dev_kfree_skb_any(newskb); } else { pxmitpriv->tx_pkts++; } } else { - netdev_dbg(padapter->pnetdev, "skb_copy() failed!\n"); pxmitpriv->tx_drop++; =20 spin_unlock_bh(&pstapriv->asoc_list_lock); --=20 2.34.1 From nobody Sun Jun 28 02:50:42 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C7B6C433FE for ; Wed, 16 Feb 2022 01:07:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245303AbiBPBHi (ORCPT ); Tue, 15 Feb 2022 20:07:38 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:53198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245264AbiBPBH2 (ORCPT ); Tue, 15 Feb 2022 20:07:28 -0500 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CC9AC6836 for ; Tue, 15 Feb 2022 17:07:15 -0800 (PST) Received: by mail-wm1-x32c.google.com with SMTP id n8so279326wms.3 for ; Tue, 15 Feb 2022 17:07:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philpotter-co-uk.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XFGZy8ThiinWc6PWDmNQOV91AZCSxdikWfRq8CGSK00=; b=Oe2VFX5a6VqbAuMSKGTApfHHupl6ZEn5YQw19VEKcImEoPsXlEKA/k6+aUOa3qmy4F balWvWdXFxyjcnnDeYfODF0iFpo+1jaxOXSqqWlHoPRsqqW/Kk6ThtOCZFchYB+/RhTb Gh8HtjMyBW2pMX1xGIRtzFRKi9LWlNnjcp3C21P/Cmu9L4ql9nfD1jLAp2AhhQk9FQyP NgxM27Lz/OwIr0jai+iVY41yqQJ9XyC70WifyJdIb/kIOLqg2R2/qCFqde4HHSZER+c3 oynpYnwekbQA+5ddJiIH4fII3vazsja+Tbc1fDr1/Ib9E3p1XXGih0AwouGpAuhKnYuD /Q3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XFGZy8ThiinWc6PWDmNQOV91AZCSxdikWfRq8CGSK00=; b=AdtVnV8MAkJECn0hdzxA0Zw9xZk1CRMzSjwiylvaumxY9pvzp5iZbuNUVT0sjLcDTM OA/H+lc0d2zQsxKtdejMAXvfX2B3k5RvNcDvJS4M4FnJ+A24ByXHwx3468AUWCDYzSOA ItJiZ3u9DiF1+3xlU71ob5J1Hh1ktZcK7xT7xMp9xLSnh8CLMmBUbwUl/naLCztWVl6o uvyL2sziImCTlpfuiLSgsfAuHP5y+xPK2ymkKLxQAVzEKnbiij6XdvsVPDAQgf8Ef4mp /SiT748YvOzj1ZaDIrPIyAHfCPyXcNNHIUGxBf0hDhlZrwaxDGxmY0J8ia8KIHi+CcgR XE3A== X-Gm-Message-State: AOAM531W+4nAyBgPGHsGmcigxhwy/Njfhg0f/fYkJIGIocGFslRUwUIN GolmzelM9zJgiH3Dxg9wJXHa/Q== X-Google-Smtp-Source: ABdhPJwnRGXg/YuN9GT9HiMROuMm2eOXpmJFagCEuw3EiTFwXnVKd6Q1Q8v+dQ8CJsW7PaliUOZPwQ== X-Received: by 2002:a1c:7419:0:b0:37b:b96e:81a6 with SMTP id p25-20020a1c7419000000b0037bb96e81a6mr5237404wmc.8.1644973633434; Tue, 15 Feb 2022 17:07:13 -0800 (PST) Received: from localhost.localdomain (3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.1.f.d.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:df16::3]) by smtp.gmail.com with ESMTPSA id m8sm10551185wms.4.2022.02.15.17.07.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 17:07:12 -0800 (PST) From: Phillip Potter To: gregkh@linuxfoundation.org Cc: dan.carpenter@oracle.com, Larry.Finger@lwfinger.net, straube.linux@gmail.com, martin@kaiser.cx, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, paskripkin@gmail.com Subject: [PATCH v2 03/15] staging: r8188eu: remove converted DBG_88E calls from core/rtw_mlme_ext.c Date: Wed, 16 Feb 2022 01:06:57 +0000 Message-Id: <20220216010709.791-4-phil@philpotter.co.uk> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220216010709.791-1-phil@philpotter.co.uk> References: <20220216010709.791-1-phil@philpotter.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove all the netdev_dbg/pr_debug calls that were previously converted from DBG_88E inside core/rtw_mlme_ext.c. Due to the sheer number of lines, this patch is separated out for ease of review. After some thought, it makes more sense to just entirely strip all of these calls, so that debugging code in the driver can be more consistent and useful going forwards. Signed-off-by: Phillip Potter --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 283 +------------------- 1 file changed, 14 insertions(+), 269 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/= r8188eu/core/rtw_mlme_ext.c index 6c354383c1d2..4c557c279818 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -315,9 +315,6 @@ static u8 init_channel_set(struct adapter *padapter, u8= ChannelPlan, struct rt_c memset(channel_set, 0, sizeof(struct rt_channel_info) * MAX_CHANNEL_NUM); =20 if (ChannelPlan >=3D RT_CHANNEL_DOMAIN_MAX && ChannelPlan !=3D RT_CHANNEL= _DOMAIN_REALTEK_DEFINE) { - netdev_dbg(padapter->pnetdev, - "ChannelPlan ID %x error !!!!!\n", - ChannelPlan); return chanset_size; } =20 @@ -438,9 +435,6 @@ void mgt_dispatcher(struct adapter *padapter, struct re= cv_frame *precv_frame) if (GetRetry(pframe)) { if (precv_frame->attrib.seq_num =3D=3D psta->RxMgmtFrameSeqNum) { /* drop the duplicate management frame */ - netdev_dbg(padapter->pnetdev, - "Drop duplicate management frame with seq_num=3D%d.\n", - precv_frame->attrib.seq_num); return; } } @@ -577,8 +571,6 @@ unsigned int OnProbeRsp(struct adapter *padapter, struc= t recv_frame *precv_frame return _SUCCESS; } else if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_ING)) { if (pwdinfo->nego_req_info.benable) { - netdev_dbg(padapter->pnetdev, - "P2P State is GONEGO ING!\n"); if (!memcmp(pwdinfo->nego_req_info.peerDevAddr, GetAddr2Ptr(pframe), ET= H_ALEN)) { pwdinfo->nego_req_info.benable =3D false; issue_p2p_GO_request(padapter, pwdinfo->nego_req_info.peerDevAddr); @@ -586,8 +578,6 @@ unsigned int OnProbeRsp(struct adapter *padapter, struc= t recv_frame *precv_frame } } else if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_INVITE_REQ)) { if (pwdinfo->invitereq_info.benable) { - netdev_dbg(padapter->pnetdev, - "P2P_STATE_TX_INVITE_REQ!\n"); if (!memcmp(pwdinfo->invitereq_info.peer_macaddr, GetAddr2Ptr(pframe), = ETH_ALEN)) { pwdinfo->invitereq_info.benable =3D false; issue_p2p_invitation_request(padapter, pwdinfo->invitereq_info.peer_ma= caddr); @@ -717,17 +707,12 @@ unsigned int OnAuth(struct adapter *padapter, struct = recv_frame *precv_frame) seq =3D le16_to_cpu(*(__le16 *)((size_t)pframe + WLAN_HDR_A3_LEN + 2)); algorithm =3D le16_to_cpu(*(__le16 *)((size_t)pframe + WLAN_HDR_A3_LEN)); =20 - netdev_dbg(padapter->pnetdev, "auth alg=3D%x, seq=3D%X\n", algorithm, seq= ); - if (auth_mode =3D=3D 2 && psecuritypriv->dot11PrivacyAlgrthm !=3D _WEP40_= && psecuritypriv->dot11PrivacyAlgrthm !=3D _WEP104_) auth_mode =3D 0; =20 if ((algorithm > 0 && auth_mode =3D=3D 0) || /* rx a shared-key auth but= shared not enabled */ (algorithm =3D=3D 0 && auth_mode =3D=3D 1)) { /* rx a open-system au= th but shared-key is enabled */ - netdev_dbg(padapter->pnetdev, - "auth rejected due to bad alg [alg=3D%d, auth_mib=3D%d] %02X%02X%02X= %02X%02X%02X\n", - algorithm, auth_mode, sa[0], sa[1], sa[2], sa[3], sa[4], sa[5]); =20 status =3D _STATS_NO_SUPP_ALG_; =20 @@ -742,12 +727,8 @@ unsigned int OnAuth(struct adapter *padapter, struct r= ecv_frame *precv_frame) pstat =3D rtw_get_stainfo(pstapriv, sa); if (!pstat) { /* allocate a new one */ - netdev_dbg(padapter->pnetdev, - "going to alloc stainfo for sa=3D%pM\n", sa); pstat =3D rtw_alloc_stainfo(pstapriv, sa); if (!pstat) { - netdev_dbg(padapter->pnetdev, - "Exceed the upper limit of supported clients...\n"); status =3D _STATS_UNABLE_HANDLE_STA_; goto auth_fail; } @@ -778,9 +759,6 @@ unsigned int OnAuth(struct adapter *padapter, struct re= cv_frame *precv_frame) pstat->expire_to =3D pstapriv->auth_to; =20 if ((pstat->auth_seq + 1) !=3D seq) { - netdev_dbg(padapter->pnetdev, - "(1)auth rejected because out of seq [rx_seq=3D%d, exp_seq=3D%d]!\n", - seq, pstat->auth_seq + 1); status =3D _STATS_OUT_OF_AUTH_SEQ_; goto auth_fail; } @@ -792,9 +770,6 @@ unsigned int OnAuth(struct adapter *padapter, struct re= cv_frame *precv_frame) pstat->expire_to =3D pstapriv->assoc_to; pstat->authalg =3D algorithm; } else { - netdev_dbg(padapter->pnetdev, - "(2)auth rejected because out of seq [rx_seq=3D%d, exp_seq=3D%d]!\n= ", - seq, pstat->auth_seq + 1); status =3D _STATS_OUT_OF_AUTH_SEQ_; goto auth_fail; } @@ -808,14 +783,11 @@ unsigned int OnAuth(struct adapter *padapter, struct = recv_frame *precv_frame) pstat->auth_seq =3D 2; } else if (seq =3D=3D 3) { /* checking for challenging txt... */ - netdev_dbg(padapter->pnetdev, "checking for challenging txt...\n"); =20 p =3D rtw_get_ie(pframe + WLAN_HDR_A3_LEN + 4 + _AUTH_IE_OFFSET_, _CHLG= ETXT_IE_, (int *)&ie_len, len - WLAN_HDR_A3_LEN - _AUTH_IE_OFFSET_ - 4); =20 if (!p || ie_len <=3D 0) { - netdev_dbg(padapter->pnetdev, - "auth rejected because challenge failure!(1)\n"); status =3D _STATS_CHALLENGE_FAIL_; goto auth_fail; } @@ -826,15 +798,10 @@ unsigned int OnAuth(struct adapter *padapter, struct = recv_frame *precv_frame) /* challenging txt is correct... */ pstat->expire_to =3D pstapriv->assoc_to; } else { - netdev_dbg(padapter->pnetdev, - "auth rejected because challenge failure!\n"); status =3D _STATS_CHALLENGE_FAIL_; goto auth_fail; } } else { - netdev_dbg(padapter->pnetdev, - "(3)auth rejected because out of seq [rx_seq=3D%d, exp_seq=3D%d]!\n= ", - seq, pstat->auth_seq + 1); status =3D _STATS_OUT_OF_AUTH_SEQ_; goto auth_fail; } @@ -887,8 +854,6 @@ unsigned int OnAuthClient(struct adapter *padapter, str= uct recv_frame *precv_fra status =3D le16_to_cpu(*(__le16 *)((size_t)pframe + WLAN_HDR_A3_LEN + off= set + 4)); =20 if (status !=3D 0) { - netdev_dbg(padapter->pnetdev, - "clnt auth fail, status: %d\n", status); if (status =3D=3D 13) { /* pmlmeinfo->auth_algo =3D=3D dot11AuthAlgrthm= _Auto) */ if (pmlmeinfo->auth_algo =3D=3D dot11AuthAlgrthm_Shared) pmlmeinfo->auth_algo =3D dot11AuthAlgrthm_Open; @@ -942,7 +907,7 @@ unsigned int OnAssocReq(struct adapter *padapter, struc= t recv_frame *precv_frame u16 capab_info; struct rtw_ieee802_11_elems elems; struct sta_info *pstat; - unsigned char reassoc, *p, *pos, *wpa_ie; + unsigned char *p, *pos, *wpa_ie; unsigned char WMM_IE[] =3D {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01}; int i, ie_len, wpa_ie_len, left; unsigned char supportRate[16]; @@ -967,17 +932,12 @@ unsigned int OnAssocReq(struct adapter *padapter, str= uct recv_frame *precv_frame =20 frame_type =3D GetFrameSubType(pframe); if (frame_type =3D=3D WIFI_ASSOCREQ) { - reassoc =3D 0; ie_offset =3D _ASOCREQ_IE_OFFSET_; } else { /* WIFI_REASSOCREQ */ - reassoc =3D 1; ie_offset =3D _REASOCREQ_IE_OFFSET_; } =20 if (pkt_len < IEEE80211_3ADDR_LEN + ie_offset) { - netdev_dbg(padapter->pnetdev, - "handle_assoc(reassoc=3D%d) - too short payload (len=3D%lu)\n", - reassoc, (unsigned long)pkt_len); return _FAIL; } =20 @@ -1009,9 +969,6 @@ unsigned int OnAssocReq(struct adapter *padapter, stru= ct recv_frame *precv_frame /* now parse all ieee802_11 ie to point to elems */ if (rtw_ieee802_11_parse_elems(pos, left, &elems, 1) =3D=3D ParseFailed || !elems.ssid) { - netdev_dbg(padapter->pnetdev, - "STA %pM sent invalid association request\n", - pstat->hwaddr); status =3D _STATS_FAILURE_; goto OnAssocReqFail; } @@ -1040,8 +997,6 @@ unsigned int OnAssocReq(struct adapter *padapter, stru= ct recv_frame *precv_frame /* check if the supported rate is ok */ p =3D rtw_get_ie(pframe + WLAN_HDR_A3_LEN + ie_offset, _SUPPORTEDRATES_IE= _, &ie_len, pkt_len - WLAN_HDR_A3_LEN - ie_offset); if (!p) { - netdev_dbg(padapter->pnetdev, - "Rx a sta assoc-req which supported rate is empty!\n"); /* use our own rate set as statoin used */ /* memcpy(supportRate, AP_BSSRATE, AP_BSSRATE_LEN); */ /* supportRateNum =3D AP_BSSRATE_LEN; */ @@ -1131,15 +1086,11 @@ unsigned int OnAssocReq(struct adapter *padapter, s= truct recv_frame *precv_frame pstat->flags &=3D ~(WLAN_STA_WPS | WLAN_STA_MAYBE_WPS); if (!wpa_ie) { if (elems.wps_ie) { - netdev_dbg(padapter->pnetdev, - "STA included WPS IE in (Re)Association Request - assume WPS is use= d\n"); pstat->flags |=3D WLAN_STA_WPS; /* wpabuf_free(sta->wps_ie); */ /* sta->wps_ie =3D wpabuf_alloc_copy(elems.wps_ie + 4, */ /* elems.wps_ie_len - 4); */ } else { - netdev_dbg(padapter->pnetdev, - "STA did not include WPA/RSN IE in (Re)Association Request - possib= le WPS use\n"); pstat->flags |=3D WLAN_STA_MAYBE_WPS; } =20 @@ -1152,8 +1103,6 @@ unsigned int OnAssocReq(struct adapter *padapter, str= uct recv_frame *precv_frame rtw_get_wps_attr_content(pmlmepriv->wps_beacon_ie, pmlmepriv->wps_beac= on_ie_len, WPS_ATTR_SELECTED_REGISTRAR, &selected_registrar, NULL); =20 if (!selected_registrar) { - netdev_dbg(padapter->pnetdev, - "selected_registrar is false , or AP is not ready to do WPS\n"); =20 status =3D _STATS_UNABLE_HANDLE_STA_; =20 @@ -1165,9 +1114,6 @@ unsigned int OnAssocReq(struct adapter *padapter, str= uct recv_frame *precv_frame int copy_len; =20 if (psecuritypriv->wpa_psk =3D=3D 0) { - netdev_dbg(padapter->pnetdev, - "STA %pM: WPA/RSN IE in association request, but AP don't support W= PA/RSN\n", - pstat->hwaddr); =20 status =3D WLAN_STATUS_INVALID_IE; =20 @@ -1175,8 +1121,6 @@ unsigned int OnAssocReq(struct adapter *padapter, str= uct recv_frame *precv_frame } =20 if (elems.wps_ie) { - netdev_dbg(padapter->pnetdev, - "STA included WPS IE in (Re)Association Request - WPS is used\n"); pstat->flags |=3D WLAN_STA_WPS; copy_len =3D 0; } else { @@ -1261,9 +1205,6 @@ unsigned int OnAssocReq(struct adapter *padapter, str= uct recv_frame *precv_frame if ((pstat->flags & WLAN_STA_HT) && ((pstat->wpa2_pairwise_cipher & WPA_CIPHER_TKIP) || (pstat->wpa_pairwise_cipher & WPA_CIPHER_TKIP))) { - netdev_dbg(padapter->pnetdev, - "HT: %pM tried to use TKIP with HT association\n", - pstat->hwaddr); =20 /* status =3D WLAN_STATUS_CIPHER_REJECTED_PER_POLICY; */ /* goto OnAssocReqFail; */ @@ -1308,7 +1249,6 @@ unsigned int OnAssocReq(struct adapter *padapter, str= uct recv_frame *precv_frame =20 /* get a unique AID */ if (pstat->aid > 0) { - netdev_dbg(padapter->pnetdev, "old AID %d\n", pstat->aid); } else { for (pstat->aid =3D 1; pstat->aid <=3D NUM_STA; pstat->aid++) if (!pstapriv->sta_aid[pstat->aid - 1]) @@ -1318,16 +1258,11 @@ unsigned int OnAssocReq(struct adapter *padapter, s= truct recv_frame *precv_frame if (pstat->aid > pstapriv->max_num_sta) { pstat->aid =3D 0; =20 - netdev_dbg(padapter->pnetdev, - "no room for more AIDs\n"); - status =3D WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA; =20 goto OnAssocReqFail; } else { pstapriv->sta_aid[pstat->aid - 1] =3D pstat; - netdev_dbg(padapter->pnetdev, - "allocate new AID=3D(%d)\n", pstat->aid); } } =20 @@ -1362,8 +1297,6 @@ unsigned int OnAssocReq(struct adapter *padapter, str= uct recv_frame *precv_frame issue_asocrsp(padapter, status, pstat, WIFI_REASSOCRSP); =20 /* 2 - report to upper layer */ - netdev_dbg(padapter->pnetdev, - "indicate_sta_join_event to upper layer - hostapd\n"); rtw_indicate_sta_assoc_event(padapter, pstat); =20 /* 3-(1) report sta add event */ @@ -1417,8 +1350,6 @@ unsigned int OnAssocRsp(struct adapter *padapter, str= uct recv_frame *precv_frame /* status */ status =3D le16_to_cpu(*(__le16 *)(pframe + WLAN_HDR_A3_LEN + 2)); if (status > 0) { - netdev_dbg(padapter->pnetdev, - "assoc reject, status code: %d\n", status); pmlmeinfo->state =3D WIFI_FW_NULL_STATE; res =3D -4; goto report_assoc_result; @@ -1498,8 +1429,6 @@ unsigned int OnDeAuth(struct adapter *padapter, struc= t recv_frame *precv_frame) =20 reason =3D le16_to_cpu(*(__le16 *)(pframe + WLAN_HDR_A3_LEN)); =20 - netdev_dbg(padapter->pnetdev, "Reason code(%d)\n", reason); - if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { struct sta_info *psta; struct sta_priv *pstapriv =3D &padapter->stapriv; @@ -1565,8 +1494,6 @@ unsigned int OnDisassoc(struct adapter *padapter, str= uct recv_frame *precv_frame =20 reason =3D le16_to_cpu(*(__le16 *)(pframe + WLAN_HDR_A3_LEN)); =20 - netdev_dbg(padapter->pnetdev, "Reason code(%d)\n", reason); - if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { struct sta_info *psta; struct sta_priv *pstapriv =3D &padapter->stapriv; @@ -1652,7 +1579,7 @@ unsigned int OnAction_back(struct adapter *padapter, = struct recv_frame *precv_fr struct recv_reorder_ctrl *preorder_ctrl; unsigned char *frame_body; unsigned char category, action; - unsigned short tid, status, reason_code =3D 0; + unsigned short tid, status; struct mlme_ext_priv *pmlmeext =3D &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo =3D &pmlmeext->mlmext_info; u8 *pframe =3D precv_frame->rx_data; @@ -1678,7 +1605,6 @@ unsigned int OnAction_back(struct adapter *padapter, = struct recv_frame *precv_fr if (!pmlmeinfo->HT_enable) return _SUCCESS; action =3D frame_body[1]; - netdev_dbg(padapter->pnetdev, "action=3D%d\n", action); switch (action) { case RTW_WLAN_ACTION_ADDBA_REQ: /* ADDBA request */ memcpy(&pmlmeinfo->ADDBA_req, &frame_body[2], sizeof(struct ADDBA_reque= st)); @@ -1693,8 +1619,6 @@ unsigned int OnAction_back(struct adapter *padapter, = struct recv_frame *precv_fr status =3D get_unaligned_le16(&frame_body[3]); tid =3D ((frame_body[5] >> 2) & 0x7); if (status =3D=3D 0) { /* successful */ - netdev_dbg(padapter->pnetdev, - "agg_enable for TID=3D%d\n", tid); psta->htpriv.agg_enable_bitmap |=3D 1 << tid; psta->htpriv.candidate_tid_bitmap &=3D ~BIT(tid); } else { @@ -1705,17 +1629,12 @@ unsigned int OnAction_back(struct adapter *padapter= , struct recv_frame *precv_fr if ((frame_body[3] & BIT(3)) =3D=3D 0) { psta->htpriv.agg_enable_bitmap &=3D ~(1 << ((frame_body[3] >> 4) & 0xf= )); psta->htpriv.candidate_tid_bitmap &=3D ~(1 << ((frame_body[3] >> 4) & = 0xf)); - reason_code =3D get_unaligned_le16(&frame_body[4]); } else if ((frame_body[3] & BIT(3)) =3D=3D BIT(3)) { tid =3D (frame_body[3] >> 4) & 0x0F; preorder_ctrl =3D &psta->recvreorder_ctrl[tid]; preorder_ctrl->enable =3D false; preorder_ctrl->indicate_seq =3D 0xffff; } - netdev_dbg(padapter->pnetdev, - "DELBA: %x(%x)\n", - pmlmeinfo->agg_enable_bitmap, - reason_code); /* todo: how to notify the host while receiving DELETE BA */ break; default: @@ -2094,7 +2013,6 @@ static void issue_p2p_GO_response(struct adapter *pad= apter, u8 *raddr, u8 *frame if (!pmgntframe) return; =20 - netdev_dbg(padapter->pnetdev, "result=3D%d\n", result); /* update attribute */ pattrib =3D &pmgntframe->attrib; update_mgntframe_attrib(padapter, pattrib); @@ -3126,18 +3044,9 @@ static u8 is_matched_in_profilelist(u8 *peermacaddr,= struct profile_info *profil { u8 i, match_result =3D 0; =20 - pr_debug("peermac=3D%.2X %.2X %.2X %.2X %.2X %.2X\n", - peermacaddr[0], peermacaddr[1], peermacaddr[2], - peermacaddr[3], peermacaddr[4], peermacaddr[5]); - for (i =3D 0; i < P2P_MAX_PERSISTENT_GROUP_NUM; i++, profileinfo++) { - pr_debug("profileinfo_mac=3D%.2X %.2X %.2X %.2X %.2X %.2X\n", - profileinfo->peermac[0], profileinfo->peermac[1], - profileinfo->peermac[2], profileinfo->peermac[3], - profileinfo->peermac[4], profileinfo->peermac[5]); if (!memcmp(peermacaddr, profileinfo->peermac, ETH_ALEN)) { match_result =3D 1; - pr_debug("Match!\n"); break; } } @@ -3689,16 +3598,10 @@ static s32 rtw_action_public_decache(struct recv_fr= ame *recv_frame, s32 token) if (GetRetry(frame)) { if (token >=3D 0) { if ((seq_ctrl =3D=3D mlmeext->action_public_rxseq) && (token =3D=3D mlm= eext->action_public_dialog_token)) { - netdev_dbg(adapter->pnetdev, - "seq_ctrl =3D 0x%x, rxseq =3D 0x%x, token:%d\n", - seq_ctrl, mlmeext->action_public_rxseq, token); return _FAIL; } } else { if (seq_ctrl =3D=3D mlmeext->action_public_rxseq) { - netdev_dbg(adapter->pnetdev, - "seq_ctrl =3D 0x%x, rxseq =3D 0x%x\n", - seq_ctrl, mlmeext->action_public_rxseq); return _FAIL; } } @@ -3741,7 +3644,6 @@ static unsigned int on_action_public_p2p(struct recv_= frame *precv_frame) =20 switch (frame_body[6]) { /* OUI Subtype */ case P2P_GO_NEGO_REQ: - netdev_dbg(padapter->pnetdev, "Got GO Nego Req Frame\n"); memset(&pwdinfo->groupid_info, 0x00, sizeof(struct group_id_info)); =20 if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_RX_PROVISION_DIS_REQ)) @@ -3753,9 +3655,6 @@ static unsigned int on_action_public_p2p(struct recv_= frame *precv_frame) _cancel_timer_ex(&pwdinfo->restore_p2p_state_timer); /* Restore the previous p2p state */ rtw_p2p_set_state(pwdinfo, rtw_p2p_pre_state(pwdinfo)); - netdev_dbg(padapter->pnetdev, - "Restore the previous p2p state to %d\n", - rtw_p2p_state(pwdinfo)); } =20 /* Commented by Kurt 20110902 */ @@ -3776,8 +3675,6 @@ static unsigned int on_action_public_p2p(struct recv_= frame *precv_frame) _set_timer(&pwdinfo->restore_p2p_state_timer, 5000); break; case P2P_GO_NEGO_RESP: - netdev_dbg(padapter->pnetdev, "Got GO Nego Resp Frame\n"); - if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_ING)) { /* Commented by Albert 20110425 */ /* The restore timer is enabled when issuing the nego request frame of = rtw_p2p_connect function. */ @@ -3797,12 +3694,9 @@ static unsigned int on_action_public_p2p(struct recv= _frame *precv_frame) if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_FAIL)) _set_timer(&pwdinfo->restore_p2p_state_timer, 5000); } else { - netdev_dbg(padapter->pnetdev, - "Skipped GO Nego Resp Frame (p2p_state !=3D P2P_STATE_GONEGO_ING)\n= "); } break; case P2P_GO_NEGO_CONF: - netdev_dbg(padapter->pnetdev, "Got GO Nego Confirm Frame\n"); result =3D process_p2p_group_negotation_confirm(pwdinfo, frame_body, len= ); if (P2P_STATUS_SUCCESS =3D=3D result) { if (rtw_p2p_role(pwdinfo) =3D=3D P2P_ROLE_CLIENT) { @@ -3816,7 +3710,6 @@ static unsigned int on_action_public_p2p(struct recv_= frame *precv_frame) /* Added by Albert 2010/10/05 */ /* Received the P2P Invite Request frame. */ =20 - netdev_dbg(padapter->pnetdev, "Got invite request frame!\n"); p2p_ie =3D rtw_get_p2p_ie(frame_body + _PUBLIC_ACTION_IE_OFFSET_, len - = _PUBLIC_ACTION_IE_OFFSET_, NULL, &p2p_ielen); if (p2p_ie) { /* Parse the necessary information from the P2P Invitation Request fram= e. */ @@ -3836,14 +3729,6 @@ static unsigned int on_action_public_p2p(struct recv= _frame *precv_frame) /* After having the peer interface address, the sigma can find the cor= rect conf file for wpa_supplicant. */ =20 if (attr_contentlen) { - netdev_dbg(padapter->pnetdev, - "GO's BSSID =3D %.2X %.2X %.2X %.2X %.2X %.2X\n", - pwdinfo->p2p_peer_interface_addr[0], - pwdinfo->p2p_peer_interface_addr[1], - pwdinfo->p2p_peer_interface_addr[2], - pwdinfo->p2p_peer_interface_addr[3], - pwdinfo->p2p_peer_interface_addr[4], - pwdinfo->p2p_peer_interface_addr[5]); } =20 if (invitation_flag & P2P_INVITATION_FLAGS_PERSISTENT) { @@ -3891,8 +3776,6 @@ static unsigned int on_action_public_p2p(struct recv_= frame *precv_frame) } } } else { - netdev_dbg(padapter->pnetdev, - "P2P Group ID Attribute NOT FOUND!\n"); status_code =3D P2P_STATUS_FAIL_INFO_UNAVAILABLE; } } else { @@ -3918,20 +3801,13 @@ static unsigned int on_action_public_p2p(struct rec= v_frame *precv_frame) status_code =3D P2P_STATUS_SUCCESS; } } else { - netdev_dbg(padapter->pnetdev, - "P2P Group ID Attribute NOT FOUND!\n"); status_code =3D P2P_STATUS_FAIL_INFO_UNAVAILABLE; } } } else { - netdev_dbg(padapter->pnetdev, - "P2P Invitation Flags Attribute NOT FOUND!\n"); status_code =3D P2P_STATUS_FAIL_INFO_UNAVAILABLE; } =20 - netdev_dbg(padapter->pnetdev, - "status_code =3D %d\n", status_code); - pwdinfo->inviteresp_info.token =3D frame_body[7]; issue_p2p_invitation_response(padapter, GetAddr2Ptr(pframe), pwdinfo->i= nviteresp_info.token, status_code); } @@ -3940,15 +3816,12 @@ static unsigned int on_action_public_p2p(struct rec= v_frame *precv_frame) u8 attr_content =3D 0x00; u32 attr_contentlen =3D 0; =20 - netdev_dbg(padapter->pnetdev, "Got invite response frame!\n"); _cancel_timer_ex(&pwdinfo->restore_p2p_state_timer); p2p_ie =3D rtw_get_p2p_ie(frame_body + _PUBLIC_ACTION_IE_OFFSET_, len - = _PUBLIC_ACTION_IE_OFFSET_, NULL, &p2p_ielen); if (p2p_ie) { rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_STATUS, &attr_cont= ent, &attr_contentlen); =20 if (attr_contentlen =3D=3D 1) { - netdev_dbg(padapter->pnetdev, - "Status =3D %d\n", attr_content); pwdinfo->invitereq_info.benable =3D false; =20 if (attr_content =3D=3D P2P_STATUS_SUCCESS) { @@ -3982,8 +3855,6 @@ static unsigned int on_action_public_p2p(struct recv_= frame *precv_frame) process_p2p_devdisc_resp(pwdinfo, pframe, len); break; case P2P_PROVISION_DISC_REQ: - netdev_dbg(padapter->pnetdev, - "Got Provisioning Discovery Request Frame\n"); process_p2p_provdisc_req(pwdinfo, pframe, len); memcpy(pwdinfo->rx_prov_disc_info.peerDevAddr, GetAddr2Ptr(pframe), ETH_= ALEN); =20 @@ -3998,8 +3869,6 @@ static unsigned int on_action_public_p2p(struct recv_= frame *precv_frame) case P2P_PROVISION_DISC_RESP: /* Commented by Albert 20110707 */ /* Should we check the pwdinfo->tx_prov_disc_info.bsent flag here?? */ - netdev_dbg(padapter->pnetdev, - "Got Provisioning Discovery Response Frame\n"); /* Commented by Albert 20110426 */ /* The restore timer is enabled when issuing the provisioing request fra= me in rtw_p2p_prov_disc function. */ _cancel_timer_ex(&pwdinfo->restore_p2p_state_timer); @@ -4154,13 +4023,11 @@ struct xmit_frame *alloc_mgtxmitframe(struct xmit_p= riv *pxmitpriv) =20 pmgntframe =3D rtw_alloc_xmitframe(pxmitpriv); if (!pmgntframe) { - pr_debug("alloc xmitframe fail\n"); return NULL; } =20 pxmitbuf =3D rtw_alloc_xmitbuf_ext(pxmitpriv); if (!pxmitbuf) { - pr_debug("alloc xmitbuf fail\n"); rtw_free_xmitframe(pxmitpriv, pmgntframe); return NULL; } @@ -4182,7 +4049,6 @@ void update_mgnt_tx_rate(struct adapter *padapter, u8= rate) struct mlme_ext_priv *pmlmeext =3D &padapter->mlmeextpriv; =20 pmlmeext->tx_rate =3D rate; - netdev_dbg(padapter->pnetdev, "rate =3D %x\n", rate); } =20 void update_mgntframe_attrib(struct adapter *padapter, struct pkt_attrib *= pattrib) @@ -4319,7 +4185,6 @@ void issue_beacon(struct adapter *padapter, int timeo= ut_ms) =20 pmgntframe =3D alloc_mgtxmitframe(pxmitpriv); if (!pmgntframe) { - netdev_dbg(padapter->pnetdev, "alloc mgnt frame fail\n"); return; } spin_lock_bh(&pmlmepriv->bcn_update_lock); @@ -4502,7 +4367,6 @@ void issue_beacon(struct adapter *padapter, int timeo= ut_ms) spin_unlock_bh(&pmlmepriv->bcn_update_lock); =20 if ((pattrib->pktlen + TXDESC_SIZE) > 512) { - netdev_dbg(padapter->pnetdev, "beacon frame too large\n"); return; } =20 @@ -4534,8 +4398,6 @@ void issue_probersp(struct adapter *padapter, unsigne= d char *da, u8 is_valid_p2p =20 pmgntframe =3D alloc_mgtxmitframe(pxmitpriv); if (!pmgntframe) { - netdev_dbg(padapter->pnetdev, - "alloc mgnt frame fail\n"); return; } =20 @@ -4761,7 +4623,6 @@ int issue_probereq_ex(struct adapter *padapter, struc= t ndis_802_11_ssid *pssid, { int ret; int i =3D 0; - u32 start =3D jiffies; =20 do { ret =3D _issue_probereq(padapter, pssid, da, wait_ms > 0); @@ -4783,17 +4644,9 @@ int issue_probereq_ex(struct adapter *padapter, stru= ct ndis_802_11_ssid *pssid, =20 if (try_cnt && wait_ms) { if (da) - netdev_dbg(padapter->pnetdev, - "to %pM, ch:%u%s, %d/%d in %u ms\n", - da, rtw_get_oper_ch(padapter), - ret =3D=3D _SUCCESS ? ", acked" : "", - i, try_cnt, rtw_get_passing_time_ms(start)); + ; else - netdev_dbg(padapter->pnetdev, - "ch:%u%s, %d/%d in %u ms\n", - rtw_get_oper_ch(padapter), - ret =3D=3D _SUCCESS ? ", acked" : "", - i, try_cnt, rtw_get_passing_time_ms(start)); + ; } exit: return ret; @@ -5129,9 +4982,6 @@ void issue_assocreq(struct adapter *padapter) for (i =3D 0; i < NDIS_802_11_LENGTH_RATES_EX; i++) { if (pmlmeinfo->network.SupportedRates[i] =3D=3D 0) break; - netdev_dbg(padapter->pnetdev, - "network.SupportedRates[%d]=3D%02X\n", - i, pmlmeinfo->network.SupportedRates[i]); } =20 for (i =3D 0; i < NDIS_802_11_LENGTH_RATES_EX; i++) { @@ -5148,9 +4998,6 @@ void issue_assocreq(struct adapter *padapter) =20 if (j =3D=3D sta_bssrate_len) { /* the rate is not supported by STA */ - netdev_dbg(padapter->pnetdev, - "the rate[%d]=3D%02X is not supported by STA!\n", - i, pmlmeinfo->network.SupportedRates[i]); } else { /* the rate is supported by STA */ bssrate[index++] =3D pmlmeinfo->network.SupportedRates[i]; @@ -5158,7 +5005,6 @@ void issue_assocreq(struct adapter *padapter) } =20 bssrate_len =3D index; - netdev_dbg(padapter->pnetdev, "bssrate_len=3D%d\n", bssrate_len); =20 if (bssrate_len =3D=3D 0) { rtw_free_xmitbuf(pxmitpriv, pmgntframe->pxmitbuf); @@ -5443,7 +5289,6 @@ int issue_nulldata(struct adapter *padapter, unsigned= char *da, unsigned int pow { int ret; int i =3D 0; - u32 start =3D jiffies; struct mlme_ext_priv *pmlmeext =3D &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo =3D &pmlmeext->mlmext_info; =20 @@ -5470,17 +5315,9 @@ int issue_nulldata(struct adapter *padapter, unsigne= d char *da, unsigned int pow =20 if (try_cnt && wait_ms) { if (da) - netdev_dbg(padapter->pnetdev, - "to %pM, ch:%u%s, %d/%d in %u ms\n", - da, rtw_get_oper_ch(padapter), - ret =3D=3D _SUCCESS ? ", acked" : "", - i, try_cnt, rtw_get_passing_time_ms(start)); + ; else - netdev_dbg(padapter->pnetdev, - "ch:%u%s, %d/%d in %u ms\n", - rtw_get_oper_ch(padapter), - ret =3D=3D _SUCCESS ? ", acked" : "", - i, try_cnt, rtw_get_passing_time_ms(start)); + ; } exit: return ret; @@ -5565,7 +5402,6 @@ int issue_qos_nulldata(struct adapter *padapter, unsi= gned char *da, u16 tid, int { int ret; int i =3D 0; - u32 start =3D jiffies; struct mlme_ext_priv *pmlmeext =3D &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo =3D &pmlmeext->mlmext_info; =20 @@ -5592,17 +5428,9 @@ int issue_qos_nulldata(struct adapter *padapter, uns= igned char *da, u16 tid, int =20 if (try_cnt && wait_ms) { if (da) - netdev_dbg(padapter->pnetdev, - "to %pM, ch:%u%s, %d/%d in %u ms\n", - da, rtw_get_oper_ch(padapter), - ret =3D=3D _SUCCESS ? ", acked" : "", - i, try_cnt, rtw_get_passing_time_ms(start)); + ; else - netdev_dbg(padapter->pnetdev, - "ch:%u%s, %d/%d in %u ms\n", - rtw_get_oper_ch(padapter), - ret =3D=3D _SUCCESS ? ", acked" : "", - i, try_cnt, rtw_get_passing_time_ms(start)); + ; } exit: return ret; @@ -5673,7 +5501,6 @@ static int _issue_deauth(struct adapter *padapter, un= signed char *da, unsigned s =20 int issue_deauth(struct adapter *padapter, unsigned char *da, unsigned sho= rt reason) { - netdev_dbg(padapter->pnetdev, "to %pM\n", da); return _issue_deauth(padapter, da, reason, false); } =20 @@ -5682,7 +5509,6 @@ int issue_deauth_ex(struct adapter *padapter, u8 *da,= unsigned short reason, int { int ret; int i =3D 0; - u32 start =3D jiffies; =20 do { ret =3D _issue_deauth(padapter, da, reason, wait_ms > 0); @@ -5703,17 +5529,9 @@ int issue_deauth_ex(struct adapter *padapter, u8 *da= , unsigned short reason, int =20 if (try_cnt && wait_ms) { if (da) - netdev_dbg(padapter->pnetdev, - "to %pM, ch:%u%s, %d/%d in %u ms\n", - da, rtw_get_oper_ch(padapter), - ret =3D=3D _SUCCESS ? ", acked" : "", - i, try_cnt, rtw_get_passing_time_ms(start)); + ; else - netdev_dbg(padapter->pnetdev, - "ch:%u%s, %d/%d in %u ms\n", - rtw_get_oper_ch(padapter), - ret =3D=3D _SUCCESS ? ", acked" : "", - i, try_cnt, rtw_get_passing_time_ms(start)); + ; } exit: return ret; @@ -5740,10 +5558,6 @@ void issue_action_BA(struct adapter *padapter, unsig= ned char *raddr, unsigned ch struct sta_priv *pstapriv =3D &padapter->stapriv; struct registry_priv *pregpriv =3D &padapter->registrypriv; =20 - netdev_dbg(padapter->pnetdev, - "category=3D%d, action=3D%d, status=3D%d\n", - category, action, status); - pmgntframe =3D alloc_mgtxmitframe(pxmitpriv); if (!pmgntframe) return; @@ -5795,10 +5609,6 @@ void issue_action_BA(struct adapter *padapter, unsig= ned char *raddr, unsigned ch if (psta) { start_seq =3D (psta->sta_xmitpriv.txseq_tid[status & 0x07] & 0xfff) + = 1; =20 - netdev_dbg(padapter->pnetdev, - "BA_starting_seqctrl=3D%d for TID=3D%d\n", - start_seq, status & 0x07); - psta->BA_starting_seqctrl[status & 0x07] =3D start_seq; =20 BA_starting_seqctrl =3D start_seq << 4; @@ -5987,8 +5797,6 @@ unsigned int send_delba(struct adapter *padapter, u8 = initiator, u8 *addr) if (initiator =3D=3D 0) { /* recipient */ for (tid =3D 0; tid < MAXTID; tid++) { if (psta->recvreorder_ctrl[tid].enable) { - netdev_dbg(padapter->pnetdev, - "rx agg disable tid(%d)\n", tid); issue_action_BA(padapter, addr, RTW_WLAN_ACTION_DELBA, (((tid << 1) | = initiator) & 0x1F)); psta->recvreorder_ctrl[tid].enable =3D false; psta->recvreorder_ctrl[tid].indicate_seq =3D 0xffff; @@ -5997,8 +5805,6 @@ unsigned int send_delba(struct adapter *padapter, u8 = initiator, u8 *addr) } else if (initiator =3D=3D 1) { /* originator */ for (tid =3D 0; tid < MAXTID; tid++) { if (psta->htpriv.agg_enable_bitmap & BIT(tid)) { - netdev_dbg(padapter->pnetdev, - "tx agg disable tid(%d)\n", tid); issue_action_BA(padapter, addr, RTW_WLAN_ACTION_DELBA, (((tid << 1) | = initiator) & 0x1F)); psta->htpriv.agg_enable_bitmap &=3D ~BIT(tid); psta->htpriv.candidate_tid_bitmap &=3D ~BIT(tid); @@ -6031,16 +5837,13 @@ unsigned int send_beacon(struct adapter *padapter) if (padapter->bSurpriseRemoved || padapter->bDriverStopped) return _FAIL; if (!bxmitok) { - netdev_dbg(padapter->pnetdev, "fail! %u ms\n", - rtw_get_passing_time_ms(start)); return _FAIL; } else { u32 passing_time =3D rtw_get_passing_time_ms(start); =20 if (passing_time > 100 || issue > 3) - netdev_dbg(padapter->pnetdev, - "success, issue:%d, poll:%d, %u ms\n", - issue, poll, rtw_get_passing_time_ms(start)); + ; + return _SUCCESS; } } @@ -6249,16 +6052,11 @@ u8 collect_bss_info(struct adapter *padapter, struc= t recv_frame *precv_frame, st /* checking SSID */ p =3D rtw_get_ie(bssid->IEs + ie_offset, _SSID_IE_, &len, bssid->IELength= - ie_offset); if (!p) { - netdev_dbg(padapter->pnetdev, - "marc: cannot find SSID for survey event\n"); return _FAIL; } =20 if (*(p + 1)) { if (len > NDIS_802_11_LENGTH_SSID) { - netdev_dbg(padapter->pnetdev, - "IE too long (%d) for survey event\n", - len); return _FAIL; } memcpy(bssid->Ssid.Ssid, (p + 2), *(p + 1)); @@ -6274,9 +6072,6 @@ u8 collect_bss_info(struct adapter *padapter, struct = recv_frame *precv_frame, st p =3D rtw_get_ie(bssid->IEs + ie_offset, _SUPPORTEDRATES_IE_, &len, bssid= ->IELength - ie_offset); if (p) { if (len > NDIS_802_11_LENGTH_RATES_EX) { - netdev_dbg(padapter->pnetdev, - "IE too long (%d) for survey event\n", - len); return _FAIL; } memcpy(bssid->SupportedRates, (p + 2), len); @@ -6286,9 +6081,6 @@ u8 collect_bss_info(struct adapter *padapter, struct = recv_frame *precv_frame, st p =3D rtw_get_ie(bssid->IEs + ie_offset, _EXT_SUPPORTEDRATES_IE_, &len, b= ssid->IELength - ie_offset); if (p) { if (len > (NDIS_802_11_LENGTH_RATES_EX - i)) { - netdev_dbg(padapter->pnetdev, - "IE too long (%d) for survey event\n", - len); return _FAIL; } memcpy(bssid->SupportedRates + i, (p + 2), len); @@ -6403,7 +6195,6 @@ void start_create_ibss(struct adapter *padapter) rtw_indicate_connect(padapter); } } else { - netdev_dbg(padapter->pnetdev, "invalid cap:%x\n", caps); return; } /* update bc/mc sta_info */ @@ -6773,9 +6564,6 @@ void report_surveydone_event(struct adapter *padapter) psurveydone_evt =3D (struct surveydone_event *)(pevtcmd + sizeof(struct C= 2HEvent_Header)); psurveydone_evt->bss_cnt =3D pmlmeext->sitesurvey_res.bss_cnt; =20 - netdev_dbg(padapter->pnetdev, "survey done event(%x)\n", - psurveydone_evt->bss_cnt); - rtw_enqueue_cmd(pcmdpriv, pcmd_obj); } =20 @@ -6820,8 +6608,6 @@ void report_join_res(struct adapter *padapter, int re= s) pjoinbss_evt->network.join_res =3D res; pjoinbss_evt->network.aid =3D res; =20 - netdev_dbg(padapter->pnetdev, "res=3D%d\n", res); - rtw_joinbss_event_prehandle(padapter, (u8 *)&pjoinbss_evt->network); =20 rtw_enqueue_cmd(pcmdpriv, pcmd_obj); @@ -6876,8 +6662,6 @@ void report_del_sta_event(struct adapter *padapter, u= nsigned char *MacAddr, unsi =20 pdel_sta_evt->mac_id =3D mac_id; =20 - netdev_dbg(padapter->pnetdev, "delete STA, mac_id =3D %d\n", mac_id); - rtw_enqueue_cmd(pcmdpriv, pcmd_obj); } =20 @@ -6920,8 +6704,6 @@ void report_add_sta_event(struct adapter *padapter, u= nsigned char *MacAddr, int memcpy((unsigned char *)(&padd_sta_evt->macaddr), MacAddr, ETH_ALEN); padd_sta_evt->cam_id =3D cam_idx; =20 - netdev_dbg(padapter->pnetdev, "add STA\n"); - rtw_enqueue_cmd(pcmdpriv, pcmd_obj); } =20 @@ -7133,8 +6915,6 @@ static void _linked_rx_signal_strength_display(struct= adapter *padapter) GetHalDefVar8188EUsb(padapter, HW_DEF_RA_INFO_DUMP, &mac_id); =20 GetHalDefVar8188EUsb(padapter, HAL_DEF_UNDERCORATEDSMOOTHEDPWDB, &Undecor= atedSmoothedPWDB); - netdev_dbg(padapter->pnetdev, - "UndecoratedSmoothedPWDB:%d\n", UndecoratedSmoothedPWDB); } =20 static u8 chk_ap_is_alive(struct sta_info *psta) @@ -7159,20 +6939,14 @@ static void rtl8188e_sreset_linked_status_check(str= uct adapter *padapter) u8 fw_status; =20 if (rx_dma_status !=3D 0x00) { - netdev_dbg(padapter->pnetdev, "REG_RXDMA_STATUS:0x%08x\n", - rx_dma_status); rtw_write32(padapter, REG_RXDMA_STATUS, rx_dma_status); } =20 fw_status =3D rtw_read8(padapter, REG_FMETHR); if (fw_status =3D=3D 1) - netdev_dbg(padapter->pnetdev, - "REG_FW_STATUS (0x%02x), Read_Efuse_Fail !!\n", - fw_status); + ; else if (fw_status =3D=3D 2) - netdev_dbg(padapter->pnetdev, - "REG_FW_STATUS (0x%02x), Condition_No_Match !!\n", - fw_status); + ; } =20 void linked_status_chk(struct adapter *padapter) @@ -7306,15 +7080,8 @@ void survey_timer_hdl(struct adapter *padapter) if (!rtw_p2p_chk_state(&padapter->wdinfo, P2P_STATE_NONE)) { rtw_p2p_findphase_ex_set(pwdinfo, P2P_FINDPHASE_EX_MAX); pmlmeext->sitesurvey_res.channel_idx =3D 3; - netdev_dbg(padapter->pnetdev, - "idx:%d, cnt:%u\n", - pmlmeext->sitesurvey_res.channel_idx, - pwdinfo->find_phase_state_exchange_cnt); } else { pmlmeext->sitesurvey_res.channel_idx =3D pmlmeext->sitesurvey_res.ch_n= um; - netdev_dbg(padapter->pnetdev, - "idx:%d\n", - pmlmeext->sitesurvey_res.channel_idx); } =20 pmlmeext->scan_abort =3D false;/* reset */ @@ -7344,7 +7111,6 @@ void link_timer_hdl(struct adapter *padapter) struct mlme_ext_info *pmlmeinfo =3D &pmlmeext->mlmext_info; =20 if (pmlmeinfo->state & WIFI_FW_AUTH_NULL) { - netdev_dbg(padapter->pnetdev, "no beacon while connecting\n"); pmlmeinfo->state =3D WIFI_FW_NULL_STATE; report_join_res(padapter, -3); } else if (pmlmeinfo->state & WIFI_FW_AUTH_STATE) { @@ -7355,7 +7121,6 @@ void link_timer_hdl(struct adapter *padapter) return; } =20 - netdev_dbg(padapter->pnetdev, "auth timeout and try again\n"); pmlmeinfo->auth_seq =3D 1; issue_auth(padapter, NULL, 0); set_link_timer(pmlmeext, REAUTH_TO); @@ -7367,7 +7132,6 @@ void link_timer_hdl(struct adapter *padapter) return; } =20 - netdev_dbg(padapter->pnetdev, "assoc timeout and try again\n"); issue_assocreq(padapter); set_link_timer(pmlmeext, REASSOC_TO); } @@ -7558,8 +7322,6 @@ u8 join_cmd_hdl(struct adapter *padapter, u8 *pbuf) break; } =20 - netdev_dbg(padapter->pnetdev, - "set ch/bw before connected\n"); } } break; @@ -7812,29 +7574,16 @@ u8 set_stakey_hdl(struct adapter *padapter, u8 *pbu= f) if (psta) { ctrl =3D (BIT(15) | ((pparm->algorithm) << 2)); =20 - netdev_dbg(padapter->pnetdev, "enc_algorithm=3D%d\n", - pparm->algorithm); - if ((psta->mac_id < 1) || (psta->mac_id > (NUM_STA - 4))) { - netdev_dbg(padapter->pnetdev, - "set_stakey failed, mac_id(aid)=3D%d\n", - psta->mac_id); return H2C_REJECTED; } =20 cam_id =3D (psta->mac_id + 3);/* 0~3 for default key, cmd_id =3D macid = + 3, macid =3D aid+1; */ =20 - netdev_dbg(padapter->pnetdev, - "Write CAM, mac_addr =3D%x:%x:%x:%x:%x:%x, cam_entry=3D%d\n", - pparm->addr[0], pparm->addr[1], pparm->addr[2], - pparm->addr[3], pparm->addr[4], pparm->addr[5], - cam_id); - write_cam(padapter, cam_id, ctrl, pparm->addr, pparm->key); =20 return H2C_SUCCESS_RSP; } else { - netdev_dbg(padapter->pnetdev, "sta has been free\n"); return H2C_REJECTED; } } @@ -7958,7 +7707,6 @@ u8 h2c_msg_hdl(struct adapter *padapter, unsigned cha= r *pbuf) u8 tx_beacon_hdl(struct adapter *padapter, unsigned char *pbuf) { if (send_beacon(padapter) =3D=3D _FAIL) { - netdev_dbg(padapter->pnetdev, "issue_beacon, fail!\n"); return H2C_PARAMETERS_ERROR; } else { /* tx bc/mc frames after update TIM */ @@ -8017,9 +7765,6 @@ u8 set_ch_hdl(struct adapter *padapter, u8 *pbuf) =20 set_ch_parm =3D (struct set_ch_parm *)pbuf; =20 - netdev_dbg(padapter->pnetdev, "ch:%u, bw:%u, ch_offset:%u\n", - set_ch_parm->ch, set_ch_parm->bw, set_ch_parm->ch_offset); - pmlmeext->cur_channel =3D set_ch_parm->ch; pmlmeext->cur_ch_offset =3D set_ch_parm->ch_offset; pmlmeext->cur_bwmode =3D set_ch_parm->bw; --=20 2.34.1 From nobody Sun Jun 28 02:50:42 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D493DC433EF for ; Wed, 16 Feb 2022 01:07:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245312AbiBPBHl (ORCPT ); Tue, 15 Feb 2022 20:07:41 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:53298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245277AbiBPBH3 (ORCPT ); Tue, 15 Feb 2022 20:07:29 -0500 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 297FBC7916 for ; Tue, 15 Feb 2022 17:07:16 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id v12so858415wrv.2 for ; Tue, 15 Feb 2022 17:07:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philpotter-co-uk.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NtCkjxp6cTPKQb+Nsysc9H27MvJPw8Uk/TMHdrWhoaw=; b=Ex2ZDXWZEFayR995gPdPhFI2wO/rRpG1BRXcAlsPBqASjbxb+S0H2ZCpflbtUSTQTO /fuav78AzBU+FrZ0mIlJGmGOEEdWPVLuH2tjuKHJa6N8l2FC82SFib0Sy50DfIGdyBjv BZfpyjyaJB18Yps69YTpnNdsLIxZ1QUhUH8sMt29V9WU/kDcEP8ZZ2vREIPXsVJGXjTA fInm0wfCE6mdmzsCYU9z6gS7g+YmGfOwOe3raSmATGQwEcx5mJT4h89j0ii6FE/ytXOZ qmp1CosO07KdjVTvialjDufuAPaDRKaREXdg0fpRIog7Djj751HM6yxDQCgU6hGNeEdc VZ5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NtCkjxp6cTPKQb+Nsysc9H27MvJPw8Uk/TMHdrWhoaw=; b=lM1w0x3HkglO39Cpf4QmZyPOS97erQMNDvJW+e80tRiCjP1tnWH+1j+xFBn7M53nsx FJ95EISkpYEuPVAqukQajdcmGSXkHiysyz5CclJa6Rb1cuoIdVAAkGy7GNvJiMcS++6R 11zG/PWqTETj/48YrvLD2QOKv2rJ7VwbW90weue6S0qNenCcA1QcrkngenXRtPW3dXjx fYajfimsJZT1kHsPkh54epMHS9G0ZbYEK0ODlnIpThKcqycM2gM2TAZQtuS3xuycCnf/ bM7f5jkRAH3R1mMWBEA4JXsF7l2vszwFXEhNDk4dJCFmwW4lKWGRpay6cT/SL5JUMJUy N+UQ== X-Gm-Message-State: AOAM531yxnfJMJSnKIGqRUkS/gCOYFM2r3k3uqC3xYvHdIG8KbCsrWXr c7LwaCBVQHtT2mi39vyJQx+E7HS2FdYv3rgp X-Google-Smtp-Source: ABdhPJxMhxnL2f8NkJVwZjeiVfQUFzJmIYxzvCFqXvjraU1gAWfEKQeH0Y7UUY3aDfAhhutfD5hWIw== X-Received: by 2002:a05:6000:1a8e:b0:1e3:8f6:dc44 with SMTP id f14-20020a0560001a8e00b001e308f6dc44mr387684wry.57.1644973634499; Tue, 15 Feb 2022 17:07:14 -0800 (PST) Received: from localhost.localdomain (3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.1.f.d.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:df16::3]) by smtp.gmail.com with ESMTPSA id m8sm10551185wms.4.2022.02.15.17.07.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 17:07:13 -0800 (PST) From: Phillip Potter To: gregkh@linuxfoundation.org Cc: dan.carpenter@oracle.com, Larry.Finger@lwfinger.net, straube.linux@gmail.com, martin@kaiser.cx, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, paskripkin@gmail.com Subject: [PATCH v2 04/15] staging: r8188eu: remove DBG_88E calls from core subdir Date: Wed, 16 Feb 2022 01:06:58 +0000 Message-Id: <20220216010709.791-5-phil@philpotter.co.uk> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220216010709.791-1-phil@philpotter.co.uk> References: <20220216010709.791-1-phil@philpotter.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove all remaining DBG_88E calls from the core subdirectory. After some thought, it makes more sense to just entirely strip all of these calls, so that debugging code in the driver can be more consistent and useful going forwards. Signed-off-by: Phillip Potter --- drivers/staging/r8188eu/core/rtw_fw.c | 10 ----- drivers/staging/r8188eu/core/rtw_p2p.c | 35 ----------------- drivers/staging/r8188eu/core/rtw_pwrctrl.c | 30 ++------------- drivers/staging/r8188eu/core/rtw_recv.c | 36 ++---------------- drivers/staging/r8188eu/core/rtw_wlan_util.c | 40 +------------------- 5 files changed, 8 insertions(+), 143 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_fw.c b/drivers/staging/r8188e= u/core/rtw_fw.c index ce0e4e3b21f9..6d07927397de 100644 --- a/drivers/staging/r8188eu/core/rtw_fw.c +++ b/drivers/staging/r8188eu/core/rtw_fw.c @@ -191,10 +191,8 @@ static int fw_free_to_go(struct adapter *padapter) } while (counter++ < POLLING_READY_TIMEOUT_COUNT); =20 if (counter >=3D POLLING_READY_TIMEOUT_COUNT) { - DBG_88E("%s: chksum report fail! REG_MCUFWDL:0x%08x\n", __func__, value3= 2); return _FAIL; } - DBG_88E("%s: Checksum report OK! REG_MCUFWDL:0x%08x\n", __func__, value32= ); =20 value32 =3D rtw_read32(padapter, REG_MCUFWDL); value32 |=3D MCUFWDL_RDY; @@ -208,13 +206,11 @@ static int fw_free_to_go(struct adapter *padapter) do { value32 =3D rtw_read32(padapter, REG_MCUFWDL); if (value32 & WINTINI_RDY) { - DBG_88E("%s: Polling FW ready success!! REG_MCUFWDL:0x%08x\n", __func__= , value32); return _SUCCESS; } udelay(5); } while (counter++ < POLLING_READY_TIMEOUT_COUNT); =20 - DBG_88E("%s: Polling FW ready fail!! REG_MCUFWDL:0x%08x\n", __func__, val= ue32); return _FAIL; } =20 @@ -306,20 +302,14 @@ int rtl8188e_firmware_download(struct adapter *padapt= er) if (ret =3D=3D _SUCCESS || (rtw_get_passing_time_ms(fwdl_start_time) > 500 && write_fw_retry++ = >=3D 3)) break; - - DBG_88E("%s write_fw_retry:%u, time after fwdl_start_time:%ums\n", - __func__, write_fw_retry, rtw_get_passing_time_ms(fwdl_start_time) - ); } fw_download_enable(padapter, false); if (ret !=3D _SUCCESS) { - DBG_88E("DL Firmware failed!\n"); goto exit; } =20 ret =3D fw_free_to_go(padapter); if (ret !=3D _SUCCESS) { - DBG_88E("DL Firmware failed!\n"); goto exit; } =20 diff --git a/drivers/staging/r8188eu/core/rtw_p2p.c b/drivers/staging/r8188= eu/core/rtw_p2p.c index 50b4fca869a7..8f4bad399bc4 100644 --- a/drivers/staging/r8188eu/core/rtw_p2p.c +++ b/drivers/staging/r8188eu/core/rtw_p2p.c @@ -30,8 +30,6 @@ static u32 go_add_group_info_attr(struct wifidirect_info = *pwdinfo, u8 *pbuf) struct adapter *padapter =3D pwdinfo->padapter; struct sta_priv *pstapriv =3D &padapter->stapriv; =20 - DBG_88E("%s\n", __func__); - pdata_attr =3D kzalloc(MAX_P2P_IE_LEN, GFP_KERNEL); =20 pstart =3D pdata_attr; @@ -123,8 +121,6 @@ static void issue_group_disc_req(struct wifidirect_info= *pwdinfo, u8 *da) u8 oui_subtype =3D P2P_GO_DISC_REQUEST; u8 dialogToken =3D 0; =20 - DBG_88E("[%s]\n", __func__); - pmgntframe =3D alloc_mgtxmitframe(pxmitpriv); if (!pmgntframe) return; @@ -182,8 +178,6 @@ static void issue_p2p_devdisc_resp(struct wifidirect_in= fo *pwdinfo, u8 *da, u8 s u8 p2pie[8] =3D { 0x00 }; u32 p2pielen =3D 0; =20 - DBG_88E("[%s]\n", __func__); - pmgntframe =3D alloc_mgtxmitframe(pxmitpriv); if (!pmgntframe) return; @@ -329,8 +323,6 @@ static void issue_p2p_presence_resp(struct wifidirect_i= nfo *pwdinfo, u8 *da, u8 u8 noa_attr_content[32] =3D { 0x00 }; u32 p2pielen =3D 0; =20 - DBG_88E("[%s]\n", __func__); - pmgntframe =3D alloc_mgtxmitframe(pxmitpriv); if (!pmgntframe) return; @@ -827,16 +819,13 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *= pwdinfo, u8 *pframe, uint l p2p_ie =3D rtw_get_p2p_ie(ies, ies_len, NULL, &p2p_ielen); =20 if (!p2p_ie) { - DBG_88E("[%s] P2P IE not Found!!\n", __func__); status_code =3D P2P_STATUS_FAIL_INVALID_PARAM; } else { - DBG_88E("[%s] P2P IE Found!!\n", __func__); } =20 while (p2p_ie) { /* Check P2P Capability ATTR */ if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8= *)&le_tmp, (uint *)&attr_contentlen)) { - DBG_88E("[%s] Got P2P Capability Attr!!\n", __func__); cap_attr =3D le16_to_cpu(le_tmp); psta->dev_cap =3D cap_attr & 0xff; } @@ -845,7 +834,6 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pw= dinfo, u8 *pframe, uint l =20 /* Check P2P Device Info ATTR */ if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_DEVICE_INFO, NU= LL, (uint *)&attr_contentlen)) { - DBG_88E("[%s] Got P2P DEVICE INFO Attr!!\n", __func__); pattr_content =3D kzalloc(attr_contentlen, GFP_KERNEL); pbuf =3D pattr_content; if (pattr_content) { @@ -1004,7 +992,6 @@ u8 process_p2p_provdisc_req(struct wifidirect_info *pw= dinfo, u8 *pframe, uint l issue_p2p_provision_resp(pwdinfo, GetAddr2Ptr(pframe), frame_body, ucon= fig_method); } } - DBG_88E("[%s] config method =3D %s\n", __func__, pwdinfo->rx_prov_disc_in= fo.strconfig_method_desc_of_prov_disc_req); return true; } =20 @@ -1083,7 +1070,6 @@ u8 process_p2p_group_negotation_req(struct wifidirect= _info *pwdinfo, u8 *pframe, memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_r= eq, "pbc", 3); } } else { - DBG_88E("[%s] WPS IE not Found!!\n", __func__); result =3D P2P_STATUS_FAIL_INCOMPATIBLE_PARAM; rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_FAIL); return result; @@ -1101,7 +1087,6 @@ u8 process_p2p_group_negotation_req(struct wifidirect= _info *pwdinfo, u8 *pframe, p2p_ie =3D rtw_get_p2p_ie(ies, ies_len, NULL, &p2p_ielen); =20 if (!p2p_ie) { - DBG_88E("[%s] P2P IE not Found!!\n", __func__); result =3D P2P_STATUS_FAIL_INCOMPATIBLE_PARAM; rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_FAIL); } @@ -1119,7 +1104,6 @@ u8 process_p2p_group_negotation_req(struct wifidirect= _info *pwdinfo, u8 *pframe, rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_ING); =20 if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GO_INTENT, &att= r_content, &attr_contentlen)) { - DBG_88E("[%s] GO Intent =3D %d, tie =3D %d\n", __func__, attr_content >= > 1, attr_content & 0x01); pwdinfo->peer_intent =3D attr_content; /* include both intent and tie b= reaker values. */ =20 if (pwdinfo->intent =3D=3D (pwdinfo->peer_intent >> 1)) { @@ -1157,7 +1141,6 @@ u8 process_p2p_group_negotation_req(struct wifidirect= _info *pwdinfo, u8 *pframe, ch_num_inclusioned =3D rtw_p2p_ch_inclusion(&padapter->mlmeextpriv, pee= r_ch_list, peer_ch_num, ch_list_inclusioned); =20 if (ch_num_inclusioned =3D=3D 0) { - DBG_88E("[%s] No common channel in channel list!\n", __func__); result =3D P2P_STATUS_FAIL_NO_COMMON_CH; rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_FAIL); break; @@ -1178,11 +1161,9 @@ u8 process_p2p_group_negotation_req(struct wifidirec= t_info *pwdinfo, u8 *pframe, * Change our operating channel as peer's for compatibility. */ pwdinfo->operating_channel =3D peer_operating_ch; - DBG_88E("[%s] Change op ch to %02x as peer's\n", __func__, pwdinfo->= operating_channel); } else { /* Take first channel of ch_list_inclusioned as operating channel */ pwdinfo->operating_channel =3D ch_list_inclusioned[0]; - DBG_88E("[%s] Change op ch to %02x\n", __func__, pwdinfo->operating_= channel); } } } @@ -1210,7 +1191,6 @@ u8 process_p2p_group_negotation_resp(struct wifidirec= t_info *pwdinfo, u8 *pframe =20 if (rtw_get_wps_ie(ies, ies_len, NULL, &wps_ielen)) { } else { - DBG_88E("[%s] WPS IE not Found!!\n", __func__); result =3D P2P_STATUS_FAIL_INCOMPATIBLE_PARAM; rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_FAIL); } @@ -1233,7 +1213,6 @@ u8 process_p2p_group_negotation_resp(struct wifidirec= t_info *pwdinfo, u8 *pframe while (p2p_ie) { /* Found the P2P IE. */ rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_STATUS, &attr_cont= ent, &attr_contentlen); if (attr_contentlen =3D=3D 1) { - DBG_88E("[%s] Status =3D %d\n", __func__, attr_content); if (attr_content =3D=3D P2P_STATUS_SUCCESS) { /* Do nothing. */ } else { @@ -1259,7 +1238,6 @@ u8 process_p2p_group_negotation_resp(struct wifidirec= t_info *pwdinfo, u8 *pframe attr_content =3D 0x00; attr_contentlen =3D 0; if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GO_INTENT, &at= tr_content, &attr_contentlen)) { - DBG_88E("[%s] GO Intent =3D %d, tie =3D %d\n", __func__, attr_content = >> 1, attr_content & 0x01); pwdinfo->peer_intent =3D attr_content; /* include both intent and tie = breaker values. */ =20 if (pwdinfo->intent =3D=3D (pwdinfo->peer_intent >> 1)) { @@ -1297,19 +1275,16 @@ u8 process_p2p_group_negotation_resp(struct wifidir= ect_info *pwdinfo, u8 *pframe =20 attr_contentlen =3D 0; if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, = operatingch_info, &attr_contentlen)) { - DBG_88E("[%s] Peer's operating channel =3D %d\n", __func__, operatingc= h_info[4]); pwdinfo->peer_operating_ch =3D operatingch_info[4]; } =20 /* Try to get the channel list information */ if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CH_LIST, pwdin= fo->channel_list_attr, &pwdinfo->channel_list_attr_len)) { - DBG_88E("[%s] channel list attribute found, len =3D %d\n", __func__, = pwdinfo->channel_list_attr_len); =20 peer_ch_num =3D rtw_p2p_get_peer_ch_list(pwdinfo, pwdinfo->channel_lis= t_attr, pwdinfo->channel_list_attr_len, peer_ch_list); ch_num_inclusioned =3D rtw_p2p_ch_inclusion(&padapter->mlmeextpriv, pe= er_ch_list, peer_ch_num, ch_list_inclusioned); =20 if (ch_num_inclusioned =3D=3D 0) { - DBG_88E("[%s] No common channel in channel list!\n", __func__); result =3D P2P_STATUS_FAIL_NO_COMMON_CH; rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_FAIL); break; @@ -1330,16 +1305,13 @@ u8 process_p2p_group_negotation_resp(struct wifidir= ect_info *pwdinfo, u8 *pframe * Change our operating channel as peer's for compatibility. */ pwdinfo->operating_channel =3D peer_operating_ch; - DBG_88E("[%s] Change op ch to %02x as peer's\n", __func__, pwdinfo-= >operating_channel); } else { /* Take first channel of ch_list_inclusioned as operating channel = */ pwdinfo->operating_channel =3D ch_list_inclusioned[0]; - DBG_88E("[%s] Change op ch to %02x\n", __func__, pwdinfo->operating= _channel); } } } } else { - DBG_88E("[%s] channel list attribute not found!\n", __func__); } =20 /* Try to get the group id information if peer is GO */ @@ -1376,7 +1348,6 @@ u8 process_p2p_group_negotation_confirm(struct wifidi= rect_info *pwdinfo, u8 *pfr pwdinfo->negotiation_dialog_token =3D 1; rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_STATUS, &attr_conte= nt, &attr_contentlen); if (attr_contentlen =3D=3D 1) { - DBG_88E("[%s] Status =3D %d\n", __func__, attr_content); result =3D attr_content; =20 if (attr_content =3D=3D P2P_STATUS_SUCCESS) { @@ -1408,14 +1379,12 @@ u8 process_p2p_group_negotation_confirm(struct wifi= direct_info *pwdinfo, u8 *pfr attr_contentlen =3D 0; memset(groupid, 0x00, 38); if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, group= id, &attr_contentlen)) { - DBG_88E("[%s] Ssid =3D %s, ssidlen =3D %zu\n", __func__, &groupid[ETH_A= LEN], strlen(&groupid[ETH_ALEN])); memcpy(pwdinfo->groupid_info.go_device_addr, &groupid[0], ETH_ALEN); memcpy(pwdinfo->groupid_info.ssid, &groupid[6], attr_contentlen - ETH_A= LEN); } =20 attr_contentlen =3D 0; if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, o= peratingch_info, &attr_contentlen)) { - DBG_88E("[%s] Peer's operating channel =3D %d\n", __func__, operatingch= _info[4]); pwdinfo->peer_operating_ch =3D operatingch_info[4]; } =20 @@ -1653,7 +1622,6 @@ void p2p_ps_wk_hdl(struct adapter *padapter, u8 p2p_p= s_state) if (pwdinfo->ctwindow > 0) { if (pwrpriv->smart_ps !=3D 0) { pwrpriv->smart_ps =3D 0; - DBG_88E("%s(): Enter CTW, change SmartPS\n", __func__); SetHwReg8188EU(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&padapter->pwr= ctrlpriv.pwr_mode)); } } @@ -1723,7 +1691,6 @@ static void reset_ch_sitesurvey_timer_process(struct = timer_list *t) if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) return; =20 - DBG_88E("[%s] In\n", __func__); /* Reset the operation channel information */ pwdinfo->rx_invitereq_info.operation_ch[0] =3D 0; pwdinfo->rx_invitereq_info.scan_op_ch_only =3D 0; @@ -1737,7 +1704,6 @@ static void reset_ch_sitesurvey_timer_process2(struct= timer_list *t) if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) return; =20 - DBG_88E("[%s] In\n", __func__); /* Reset the operation channel information */ pwdinfo->p2p_info.operation_ch[0] =3D 0; pwdinfo->p2p_info.scan_op_ch_only =3D 0; @@ -1778,7 +1744,6 @@ static void pre_tx_scan_timer_process(struct timer_li= st *t) if (pwdinfo->invitereq_info.benable) p2p_protocol_wk_cmd(adapter, P2P_PRE_TX_INVITEREQ_PROCESS_WK); } else { - DBG_88E("[%s] p2p_state is %d, ignore!!\n", __func__, rtw_p2p_state(pwdi= nfo)); } =20 spin_unlock_bh(&pmlmepriv->lock); diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r= 8188eu/core/rtw_pwrctrl.c index ff35685eaa12..db7074bf5741 100644 --- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c +++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c @@ -26,7 +26,6 @@ void ips_enter(struct adapter *padapter) pwrpriv->ips_mode =3D pwrpriv->ips_mode_req; =20 pwrpriv->ips_enter_cnts++; - DBG_88E("=3D=3D>ips_enter cnts:%d\n", pwrpriv->ips_enter_cnts); if (rf_off =3D=3D pwrpriv->change_rfpwrstate) { pwrpriv->bpower_saving =3D true; =20 @@ -55,7 +54,6 @@ int ips_leave(struct adapter *padapter) pwrpriv->bips_processing =3D true; pwrpriv->change_rfpwrstate =3D rf_on; pwrpriv->ips_leave_cnts++; - DBG_88E("=3D=3D>ips_leave cnts:%d\n", pwrpriv->ips_leave_cnts); =20 result =3D rtw_ips_pwr_up(padapter); if (result =3D=3D _SUCCESS) { @@ -63,7 +61,6 @@ int ips_leave(struct adapter *padapter) } =20 if ((_WEP40_ =3D=3D psecuritypriv->dot11PrivacyAlgrthm) || (_WEP104_ =3D= =3D psecuritypriv->dot11PrivacyAlgrthm)) { - DBG_88E("=3D=3D>%s, channel(%d), processing(%x)\n", __func__, padapter-= >mlmeextpriv.cur_channel, pwrpriv->bips_processing); set_channel_bwmode(padapter, padapter->mlmeextpriv.cur_channel, HAL_PRI= ME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20); for (keyid =3D 0; keyid < 4; keyid++) { if (pmlmepriv->key_mask & BIT(keyid)) { @@ -75,7 +72,6 @@ int ips_leave(struct adapter *padapter) } } =20 - DBG_88E("=3D=3D> ips_leave.....LED(0x%08x)...\n", rtw_read32(padapter, 0= x4c)); pwrpriv->bips_processing =3D false; =20 pwrpriv->bkeepfwalive =3D false; @@ -126,7 +122,6 @@ static bool rtw_pwr_unassociated_idle(struct adapter *a= dapter) void rtw_ps_processor(struct adapter *padapter) { struct pwrctrl_priv *pwrpriv =3D &padapter->pwrctrlpriv; - struct mlme_priv *pmlmepriv =3D &padapter->mlmepriv; =20 pwrpriv->ps_processing =3D true; =20 @@ -140,7 +135,6 @@ void rtw_ps_processor(struct adapter *padapter) goto exit; =20 if ((pwrpriv->rf_pwrstate =3D=3D rf_on) && ((pwrpriv->pwr_state_check_cnt= s % 4) =3D=3D 0)) { - DBG_88E("=3D=3D>%s .fw_state(%x)\n", __func__, get_fwstate(pmlmepriv)); pwrpriv->change_rfpwrstate =3D rf_off; =20 ips_enter(padapter); @@ -179,7 +173,6 @@ static u8 PS_RDY_CHECK(struct adapter *padapter) if (pwrpriv->bInSuspend) return false; if (padapter->securitypriv.dot11AuthAlgrthm =3D=3D dot11AuthAlgrthm_8021X= && !padapter->securitypriv.binstallGrpkey) { - DBG_88E("Group handshake still in progress !!!\n"); return false; } return true; @@ -205,14 +198,12 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_= mode, u8 smart_ps, u8 bcn_a /* if (pwrpriv->pwr_mode =3D=3D PS_MODE_ACTIVE) */ if (ps_mode =3D=3D PS_MODE_ACTIVE) { if (pwdinfo->opp_ps =3D=3D 0) { - DBG_88E("rtw_set_ps_mode: Leave 802.11 power save\n"); pwrpriv->pwr_mode =3D ps_mode; SetHwReg8188EU(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&ps_mode)); pwrpriv->bFwCurrentInPSMode =3D false; } } else { if (PS_RDY_CHECK(padapter)) { - DBG_88E("%s: Enter 802.11 power save\n", __func__); pwrpriv->bFwCurrentInPSMode =3D true; pwrpriv->pwr_mode =3D ps_mode; pwrpriv->smart_ps =3D smart_ps; @@ -247,13 +238,11 @@ s32 LPS_RF_ON_check(struct adapter *padapter, u32 del= ay_ms) =20 if (padapter->bSurpriseRemoved) { err =3D -2; - DBG_88E("%s: device surprise removed!!\n", __func__); break; } =20 if (rtw_get_passing_time_ms(start_time) > delay_ms) { err =3D -1; - DBG_88E("%s: Wait for FW LPS leave more than %u ms!!!\n", __func__, del= ay_ms); break; } rtw_usleep_os(100); @@ -278,7 +267,6 @@ void LPS_Enter(struct adapter *padapter) if (pwrpriv->LpsIdleCount >=3D 2) { /* 4 Sec */ if (pwrpriv->pwr_mode =3D=3D PS_MODE_ACTIVE) { pwrpriv->bpower_saving =3D true; - DBG_88E("%s smart_ps:%d\n", __func__, pwrpriv->smart_ps); /* For Tenda W311R IOT issue */ rtw_set_ps_mode(padapter, pwrpriv->power_mgnt, pwrpriv->smart_ps, 0x40); @@ -377,13 +365,12 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips= _deffer_ms, const char *cal pwrpriv->ips_deny_time =3D jiffies + rtw_ms_to_systime(ips_deffer_ms); =20 if (pwrpriv->ps_processing) { - DBG_88E("%s wait ps_processing...\n", __func__); while (pwrpriv->ps_processing && rtw_get_passing_time_ms(start) <=3D 300= 0) msleep(10); if (pwrpriv->ps_processing) - DBG_88E("%s wait ps_processing timeout\n", __func__); + ; else - DBG_88E("%s wait ps_processing done\n", __func__); + ; } =20 /* System suspend is not allowed to wakeup */ @@ -393,9 +380,9 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_d= effer_ms, const char *cal (rtw_get_passing_time_ms(start) <=3D 500))) msleep(10); if (pwrpriv->bInSuspend) - DBG_88E("%s wait bInSuspend timeout\n", __func__); + ; else - DBG_88E("%s wait bInSuspend done\n", __func__); + ; } =20 /* I think this should be check in IPS, LPS, autosuspend functions... */ @@ -404,9 +391,7 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_d= effer_ms, const char *cal goto exit; } if (rf_off =3D=3D pwrpriv->rf_pwrstate) { - DBG_88E("%s call ips_leave....\n", __func__); if (_FAIL =3D=3D ips_leave(padapter)) { - DBG_88E("=3D=3D=3D=3D=3D=3D> ips_leave fail.............\n"); ret =3D _FAIL; goto exit; } @@ -415,11 +400,6 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_= deffer_ms, const char *cal /* TODO: the following checking need to be merged... */ if (padapter->bDriverStopped || !padapter->bup || !padapter->hw_init_completed) { - DBG_88E("%s: bDriverStopped=3D%d, bup=3D%d, hw_init_completed =3D%u\n" - , caller - , padapter->bDriverStopped - , padapter->bup - , padapter->hw_init_completed); ret =3D false; goto exit; } @@ -457,11 +437,9 @@ int rtw_pm_set_ips(struct adapter *padapter, u8 mode) =20 if (mode =3D=3D IPS_NORMAL || mode =3D=3D IPS_LEVEL_2) { rtw_ips_mode_req(pwrctrlpriv, mode); - DBG_88E("%s %s\n", __func__, mode =3D=3D IPS_NORMAL ? "IPS_NORMAL" : "IP= S_LEVEL_2"); return 0; } else if (mode =3D=3D IPS_NONE) { rtw_ips_mode_req(pwrctrlpriv, mode); - DBG_88E("%s %s\n", __func__, "IPS_NONE"); if ((padapter->bSurpriseRemoved =3D=3D 0) && (_FAIL =3D=3D rtw_pwr_wakeu= p(padapter))) return -EFAULT; } else { diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r818= 8eu/core/rtw_recv.c index acc0dd87b62e..0f8f757de02a 100644 --- a/drivers/staging/r8188eu/core/rtw_recv.c +++ b/drivers/staging/r8188eu/core/rtw_recv.c @@ -240,7 +240,6 @@ u32 rtw_free_uc_swdec_pending_queue(struct adapter *ada= pter) struct recv_frame *pending_frame; while ((pending_frame =3D rtw_alloc_recvframe(&adapter->recvpriv.uc_swdec= _pending_queue))) { rtw_free_recvframe(pending_frame, &adapter->recvpriv.free_recv_queue); - DBG_88E("%s: dequeue uc_swdec_pending_queue\n", __func__); cnt++; } =20 @@ -272,7 +271,6 @@ static int recvframe_chkmic(struct adapter *adapter, s= truct recv_frame *precvfr =20 if (!psecuritypriv) { res =3D _FAIL; - DBG_88E("\n recvframe_chkmic:didn't install group key!!!!!!!!!!\n"); goto exit; } } else { @@ -303,9 +301,7 @@ static int recvframe_chkmic(struct adapter *adapter, s= truct recv_frame *precvfr =20 if ((prxattrib->bdecrypted) && (brpt_micerror)) { rtw_handle_tkip_mic_err(adapter, (u8)is_multicast_ether_addr(prxattri= b->ra)); - DBG_88E(" mic error :prxattrib->bdecrypted=3D%d\n", prxattrib->bdecry= pted); } else { - DBG_88E(" mic error :prxattrib->bdecrypted=3D%d\n", prxattrib->bdecry= pted); } res =3D _FAIL; } else { @@ -336,8 +332,6 @@ static struct recv_frame *decryptor(struct adapter *pad= apter, struct recv_frame prxattrib->key_index =3D (((iv[3]) >> 6) & 0x3); =20 if (prxattrib->key_index > WEP_KEYS) { - DBG_88E("prxattrib->key_index(%d)>WEP_KEYS\n", prxattrib->key_index); - switch (prxattrib->encrypt) { case _WEP40_: case _WEP104_: @@ -686,7 +680,6 @@ static int ap2sta_data_frame( !memcmp(mybssid, "\x0\x0\x0\x0\x0\x0", ETH_ALEN) || (memcmp(pattrib->bssid, mybssid, ETH_ALEN))) { if (!bmcast) { - DBG_88E("issue_deauth to the nonassociated ap=3D%pM for the reason(7)\= n", (pattrib->bssid)); issue_deauth(adapter, pattrib->bssid, WLAN_REASON_CLASS3_FRAME_FROM_NO= NASSOC_STA); } =20 @@ -737,8 +730,6 @@ static int ap2sta_data_frame( if (!memcmp(myhwaddr, pattrib->dst, ETH_ALEN) && (!bmcast)) { *psta =3D rtw_get_stainfo(pstapriv, pattrib->bssid); /* get sta_info */ if (!*psta) { - DBG_88E("issue_deauth to the ap =3D%pM for the reason(7)\n", (pattrib-= >bssid)); - issue_deauth(adapter, pattrib->bssid, WLAN_REASON_CLASS3_FRAME_FROM_NO= NASSOC_STA); } } @@ -771,8 +762,6 @@ static int sta2ap_data_frame(struct adapter *adapter, =20 *psta =3D rtw_get_stainfo(pstapriv, pattrib->src); if (!*psta) { - DBG_88E("issue_deauth to sta=3D%pM for the reason(7)\n", (pattrib->src)= ); - issue_deauth(adapter, pattrib->src, WLAN_REASON_CLASS3_FRAME_FROM_NONAS= SOC_STA); =20 ret =3D RTW_RX_HANDLED; @@ -797,7 +786,6 @@ static int sta2ap_data_frame(struct adapter *adapter, ret =3D RTW_RX_HANDLED; goto exit; } - DBG_88E("issue_deauth to sta=3D%pM for the reason(7)\n", (pattrib->src)); issue_deauth(adapter, pattrib->src, WLAN_REASON_CLASS3_FRAME_FROM_NONASS= OC_STA); ret =3D RTW_RX_HANDLED; goto exit; @@ -862,7 +850,6 @@ static int validate_recv_ctrl_frame(struct adapter *pad= apter, return _FAIL; =20 if (psta->state & WIFI_STA_ALIVE_CHK_STATE) { - DBG_88E("%s alive check-rx ps-poll\n", __func__); psta->expire_to =3D pstapriv->expire_to; psta->state ^=3D WIFI_STA_ALIVE_CHK_STATE; } @@ -903,12 +890,9 @@ static int validate_recv_ctrl_frame(struct adapter *pa= dapter, } else { if (pstapriv->tim_bitmap & BIT(psta->aid)) { if (psta->sleepq_len =3D=3D 0) { - DBG_88E("no buffered packets to xmit\n"); - /* issue nulldata with More data bit =3D 0 to indicate we have no bu= ffered packets */ issue_nulldata(padapter, psta->hwaddr, 0, 0, 0); } else { - DBG_88E("error!psta->sleepq_len=3D%d\n", psta->sleepq_len); psta->sleepq_len =3D 0; } =20 @@ -1115,31 +1099,21 @@ static int validate_recv_frame(struct adapter *adap= ter, struct recv_frame *precv GetHalDefVar8188EUsb(adapter, HAL_DEF_DBG_DUMP_RXPKT, &bDumpRxPkt); if (bDumpRxPkt =3D=3D 1) {/* dump all rx packets */ int i; - DBG_88E("#############################\n"); =20 for (i =3D 0; i < 64; i =3D i + 8) - DBG_88E("%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:\n", *(ptr + i), - *(ptr + i + 1), *(ptr + i + 2), *(ptr + i + 3), *(ptr + i + 4), *(ptr = + i + 5), *(ptr + i + 6), *(ptr + i + 7)); - DBG_88E("#############################\n"); + ; } else if (bDumpRxPkt =3D=3D 2) { if (type =3D=3D WIFI_MGT_TYPE) { int i; - DBG_88E("#############################\n"); =20 for (i =3D 0; i < 64; i =3D i + 8) - DBG_88E("%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:\n", *(ptr + i), - *(ptr + i + 1), *(ptr + i + 2), *(ptr + i + 3), *(ptr + i + 4), *(ptr= + i + 5), *(ptr + i + 6), *(ptr + i + 7)); - DBG_88E("#############################\n"); + ; } } else if (bDumpRxPkt =3D=3D 3) { if (type =3D=3D WIFI_DATA_TYPE) { int i; - DBG_88E("#############################\n"); - for (i =3D 0; i < 64; i =3D i + 8) - DBG_88E("%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:\n", *(ptr + i), - *(ptr + i + 1), *(ptr + i + 2), *(ptr + i + 3), *(ptr + i + 4), *(ptr= + i + 5), *(ptr + i + 6), *(ptr + i + 7)); - DBG_88E("#############################\n"); + ; } } switch (type) { @@ -1446,7 +1420,6 @@ static int amsdu_to_msdu(struct adapter *padapter, st= ruct recv_frame *prframe) nSubframe_Length =3D RTW_GET_BE16(pdata + 12); =20 if (a_len < ETH_HLEN + nSubframe_Length) { - DBG_88E("nRemain_Length is %d and nSubframe_Length is : %d\n", a_len, n= Subframe_Length); goto exit; } =20 @@ -1467,7 +1440,6 @@ static int amsdu_to_msdu(struct adapter *padapter, st= ruct recv_frame *prframe) sub_skb->len =3D nSubframe_Length; skb_set_tail_pointer(sub_skb, nSubframe_Length); } else { - DBG_88E("skb_clone() Fail!!! , nr_subframes=3D%d\n", nr_subframes); break; } } @@ -1475,7 +1447,6 @@ static int amsdu_to_msdu(struct adapter *padapter, st= ruct recv_frame *prframe) subframes[nr_subframes++] =3D sub_skb; =20 if (nr_subframes >=3D MAX_SUBFRAME_COUNT) { - DBG_88E("ParseSubframe(): Too many Subframes! Packets dropped!\n"); break; } =20 @@ -1871,7 +1842,6 @@ static int recv_func(struct adapter *padapter, struct= recv_frame *rframe) psecuritypriv->ndisauthtype =3D=3D Ndis802_11AuthModeWPAPSK && !psecuritypriv->busetkipkey) { rtw_enqueue_recvframe(rframe, &padapter->recvpriv.uc_swdec_pending_queu= e); - DBG_88E("%s: no key, enqueue uc_swdec_pending_queue\n", __func__); if (recvpriv->free_recvframe_cnt < NR_RECVFRAME / 4) { /* to prevent from recvframe starvation, * get recvframe from uc_swdec_pending_queue to diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging= /r8188eu/core/rtw_wlan_util.c index c6288c2d5f33..abc2386dc8d9 100644 --- a/drivers/staging/r8188eu/core/rtw_wlan_util.c +++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c @@ -335,7 +335,7 @@ void set_channel_bwmode(struct adapter *padapter, unsig= ned char channel, unsigne u8 center_ch; =20 if (padapter->bNotifyChannelChange) - DBG_88E("[%s] ch =3D %d, offset =3D %d, bwmode =3D %d\n", __func__, chan= nel, channel_offset, bwmode); + ; =20 if ((bwmode =3D=3D HT_CHANNEL_WIDTH_20) || (channel_offset =3D=3D HAL_PRIME_CHNL_OFFSET_DONT_CARE)) { @@ -572,8 +572,6 @@ void WMMOnAssocRsp(struct adapter *padapter) edca[XMIT_VO_QUEUE] =3D acParm; break; } - - DBG_88E("WMM(%x): %x, %x\n", ACI, ACM, acParm); } =20 if (padapter->registrypriv.acm_method =3D=3D 1) @@ -610,7 +608,6 @@ void WMMOnAssocRsp(struct adapter *padapter) =20 for (i =3D 0; i < 4; i++) { pxmitpriv->wmm_para_seq[i] =3D inx[i]; - DBG_88E("wmm_para_seq(%d): %d\n", i, pxmitpriv->wmm_para_seq[i]); } } =20 @@ -758,8 +755,6 @@ void HTOnAssocRsp(struct adapter *padapter) struct mlme_ext_priv *pmlmeext =3D &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo =3D &pmlmeext->mlmext_info; =20 - DBG_88E("%s\n", __func__); - if ((pmlmeinfo->HT_info_enable) && (pmlmeinfo->HT_caps_enable)) { pmlmeinfo->HT_enable =3D 1; } else { @@ -858,13 +853,10 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *= pframe, u32 packet_len) len =3D packet_len - sizeof(struct rtw_ieee80211_hdr_3addr); =20 if (len > MAX_IE_SZ) { - DBG_88E("%s IE too long for survey event\n", __func__); return _FAIL; } =20 if (memcmp(cur_network->network.MacAddress, pbssid, 6)) { - DBG_88E("Oops: rtw_check_network_encrypt linked but recv other bssid bcn= \n%pM %pM\n", - (pbssid), (cur_network->network.MacAddress)); return true; } =20 @@ -902,11 +894,6 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *p= frame, u32 packet_len) } if (ht_cap_info !=3D cur_network->BcnInfo.ht_cap_info || ((ht_info_infos_0 & 0x03) !=3D (cur_network->BcnInfo.ht_info_infos_0 = & 0x03))) { - DBG_88E("%s bcn now: ht_cap_info:%x ht_info_infos_0:%x\n", __func__, - ht_cap_info, ht_info_infos_0); - DBG_88E("%s bcn link: ht_cap_info:%x ht_info_infos_0:%x\n", __func__, - cur_network->BcnInfo.ht_cap_info, cur_network->BcnInfo.ht_info_infos_0= ); - DBG_88E("%s bw mode change, disconnect\n", __func__); /* bcn_info_update */ cur_network->BcnInfo.ht_cap_info =3D ht_cap_info; cur_network->BcnInfo.ht_info_infos_0 =3D ht_info_infos_0; @@ -923,20 +910,16 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *= pframe, u32 packet_len) if (pht_info) { bcn_channel =3D pht_info->primary_channel; } else { /* we don't find channel IE, so don't check it */ - DBG_88E("Oops: %s we don't find channel IE, so don't check it\n", __f= unc__); bcn_channel =3D Adapter->mlmeextpriv.cur_channel; } } if (bcn_channel !=3D Adapter->mlmeextpriv.cur_channel) { - DBG_88E("%s beacon channel:%d cur channel:%d disconnect\n", __func__, - bcn_channel, Adapter->mlmeextpriv.cur_channel); goto _mismatch; } =20 /* checking SSID */ p =3D rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _SSID_IE_, &len, bssid->= IELength - _FIXED_IE_LENGTH_); if (!p) { - DBG_88E("%s marc: cannot find SSID for survey event\n", __func__); hidden_ssid =3D true; } else { hidden_ssid =3D false; @@ -953,7 +936,6 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pf= rame, u32 packet_len) if (memcmp(bssid->Ssid.Ssid, cur_network->network.Ssid.Ssid, 32) || bssid->Ssid.SsidLength !=3D cur_network->network.Ssid.SsidLength) { if (bssid->Ssid.Ssid[0] !=3D '\0' && bssid->Ssid.SsidLength !=3D 0) { /*= not hidden ssid */ - DBG_88E("%s(), SSID is not match return FAIL\n", __func__); goto _mismatch; } } @@ -967,7 +949,6 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pf= rame, u32 packet_len) bssid->Privacy =3D 0; =20 if (cur_network->network.Privacy !=3D bssid->Privacy) { - DBG_88E("%s(), privacy is not match return FAIL\n", __func__); goto _mismatch; } =20 @@ -983,7 +964,6 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pf= rame, u32 packet_len) } =20 if (cur_network->BcnInfo.encryp_protocol !=3D encryp_protocol) { - DBG_88E("%s(): enctyp is not match , return FAIL\n", __func__); goto _mismatch; } =20 @@ -999,14 +979,10 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *= pframe, u32 packet_len) } =20 if (pairwise_cipher !=3D cur_network->BcnInfo.pairwise_cipher || group_c= ipher !=3D cur_network->BcnInfo.group_cipher) { - DBG_88E("%s pairwise_cipher(%x:%x) or group_cipher(%x:%x) is not match = , return FAIL\n", __func__, - pairwise_cipher, cur_network->BcnInfo.pairwise_cipher, - group_cipher, cur_network->BcnInfo.group_cipher); goto _mismatch; } =20 if (is_8021x !=3D cur_network->BcnInfo.is_8021x) { - DBG_88E("%s authentication is not match , return FAIL\n", __func__); goto _mismatch; } } @@ -1257,38 +1233,29 @@ unsigned char check_assoc_AP(u8 *pframe, uint len) case _VENDOR_SPECIFIC_IE_: if ((!memcmp(pIE->data, ARTHEROS_OUI1, 3)) || (!memcmp(pIE->data, ARTHEROS_OUI2, 3))) { - DBG_88E("link to Artheros AP\n"); return HT_IOT_PEER_ATHEROS; } else if ((!memcmp(pIE->data, BROADCOM_OUI1, 3)) || (!memcmp(pIE->data, BROADCOM_OUI2, 3))) { - DBG_88E("link to Broadcom AP\n"); return HT_IOT_PEER_BROADCOM; } else if (!memcmp(pIE->data, MARVELL_OUI, 3)) { - DBG_88E("link to Marvell AP\n"); return HT_IOT_PEER_MARVELL; } else if (!memcmp(pIE->data, RALINK_OUI, 3)) { if (!ralink_vendor_flag) { ralink_vendor_flag =3D 1; } else { - DBG_88E("link to Ralink AP\n"); return HT_IOT_PEER_RALINK; } } else if (!memcmp(pIE->data, CISCO_OUI, 3)) { - DBG_88E("link to Cisco AP\n"); return HT_IOT_PEER_CISCO; } else if (!memcmp(pIE->data, REALTEK_OUI, 3)) { - DBG_88E("link to Realtek 96B\n"); return HT_IOT_PEER_REALTEK; } else if (!memcmp(pIE->data, AIRGOCAP_OUI, 3)) { - DBG_88E("link to Airgo Cap\n"); return HT_IOT_PEER_AIRGO; } else if (!memcmp(pIE->data, EPIGRAM_OUI, 3)) { epigram_vendor_flag =3D 1; if (ralink_vendor_flag) { - DBG_88E("link to Tenda W311R AP\n"); return HT_IOT_PEER_TENDA; } else { - DBG_88E("Capture EPIGRAM_OUI\n"); } } else { break; @@ -1302,13 +1269,10 @@ unsigned char check_assoc_AP(u8 *pframe, uint len) } =20 if (ralink_vendor_flag && !epigram_vendor_flag) { - DBG_88E("link to Ralink AP\n"); return HT_IOT_PEER_RALINK; } else if (ralink_vendor_flag && epigram_vendor_flag) { - DBG_88E("link to Tenda W311R AP\n"); return HT_IOT_PEER_TENDA; } else { - DBG_88E("link to new AP\n"); return HT_IOT_PEER_UNKNOWN; } } @@ -1518,13 +1482,11 @@ int rtw_handle_dualmac(struct adapter *adapter, boo= l init) if (init) { if (!pbuddy_padapter) { pbuddy_padapter =3D adapter; - DBG_88E("%s(): pbuddy_padapter =3D=3D NULL, Set pbuddy_padapter\n", __f= unc__); } else { adapter->pbuddy_adapter =3D pbuddy_padapter; pbuddy_padapter->pbuddy_adapter =3D adapter; /* clear global value */ pbuddy_padapter =3D NULL; - DBG_88E("%s(): pbuddy_padapter exist, Exchange Information\n", __func__= ); } } else { pbuddy_padapter =3D NULL; --=20 2.34.1 From nobody Sun Jun 28 02:50:42 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3BFDC433EF for ; Wed, 16 Feb 2022 01:07:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245318AbiBPBHp (ORCPT ); Tue, 15 Feb 2022 20:07:45 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:53470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245279AbiBPBHb (ORCPT ); Tue, 15 Feb 2022 20:07:31 -0500 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04453F540A for ; Tue, 15 Feb 2022 17:07:17 -0800 (PST) Received: by mail-wm1-x32c.google.com with SMTP id d14-20020a05600c34ce00b0037bf4d14dc7so506763wmq.3 for ; Tue, 15 Feb 2022 17:07:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philpotter-co-uk.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+sIg3BV9tyTI60f71oJe0AuyH0e4O8yLVbZtdgQuv8g=; b=67k/oTcd41T/3ZTK37JMx0MalVfS/bQ1yVWnY8OsVGxXWmJd0IQZyLPVmc2heY/UTb V7BHIROQBlmbEXLp8Piutly5o32c1NxEDssGiyqJ3BNIfahnSsyWiOmO7QlfB+7H1f46 A1M1FxzYXscyVqP7pbeEus4IlhcIX9rM2N8ydKLD1v7gacPvG0Etgez9b1t4o/cgfZcv av+jsTtlT2lN9e21nRLPVBZg/zwjRMZ0gUQo5suNyfh6txZOEv1fvGlvC4gQRhn4/f62 mDkEfSU0/i4PJpTijK35Nre28soGT1HjqIqkmjaN5YT1lNLGvtSnK9roJBmKrX/t40kd t/dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+sIg3BV9tyTI60f71oJe0AuyH0e4O8yLVbZtdgQuv8g=; b=2LdeOC29JcLryOFJSq/ukIDL6R7adAtuDV9kifG7e50sd6nL+Pgpl0GW44XQgH7fPe h3XGlLbmpX388/ijjQwKL8B6wJde+at/oU6dBBJrR9LDnd3HV0nPg0BxzOFAdRt7i/bg JdPwN0omf+2ZzJwaGmbHwnV5K7fcRnPIPzs9ouswQsOURbatQisr3GlnUjTFUGmygKSF HxVGnylE8sv5vqV3suLKmGv0MhXqoajqzjz5ZTG1+XEV3eyjJKhqEOT2QOmU4Gh+x3br 3XCx9VSYheQW+xsriJzhFW9TWZqB8oYegV18QvjPp8P6revqfWoUxa/vIg06hPwjLhXV JOYA== X-Gm-Message-State: AOAM532H6eWxDWN03r9RT1CrtxZcZW9x65NnB6PqJY9qLYpz8Dez+40n tPw+7biKJCeYWgxdWXIRPu8ShQ== X-Google-Smtp-Source: ABdhPJyadk1/exbOPhLMaxhpq8icKd3Nz0oc72Zdvn4CeSDgFAjMXJl5jvw4iL6d22fAwxak0zcvJg== X-Received: by 2002:a05:600c:35cb:b0:37e:34c8:c375 with SMTP id r11-20020a05600c35cb00b0037e34c8c375mr21414wmq.78.1644973635415; Tue, 15 Feb 2022 17:07:15 -0800 (PST) Received: from localhost.localdomain (3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.1.f.d.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:df16::3]) by smtp.gmail.com with ESMTPSA id m8sm10551185wms.4.2022.02.15.17.07.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 17:07:14 -0800 (PST) From: Phillip Potter To: gregkh@linuxfoundation.org Cc: dan.carpenter@oracle.com, Larry.Finger@lwfinger.net, straube.linux@gmail.com, martin@kaiser.cx, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, paskripkin@gmail.com Subject: [PATCH v2 05/15] staging: r8188eu: remove DBG_88E calls from hal subdir Date: Wed, 16 Feb 2022 01:06:59 +0000 Message-Id: <20220216010709.791-6-phil@philpotter.co.uk> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220216010709.791-1-phil@philpotter.co.uk> References: <20220216010709.791-1-phil@philpotter.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove all remaining DBG_88E calls from the hal subdirectory. After some thought, it makes more sense to just entirely strip all of these calls, so that debugging code in the driver can be more consistent and useful going forwards. Signed-off-by: Phillip Potter Reported-by: kernel test robot --- drivers/staging/r8188eu/hal/HalPwrSeqCmd.c | 1 - drivers/staging/r8188eu/hal/hal_intf.c | 3 +- drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 26 +----------- .../staging/r8188eu/hal/rtl8188e_hal_init.c | 40 +----------------- drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 2 +- drivers/staging/r8188eu/hal/rtl8188eu_recv.c | 4 +- drivers/staging/r8188eu/hal/rtl8188eu_xmit.c | 5 +-- drivers/staging/r8188eu/hal/usb_halinit.c | 42 +------------------ drivers/staging/r8188eu/hal/usb_ops_linux.c | 17 -------- 9 files changed, 9 insertions(+), 131 deletions(-) diff --git a/drivers/staging/r8188eu/hal/HalPwrSeqCmd.c b/drivers/staging/r= 8188eu/hal/HalPwrSeqCmd.c index 47ad4ea273cc..eb22ac17c586 100644 --- a/drivers/staging/r8188eu/hal/HalPwrSeqCmd.c +++ b/drivers/staging/r8188eu/hal/HalPwrSeqCmd.c @@ -64,7 +64,6 @@ u8 HalPwrSeqCmdParsing(struct adapter *padapter, struct w= l_pwr_cfg pwrseqcmd[]) udelay(10); =20 if (poll_count++ > max_poll_count) { - DBG_88E("Fail to polling Offset[%#x]\n", offset); return false; } } while (!poll_bit); diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188= eu/hal/hal_intf.c index fee3a598b59d..008098040a07 100644 --- a/drivers/staging/r8188eu/hal/hal_intf.c +++ b/drivers/staging/r8188eu/hal/hal_intf.c @@ -21,7 +21,6 @@ uint rtw_hal_init(struct adapter *adapt) hal_notch_filter_8188e(adapt, 1); } else { adapt->hw_init_completed =3D false; - DBG_88E("rtw_hal_init: hal__init fail\n"); } =20 return status; @@ -36,7 +35,7 @@ uint rtw_hal_deinit(struct adapter *adapt) if (status =3D=3D _SUCCESS) adapt->hw_init_completed =3D false; else - DBG_88E("\n rtw_hal_deinit: hal_init fail\n"); + ; =20 return status; } diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r= 8188eu/hal/rtl8188e_cmd.c index a491c37777df..93dfd3dee59b 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c @@ -55,7 +55,6 @@ static s32 FillH2CCmd_88E(struct adapter *adapt, u8 Eleme= ntID, u32 CmdLen, u8 *p u32 h2c_cmd_ex =3D 0; =20 if (!adapt->bFWReady) { - DBG_88E("FillH2CCmd_88E(): return H2C cmd because fw is not ready\n"); return _FAIL; } =20 @@ -67,7 +66,6 @@ static s32 FillH2CCmd_88E(struct adapter *adapt, u8 Eleme= ntID, u32 CmdLen, u8 *p h2c_box_num =3D haldata->LastHMEBoxNum; =20 if (!_is_fw_read_cmd_down(adapt, h2c_box_num)) { - DBG_88E(" fw read cmd failed...\n"); return _FAIL; } =20 @@ -115,7 +113,6 @@ u8 rtl8188e_set_raid_cmd(struct adapter *adapt, u32 mas= k) =20 FillH2CCmd_88E(adapt, H2C_DM_MACID_CFG, 3, buf); } else { - DBG_88E("=3D=3D>%s fw dont support RA\n", __func__); res =3D _FAIL; } =20 @@ -157,9 +154,6 @@ void rtl8188e_set_FwPwrMode_cmd(struct adapter *adapt, = u8 Mode) struct pwrctrl_priv *pwrpriv =3D &adapt->pwrctrlpriv; u8 RLBM =3D 0; /* 0:Min, 1:Max, 2:User define */ =20 - DBG_88E("%s: Mode=3D%d SmartPS=3D%d UAPSD=3D%d\n", __func__, - Mode, pwrpriv->smart_ps, adapt->registrypriv.uapsd_enable); - switch (Mode) { case PS_MODE_ACTIVE: H2CSetPwrMode.Mode =3D 0; @@ -200,12 +194,8 @@ void rtl8188e_set_FwPwrMode_cmd(struct adapter *adapt,= u8 Mode) =20 void rtl8188e_set_FwMediaStatus_cmd(struct adapter *adapt, __le16 mstatus_= rpt) { - u8 opmode, macid; u16 mst_rpt =3D le16_to_cpu(mstatus_rpt); - opmode =3D (u8)mst_rpt; - macid =3D (u8)(mst_rpt >> 8); =20 - DBG_88E("### %s: MStatus=3D%x MACID=3D%d\n", __func__, opmode, macid); FillH2CCmd_88E(adapt, H2C_COM_MEDIA_STATUS_RPT, sizeof(mst_rpt), (u8 *)&m= st_rpt); } =20 @@ -286,7 +276,6 @@ static void ConstructBeacon(struct adapter *adapt, u8 *= pframe, u32 *pLength) _ConstructBeacon: =20 if ((pktlen + TXDESC_SIZE) > 512) { - DBG_88E("beacon frame too large\n"); return; } =20 @@ -453,10 +442,8 @@ static void SetFwRsvdPagePkt(struct adapter *adapt, bo= ol bDLFinished) u32 TotalPacketLen; struct rsvdpage_loc RsvdPageLoc; =20 - DBG_88E("%s\n", __func__); ReservedPagePacket =3D kzalloc(1000, GFP_KERNEL); if (!ReservedPagePacket) { - DBG_88E("%s: alloc ReservedPagePacket fail!\n", __func__); return; } =20 @@ -535,7 +522,6 @@ static void SetFwRsvdPagePkt(struct adapter *adapt, boo= l bDLFinished) =20 rtl8188eu_mgnt_xmit(adapt, pmgntframe); =20 - DBG_88E("%s: Set RSVD page location to Fw\n", __func__); FillH2CCmd_88E(adapt, H2C_COM_RSVD_PAGE, sizeof(RsvdPageLoc), (u8 *)&Rsvd= PageLoc); =20 exit: @@ -552,8 +538,6 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *a= dapt, u8 mstatus) u8 DLBcnCount =3D 0; u32 poll =3D 0; =20 - DBG_88E("%s mstatus(%x)\n", __func__, mstatus); - if (mstatus =3D=3D 1) { /* We should set AID, correct TSF, HW seq enable before set JoinBssRepo= rt to Fw in 88/92C. */ /* Suggested by filen. Added by tynli. */ @@ -571,7 +555,6 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *a= dapt, u8 mstatus) rtw_write8(adapt, REG_BCN_CTRL, rtw_read8(adapt, REG_BCN_CTRL) | BIT(4)); =20 if (haldata->RegFwHwTxQCtrl & BIT(6)) { - DBG_88E("HalDownloadRSVDPage(): There is an Adapter is sending beacon.\= n"); bSendBeacon =3D true; } =20 @@ -599,9 +582,9 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *a= dapt, u8 mstatus) if (adapt->bSurpriseRemoved || adapt->bDriverStopped) ; else if (!bcn_valid) - DBG_88E("%s: 1 Download RSVD page failed! DLBcnCount:%u, poll:%u\n", __= func__, DLBcnCount, poll); + ; else - DBG_88E("%s: 1 Download RSVD success! DLBcnCount:%u, poll:%u\n", __func= __, DLBcnCount, poll); + ; /* */ /* We just can send the reserved page twice during the time that Tx thr= ead is stopped (e.g. pnpsetpower) */ /* because we need to free the Tx BCN Desc which is used by the first r= eserved page packet. */ @@ -626,7 +609,6 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *a= dapt, u8 mstatus) /* Update RSVD page location H2C to Fw. */ if (bcn_valid) { SetHwReg8188EU(adapt, HW_VAR_BCN_VALID, NULL); - DBG_88E("Set RSVD page location to Fw.\n"); } =20 /* Do not enable HW DMA BCN or it will cause Pcie interface hang by tim= ing issue. 2011.11.24. by tynli. */ @@ -646,11 +628,9 @@ void rtl8188e_set_p2p_ps_offload_cmd(struct adapter *a= dapt, u8 p2p_ps_state) =20 switch (p2p_ps_state) { case P2P_PS_DISABLE: - DBG_88E("P2P_PS_DISABLE\n"); memset(p2p_ps_offload, 0, 1); break; case P2P_PS_ENABLE: - DBG_88E("P2P_PS_ENABLE\n"); /* update CTWindow value. */ if (pwdinfo->ctwindow > 0) { p2p_ps_offload->CTWindow_En =3D 1; @@ -690,11 +670,9 @@ void rtl8188e_set_p2p_ps_offload_cmd(struct adapter *a= dapt, u8 p2p_ps_state) } break; case P2P_PS_SCAN: - DBG_88E("P2P_PS_SCAN\n"); p2p_ps_offload->discovery =3D 1; break; case P2P_PS_SCAN_DONE: - DBG_88E("P2P_PS_SCAN_DONE\n"); p2p_ps_offload->discovery =3D 0; pwdinfo->p2p_ps_state =3D P2P_PS_ENABLE; break; diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/stag= ing/r8188eu/hal/rtl8188e_hal_init.c index 8fe74e21992e..f83ae7a7e5d9 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c @@ -20,7 +20,6 @@ static void iol_mode_enable(struct adapter *padapter, u8 = enable) rtw_write8(padapter, REG_SYS_CFG, reg_0xf0 | SW_OFFLOAD_EN); =20 if (!padapter->bFWReady) { - DBG_88E("bFWReady =3D=3D false call reset 8051...\n"); rtw_reset_8051(padapter); } =20 @@ -78,13 +77,11 @@ efuse_phymap_to_logical(u8 *phymap, u16 _offset, u16 _s= ize_byte, u8 *pbuf) =20 efuseTbl =3D kzalloc(EFUSE_MAP_LEN_88E, GFP_KERNEL); if (!efuseTbl) { - DBG_88E("%s: alloc efuseTbl fail!\n", __func__); goto exit; } =20 eFuseWord =3D rtw_malloc2d(EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, si= zeof(u16)); if (!eFuseWord) { - DBG_88E("%s: alloc eFuseWord fail!\n", __func__); goto exit; } =20 @@ -102,7 +99,6 @@ efuse_phymap_to_logical(u8 *phymap, u16 _offset, u16 _si= ze_byte, u8 *pbuf) efuse_utilized++; eFuse_Addr++; } else { - DBG_88E("EFUSE is empty efuse_Addr-%d efuse_data =3D%x\n", eFuse_Addr, r= temp8); goto exit; } =20 @@ -207,8 +203,6 @@ static void efuse_read_phymap_from_txpktbuf( if (bcnhead < 0) /* if not valid */ bcnhead =3D rtw_read8(adapter, REG_TDECTRL + 1); =20 - DBG_88E("%s bcnhead:%d\n", __func__, bcnhead); - rtw_write8(adapter, REG_PKT_BUFF_ACCESS_CTRL, TXPKT_BUF_SELECT); =20 dbg_addr =3D bcnhead * 128 / 8; /* 8-bytes addressing */ @@ -220,7 +214,6 @@ static void efuse_read_phymap_from_txpktbuf( start =3D jiffies; while (!(reg_0x143 =3D rtw_read8(adapter, REG_TXPKTBUF_DBG)) && (passing_time =3D rtw_get_passing_time_ms(start)) < 1000) { - DBG_88E("%s polling reg_0x143:0x%02x, reg_0x106:0x%02x\n", __func__, re= g_0x143, rtw_read8(adapter, 0x106)); rtw_usleep_os(100); } =20 @@ -233,14 +226,12 @@ static void efuse_read_phymap_from_txpktbuf( * do not remove it as the rtw_read16() call consumes * 2 bytes from the EEPROM source. */ - u16 lenc =3D rtw_read16(adapter, REG_PKTBUF_DBG_DATA_L); + rtw_read16(adapter, REG_PKTBUF_DBG_DATA_L); =20 len =3D le32_to_cpu(lo32) & 0x0000ffff; =20 limit =3D (len - 2 < limit) ? len - 2 : limit; =20 - DBG_88E("%s len:%u, lenc:%u\n", __func__, len, lenc); - memcpy(pos, ((u8 *)&lo32) + 2, (limit >=3D count + 2) ? 2 : limit - cou= nt); count +=3D (limit >=3D count + 2) ? 2 : limit - count; pos =3D content + count; @@ -261,7 +252,6 @@ static void efuse_read_phymap_from_txpktbuf( i++; } rtw_write8(adapter, REG_PKT_BUFF_ACCESS_CTRL, DISABLE_TRXPKT_BUF_ACCESS); - DBG_88E("%s read count:%u\n", __func__, count); *size =3D count; } =20 @@ -285,7 +275,6 @@ s32 rtl8188e_iol_efuse_patch(struct adapter *padapter) { s32 result =3D _SUCCESS; =20 - DBG_88E("=3D=3D> %s\n", __func__); if (rtw_IOL_applied(padapter)) { iol_mode_enable(padapter, 1); result =3D iol_execute(padapter, CMD_READ_EFUSE_MAP); @@ -385,19 +374,16 @@ static void Hal_EfuseReadEFuse88E(struct adapter *Ada= pter, /* Do NOT excess total size of EFuse table. Added by Roger, 2008.11.10. = */ /* */ if ((_offset + _size_byte) > EFUSE_MAP_LEN_88E) {/* total E-Fuse table i= s 512bytes */ - DBG_88E("Hal_EfuseReadEFuse88E(): Invalid offset(%#x) with read bytes(%#= x)!!\n", _offset, _size_byte); goto exit; } =20 efuseTbl =3D kzalloc(EFUSE_MAP_LEN_88E, GFP_KERNEL); if (!efuseTbl) { - DBG_88E("%s: alloc efuseTbl fail!\n", __func__); goto exit; } =20 eFuseWord =3D rtw_malloc2d(EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, si= zeof(u16)); if (!eFuseWord) { - DBG_88E("%s: alloc eFuseWord fail!\n", __func__); goto exit; } =20 @@ -415,7 +401,6 @@ static void Hal_EfuseReadEFuse88E(struct adapter *Adapt= er, efuse_utilized++; eFuse_Addr++; } else { - DBG_88E("EFUSE is empty efuse_Addr-%d efuse_data =3D%x\n", eFuse_Addr, *= rtemp8); goto exit; } =20 @@ -542,11 +527,9 @@ void rtl8188e_SetHalODMVar(struct adapter *Adapter, vo= id *pValue1, bool bSet) struct sta_info *psta =3D (struct sta_info *)pValue1; =20 if (bSet) { - DBG_88E("### Set STA_(%d) info\n", psta->mac_id); podmpriv->pODM_StaInfo[psta->mac_id] =3D psta; ODM_RAInfo_Init(podmpriv, psta->mac_id); } else { - DBG_88E("### Clean STA_(%d) info\n", psta->mac_id); podmpriv->pODM_StaInfo[psta->mac_id] =3D NULL; } } @@ -554,10 +537,8 @@ void rtl8188e_SetHalODMVar(struct adapter *Adapter, vo= id *pValue1, bool bSet) void hal_notch_filter_8188e(struct adapter *adapter, bool enable) { if (enable) { - DBG_88E("Enable notch filter\n"); rtw_write8(adapter, rOFDM0_RxDSP + 1, rtw_read8(adapter, rOFDM0_RxDSP + = 1) | BIT(1)); } else { - DBG_88E("Disable notch filter\n"); rtw_write8(adapter, rOFDM0_RxDSP + 1, rtw_read8(adapter, rOFDM0_RxDSP + = 1) & ~BIT(1)); } } @@ -791,11 +772,6 @@ void Hal_ReadPowerSavingMode88E(struct adapter *padapt= er, u8 *hwinfo, bool AutoL /* decide hw if support remote wakeup function */ /* if hw supported, 8051 (SIE) will generate WeakUP signal(D+/D- toggle= ) when autoresume */ padapter->pwrctrlpriv.bSupportRemoteWakeup =3D (hwinfo[EEPROM_USB_OPTION= AL_FUNCTION0] & BIT(1)) ? true : false; - - DBG_88E("%s , bSupportRemoteWakeup(%x)\n", __func__, - padapter->pwrctrlpriv.bSupportRemoteWakeup); - - DBG_88E("### PS params =3D> power_mgnt(%x), usbss_enable(%x) ###\n", pa= dapter->registrypriv.power_mgnt, padapter->registrypriv.usbss_enable); } } =20 @@ -816,17 +792,10 @@ void Hal_ReadTxPowerInfo88E(struct adapter *padapter,= u8 *PROMContent, bool Auto pHalData->Index24G_BW40_Base[ch] =3D pwrInfo24G.IndexBW40_Base[0][4]; else pHalData->Index24G_BW40_Base[ch] =3D pwrInfo24G.IndexBW40_Base[0][group= ]; - - DBG_88E("=3D=3D=3D=3D=3D=3D=3D Path 0, Channel %d =3D=3D=3D=3D=3D=3D=3D\= n", ch); - DBG_88E("Index24G_CCK_Base[%d] =3D 0x%x\n", ch, pHalData->Index24G_CCK_B= ase[ch]); - DBG_88E("Index24G_BW40_Base[%d] =3D 0x%x\n", ch, pHalData->Index24G_BW40= _Base[ch]); } for (TxCount =3D 0; TxCount < MAX_TX_COUNT; TxCount++) { pHalData->OFDM_24G_Diff[TxCount] =3D pwrInfo24G.OFDM_Diff[0][TxCount]; pHalData->BW20_24G_Diff[TxCount] =3D pwrInfo24G.BW20_Diff[0][TxCount]; - DBG_88E("=3D=3D=3D=3D=3D=3D=3D TxCount %d =3D=3D=3D=3D=3D=3D=3D\n", TxCo= unt); - DBG_88E("OFDM_24G_Diff[%d] =3D %d\n", TxCount, pHalData->OFDM_24G_Diff[T= xCount]); - DBG_88E("BW20_24G_Diff[%d] =3D %d\n", TxCount, pHalData->BW20_24G_Diff[T= xCount]); } =20 /* 2010/10/19 MH Add Regulator recognize for CU. */ @@ -837,7 +806,6 @@ void Hal_ReadTxPowerInfo88E(struct adapter *padapter, u= 8 *PROMContent, bool Auto } else { pHalData->EEPROMRegulatory =3D 0; } - DBG_88E("EEPROMRegulatory =3D 0x%x\n", pHalData->EEPROMRegulatory); } =20 void Hal_EfuseParseXtal_8188E(struct adapter *pAdapter, u8 *hwinfo, bool A= utoLoadFail) @@ -851,7 +819,6 @@ void Hal_EfuseParseXtal_8188E(struct adapter *pAdapter,= u8 *hwinfo, bool AutoLoa } else { pHalData->CrystalCap =3D EEPROM_Default_CrystalCap_88E; } - DBG_88E("CrystalCap: 0x%2x\n", pHalData->CrystalCap); } =20 void rtl8188e_EfuseParseChnlPlan(struct adapter *padapter, u8 *hwinfo, boo= l AutoLoadFail) @@ -861,8 +828,6 @@ void rtl8188e_EfuseParseChnlPlan(struct adapter *padapt= er, u8 *hwinfo, bool Auto hwinfo ? hwinfo[EEPROM_ChannelPlan_88E] : 0xFF, padapter->registrypriv.channel_plan, RT_CHANNEL_DOMAIN_WORLD_WIDE_13, AutoLoadFail); - - DBG_88E("mlmepriv.ChannelPlan =3D 0x%02x\n", padapter->mlmepriv.ChannelPl= an); } =20 void Hal_ReadAntennaDiversity88E(struct adapter *pAdapter, u8 *PROMContent= , bool AutoLoadFail) @@ -894,7 +859,6 @@ void Hal_ReadAntennaDiversity88E(struct adapter *pAdapt= er, u8 *PROMContent, bool } else { pHalData->AntDivCfg =3D 0; } - DBG_88E("EEPROM : AntDivCfg =3D %x, TRxAntDivType =3D %x\n", pHalData->An= tDivCfg, pHalData->TRxAntDivType); } =20 void Hal_ReadThermalMeter_88E(struct adapter *Adapter, u8 *PROMContent, bo= ol AutoloadFail) @@ -909,6 +873,4 @@ void Hal_ReadThermalMeter_88E(struct adapter *Adapter, = u8 *PROMContent, bool Aut =20 if (pHalData->EEPROMThermalMeter =3D=3D 0xff || AutoloadFail) pHalData->EEPROMThermalMeter =3D EEPROM_Default_ThermalMeter_88E; - - DBG_88E("ThermalMeter =3D 0x%x\n", pHalData->EEPROMThermalMeter); } diff --git a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c b/drivers/stagin= g/r8188eu/hal/rtl8188e_phycfg.c index b0e5b9f6a005..5c8d43014603 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c @@ -685,7 +685,7 @@ static void _PHY_SwChnl8192C(struct adapter *Adapter, u= 8 channel) struct hal_data_8188e *pHalData =3D &Adapter->haldata; =20 if (Adapter->bNotifyChannelChange) - DBG_88E("[%s] ch =3D %d\n", __func__, channel); + ; =20 /* s1. pre common command - CmdID_SetTxPowerLevel */ PHY_SetTxPowerLevel8188E(Adapter, channel); diff --git a/drivers/staging/r8188eu/hal/rtl8188eu_recv.c b/drivers/staging= /r8188eu/hal/rtl8188eu_recv.c index 8031ac9f9d43..08bdf715d872 100644 --- a/drivers/staging/r8188eu/hal/rtl8188eu_recv.c +++ b/drivers/staging/r8188eu/hal/rtl8188eu_recv.c @@ -107,11 +107,11 @@ void rtl8188eu_free_recv_priv(struct adapter *padapte= r) kfree(precvpriv->pallocated_recv_buf); =20 if (skb_queue_len(&precvpriv->rx_skb_queue)) - DBG_88E(KERN_WARNING "rx_skb_queue not empty\n"); + ; skb_queue_purge(&precvpriv->rx_skb_queue); =20 if (skb_queue_len(&precvpriv->free_recv_skb_queue)) - DBG_88E(KERN_WARNING "free_recv_skb_queue not empty, %d\n", skb_queue_le= n(&precvpriv->free_recv_skb_queue)); + ; =20 skb_queue_purge(&precvpriv->free_recv_skb_queue); } diff --git a/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c b/drivers/staging= /r8188eu/hal/rtl8188eu_xmit.c index f2555c97b0c4..db6ad97d6a2b 100644 --- a/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c +++ b/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c @@ -265,10 +265,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe= , u8 *pmem, s32 sz, u8 bag =20 ptxdesc->txdw5 |=3D cpu_to_le32(MRateToHwRate(pmlmeext->tx_rate)); } else if ((pxmitframe->frame_tag & 0x0f) =3D=3D TXAGG_FRAMETAG) { - DBG_88E("pxmitframe->frame_tag =3D=3D TXAGG_FRAMETAG\n"); } else { - DBG_88E("pxmitframe->frame_tag =3D %d\n", pxmitframe->frame_tag); - /* offset 4 */ ptxdesc->txdw1 |=3D cpu_to_le32((4) & 0x3f);/* CAM_ID(MAC_ID) */ =20 @@ -573,7 +570,7 @@ static s32 xmitframe_direct(struct adapter *adapt, stru= ct xmit_frame *pxmitframe if (res =3D=3D _SUCCESS) rtw_dump_xframe(adapt, pxmitframe); else - DBG_88E("=3D=3D> %s xmitframe_coalsece failed\n", __func__); + ; return res; } =20 diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8= 188eu/hal/usb_halinit.c index 3b8869455166..cc11ddac86b7 100644 --- a/drivers/staging/r8188eu/hal/usb_halinit.c +++ b/drivers/staging/r8188eu/hal/usb_halinit.c @@ -33,7 +33,6 @@ static void _ConfigNormalChipOutEP_8188E(struct adapter *= adapt, u8 NumOutPipe) default: break; } - DBG_88E("%s OutEpQueueSel(0x%02x), OutEpNumber(%d)\n", __func__, haldata-= >OutEpQueueSel, haldata->OutEpNumber); } =20 static bool HalUsbSetQueuePipeMapping8188EUsb(struct adapter *adapt, u8 Nu= mOutPipe) @@ -59,7 +58,6 @@ u32 rtl8188eu_InitPowerOn(struct adapter *adapt) return _SUCCESS; =20 if (!HalPwrSeqCmdParsing(adapt, Rtl8188E_NIC_PWR_ON_FLOW)) { - DBG_88E(KERN_ERR "%s: run power on flow fail\n", __func__); return _FAIL; } =20 @@ -495,7 +493,6 @@ static void _InitAntenna_Selection(struct adapter *Adap= ter) =20 if (haldata->AntDivCfg =3D=3D 0) return; - DBG_88E("=3D=3D> %s ....\n", __func__); =20 rtw_write32(Adapter, REG_LEDCFG0, rtw_read32(Adapter, REG_LEDCFG0) | BIT(= 23)); rtl8188e_PHY_SetBBReg(Adapter, rFPGA0_XAB_RFParameter, BIT(13), 0x01); @@ -504,7 +501,6 @@ static void _InitAntenna_Selection(struct adapter *Adap= ter) haldata->CurAntenna =3D Antenna_A; else haldata->CurAntenna =3D Antenna_B; - DBG_88E("%s,Cur_ant:(%x)%s\n", __func__, haldata->CurAntenna, (haldata->C= urAntenna =3D=3D Antenna_A) ? "Antenna_A" : "Antenna_B"); } =20 static void hw_var_set_macaddr(struct adapter *Adapter, u8 *val) @@ -527,7 +523,6 @@ u32 rtl8188eu_hal_init(struct adapter *Adapter) struct hal_data_8188e *haldata =3D &Adapter->haldata; struct pwrctrl_priv *pwrctrlpriv =3D &Adapter->pwrctrlpriv; struct registry_priv *pregistrypriv =3D &Adapter->registrypriv; - u32 init_start_time =3D jiffies; =20 if (Adapter->pwrctrlpriv.bkeepfwalive) { if (haldata->odmpriv.RFCalibrateInfo.bIQKInitialized) { @@ -575,7 +570,6 @@ u32 rtl8188eu_hal_init(struct adapter *Adapter) status =3D rtl8188e_firmware_download(Adapter); =20 if (status !=3D _SUCCESS) { - DBG_88E("%s: Download Firmware failed!!\n", __func__); Adapter->bFWReady =3D false; haldata->fw_ractrl =3D false; return status; @@ -589,7 +583,6 @@ u32 rtl8188eu_hal_init(struct adapter *Adapter) =20 status =3D PHY_MACConfig8188E(Adapter); if (status =3D=3D _FAIL) { - DBG_88E(" ### Failed to init MAC ......\n "); goto exit; } =20 @@ -598,19 +591,16 @@ u32 rtl8188eu_hal_init(struct adapter *Adapter) /* */ status =3D PHY_BBConfig8188E(Adapter); if (status =3D=3D _FAIL) { - DBG_88E(" ### Failed to init BB ......\n "); goto exit; } =20 status =3D PHY_RFConfig8188E(Adapter); if (status =3D=3D _FAIL) { - DBG_88E(" ### Failed to init RF ......\n "); goto exit; } =20 status =3D rtl8188e_iol_efuse_patch(Adapter); if (status =3D=3D _FAIL) { - DBG_88E("%s rtl8188e_iol_efuse_patch failed\n", __func__); goto exit; } =20 @@ -731,8 +721,6 @@ u32 rtl8188eu_hal_init(struct adapter *Adapter) rtw_write32(Adapter, REG_FWHW_TXQ_CTRL, rtw_read32(Adapter, REG_FWHW_TXQ_= CTRL) | BIT(12)); =20 exit: - DBG_88E("%s in %dms\n", __func__, rtw_get_passing_time_ms(init_start_time= )); - return status; } =20 @@ -794,13 +782,9 @@ static void CardDisableRTL8188EU(struct adapter *Adapt= er) =20 u32 rtl8188eu_hal_deinit(struct adapter *Adapter) { - - DBG_88E("=3D=3D> %s\n", __func__); - rtw_write32(Adapter, REG_HIMR_88E, IMR_DISABLED_88E); rtw_write32(Adapter, REG_HIMRE_88E, IMR_DISABLED_88E); =20 - DBG_88E("bkeepfwalive(%x)\n", Adapter->pwrctrlpriv.bkeepfwalive); if (!Adapter->pwrctrlpriv.bkeepfwalive) { if (Adapter->hw_init_completed) { CardDisableRTL8188EU(Adapter); @@ -869,9 +853,6 @@ void ReadAdapterInfo8188EU(struct adapter *Adapter) eeprom->EepromOrEfuse =3D (eeValue & BOOT_FROM_EEPROM); eeprom->bautoload_fail_flag =3D !(eeValue & EEPROM_EN); =20 - DBG_88E("Boot from %s, Autoload %s !\n", (eeprom->EepromOrEfuse ? "EEPROM= " : "EFUSE"), - (eeprom->bautoload_fail_flag ? "Fail" : "OK")); - if (!is_boot_from_eeprom(Adapter)) EFUSE_ShadowMapUpdate(Adapter); =20 @@ -932,8 +913,6 @@ static void hw_var_set_opmode(struct adapter *Adapter, = u8 *val) val8 |=3D mode; rtw_write8(Adapter, MSR, val8); =20 - DBG_88E("%s()-%d mode =3D %d\n", __func__, __LINE__, mode); - if ((mode =3D=3D _HW_STATE_STATION_) || (mode =3D=3D _HW_STATE_NOLINK_)) { StopTxBeacon(Adapter); =20 @@ -1010,7 +989,6 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 variab= le, u8 *val) /* For 8190, we select only 24M, 12M, 6M, 11M, 5.5M, 2M, and 1M from t= he Basic rate. */ /* We do not use other rates. */ HalSetBrateCfg(Adapter, val, &BrateCfg); - DBG_88E("HW_VAR_BASIC_RATE: BrateCfg(%#x)\n", BrateCfg); =20 /* 2011.03.30 add by Luke Lee */ /* CCK 2M ACK should be disabled for some BCM and Atheros AP IOT */ @@ -1220,7 +1198,6 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 varia= ble, u8 *val) else AcmCtrl &=3D (~AcmHw_BeqEn); =20 - DBG_88E("[HW_VAR_ACM_CTRL] Write 0x%X\n", AcmCtrl); rtw_write8(Adapter, REG_ACMHWCTRL, AcmCtrl); } break; @@ -1360,7 +1337,7 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 varia= ble, u8 *val) break; } while (trycnt--); if (trycnt =3D=3D 0) - DBG_88E("Stop RX DMA failed......\n"); + ; =20 /* RQPN Load 0 */ rtw_write16(Adapter, REG_RQPN_NPQ, 0x0); @@ -1372,7 +1349,6 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 varia= ble, u8 *val) case HW_VAR_TX_RPT_MAX_MACID: { u8 maxMacid =3D *val; - DBG_88E("### MacID(%d),Set Max Tx RPT MID(%d)\n", maxMacid, maxMacid + = 1); rtw_write8(Adapter, REG_TX_RPT_CTRL + 1, maxMacid + 1); } break; @@ -1456,16 +1432,7 @@ void GetHalDefVar8188EUsb(struct adapter *Adapter, e= num hal_def_variable eVariab break; case HW_DEF_RA_INFO_DUMP: { - u8 entry_id =3D *((u8 *)pValue); if (check_fwstate(&Adapter->mlmepriv, _FW_LINKED)) { - DBG_88E("=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RA status check =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D\n"); - DBG_88E("Mac_id:%d , RateID =3D %d, RAUseRate =3D 0x%08x, RateSGI =3D = %d, DecisionRate =3D 0x%02x ,PTStage =3D %d\n", - entry_id, - haldata->odmpriv.RAInfo[entry_id].RateID, - haldata->odmpriv.RAInfo[entry_id].RAUseRate, - haldata->odmpriv.RAInfo[entry_id].RateSGI, - haldata->odmpriv.RAInfo[entry_id].DecisionRate, - haldata->odmpriv.RAInfo[entry_id].PTStage); } } break; @@ -1493,15 +1460,12 @@ void SetHalDefVar8188EUsb(struct adapter *Adapter, = enum hal_def_variable eVariab =20 if (dm_func =3D=3D 0) { /* disable all dynamic func */ podmpriv->SupportAbility =3D DYNAMIC_FUNC_DISABLE; - DBG_88E("=3D=3D> Disable all dynamic function...\n"); } else if (dm_func =3D=3D 1) {/* disable DIG */ podmpriv->SupportAbility &=3D (~DYNAMIC_BB_DIG); - DBG_88E("=3D=3D> Disable DIG...\n"); } else if (dm_func =3D=3D 2) {/* disable High power */ podmpriv->SupportAbility &=3D (~DYNAMIC_BB_DYNAMIC_TXPWR); } else if (dm_func =3D=3D 3) {/* disable tx power tracking */ podmpriv->SupportAbility &=3D (~DYNAMIC_RF_CALIBRATION); - DBG_88E("=3D=3D> Disable tx power tracking...\n"); } else if (dm_func =3D=3D 5) {/* disable antenna diversity */ podmpriv->SupportAbility &=3D (~DYNAMIC_BB_ANT_DIV); } else if (dm_func =3D=3D 6) {/* turn on all dynamic func */ @@ -1510,7 +1474,6 @@ void SetHalDefVar8188EUsb(struct adapter *Adapter, en= um hal_def_variable eVariab pDigTable->CurIGValue =3D rtw_read8(Adapter, 0xc50); } podmpriv->SupportAbility =3D DYNAMIC_ALL_FUNC_ENABLE; - DBG_88E("=3D=3D> Turn on all dynamic function...\n"); } } break; @@ -1574,8 +1537,6 @@ void UpdateHalRAMask8188EUsb(struct adapter *adapt, u= 32 mac_id, u8 rssi_level) =20 rate_bitmap =3D 0x0fffffff; rate_bitmap =3D ODM_Get_Rate_Bitmap(&haldata->odmpriv, mac_id, mask, rssi= _level); - DBG_88E("%s =3D> mac_id:%d, networkType:0x%02x, mask:0x%08x\n\t =3D=3D> r= ssi_level:%d, rate_bitmap:0x%08x\n", - __func__, mac_id, networkType, mask, rssi_level, rate_bitmap); =20 mask &=3D rate_bitmap; =20 @@ -1589,7 +1550,6 @@ void UpdateHalRAMask8188EUsb(struct adapter *adapt, u= 32 mac_id, u8 rssi_level) if (shortGIrate) arg |=3D BIT(5); mask |=3D ((raid << 28) & 0xf0000000); - DBG_88E("update raid entry, mask=3D0x%x, arg=3D0x%x\n", mask, arg); psta->ra_mask =3D mask; mask |=3D ((raid << 28) & 0xf0000000); =20 diff --git a/drivers/staging/r8188eu/hal/usb_ops_linux.c b/drivers/staging/= r8188eu/hal/usb_ops_linux.c index b7b51af7f2c3..2f3cdc356d2a 100644 --- a/drivers/staging/r8188eu/hal/usb_ops_linux.c +++ b/drivers/staging/r8188eu/hal/usb_ops_linux.c @@ -210,7 +210,6 @@ static int recvbuf2recvframe(struct adapter *adapt, str= uct sk_buff *pskb) =20 precvframe =3D rtw_alloc_recvframe(pfree_recv_queue); if (!precvframe) { - DBG_88E("%s()-%d: rtw_alloc_recvframe() failed! RX Drop!\n", __func__, = __LINE__); goto _exit_recvbuf2recvframe; } =20 @@ -223,8 +222,6 @@ static int recvbuf2recvframe(struct adapter *adapt, str= uct sk_buff *pskb) pattrib =3D &precvframe->attrib; =20 if ((pattrib->crc_err) || (pattrib->icv_err)) { - DBG_88E("%s: RX Warning! crc_err=3D%d icv_err=3D%d, skip!\n", __func__,= pattrib->crc_err, pattrib->icv_err); - rtw_free_recvframe(precvframe, pfree_recv_queue); goto _exit_recvbuf2recvframe; } @@ -235,7 +232,6 @@ static int recvbuf2recvframe(struct adapter *adapt, str= uct sk_buff *pskb) pkt_offset =3D RXDESC_SIZE + pattrib->drvinfo_sz + pattrib->shift_sz + p= attrib->pkt_len; =20 if ((pattrib->pkt_len <=3D 0) || (pkt_offset > transfer_len)) { - DBG_88E("%s()-%d: RX Warning!,pkt_len<=3D0 or pkt_offset> transfoer_len= \n", __func__, __LINE__); rtw_free_recvframe(precvframe, pfree_recv_queue); goto _exit_recvbuf2recvframe; } @@ -276,7 +272,6 @@ static int recvbuf2recvframe(struct adapter *adapt, str= uct sk_buff *pskb) precvframe->rx_data =3D pkt_copy->data; } else { if ((pattrib->mfrag =3D=3D 1) && (pattrib->frag_num =3D=3D 0)) { - DBG_88E("recvbuf2recvframe: alloc_skb fail , drop frag frame\n"); rtw_free_recvframe(precvframe, pfree_recv_queue); goto _exit_recvbuf2recvframe; } @@ -287,7 +282,6 @@ static int recvbuf2recvframe(struct adapter *adapt, str= uct sk_buff *pskb) precvframe->rx_data =3D precvframe->rx_tail; precvframe->rx_end =3D pbuf + pattrib->drvinfo_sz + RXDESC_SIZE + all= oc_sz; } else { - DBG_88E("recvbuf2recvframe: skb_clone fail\n"); rtw_free_recvframe(precvframe, pfree_recv_queue); goto _exit_recvbuf2recvframe; } @@ -341,7 +335,6 @@ void rtl8188eu_recv_tasklet(unsigned long priv) =20 while (NULL !=3D (pskb =3D skb_dequeue(&precvpriv->rx_skb_queue))) { if ((adapt->bDriverStopped) || (adapt->bSurpriseRemoved)) { - DBG_88E("recv_tasklet =3D> bDriverStopped or bSurpriseRemoved\n"); dev_kfree_skb_any(pskb); break; } @@ -362,9 +355,6 @@ static void usb_read_port_complete(struct urb *purb, st= ruct pt_regs *regs) =20 if (adapt->bSurpriseRemoved || adapt->bDriverStopped || adapt->bReadPortC= ancel) { precvbuf->reuse =3D true; - DBG_88E("%s() RX Warning! bDriverStopped(%d) OR bSurpriseRemoved(%d) bRe= adPortCancel(%d)\n", - __func__, adapt->bDriverStopped, - adapt->bSurpriseRemoved, adapt->bReadPortCancel); return; } =20 @@ -372,7 +362,6 @@ static void usb_read_port_complete(struct urb *purb, st= ruct pt_regs *regs) if ((purb->actual_length > MAX_RECVBUF_SZ) || (purb->actual_length < RXD= ESC_SIZE)) { precvbuf->reuse =3D true; rtw_read_port(adapt, (unsigned char *)precvbuf); - DBG_88E("%s()-%d: RX Warning!\n", __func__, __LINE__); } else { rtw_reset_continual_urb_error(adapter_to_dvobj(adapt)); =20 @@ -388,7 +377,6 @@ static void usb_read_port_complete(struct urb *purb, st= ruct pt_regs *regs) rtw_read_port(adapt, (unsigned char *)precvbuf); } } else { - DBG_88E("###=3D> usb_read_port_complete =3D> urb status(%d)\n", purb->st= atus); skb_put(precvbuf->pskb, purb->actual_length); precvbuf->pskb =3D NULL; =20 @@ -409,7 +397,6 @@ static void usb_read_port_complete(struct urb *purb, st= ruct pt_regs *regs) rtw_read_port(adapt, (unsigned char *)precvbuf); break; case -EINPROGRESS: - DBG_88E("ERROR: URB IS IN PROGRESS!/n"); break; default: break; @@ -449,7 +436,6 @@ u32 rtw_read_port(struct adapter *adapter, u8 *rmem) if (!precvbuf->reuse || !precvbuf->pskb) { precvbuf->pskb =3D netdev_alloc_skb(adapter->pnetdev, MAX_RECVBUF_SZ + R= ECVBUFF_ALIGN_SZ); if (!precvbuf->pskb) { - DBG_88E("#### usb_read_port() alloc_skb fail!#####\n"); return _FAIL; } =20 @@ -487,8 +473,6 @@ u32 rtw_read_port(struct adapter *adapter, u8 *rmem) =20 err =3D usb_submit_urb(purb, GFP_ATOMIC); if ((err) && (err !=3D (-EPERM))) { - DBG_88E("cannot submit rx in-token(err =3D 0x%08x),urb_status =3D %d\n", - err, purb->status); ret =3D _FAIL; } =20 @@ -508,7 +492,6 @@ void rtl8188eu_xmit_tasklet(unsigned long priv) if ((adapt->bDriverStopped) || (adapt->bSurpriseRemoved) || (adapt->bWritePortCancel)) { - DBG_88E("xmit_tasklet =3D> bDriverStopped or bSurpriseRemoved or bWrite= PortCancel\n"); break; } =20 --=20 2.34.1 From nobody Sun Jun 28 02:50:42 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B95E0C433EF for ; Wed, 16 Feb 2022 01:07:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245332AbiBPBIB (ORCPT ); Tue, 15 Feb 2022 20:08:01 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:53512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245282AbiBPBHb (ORCPT ); Tue, 15 Feb 2022 20:07:31 -0500 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AA0AF5411 for ; Tue, 15 Feb 2022 17:07:18 -0800 (PST) Received: by mail-wm1-x334.google.com with SMTP id c192so277598wma.4 for ; Tue, 15 Feb 2022 17:07:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philpotter-co-uk.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WbihFGTVZkk7P6dwZS75M52l7GCERupGZ+b73GUyfeM=; b=KnalSrBjok8kx5emDnI0wSE+MZd2xJ9ff+ZJWJ7Io+gYGfRUrAPYrusM4rAUKUZzxc Y0kcpTnAd4BVLTsAC0IvKqOxdBTYoLXww4fWFvPNIqX6icBJqaqxNAaZOgyOy9mf1UXY nKJtVHQEqcLP8QNTX0z0ZdSZZYF1FDxJFS6+cs92y24/oVetfPx83yIuM22YK47X00id hPkKXIVSw8xZv2IdDtqzsEVm92mPu4tH1D9QUhIfLpUr+kI5fLBpndOhgBEV0I6SyUZy H7jHvh2ZeBq5YSEnsgr83mux/HBUcCFVUn8c7lmgwYkxKw4pQ99M4HhomhMMnQBbReJb Cc5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WbihFGTVZkk7P6dwZS75M52l7GCERupGZ+b73GUyfeM=; b=pkfG0kivSCAeAfakCjh4TSMnPTH5owL94WYQC5MD23ZXEtowqz/J/HKrQYPHjRgXN8 tpkMk+f4A9NUJVxEO2c0y/p9F0zlVjjDSw6B407hk9W2DKM4MyCIyDB6EbkW+dLzZAhl GuosXxR6k02BAR+FL9r26Y+8eUpKuDla5nqsx/dVSrP7loev++zBth0LwqFqPbC7+kK1 3doo8OCOwbO9cgaNkEOGxHI+ivxUuNj9VGNLlycBQWacn2G/aK7ErLOY9eCpSYyH6mBu NdFsr9lMyUw5OwKU7VOojf23HnwP4CJHjxWLwDuuHz1y18M6k87e+r8qKSUCSib24g0P tkSw== X-Gm-Message-State: AOAM533NVnpo1lV+u/JcN1paqBk7ErPRKy29wmG/I0dfkHDHBAQk3vj9 ydA0y69vzwc08o1FxRAiZrUe4Q== X-Google-Smtp-Source: ABdhPJxnbnPB9hNTO2LhkwWAk69t6JAogvGBvROV6PzG6Cz1I3KJlWZmkchZkhqIsiIcAa0UF3hpFA== X-Received: by 2002:a05:600c:3ba0:b0:37b:b86a:5d30 with SMTP id n32-20020a05600c3ba000b0037bb86a5d30mr5105815wms.136.1644973636540; Tue, 15 Feb 2022 17:07:16 -0800 (PST) Received: from localhost.localdomain (3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.1.f.d.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:df16::3]) by smtp.gmail.com with ESMTPSA id m8sm10551185wms.4.2022.02.15.17.07.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 17:07:16 -0800 (PST) From: Phillip Potter To: gregkh@linuxfoundation.org Cc: dan.carpenter@oracle.com, Larry.Finger@lwfinger.net, straube.linux@gmail.com, martin@kaiser.cx, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, paskripkin@gmail.com Subject: [PATCH v2 06/15] staging: r8188eu: remove DBG_88E calls from os_dep/ioctl_linux.c Date: Wed, 16 Feb 2022 01:07:00 +0000 Message-Id: <20220216010709.791-7-phil@philpotter.co.uk> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220216010709.791-1-phil@philpotter.co.uk> References: <20220216010709.791-1-phil@philpotter.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove all remaining DBG_88E calls from os_dep/ioctl_linux.c, patching separately from the rest of the os_dep subdirectory for ease of review due to the sheer number of calls. After some thought, it makes more sense to just entirely strip all of these calls, so that debugging code in the driver can be more consistent and useful going forwards. Signed-off-by: Phillip Potter --- drivers/staging/r8188eu/os_dep/ioctl_linux.c | 286 +------------------ 1 file changed, 13 insertions(+), 273 deletions(-) diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging= /r8188eu/os_dep/ioctl_linux.c index 3bb2714a6a54..97cce74b2b28 100644 --- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c +++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c @@ -342,26 +342,21 @@ static int wpa_set_auth_algs(struct net_device *dev, = u32 value) int ret =3D 0; =20 if ((value & AUTH_ALG_SHARED_KEY) && (value & AUTH_ALG_OPEN_SYSTEM)) { - DBG_88E("wpa_set_auth_algs, AUTH_ALG_SHARED_KEY and AUTH_ALG_OPEN_SYSTE= M [value:0x%x]\n", value); padapter->securitypriv.ndisencryptstatus =3D Ndis802_11Encryption1Enable= d; padapter->securitypriv.ndisauthtype =3D Ndis802_11AuthModeAutoSwitch; padapter->securitypriv.dot11AuthAlgrthm =3D dot11AuthAlgrthm_Auto; } else if (value & AUTH_ALG_SHARED_KEY) { - DBG_88E("wpa_set_auth_algs, AUTH_ALG_SHARED_KEY [value:0x%x]\n", value); padapter->securitypriv.ndisencryptstatus =3D Ndis802_11Encryption1Enable= d; =20 padapter->securitypriv.ndisauthtype =3D Ndis802_11AuthModeShared; padapter->securitypriv.dot11AuthAlgrthm =3D dot11AuthAlgrthm_Shared; } else if (value & AUTH_ALG_OPEN_SYSTEM) { - DBG_88E("wpa_set_auth_algs, AUTH_ALG_OPEN_SYSTEM\n"); if (padapter->securitypriv.ndisauthtype < Ndis802_11AuthModeWPAPSK) { padapter->securitypriv.ndisauthtype =3D Ndis802_11AuthModeOpen; padapter->securitypriv.dot11AuthAlgrthm =3D dot11AuthAlgrthm_Open; } } else if (value & AUTH_ALG_LEAP) { - DBG_88E("wpa_set_auth_algs, AUTH_ALG_LEAP\n"); } else { - DBG_88E("wpa_set_auth_algs, error!\n"); ret =3D -EINVAL; } return ret; @@ -398,8 +393,6 @@ static int wpa_set_encryption(struct net_device *dev, s= truct ieee_param *param, } =20 if (strcmp(param->u.crypt.alg, "WEP") =3D=3D 0) { - DBG_88E("wpa_set_encryption, crypt.alg =3D WEP\n"); - padapter->securitypriv.ndisencryptstatus =3D Ndis802_11Encryption1Enable= d; padapter->securitypriv.dot11PrivacyAlgrthm =3D _WEP40_; padapter->securitypriv.dot118021XGrpPrivacy =3D _WEP40_; @@ -407,8 +400,6 @@ static int wpa_set_encryption(struct net_device *dev, s= truct ieee_param *param, wep_key_idx =3D param->u.crypt.idx; wep_key_len =3D param->u.crypt.key_len; =20 - DBG_88E("(1)wep_key_idx =3D%d\n", wep_key_idx); - if (wep_key_idx > WEP_KEYS) return -EINVAL; =20 @@ -433,11 +424,9 @@ static int wpa_set_encryption(struct net_device *dev, = struct ieee_param *param, pwep->KeyIndex |=3D 0x80000000; memcpy(pwep->KeyMaterial, param->u.crypt.key, pwep->KeyLength); if (param->u.crypt.set_tx) { - DBG_88E("wep, set_tx =3D 1\n"); if (rtw_set_802_11_add_wep(padapter, pwep) =3D=3D (u8)_FAIL) ret =3D -EOPNOTSUPP; } else { - DBG_88E("wep, set_tx =3D 0\n"); if (wep_key_idx >=3D WEP_KEYS) { ret =3D -EOPNOTSUPP; goto exit; @@ -474,15 +463,12 @@ static int wpa_set_encryption(struct net_device *dev,= struct ieee_param *param, padapter->securitypriv.busetkipkey =3D false; } =20 - DBG_88E(" ~~~~set sta key:unicastkey\n"); - rtw_setstakey_cmd(padapter, (unsigned char *)psta, true); } else { /* group key */ memcpy(padapter->securitypriv.dot118021XGrpKey[param->u.crypt.idx].sk= ey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt= .key_len)); memcpy(padapter->securitypriv.dot118021XGrptxmickey[param->u.crypt.id= x].skey, ¶m->u.crypt.key[16], 8); memcpy(padapter->securitypriv.dot118021XGrprxmickey[param->u.crypt.id= x].skey, ¶m->u.crypt.key[24], 8); padapter->securitypriv.binstallGrpkey =3D true; - DBG_88E(" ~~~~set sta key:groupkey\n"); =20 padapter->securitypriv.dot118021XGrpKeyid =3D param->u.crypt.idx; =20 @@ -538,9 +524,8 @@ static int rtw_set_wpa_ie(struct adapter *padapter, cha= r *pie, unsigned short ie /* dump */ { int i; - DBG_88E("\n wpa_ie(length:%d):\n", ielen); for (i =3D 0; i < ielen; i +=3D 8) - DBG_88E("0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x\n", b= uf[i], buf[i + 1], buf[i + 2], buf[i + 3], buf[i + 4], buf[i + 5], buf[i + = 6], buf[i + 7]); + ; } =20 if (ielen < RSN_HEADER_LEN) { @@ -614,8 +599,6 @@ static int rtw_set_wpa_ie(struct adapter *padapter, cha= r *pie, unsigned short ie while (cnt < ielen) { eid =3D buf[cnt]; if ((eid =3D=3D _VENDOR_SPECIFIC_IE_) && (!memcmp(&buf[cnt + 2], wps_o= ui, 4))) { - DBG_88E("SET WPS_IE\n"); - padapter->securitypriv.wps_ie_len =3D ((buf[cnt + 1] + 2) < (MAX_WPA_= IE_LEN << 2)) ? (buf[cnt + 1] + 2) : (MAX_WPA_IE_LEN << 2); =20 memcpy(padapter->securitypriv.wps_ie, &buf[cnt], padapter->securitypr= iv.wps_ie_len); @@ -728,19 +711,15 @@ static int rtw_wx_set_mode(struct net_device *dev, st= ruct iw_request_info *a, switch (wrqu->mode) { case IW_MODE_AUTO: networkType =3D Ndis802_11AutoUnknown; - DBG_88E("set_mode =3D IW_MODE_AUTO\n"); break; case IW_MODE_ADHOC: networkType =3D Ndis802_11IBSS; - DBG_88E("set_mode =3D IW_MODE_ADHOC\n"); break; case IW_MODE_MASTER: networkType =3D Ndis802_11APMode; - DBG_88E("set_mode =3D IW_MODE_MASTER\n"); break; case IW_MODE_INFRA: networkType =3D Ndis802_11Infrastructure; - DBG_88E("set_mode =3D IW_MODE_INFRA\n"); break; default: ret =3D -EINVAL; @@ -791,7 +770,6 @@ static int rtw_wx_set_pmkid(struct net_device *dev, =20 memcpy(strIssueBssid, pPMK->bssid.sa_data, ETH_ALEN); if (pPMK->cmd =3D=3D IW_PMKSA_ADD) { - DBG_88E("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n"); if (!memcmp(strIssueBssid, strZeroMacAddress, ETH_ALEN)) return ret; else @@ -802,7 +780,6 @@ static int rtw_wx_set_pmkid(struct net_device *dev, for (j =3D 0; j < NUM_PMKID_CACHE; j++) { if (!memcmp(psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN)= ) { /* BSSID is matched, the same AP =3D> rewrite with new PMKID. */ - DBG_88E("[rtw_wx_set_pmkid] BSSID exists in the PMKList.\n"); memcpy(psecuritypriv->PMKIDList[j].PMKID, pPMK->pmkid, IW_PMKID_LEN); psecuritypriv->PMKIDList[j].bUsed =3D true; psecuritypriv->PMKIDIndex =3D j + 1; @@ -813,9 +790,6 @@ static int rtw_wx_set_pmkid(struct net_device *dev, =20 if (!blInserted) { /* Find a new entry */ - DBG_88E("[rtw_wx_set_pmkid] Use the new entry index =3D %d for this PMK= ID.\n", - psecuritypriv->PMKIDIndex); - memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, strIs= sueBssid, ETH_ALEN); memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, pPMK-= >pmkid, IW_PMKID_LEN); =20 @@ -825,7 +799,6 @@ static int rtw_wx_set_pmkid(struct net_device *dev, psecuritypriv->PMKIDIndex =3D 0; } } else if (pPMK->cmd =3D=3D IW_PMKSA_REMOVE) { - DBG_88E("[rtw_wx_set_pmkid] IW_PMKSA_REMOVE!\n"); ret =3D true; for (j =3D 0; j < NUM_PMKID_CACHE; j++) { if (!memcmp(psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN)= ) { @@ -836,7 +809,6 @@ static int rtw_wx_set_pmkid(struct net_device *dev, } } } else if (pPMK->cmd =3D=3D IW_PMKSA_FLUSH) { - DBG_88E("[rtw_wx_set_pmkid] IW_PMKSA_FLUSH!\n"); memset(&psecuritypriv->PMKIDList[0], 0x00, sizeof(struct rt_pmkid_list) = * NUM_PMKID_CACHE); psecuritypriv->PMKIDIndex =3D 0; ret =3D true; @@ -1055,19 +1027,12 @@ static int rtw_wx_set_mlme(struct net_device *dev, union iwreq_data *wrqu, char *extra) { int ret =3D 0; - u16 reason; struct adapter *padapter =3D (struct adapter *)rtw_netdev_priv(dev); struct iw_mlme *mlme =3D (struct iw_mlme *)extra; =20 if (!mlme) return -1; =20 - DBG_88E("%s\n", __func__); - - reason =3D mlme->reason_code; - - DBG_88E("%s, cmd =3D%d, reason =3D%d\n", __func__, mlme->cmd, reason); - switch (mlme->cmd) { case IW_MLME_DEAUTH: if (!rtw_set_802_11_disassociate(padapter)) @@ -1099,7 +1064,6 @@ static int rtw_wx_set_scan(struct net_device *dev, st= ruct iw_request_info *a, } =20 if (padapter->bDriverStopped) { - DBG_88E("bDriverStopped =3D%d\n", padapter->bDriverStopped); ret =3D -1; goto exit; } @@ -1149,15 +1113,12 @@ static int rtw_wx_set_scan(struct net_device *dev, = struct iw_request_info *a, memcpy(ssid[0].Ssid, req->essid, len); ssid[0].SsidLength =3D len; =20 - DBG_88E("IW_SCAN_THIS_ESSID, ssid =3D%s, len =3D%d\n", req->essid, req-= >essid_len); - spin_lock_bh(&pmlmepriv->lock); =20 _status =3D rtw_sitesurvey_cmd(padapter, ssid, 1, NULL, 0); =20 spin_unlock_bh(&pmlmepriv->lock); } else if (req->scan_type =3D=3D IW_SCAN_TYPE_PASSIVE) { - DBG_88E("rtw_wx_set_scan, req->scan_type =3D=3D IW_SCAN_TYPE_PASSIVE\n"= ); } } else { if (wrqu->data.length >=3D WEXT_CSCAN_HEADER_SIZE && @@ -1320,12 +1281,11 @@ static int rtw_wx_set_essid(struct net_device *dev, } =20 authmode =3D padapter->securitypriv.ndisauthtype; - DBG_88E("=3D>%s\n", __func__); if (wrqu->essid.flags && wrqu->essid.length) { len =3D (wrqu->essid.length < IW_ESSID_MAX_SIZE) ? wrqu->essid.length : = IW_ESSID_MAX_SIZE; =20 if (wrqu->essid.length !=3D 33) - DBG_88E("ssid =3D%s, len =3D%d\n", extra, wrqu->essid.length); + ; =20 memset(&ndis_ssid, 0, sizeof(struct ndis_802_11_ssid)); ndis_ssid.SsidLength =3D len; @@ -1369,11 +1329,6 @@ static int rtw_wx_set_essid(struct net_device *dev, } =20 exit: - - DBG_88E("<=3D%s, ret %d\n", __func__, ret); - - - return ret; } =20 @@ -1513,10 +1468,6 @@ static int rtw_wx_set_rts(struct net_device *dev, padapter->registrypriv.rts_thresh =3D wrqu->rts.value; } =20 - DBG_88E("%s, rts_thresh =3D%d\n", __func__, padapter->registrypriv.rts_th= resh); - - - return 0; } =20 @@ -1528,8 +1479,6 @@ static int rtw_wx_get_rts(struct net_device *dev, =20 =20 =20 - DBG_88E("%s, rts_thresh =3D%d\n", __func__, padapter->registrypriv.rts_th= resh); - wrqu->rts.value =3D padapter->registrypriv.rts_thresh; wrqu->rts.fixed =3D 0; /* no auto select */ /* wrqu->rts.disabled =3D (wrqu->rts.value =3D=3D DEFAULT_RTS_THRESHOLD);= */ @@ -1557,10 +1506,6 @@ static int rtw_wx_set_frag(struct net_device *dev, padapter->xmitpriv.frag_len =3D wrqu->frag.value & ~0x1; } =20 - DBG_88E("%s, frag_len =3D%d\n", __func__, padapter->xmitpriv.frag_len); - - - return 0; } =20 @@ -1572,8 +1517,6 @@ static int rtw_wx_get_frag(struct net_device *dev, =20 =20 =20 - DBG_88E("%s, frag_len =3D%d\n", __func__, padapter->xmitpriv.frag_len); - wrqu->frag.value =3D padapter->xmitpriv.frag_len; wrqu->frag.fixed =3D 0; /* no auto select */ =20 @@ -1605,7 +1548,6 @@ static int rtw_wx_set_enc(struct net_device *dev, struct iw_point *erq =3D &wrqu->encoding; struct adapter *padapter =3D (struct adapter *)rtw_netdev_priv(dev); struct pwrctrl_priv *pwrpriv =3D &padapter->pwrctrlpriv; - DBG_88E("+rtw_wx_set_enc, flags =3D 0x%x\n", erq->flags); =20 memset(&wep, 0, sizeof(struct ndis_802_11_wep)); =20 @@ -1614,7 +1556,6 @@ static int rtw_wx_set_enc(struct net_device *dev, =20 =20 if (erq->flags & IW_ENCODE_DISABLED) { - DBG_88E("EncryptionDisabled\n"); padapter->securitypriv.ndisencryptstatus =3D Ndis802_11EncryptionDisable= d; padapter->securitypriv.dot11PrivacyAlgrthm =3D _NO_PRIVACY_; padapter->securitypriv.dot118021XGrpPrivacy =3D _NO_PRIVACY_; @@ -1633,12 +1574,10 @@ static int rtw_wx_set_enc(struct net_device *dev, } else { keyindex_provided =3D 0; key =3D padapter->securitypriv.dot11PrivacyKeyIndex; - DBG_88E("rtw_wx_set_enc, key =3D%d\n", key); } =20 /* set authentication mode */ if (erq->flags & IW_ENCODE_OPEN) { - DBG_88E("rtw_wx_set_enc():IW_ENCODE_OPEN\n"); padapter->securitypriv.ndisencryptstatus =3D Ndis802_11Encryption1Enable= d;/* Ndis802_11EncryptionDisabled; */ padapter->securitypriv.dot11AuthAlgrthm =3D dot11AuthAlgrthm_Open; padapter->securitypriv.dot11PrivacyAlgrthm =3D _NO_PRIVACY_; @@ -1646,7 +1585,6 @@ static int rtw_wx_set_enc(struct net_device *dev, authmode =3D Ndis802_11AuthModeOpen; padapter->securitypriv.ndisauthtype =3D authmode; } else if (erq->flags & IW_ENCODE_RESTRICTED) { - DBG_88E("rtw_wx_set_enc():IW_ENCODE_RESTRICTED\n"); padapter->securitypriv.ndisencryptstatus =3D Ndis802_11Encryption1Enable= d; padapter->securitypriv.dot11AuthAlgrthm =3D dot11AuthAlgrthm_Shared; padapter->securitypriv.dot11PrivacyAlgrthm =3D _WEP40_; @@ -1654,8 +1592,6 @@ static int rtw_wx_set_enc(struct net_device *dev, authmode =3D Ndis802_11AuthModeShared; padapter->securitypriv.ndisauthtype =3D authmode; } else { - DBG_88E("rtw_wx_set_enc():erq->flags =3D 0x%x\n", erq->flags); - padapter->securitypriv.ndisencryptstatus =3D Ndis802_11Encryption1Enable= d;/* Ndis802_11EncryptionDisabled; */ padapter->securitypriv.dot11AuthAlgrthm =3D dot11AuthAlgrthm_Open; /* op= en system */ padapter->securitypriv.dot11PrivacyAlgrthm =3D _NO_PRIVACY_; @@ -1676,8 +1612,6 @@ static int rtw_wx_set_enc(struct net_device *dev, /* set key_id only, no given KeyMaterial(erq->length =3D=3D 0). */ padapter->securitypriv.dot11PrivacyKeyIndex =3D key; =20 - DBG_88E("(keyindex_provided =3D=3D 1), keyid =3D%d, key_len =3D%d\n", k= ey, padapter->securitypriv.dot11DefKeylen[key]); - switch (padapter->securitypriv.dot11DefKeylen[key]) { case 5: padapter->securitypriv.dot11PrivacyAlgrthm =3D _WEP40_; @@ -1865,7 +1799,6 @@ static int rtw_wx_set_auth(struct net_device *dev, if (check_fwstate(&padapter->mlmepriv, _FW_LINKED)) { LeaveAllPowerSaveMode(padapter); rtw_disassoc_cmd(padapter, 500, false); - DBG_88E("%s...call rtw_indicate_disconnect\n ", __func__); rtw_indicate_disconnect(padapter); rtw_free_assoc_resources(padapter, 1); } @@ -2003,11 +1936,9 @@ static int rtw_wx_read32(struct net_device *dev, sprintf(extra, "0x%08X", data32); break; default: - DBG_88E(KERN_INFO "%s: usage> read [bytes],[address(hex)]\n", __func__); ret =3D -EINVAL; goto err_free_ptmp; } - DBG_88E(KERN_INFO "%s: addr =3D 0x%08X data =3D%s\n", __func__, addr, ext= ra); =20 kfree(ptmp); return 0; @@ -2035,18 +1966,14 @@ static int rtw_wx_write32(struct net_device *dev, switch (bytes) { case 1: rtw_write8(padapter, addr, (u8)data32); - DBG_88E(KERN_INFO "%s: addr =3D 0x%08X data =3D 0x%02X\n", __func__, add= r, (u8)data32); break; case 2: rtw_write16(padapter, addr, (u16)data32); - DBG_88E(KERN_INFO "%s: addr =3D 0x%08X data =3D 0x%04X\n", __func__, add= r, (u16)data32); break; case 4: rtw_write32(padapter, addr, data32); - DBG_88E(KERN_INFO "%s: addr =3D 0x%08X data =3D 0x%08X\n", __func__, add= r, data32); break; default: - DBG_88E(KERN_INFO "%s: usage> write [bytes],[address(hex)],[data(hex)]\n= ", __func__); return -EINVAL; } =20 @@ -2099,11 +2026,10 @@ static int rtw_wx_set_channel_plan(struct net_devic= e *dev, union iwreq_data *wrqu, char *extra) { struct adapter *padapter =3D (struct adapter *)rtw_netdev_priv(dev); - struct mlme_priv *pmlmepriv =3D &padapter->mlmepriv; u8 channel_plan_req =3D (u8)(*((int *)wrqu)); =20 if (_SUCCESS =3D=3D rtw_set_chplan_cmd(padapter, channel_plan_req)) - DBG_88E("%s set channel_plan =3D 0x%02X\n", __func__, pmlmepriv->Channel= Plan); + ; else return -EPERM; =20 @@ -2126,8 +2052,6 @@ static int rtw_get_ap_info(struct net_device *dev, struct __queue *queue =3D &pmlmepriv->scanned_queue; struct iw_point *pdata =3D &wrqu->data; =20 - DBG_88E("+rtw_get_aplist_info\n"); - if (padapter->bDriverStopped || !pdata) { ret =3D -EINVAL; goto exit; @@ -2159,15 +2083,12 @@ static int rtw_get_ap_info(struct net_device *dev, pnetwork =3D container_of(plist, struct wlan_network, list); =20 if (!mac_pton(data, bssid)) { - DBG_88E("Invalid BSSID '%s'.\n", (u8 *)data); spin_unlock_bh(&pmlmepriv->scanned_queue.lock); return -EINVAL; } =20 if (!memcmp(bssid, pnetwork->network.MacAddress, ETH_ALEN)) { /* BSSID match, then check if supporting wpa/wpa2 */ - DBG_88E("BSSID:%pM\n", (bssid)); - pbuf =3D rtw_get_wpa_ie(&pnetwork->network.IEs[12], &wpa_ielen, pnetwor= k->network.IELength - 12); if (pbuf && (wpa_ielen > 0)) { pdata->flags =3D 1; @@ -2216,9 +2137,7 @@ static int rtw_set_pid(struct net_device *dev, if (selector < 3 && selector >=3D 0) { padapter->pid[selector] =3D *(pdata + 1); ui_pid[selector] =3D *(pdata + 1); - DBG_88E("%s set pid[%d] =3D%d\n", __func__, selector, padapter->pid[sele= ctor]); } else { - DBG_88E("%s selector %d error\n", __func__, selector); } exit: return ret; @@ -2249,8 +2168,6 @@ static int rtw_wps_start(struct net_device *dev, if (u32wps_start =3D=3D 0) u32wps_start =3D *extra; =20 - DBG_88E("[%s] wps_start =3D %d\n", __func__, u32wps_start); - if (u32wps_start =3D=3D 1) /* WPS Start */ rtw_led_control(padapter, LED_CTL_START_WPS); else if (u32wps_start =3D=3D 2) /* WPS Stop because of wps success */ @@ -2319,7 +2236,6 @@ static void rtw_p2p_set_go_nego_ssid(struct net_devic= e *dev, struct adapter *padapter =3D (struct adapter *)rtw_netdev_priv(dev); struct wifidirect_info *pwdinfo =3D &padapter->wdinfo; =20 - DBG_88E("[%s] ssid =3D %s, len =3D %zu\n", __func__, extra, strlen(extra)= ); memcpy(pwdinfo->nego_ssid, extra, strlen(extra)); pwdinfo->nego_ssidlen =3D strlen(extra); } @@ -2345,7 +2261,6 @@ static int rtw_p2p_set_intent(struct net_device *dev, pwdinfo->intent =3D intent; else ret =3D -1; - DBG_88E("[%s] intent =3D %d\n", __func__, intent); return ret; } =20 @@ -2374,8 +2289,6 @@ static int rtw_p2p_set_listen_ch(struct net_device *d= ev, ret =3D -1; } =20 - DBG_88E("[%s] listen_ch =3D %d\n", __func__, pwdinfo->listen_channel); - return ret; } =20 @@ -2405,8 +2318,6 @@ static int rtw_p2p_set_op_ch(struct net_device *dev, else ret =3D -1; =20 - DBG_88E("[%s] op_ch =3D %d\n", __func__, pwdinfo->operating_channel); - return ret; } =20 @@ -2428,8 +2339,6 @@ static int rtw_p2p_profilefound(struct net_device *de= v, /* YY =3D> SSID Length */ /* SSID =3D> SSID for persistence group */ =20 - DBG_88E("[%s] In value =3D %s, len =3D %d\n", __func__, extra, wrqu->data= .length - 1); - /* The upper application should pass the SSID to driver by using this rtw= _p2p_profilefound function. */ if (!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) { if (extra[0] =3D=3D '0') { @@ -2464,7 +2373,6 @@ static void rtw_p2p_setDN(struct net_device *dev, struct adapter *padapter =3D (struct adapter *)rtw_netdev_priv(dev); struct wifidirect_info *pwdinfo =3D &padapter->wdinfo; =20 - DBG_88E("[%s] %s %d\n", __func__, extra, wrqu->data.length - 1); memset(pwdinfo->device_name, 0x00, WPS_MAX_DEVICE_NAME_LEN); memcpy(pwdinfo->device_name, extra, wrqu->data.length - 1); pwdinfo->device_name_len =3D wrqu->data.length - 1; @@ -2478,9 +2386,7 @@ static void rtw_p2p_get_status(struct net_device *dev, struct wifidirect_info *pwdinfo =3D &padapter->wdinfo; =20 if (padapter->bShowGetP2PState) - DBG_88E("[%s] Role =3D %d, Status =3D %d, peer addr =3D %.2X:%.2X:%.2X:%= .2X:%.2X:%.2X\n", __func__, rtw_p2p_role(pwdinfo), rtw_p2p_state(pwdinfo), - pwdinfo->p2p_peer_interface_addr[0], pwdinfo->p2p_peer_interface_addr[1= ], pwdinfo->p2p_peer_interface_addr[2], - pwdinfo->p2p_peer_interface_addr[3], pwdinfo->p2p_peer_interface_addr[4= ], pwdinfo->p2p_peer_interface_addr[5]); + ; =20 /* Commented by Albert 2010/10/12 */ /* Because of the output size limitation, I had removed the "Role" inform= ation. */ @@ -2512,10 +2418,6 @@ static void rtw_p2p_get_role(struct net_device *dev, struct adapter *padapter =3D (struct adapter *)rtw_netdev_priv(dev); struct wifidirect_info *pwdinfo =3D &padapter->wdinfo; =20 - DBG_88E("[%s] Role =3D %d, Status =3D %d, peer addr =3D %.2X:%.2X:%.2X:%.= 2X:%.2X:%.2X\n", __func__, rtw_p2p_role(pwdinfo), rtw_p2p_state(pwdinfo), - pwdinfo->p2p_peer_interface_addr[0], pwdinfo->p2p_peer_interface_addr[1= ], pwdinfo->p2p_peer_interface_addr[2], - pwdinfo->p2p_peer_interface_addr[3], pwdinfo->p2p_peer_interface_addr[4= ], pwdinfo->p2p_peer_interface_addr[5]); - sprintf(extra, "\n\nRole =3D%.2d\n", rtw_p2p_role(pwdinfo)); wrqu->data.length =3D strlen(extra); } @@ -2527,9 +2429,6 @@ static void rtw_p2p_get_peer_ifaddr(struct net_device= *dev, struct adapter *padapter =3D (struct adapter *)rtw_netdev_priv(dev); struct wifidirect_info *pwdinfo =3D &padapter->wdinfo; =20 - DBG_88E("[%s] Role =3D %d, Status =3D %d, peer addr =3D %pM\n", __func__, - rtw_p2p_role(pwdinfo), rtw_p2p_state(pwdinfo), - pwdinfo->p2p_peer_interface_addr); sprintf(extra, "\nMAC %pM", pwdinfo->p2p_peer_interface_addr); wrqu->data.length =3D strlen(extra); @@ -2543,9 +2442,6 @@ static void rtw_p2p_get_peer_devaddr(struct net_devic= e *dev, struct adapter *padapter =3D (struct adapter *)rtw_netdev_priv(dev); struct wifidirect_info *pwdinfo =3D &padapter->wdinfo; =20 - DBG_88E("[%s] Role =3D %d, Status =3D %d, peer addr =3D %pM\n", __func__, - rtw_p2p_role(pwdinfo), rtw_p2p_state(pwdinfo), - pwdinfo->rx_prov_disc_info.peerDevAddr); sprintf(extra, "\n%pM", pwdinfo->rx_prov_disc_info.peerDevAddr); wrqu->data.length =3D strlen(extra); @@ -2560,9 +2456,6 @@ static void rtw_p2p_get_peer_devaddr_by_invitation(st= ruct net_device *dev, struct adapter *padapter =3D (struct adapter *)rtw_netdev_priv(dev); struct wifidirect_info *pwdinfo =3D &padapter->wdinfo; =20 - DBG_88E("[%s] Role =3D %d, Status =3D %d, peer addr =3D %pM\n", - __func__, rtw_p2p_role(pwdinfo), rtw_p2p_state(pwdinfo), - pwdinfo->p2p_peer_device_addr); sprintf(extra, "\nMAC %pM", pwdinfo->p2p_peer_device_addr); wrqu->data.length =3D strlen(extra); @@ -2592,8 +2485,6 @@ static void rtw_p2p_get_op_ch(struct net_device *dev, struct adapter *padapter =3D (struct adapter *)rtw_netdev_priv(dev); struct wifidirect_info *pwdinfo =3D &padapter->wdinfo; =20 - DBG_88E("[%s] Op_ch =3D %02x\n", __func__, pwdinfo->operating_channel); - sprintf(extra, "\n\nOp_ch =3D%.2d\n", pwdinfo->operating_channel); wrqu->data.length =3D strlen(extra); } @@ -2621,7 +2512,6 @@ static int rtw_p2p_get_wps_configmethod(struct net_de= vice *dev, /* After knowing its WPS config method, the application can decide the co= nfig method for provisioning discovery. */ /* Format: iwpriv wlanx p2p_get_wpsCM 00:E0:4C:00:00:05 */ =20 - DBG_88E("[%s] data =3D %s\n", __func__, (char *)extra); if (copy_from_user(peerMACStr, wrqu->data.pointer + 6, 17)) return -EFAULT; =20 @@ -2689,7 +2579,6 @@ static int rtw_p2p_get_go_device_address(struct net_d= evice *dev, /* The input data is the GO's interface address which the application wan= ts to know its device address. */ /* Format: iwpriv wlanx p2p_get2 go_devadd =3D 00:E0:4C:00:00:05 */ =20 - DBG_88E("[%s] data =3D %s\n", __func__, (char *)extra); if (copy_from_user(peerMACStr, wrqu->data.pointer + 10, 17)) return -EFAULT; =20 @@ -2769,7 +2658,6 @@ static int rtw_p2p_get_device_type(struct net_device = *dev, /* Such user interface could know the device type. */ /* Format: iwpriv wlanx p2p_get2 dev_type =3D 00:E0:4C:00:00:05 */ =20 - DBG_88E("[%s] data =3D %s\n", __func__, (char *)extra); if (copy_from_user(peerMACStr, wrqu->data.pointer + 9, 17)) return -EFAULT; =20 @@ -2844,7 +2732,6 @@ static int rtw_p2p_get_device_name(struct net_device = *dev, /* Such user interface could show peer device's device name instead of ss= id. */ /* Format: iwpriv wlanx p2p_get2 devN =3D 00:E0:4C:00:00:05 */ =20 - DBG_88E("[%s] data =3D %s\n", __func__, (char *)extra); if (copy_from_user(peerMACStr, wrqu->data.pointer + 5, 17)) return -EFAULT; =20 @@ -2911,7 +2798,6 @@ static int rtw_p2p_get_invitation_procedure(struct ne= t_device *dev, /* The application wants to know P2P initiation procedure is supported or= not. */ /* Format: iwpriv wlanx p2p_get2 InvProc =3D 00:E0:4C:00:00:05 */ =20 - DBG_88E("[%s] data =3D %s\n", __func__, (char *)extra); if (copy_from_user(peerMACStr, wrqu->data.pointer + 8, 17)) return -EFAULT; =20 @@ -2984,10 +2870,7 @@ static int rtw_p2p_connect(struct net_device *dev, /* Format: 00:E0:4C:00:00:05 */ /* Format: 00:E0:4C:00:00:05 */ =20 - DBG_88E("[%s] data =3D %s\n", __func__, extra); - if (pwdinfo->p2p_state =3D=3D P2P_STATE_NONE) { - DBG_88E("[%s] WiFi Direct is disable!\n", __func__); return ret; } =20 @@ -3031,11 +2914,9 @@ static int rtw_p2p_connect(struct net_device *dev, rtw_p2p_set_pre_state(pwdinfo, rtw_p2p_state(pwdinfo)); rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_ING); =20 - DBG_88E("[%s] Start PreTx Procedure!\n", __func__); _set_timer(&pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT); _set_timer(&pwdinfo->restore_p2p_state_timer, P2P_GO_NEGO_TIMEOUT); } else { - DBG_88E("[%s] Not Found in Scanning Queue~\n", __func__); ret =3D -1; } return ret; @@ -3064,15 +2945,11 @@ static void rtw_p2p_invite_req(struct net_device *d= ev, /* Command line sample: iwpriv wlan0 p2p_set invite =3D"00:11:22:33:44:55= 00:E0:4C:00:00:05 DIRECT-xy" */ /* Format: 00:11:22:33:44:55 00:E0:4C:00:00:05 DIRECT-xy */ =20 - DBG_88E("[%s] data =3D %s\n", __func__, extra); - if (wrqu->data.length <=3D 37) { - DBG_88E("[%s] Wrong format!\n", __func__); return; } =20 if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) { - DBG_88E("[%s] WiFi Direct is disable!\n", __func__); return; } else { /* Reset the content of struct tx_invite_req_info */ @@ -3144,7 +3021,6 @@ static void rtw_p2p_invite_req(struct net_device *dev, =20 _set_timer(&pwdinfo->restore_p2p_state_timer, P2P_INVITE_TIMEOUT); } else { - DBG_88E("[%s] NOT Found in the Scanning Queue!\n", __func__); } } =20 @@ -3159,10 +3035,7 @@ static void rtw_p2p_set_persistent(struct net_device= *dev, /* 0: disable persistent group functionality */ /* 1: enable persistent group founctionality */ =20 - DBG_88E("[%s] data =3D %s\n", __func__, extra); - if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) { - DBG_88E("[%s] WiFi Direct is disable!\n", __func__); return; } else { if (extra[0] =3D=3D '0') /* Disable the persistent group function. */ @@ -3200,10 +3073,7 @@ static void rtw_p2p_prov_disc(struct net_device *dev, /* Format: 00:E0:4C:00:00:05_pbc */ /* Format: 00:E0:4C:00:00:05_label */ =20 - DBG_88E("[%s] data =3D %s\n", __func__, extra); - if (pwdinfo->p2p_state =3D=3D P2P_STATE_NONE) { - DBG_88E("[%s] WiFi Direct is disable!\n", __func__); return; } else { /* Reset the content of struct tx_provdisc_req_info excluded the wps_con= fig_method_request. */ @@ -3227,7 +3097,6 @@ static void rtw_p2p_prov_disc(struct net_device *dev, } else if (!memcmp(&extra[18], "label", 5)) { pwdinfo->tx_prov_disc_info.wps_config_method_request =3D WPS_CM_LABEL; } else { - DBG_88E("[%s] Unknown WPS config methodn", __func__); return; } =20 @@ -3277,7 +3146,6 @@ static void rtw_p2p_prov_disc(struct net_device *dev, spin_unlock_bh(&pmlmepriv->scanned_queue.lock); =20 if (peer_channel) { - DBG_88E("[%s] peer channel: %d!\n", __func__, peer_channel); memcpy(pwdinfo->tx_prov_disc_info.peerIFAddr, pnetwork->network.MacAddre= ss, ETH_ALEN); memcpy(pwdinfo->tx_prov_disc_info.peerDevAddr, peerMAC, ETH_ALEN); pwdinfo->tx_prov_disc_info.peer_channel_num[0] =3D (u16)peer_channel; @@ -3298,7 +3166,6 @@ static void rtw_p2p_prov_disc(struct net_device *dev, =20 _set_timer(&pwdinfo->restore_p2p_state_timer, P2P_PROVISION_TIMEOUT); } else { - DBG_88E("[%s] NOT Found in the Scanning Queue!\n", __func__); } } =20 @@ -3312,7 +3179,6 @@ static void rtw_p2p_got_wpsinfo(struct net_device *de= v, struct adapter *padapter =3D (struct adapter *)rtw_netdev_priv(dev); struct wifidirect_info *pwdinfo =3D &padapter->wdinfo; =20 - DBG_88E("[%s] data =3D %s\n", __func__, extra); /* Added by Albert 20110328 */ /* if the input data is P2P_NO_WPSINFO -> reset the wpsinfo */ /* if the input data is P2P_GOT_WPSINFO_PEER_DISPLAY_PIN -> the utility j= ust input the PIN code got from the peer P2P device. */ @@ -3337,7 +3203,6 @@ static int rtw_p2p_set(struct net_device *dev, { int ret =3D 0; =20 - DBG_88E("[%s] extra =3D %s\n", __func__, extra); if (!memcmp(extra, "enable =3D", 7)) { rtw_wext_p2p_enable(dev, info, wrqu, &extra[7]); } else if (!memcmp(extra, "setDN =3D", 6)) { @@ -3394,7 +3259,7 @@ static int rtw_p2p_get(struct net_device *dev, struct adapter *padapter =3D (struct adapter *)rtw_netdev_priv(dev); =20 if (padapter->bShowGetP2PState) - DBG_88E("[%s] extra =3D %s\n", __func__, (char *)wrqu->data.pointer); + ; if (!memcmp(wrqu->data.pointer, "status", 6)) { rtw_p2p_get_status(dev, info, wrqu, extra); } else if (!memcmp(wrqu->data.pointer, "role", 4)) { @@ -3423,7 +3288,6 @@ static int rtw_p2p_get2(struct net_device *dev, { int ret =3D 0; =20 - DBG_88E("[%s] extra =3D %s\n", __func__, (char *)wrqu->data.pointer); if (!memcmp(extra, "wpsCM =3D", 6)) { wrqu->data.length -=3D 6; ret =3D rtw_p2p_get_wps_configmethod(dev, info, wrqu, &extra[6]); @@ -3470,7 +3334,6 @@ static int rtw_rereg_nd_name(struct net_device *dev, if (0 =3D=3D strcmp(rereg_priv->old_ifname, new_ifname)) return ret; =20 - DBG_88E("%s new_ifname:%s\n", __func__, new_ifname); ret =3D rtw_change_ifname(padapter, new_ifname); if (0 !=3D ret) goto exit; @@ -3485,7 +3348,6 @@ static int rtw_rereg_nd_name(struct net_device *dev, rereg_priv->old_ifname[IFNAMSIZ - 1] =3D 0; =20 if (!memcmp(new_ifname, "disable%d", 9)) { - DBG_88E("%s disable\n", __func__); /* free network queue for Android's timming issue */ rtw_free_network_queue(padapter, true); =20 @@ -3568,7 +3430,6 @@ static int rtw_dbg_port(struct net_device *dev, struct mlme_priv *pmlmepriv =3D &padapter->mlmepriv; struct mlme_ext_priv *pmlmeext =3D &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo =3D &pmlmeext->mlmext_info; - struct security_priv *psecuritypriv =3D &padapter->securitypriv; struct wlan_network *cur_network =3D &pmlmepriv->cur_network; struct sta_priv *pstapriv =3D &padapter->stapriv; =20 @@ -3585,13 +3446,10 @@ static int rtw_dbg_port(struct net_device *dev, case 0x70:/* read_reg */ switch (minor_cmd) { case 1: - DBG_88E("rtw_read8(0x%x) =3D 0x%02x\n", arg, rtw_read8(padapter, arg)); break; case 2: - DBG_88E("rtw_read16(0x%x) =3D 0x%04x\n", arg, rtw_read16(padapter, arg)= ); break; case 4: - DBG_88E("rtw_read32(0x%x) =3D 0x%08x\n", arg, rtw_read32(padapter, arg)= ); break; } break; @@ -3599,31 +3457,25 @@ static int rtw_dbg_port(struct net_device *dev, switch (minor_cmd) { case 1: rtw_write8(padapter, arg, extra_arg); - DBG_88E("rtw_write8(0x%x) =3D 0x%02x\n", arg, rtw_read8(padapter, arg)); break; case 2: rtw_write16(padapter, arg, extra_arg); - DBG_88E("rtw_write16(0x%x) =3D 0x%04x\n", arg, rtw_read16(padapter, arg= )); break; case 4: rtw_write32(padapter, arg, extra_arg); - DBG_88E("rtw_write32(0x%x) =3D 0x%08x\n", arg, rtw_read32(padapter, arg= )); break; } break; case 0x72:/* read_bb */ - DBG_88E("read_bbreg(0x%x) =3D 0x%x\n", arg, rtl8188e_PHY_QueryBBReg(pada= pter, arg, 0xffffffff)); break; case 0x73:/* write_bb */ rtl8188e_PHY_SetBBReg(padapter, arg, 0xffffffff, extra_arg); - DBG_88E("write_bbreg(0x%x) =3D 0x%x\n", arg, rtl8188e_PHY_QueryBBReg(pad= apter, arg, 0xffffffff)); break; case 0x74:/* read_rf */ if (minor_cmd !=3D RF_PATH_A) { ret =3D -EINVAL; break; } - DBG_88E("read RF_reg path(0x%02x), offset(0x%x), value(0x%08x)\n", RF_PA= TH_A, arg, rtl8188e_PHY_QueryRFReg(padapter, arg, 0xffffffff)); break; case 0x75:/* write_rf */ if (minor_cmd !=3D RF_PATH_A) { @@ -3631,7 +3483,6 @@ static int rtw_dbg_port(struct net_device *dev, break; } rtl8188e_PHY_SetRFReg(padapter, arg, 0xffffffff, extra_arg); - DBG_88E("write RF_reg path(0x%02x), offset(0x%x), value(0x%08x)\n", RF_P= ATH_A, arg, rtl8188e_PHY_QueryRFReg(padapter, arg, 0xffffffff)); break; =20 case 0x76: @@ -3710,9 +3561,9 @@ static int rtw_dbg_port(struct net_device *dev, =20 final =3D rtw_read8(padapter, reg); if (start_value + write_num - 1 =3D=3D final) - DBG_88E("continuous IOL_CMD_WB_REG to 0x%x %u times Success, start:%u,= final:%u\n", reg, write_num, start_value, final); + ; else - DBG_88E("continuous IOL_CMD_WB_REG to 0x%x %u times Fail, start:%u, fi= nal:%u\n", reg, write_num, start_value, final); + ; } break; =20 @@ -3739,9 +3590,9 @@ static int rtw_dbg_port(struct net_device *dev, =20 final =3D rtw_read16(padapter, reg); if (start_value + write_num - 1 =3D=3D final) - DBG_88E("continuous IOL_CMD_WW_REG to 0x%x %u times Success, start:%u,= final:%u\n", reg, write_num, start_value, final); + ; else - DBG_88E("continuous IOL_CMD_WW_REG to 0x%x %u times Fail, start:%u, fi= nal:%u\n", reg, write_num, start_value, final); + ; } break; case 0x08: /* continuous write dword test */ @@ -3767,11 +3618,9 @@ static int rtw_dbg_port(struct net_device *dev, =20 final =3D rtw_read32(padapter, reg); if (start_value + write_num - 1 =3D=3D final) - DBG_88E("continuous IOL_CMD_WD_REG to 0x%x %u times Success, start:%u,= final:%u\n", - reg, write_num, start_value, final); + ; else - DBG_88E("continuous IOL_CMD_WD_REG to 0x%x %u times Fail, start:%u, fi= nal:%u\n", - reg, write_num, start_value, final); + ; } break; } @@ -3786,8 +3635,6 @@ static int rtw_dbg_port(struct net_device *dev, u8 sign =3D minor_cmd; u16 write_value =3D 0; =20 - DBG_88E("%s set RESP_TXAGC to %s %u\n", __func__, sign ? "minus" : "plu= s", value); - if (sign) value =3D value | 0x10; =20 @@ -3802,24 +3649,14 @@ static int rtw_dbg_port(struct net_device *dev, case 0x7F: switch (minor_cmd) { case 0x0: - DBG_88E("fwstate =3D 0x%x\n", get_fwstate(pmlmepriv)); break; case 0x01: - DBG_88E("auth_alg =3D 0x%x, enc_alg =3D 0x%x, auth_type =3D 0x%x, enc_t= ype =3D 0x%x\n", - psecuritypriv->dot11AuthAlgrthm, psecuritypriv->dot11PrivacyAlgrthm, - psecuritypriv->ndisauthtype, psecuritypriv->ndisencryptstatus); break; case 0x02: - DBG_88E("pmlmeinfo->state =3D 0x%x\n", pmlmeinfo->state); break; case 0x03: - DBG_88E("qos_option =3D%d\n", pmlmepriv->qospriv.qos_option); - DBG_88E("ht_option =3D%d\n", pmlmepriv->htpriv.ht_option); break; case 0x04: - DBG_88E("cur_ch =3D%d\n", pmlmeext->cur_channel); - DBG_88E("cur_bw =3D%d\n", pmlmeext->cur_bwmode); - DBG_88E("cur_ch_off =3D%d\n", pmlmeext->cur_ch_offset); break; case 0x05: psta =3D rtw_get_stainfo(pstapriv, cur_network->network.MacAddress); @@ -3827,47 +3664,25 @@ static int rtw_dbg_port(struct net_device *dev, int i; struct recv_reorder_ctrl *preorder_ctrl; =20 - DBG_88E("SSID =3D%s\n", cur_network->network.Ssid.Ssid); - DBG_88E("sta's macaddr: %pM\n", psta->hwaddr); - DBG_88E("cur_channel =3D%d, cur_bwmode =3D%d, cur_ch_offset =3D%d\n", = pmlmeext->cur_channel, pmlmeext->cur_bwmode, pmlmeext->cur_ch_offset); - DBG_88E("rtsen =3D%d, cts2slef =3D%d\n", psta->rtsen, psta->cts2self); - DBG_88E("state =3D 0x%x, aid =3D%d, macid =3D%d, raid =3D%d\n", psta->= state, psta->aid, psta->mac_id, psta->raid); - DBG_88E("qos_en =3D%d, ht_en =3D%d, init_rate =3D%d\n", psta->qos_opti= on, psta->htpriv.ht_option, psta->init_rate); - DBG_88E("bwmode =3D%d, ch_offset =3D%d, sgi =3D%d\n", psta->htpriv.bwm= ode, psta->htpriv.ch_offset, psta->htpriv.sgi); - DBG_88E("ampdu_enable =3D %d\n", psta->htpriv.ampdu_enable); - DBG_88E("agg_enable_bitmap =3D%x, candidate_tid_bitmap =3D%x\n", psta-= >htpriv.agg_enable_bitmap, psta->htpriv.candidate_tid_bitmap); for (i =3D 0; i < 16; i++) { preorder_ctrl =3D &psta->recvreorder_ctrl[i]; if (preorder_ctrl->enable) - DBG_88E("tid =3D%d, indicate_seq =3D%d\n", i, preorder_ctrl->indicat= e_seq); + ; } } else { - DBG_88E("can't get sta's macaddr, cur_network's macaddr:%pM\n", (cur_n= etwork->network.MacAddress)); } break; case 0x06: { u32 ODMFlag; GetHwReg8188EU(padapter, HW_VAR_DM_FLAG, (u8 *)(&ODMFlag)); - DBG_88E("(B)DMFlag =3D 0x%x, arg =3D 0x%x\n", ODMFlag, arg); ODMFlag =3D (u32)(0x0f & arg); - DBG_88E("(A)DMFlag =3D 0x%x\n", ODMFlag); SetHwReg8188EU(padapter, HW_VAR_DM_FLAG, (u8 *)(&ODMFlag)); } break; case 0x07: - DBG_88E("bSurpriseRemoved =3D%d, bDriverStopped =3D%d\n", - padapter->bSurpriseRemoved, padapter->bDriverStopped); break; case 0x08: - { - struct xmit_priv *pxmitpriv =3D &padapter->xmitpriv; - struct recv_priv *precvpriv =3D &padapter->recvpriv; - - DBG_88E("free_xmitbuf_cnt =3D%d, free_xmitframe_cnt =3D%d, free_xmit_e= xtbuf_cnt =3D%d\n", - pxmitpriv->free_xmitbuf_cnt, pxmitpriv->free_xmitframe_cnt, pxmitpriv= ->free_xmit_extbuf_cnt); - DBG_88E("rx_urb_pending_cn =3D%d\n", precvpriv->rx_pending_cnt); - } break; case 0x09: { @@ -3875,7 +3690,6 @@ static int rtw_dbg_port(struct net_device *dev, struct list_head *plist, *phead; struct recv_reorder_ctrl *preorder_ctrl; =20 - DBG_88E("sta_dz_bitmap =3D 0x%x, tim_bitmap =3D 0x%x\n", pstapriv->sta= _dz_bitmap, pstapriv->tim_bitmap); spin_lock_bh(&pstapriv->sta_hash_lock); =20 for (i =3D 0; i < NUM_STA; i++) { @@ -3888,26 +3702,10 @@ static int rtw_dbg_port(struct net_device *dev, plist =3D plist->next; =20 if (extra_arg =3D=3D psta->aid) { - DBG_88E("sta's macaddr:%pM\n", (psta->hwaddr)); - DBG_88E("rtsen =3D%d, cts2slef =3D%d\n", psta->rtsen, psta->cts2sel= f); - DBG_88E("state =3D 0x%x, aid =3D%d, macid =3D%d, raid =3D%d\n", pst= a->state, psta->aid, psta->mac_id, psta->raid); - DBG_88E("qos_en =3D%d, ht_en =3D%d, init_rate =3D%d\n", psta->qos_o= ption, psta->htpriv.ht_option, psta->init_rate); - DBG_88E("bwmode =3D%d, ch_offset =3D%d, sgi =3D%d\n", psta->htpriv.= bwmode, psta->htpriv.ch_offset, psta->htpriv.sgi); - DBG_88E("ampdu_enable =3D %d\n", psta->htpriv.ampdu_enable); - DBG_88E("agg_enable_bitmap =3D%x, candidate_tid_bitmap =3D%x\n", ps= ta->htpriv.agg_enable_bitmap, psta->htpriv.candidate_tid_bitmap); - - DBG_88E("capability =3D 0x%x\n", psta->capability); - DBG_88E("flags =3D 0x%x\n", psta->flags); - DBG_88E("wpa_psk =3D 0x%x\n", psta->wpa_psk); - DBG_88E("wpa2_group_cipher =3D 0x%x\n", psta->wpa2_group_cipher); - DBG_88E("wpa2_pairwise_cipher =3D 0x%x\n", psta->wpa2_pairwise_ciph= er); - DBG_88E("qos_info =3D 0x%x\n", psta->qos_info); - DBG_88E("dot118021XPrivacy =3D 0x%x\n", psta->dot118021XPrivacy); - for (j =3D 0; j < 16; j++) { preorder_ctrl =3D &psta->recvreorder_ctrl[j]; if (preorder_ctrl->enable) - DBG_88E("tid =3D%d, indicate_seq =3D%d\n", j, preorder_ctrl->indi= cate_seq); + ; } } } @@ -3917,24 +3715,16 @@ static int rtw_dbg_port(struct net_device *dev, break; case 0x0c:/* dump rx/tx packet */ if (arg =3D=3D 0) { - DBG_88E("dump rx packet (%d)\n", extra_arg); SetHalDefVar8188EUsb(padapter, HAL_DEF_DBG_DUMP_RXPKT, &extra_arg); } else if (arg =3D=3D 1) { - DBG_88E("dump tx packet (%d)\n", extra_arg); SetHalDefVar8188EUsb(padapter, HAL_DEF_DBG_DUMP_TXPKT, &extra_arg); } break; case 0x15: - { - struct pwrctrl_priv *pwrpriv =3D &padapter->pwrctrlpriv; - DBG_88E("=3D=3D>silent resete cnts:%d\n", pwrpriv->ips_enter_cnts); - } break; case 0x10:/* driver version display */ - DBG_88E("rtw driver version =3D%s\n", DRIVERVERSION); break; case 0x11: - DBG_88E("turn %s Rx RSSI display function\n", (extra_arg =3D=3D 1) ? "o= n" : "off"); padapter->bRxRSSIDisplay =3D extra_arg; break; case 0x12: /* set rx_stbc */ @@ -3947,9 +3737,7 @@ static int rtw_dbg_port(struct net_device *dev, extra_arg =3D=3D 2 || extra_arg =3D=3D 3) { pregpriv->rx_stbc =3D extra_arg; - DBG_88E("set rx_stbc =3D%d\n", pregpriv->rx_stbc); } else { - DBG_88E("get rx_stbc =3D%d\n", pregpriv->rx_stbc); } } break; @@ -3959,24 +3747,16 @@ static int rtw_dbg_port(struct net_device *dev, /* 0: disable, 0x1:enable (but wifi_spec should be 0), 0x2: force enab= le (don't care wifi_spec) */ if (extra_arg >=3D 0 && extra_arg < 3) { pregpriv->ampdu_enable =3D extra_arg; - DBG_88E("set ampdu_enable =3D%d\n", pregpriv->ampdu_enable); } else { - DBG_88E("get ampdu_enable =3D%d\n", pregpriv->ampdu_enable); } } break; case 0x14: /* get wifi_spec */ - { - struct registry_priv *pregpriv =3D &padapter->registrypriv; - DBG_88E("get wifi_spec =3D%d\n", pregpriv->wifi_spec); - } break; case 0x23: - DBG_88E("turn %s the bNotifyChannelChange Variable\n", (extra_arg =3D= =3D 1) ? "on" : "off"); padapter->bNotifyChannelChange =3D extra_arg; break; case 0x24: - DBG_88E("turn %s the bShowGetP2PState Variable\n", (extra_arg =3D=3D 1)= ? "on" : "off"); padapter->bShowGetP2PState =3D extra_arg; break; case 0xdd:/* registers dump, 0 for mac reg, 1 for bb reg, 2 for rf reg */ @@ -3993,14 +3773,6 @@ static int rtw_dbg_port(struct net_device *dev, =20 if (0xf =3D=3D extra_arg) { GetHalDefVar8188EUsb(padapter, HAL_DEF_DBG_DM_FUNC, &odm_flag); - DBG_88E(" =3D=3D=3D DMFlag(0x%08x) =3D=3D=3D\n", odm_flag); - DBG_88E("extra_arg =3D 0 - disable all dynamic func\n"); - DBG_88E("extra_arg =3D 1 - disable DIG- BIT(0)\n"); - DBG_88E("extra_arg =3D 2 - disable High power - BIT(1)\n"); - DBG_88E("extra_arg =3D 3 - disable tx power tracking - BIT(2)\n"); - DBG_88E("extra_arg =3D 4 - disable BT coexistence - BIT(3)\n"); - DBG_88E("extra_arg =3D 5 - disable antenna diversity - BIT(4)\n"); - DBG_88E("extra_arg =3D 6 - enable all dynamic func\n"); } else { /* extra_arg =3D 0 - disable all dynamic func extra_arg =3D 1 - disable DIG @@ -4009,51 +3781,21 @@ static int rtw_dbg_port(struct net_device *dev, */ SetHalDefVar8188EUsb(padapter, HAL_DEF_DBG_DM_FUNC, &extra_arg); GetHalDefVar8188EUsb(padapter, HAL_DEF_DBG_DM_FUNC, &odm_flag); - DBG_88E(" =3D=3D=3D DMFlag(0x%08x) =3D=3D=3D\n", odm_flag); } } break; =20 case 0xfd: rtw_write8(padapter, 0xc50, arg); - DBG_88E("wr(0xc50) =3D 0x%x\n", rtw_read8(padapter, 0xc50)); rtw_write8(padapter, 0xc58, arg); - DBG_88E("wr(0xc58) =3D 0x%x\n", rtw_read8(padapter, 0xc58)); break; case 0xfe: - DBG_88E("rd(0xc50) =3D 0x%x\n", rtw_read8(padapter, 0xc50)); - DBG_88E("rd(0xc58) =3D 0x%x\n", rtw_read8(padapter, 0xc58)); break; case 0xff: - DBG_88E("dbg(0x210) =3D 0x%x\n", rtw_read32(padapter, 0x210)); - DBG_88E("dbg(0x608) =3D 0x%x\n", rtw_read32(padapter, 0x608)); - DBG_88E("dbg(0x280) =3D 0x%x\n", rtw_read32(padapter, 0x280)); - DBG_88E("dbg(0x284) =3D 0x%x\n", rtw_read32(padapter, 0x284)); - DBG_88E("dbg(0x288) =3D 0x%x\n", rtw_read32(padapter, 0x288)); - - DBG_88E("dbg(0x664) =3D 0x%x\n", rtw_read32(padapter, 0x664)); - - DBG_88E("\n"); - - DBG_88E("dbg(0x430) =3D 0x%x\n", rtw_read32(padapter, 0x430)); - DBG_88E("dbg(0x438) =3D 0x%x\n", rtw_read32(padapter, 0x438)); - - DBG_88E("dbg(0x440) =3D 0x%x\n", rtw_read32(padapter, 0x440)); - - DBG_88E("dbg(0x458) =3D 0x%x\n", rtw_read32(padapter, 0x458)); - - DBG_88E("dbg(0x484) =3D 0x%x\n", rtw_read32(padapter, 0x484)); - DBG_88E("dbg(0x488) =3D 0x%x\n", rtw_read32(padapter, 0x488)); - - DBG_88E("dbg(0x444) =3D 0x%x\n", rtw_read32(padapter, 0x444)); - DBG_88E("dbg(0x448) =3D 0x%x\n", rtw_read32(padapter, 0x448)); - DBG_88E("dbg(0x44c) =3D 0x%x\n", rtw_read32(padapter, 0x44c)); - DBG_88E("dbg(0x450) =3D 0x%x\n", rtw_read32(padapter, 0x450)); break; } break; default: - DBG_88E("error dbg cmd!\n"); break; } return ret; @@ -4130,8 +3872,6 @@ static int rtw_pm_set(struct net_device *dev, unsigned mode =3D 0; struct adapter *padapter =3D (struct adapter *)rtw_netdev_priv(dev); =20 - DBG_88E("[%s] extra =3D %s\n", __func__, extra); - if (!memcmp(extra, "lps =3D", 4)) { sscanf(extra + 4, "%u", &mode); ret =3D rtw_pm_set_lps(padapter, mode); --=20 2.34.1 From nobody Sun Jun 28 02:50:42 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D53CBC433EF for ; Wed, 16 Feb 2022 01:07:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245319AbiBPBHs (ORCPT ); Tue, 15 Feb 2022 20:07:48 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:53490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245275AbiBPBHb (ORCPT ); Tue, 15 Feb 2022 20:07:31 -0500 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF229F5412 for ; Tue, 15 Feb 2022 17:07:18 -0800 (PST) Received: by mail-wm1-x32f.google.com with SMTP id n8so279382wms.3 for ; Tue, 15 Feb 2022 17:07:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philpotter-co-uk.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4mMe++iOVbf6BKH9Qj9kdpFtiJcC5IZovwZdqE71pIg=; b=ADfBeuGDD7HxdWrfoZBA2WvnlJ21G5R3anBtDKzPDQ2d5eiR1HnXVKIE/q0KNX3tHV 0wqe6ebKMiFOjUCMSy2+HtQzw9mjTMx3qgsYWaEW5GNS9HaD/3x/Y08QiXOVmyh6gxSO VNJUQY3GKGHJthSqQ3ff3jKAOXUPlGRfmfQcNeDPbkCe52sUg1vwt69gmn0oCS1KNNuP U+xSSEk8dr2OdjLH+A1xxwXVTMbWEJmdrD4odUkGAAGkCRjr65abHC3vkGG35u/fflvl UerZeWs6p3k4BDdh9vKxYaTICTM/GjpGlxFOyrQI7OYjbnipv3ymf15HkqB42mQw+Dbc +QFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4mMe++iOVbf6BKH9Qj9kdpFtiJcC5IZovwZdqE71pIg=; b=phGWCFZm2qfVdzK+K065Q3i+FRK0WJVR9Xfj6NPhZcla7EHNTa0q1iaxDO2kyx1kio e3Qeq1WNfe9Jy5Gtdvu1MZVemp9SmORYXCWxifKxEt0dDmfJk4MgmoCRxTt65rrdMo5A Ax6coVB47CvRa2d7hwWbnbzcyppgu5QxCFXLDdRMbV2TN2/b88/cVA7WiEcWLw2ThFIb CuwDghDXOG/R9kETKEoiwgn+TuBLG0AGXWTMULaDgd2cebU5S7bSlHjGg032B0NiFlLR AAKBj/GGKX+cVUxNrQsrH1uIldIJSyymGmhcy6ktArjrBnqDXXmVUNQkkjrz9fiYSxzn 4wVw== X-Gm-Message-State: AOAM531U09hl46oh70uv+HuKv23uk5ryc6J0KpBaBEs8CsMu2dwkudZB zMMDD9SnRqWBtIsyTAG38Q+Z6w== X-Google-Smtp-Source: ABdhPJyPLapSvpcTXR+dCjEt3qP+6avaSxFjtj3u7NS1dELnxox30NAfUfKah3ba6rcKbWOgfSYW/Q== X-Received: by 2002:a1c:35c9:0:b0:37b:edec:4d88 with SMTP id c192-20020a1c35c9000000b0037bedec4d88mr4970082wma.159.1644973637321; Tue, 15 Feb 2022 17:07:17 -0800 (PST) Received: from localhost.localdomain (3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.1.f.d.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:df16::3]) by smtp.gmail.com with ESMTPSA id m8sm10551185wms.4.2022.02.15.17.07.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 17:07:16 -0800 (PST) From: Phillip Potter To: gregkh@linuxfoundation.org Cc: dan.carpenter@oracle.com, Larry.Finger@lwfinger.net, straube.linux@gmail.com, martin@kaiser.cx, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, paskripkin@gmail.com Subject: [PATCH v2 07/15] staging: r8188eu: remove remaining DBG_88E calls from os_dep subdir Date: Wed, 16 Feb 2022 01:07:01 +0000 Message-Id: <20220216010709.791-8-phil@philpotter.co.uk> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220216010709.791-1-phil@philpotter.co.uk> References: <20220216010709.791-1-phil@philpotter.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove all remaining DBG_88E calls from the os_dep subdirectory. After some thought, it makes more sense to just entirely strip all of these calls, so that debugging code in the driver can be more consistent and useful going forwards. Signed-off-by: Phillip Potter --- drivers/staging/r8188eu/os_dep/mlme_linux.c | 4 -- drivers/staging/r8188eu/os_dep/os_intfs.c | 24 --------- drivers/staging/r8188eu/os_dep/usb_intf.c | 57 +-------------------- 3 files changed, 1 insertion(+), 84 deletions(-) diff --git a/drivers/staging/r8188eu/os_dep/mlme_linux.c b/drivers/staging/= r8188eu/os_dep/mlme_linux.c index f7ce724ebf87..72ad9700130e 100644 --- a/drivers/staging/r8188eu/os_dep/mlme_linux.c +++ b/drivers/staging/r8188eu/os_dep/mlme_linux.c @@ -181,8 +181,6 @@ void rtw_indicate_sta_assoc_event(struct adapter *padap= ter, struct sta_info *pst =20 memcpy(wrqu.addr.sa_data, psta->hwaddr, ETH_ALEN); =20 - DBG_88E("+rtw_indicate_sta_assoc_event\n"); - wireless_send_event(padapter->pnetdev, IWEVREGISTERED, &wrqu, NULL); } =20 @@ -204,7 +202,5 @@ void rtw_indicate_sta_disassoc_event(struct adapter *pa= dapter, struct sta_info * =20 memcpy(wrqu.addr.sa_data, psta->hwaddr, ETH_ALEN); =20 - DBG_88E("+rtw_indicate_sta_disassoc_event\n"); - wireless_send_event(padapter->pnetdev, IWEVEXPIRED, &wrqu, NULL); } diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8= 188eu/os_dep/os_intfs.c index ef4ba0f22c09..4230819cbf8c 100644 --- a/drivers/staging/r8188eu/os_dep/os_intfs.c +++ b/drivers/staging/r8188eu/os_dep/os_intfs.c @@ -362,7 +362,6 @@ struct net_device *rtw_init_netdev(struct adapter *old_= padapter) pnetdev->dev.type =3D &wlan_type; padapter =3D rtw_netdev_priv(pnetdev); padapter->pnetdev =3D pnetdev; - DBG_88E("register rtw_netdev_ops to netdev_ops\n"); pnetdev->netdev_ops =3D &rtw_netdev_ops; pnetdev->watchdog_timeo =3D HZ * 3; /* 3 second timeout */ pnetdev->wireless_handlers =3D (struct iw_handler_def *)&rtw_handlers_def; @@ -493,17 +492,14 @@ u8 rtw_init_drv_sw(struct adapter *padapter) return _FAIL; =20 if (_rtw_init_xmit_priv(&padapter->xmitpriv, padapter) =3D=3D _FAIL) { - DBG_88E("Can't _rtw_init_xmit_priv\n"); return _FAIL; } =20 if (_rtw_init_recv_priv(&padapter->recvpriv, padapter) =3D=3D _FAIL) { - DBG_88E("Can't _rtw_init_recv_priv\n"); return _FAIL; } =20 if (_rtw_init_sta_priv(&padapter->stapriv) =3D=3D _FAIL) { - DBG_88E("Can't _rtw_init_sta_priv\n"); return _FAIL; } =20 @@ -611,8 +607,6 @@ int _netdev_open(struct net_device *pnetdev) struct adapter *padapter =3D (struct adapter *)rtw_netdev_priv(pnetdev); struct pwrctrl_priv *pwrctrlpriv =3D &padapter->pwrctrlpriv; =20 - DBG_88E("+88eu_drv - drv_open, bup =3D%d\n", padapter->bup); - if (pwrctrlpriv->ps_flag) { padapter->net_closed =3D false; goto netdev_open_normal_process; @@ -661,14 +655,12 @@ int _netdev_open(struct net_device *pnetdev) netdev_br_init(pnetdev); =20 netdev_open_normal_process: - DBG_88E("-88eu_drv - drv_open, bup =3D%d\n", padapter->bup); return 0; =20 netdev_open_error: padapter->bup =3D false; netif_carrier_off(pnetdev); netif_tx_stop_all_queues(pnetdev); - DBG_88E("-88eu_drv - drv_open fail, bup =3D%d\n", padapter->bup); return -1; } =20 @@ -687,7 +679,6 @@ static int ips_netdrv_open(struct adapter *padapter) { int status =3D _SUCCESS; padapter->net_closed =3D false; - DBG_88E("=3D=3D=3D> %s.........\n", __func__); =20 padapter->bDriverStopped =3D false; padapter->bSurpriseRemoved =3D false; @@ -706,31 +697,23 @@ static int ips_netdrv_open(struct adapter *padapter) return _SUCCESS; =20 netdev_open_error: - DBG_88E("-ips_netdrv_open - drv_open failure, bup =3D%d\n", padapter->bup= ); - return _FAIL; } =20 int rtw_ips_pwr_up(struct adapter *padapter) { int result; - u32 start_time =3D jiffies; - DBG_88E("=3D=3D=3D> rtw_ips_pwr_up..............\n"); rtw_reset_drv_sw(padapter); =20 result =3D ips_netdrv_open(padapter); =20 rtw_led_control(padapter, LED_CTL_NO_LINK); =20 - DBG_88E("<=3D=3D=3D rtw_ips_pwr_up.............. in %dms\n", rtw_get_pas= sing_time_ms(start_time)); return result; } =20 void rtw_ips_pwr_down(struct adapter *padapter) { - u32 start_time =3D jiffies; - DBG_88E("=3D=3D=3D> rtw_ips_pwr_down...................\n"); - padapter->bCardDisableWOHSM =3D true; padapter->net_closed =3D true; =20 @@ -738,13 +721,10 @@ void rtw_ips_pwr_down(struct adapter *padapter) =20 rtw_ips_dev_unload(padapter); padapter->bCardDisableWOHSM =3D false; - DBG_88E("<=3D=3D=3D rtw_ips_pwr_down..................... in %dms\n", rtw= _get_passing_time_ms(start_time)); } =20 void rtw_ips_dev_unload(struct adapter *padapter) { - DBG_88E("=3D=3D=3D=3D> %s...\n", __func__); - SetHwReg8188EU(padapter, HW_VAR_FIFO_CLEARN_UP, NULL); =20 if (padapter->intf_stop) @@ -763,9 +743,6 @@ int netdev_close(struct net_device *pnetdev) padapter->net_closed =3D true; =20 if (padapter->pwrctrlpriv.rf_pwrstate =3D=3D rf_on) { - DBG_88E("(2)88eu_drv - drv_close, bup =3D%d, hw_init_completed =3D%d\n", - padapter->bup, padapter->hw_init_completed); - /* s1. */ if (pnetdev) { if (!rtw_netif_queue_stopped(pnetdev)) @@ -792,6 +769,5 @@ int netdev_close(struct net_device *pnetdev) kfree(dvobj->firmware.data); dvobj->firmware.data =3D NULL; =20 - DBG_88E("-88eu_drv - drv_close, bup =3D%d\n", padapter->bup); return 0; } diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8= 188eu/os_dep/usb_intf.c index ae3750a3f056..79d2d640ddfa 100644 --- a/drivers/staging/r8188eu/os_dep/usb_intf.c +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c @@ -145,7 +145,6 @@ static void usb_dvobj_deinit(struct usb_interface *usb_= intf) * on sitesurvey for the first time when * device is up . Reset usb port for sitesurvey * fail issue. */ - DBG_88E("usb attached..., try to reset usb device\n"); usb_reset_device(interface_to_usbdev(usb_intf)); } } @@ -175,7 +174,6 @@ static void usb_intf_stop(struct adapter *padapter) static void rtw_dev_unload(struct adapter *padapter) { if (padapter->bup) { - DBG_88E("=3D=3D=3D> rtw_dev_unload\n"); padapter->bDriverStopped =3D true; if (padapter->xmitpriv.ack_tx) rtw_ack_tx_done(&padapter->xmitpriv, RTW_SCTX_DONE_DRV_STOP); @@ -193,8 +191,6 @@ static void rtw_dev_unload(struct adapter *padapter) =20 padapter->bup =3D false; } - - DBG_88E("<=3D=3D=3D rtw_dev_unload\n"); } =20 static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t messa= ge) @@ -206,16 +202,9 @@ static int rtw_suspend(struct usb_interface *pusb_intf= , pm_message_t message) struct pwrctrl_priv *pwrpriv =3D &padapter->pwrctrlpriv; =20 int ret =3D 0; - u32 start_time =3D jiffies; - - - DBG_88E("=3D=3D> %s (%s:%d)\n", __func__, current->comm, current->pid); =20 if ((!padapter->bup) || (padapter->bDriverStopped) || (padapter->bSurpriseRemoved)) { - DBG_88E("padapter->bup=3D%d bDriverStopped=3D%d bSurpriseRemoved =3D %d\= n", - padapter->bup, padapter->bDriverStopped, - padapter->bSurpriseRemoved); goto exit; } =20 @@ -235,13 +224,6 @@ static int rtw_suspend(struct usb_interface *pusb_intf= , pm_message_t message) =20 if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) && check_fwstate(pmlmepriv, _FW_LINKED)) { - DBG_88E("%s:%d %s(%pM), length:%d assoc_ssid.length:%d\n", - __func__, __LINE__, - pmlmepriv->cur_network.network.Ssid.Ssid, - pmlmepriv->cur_network.network.MacAddress, - pmlmepriv->cur_network.network.Ssid.SsidLength, - pmlmepriv->assoc_ssid.SsidLength); - pmlmepriv->to_roaming =3D 1; } /* s2-2. indicate disconnect to os */ @@ -261,9 +243,6 @@ static int rtw_suspend(struct usb_interface *pusb_intf,= pm_message_t message) rtw_indicate_disconnect(padapter); =20 exit: - DBG_88E("<=3D=3D=3D %s return %d.............. in %dms\n", __func__ - , ret, rtw_get_passing_time_ms(start_time)); - return ret; } =20 @@ -274,9 +253,6 @@ static int rtw_resume(struct usb_interface *pusb_intf) struct net_device *pnetdev; struct pwrctrl_priv *pwrpriv =3D NULL; int ret =3D -1; - u32 start_time =3D jiffies; - - DBG_88E("=3D=3D> %s (%s:%d)\n", __func__, current->comm, current->pid); =20 pnetdev =3D padapter->pnetdev; pwrpriv =3D &padapter->pwrctrlpriv; @@ -286,7 +262,6 @@ static int rtw_resume(struct usb_interface *pusb_intf) if (pwrpriv) pwrpriv->bkeepfwalive =3D false; =20 - DBG_88E("bkeepfwalive(%x)\n", pwrpriv->bkeepfwalive); if (netdev_open(pnetdev) !=3D 0) { mutex_unlock(&pwrpriv->lock); goto exit; @@ -298,7 +273,6 @@ static int rtw_resume(struct usb_interface *pusb_intf) mutex_unlock(&pwrpriv->lock); =20 if (padapter->pid[1] !=3D 0) { - DBG_88E("pid[1]:%d\n", padapter->pid[1]); rtw_signal_process(padapter->pid[1], SIGUSR2); } =20 @@ -308,9 +282,6 @@ static int rtw_resume(struct usb_interface *pusb_intf) exit: if (pwrpriv) pwrpriv->bInSuspend =3D false; - DBG_88E("<=3D=3D=3D %s return %d.............. in %dms\n", __func__, - ret, rtw_get_passing_time_ms(start_time)); - =20 return ret; } @@ -379,40 +350,27 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_= priv *dvobj, dvobj->pusbdev->do_remote_wakeup =3D 1; pusb_intf->needs_remote_wakeup =3D 1; device_init_wakeup(&pusb_intf->dev, 1); - DBG_88E("\n padapter->pwrctrlpriv.bSupportRemoteWakeup~~~[%d]~~~\n", - device_may_wakeup(&pusb_intf->dev)); } #endif =20 /* 2012-07-11 Move here to prevent the 8723AS-VAU BT auto * suspend influence */ if (usb_autopm_get_interface(pusb_intf) < 0) - DBG_88E("can't get autopm:\n"); + ; =20 /* alloc dev name after read efuse. */ if (rtw_init_netdev_name(pnetdev, padapter->registrypriv.ifname) < 0) { - DBG_88E("rtw_init_netdev_name failed, ifname:%s\n", - padapter->registrypriv.ifname); goto free_drv_sw; } rtw_macaddr_cfg(padapter->eeprompriv.mac_addr); rtw_init_wifidirect_addrs(padapter, padapter->eeprompriv.mac_addr, padapter->eeprompriv.mac_addr); eth_hw_addr_set(pnetdev, padapter->eeprompriv.mac_addr); - DBG_88E("MAC Address from pnetdev->dev_addr =3D %pM\n", - pnetdev->dev_addr); =20 /* step 6. Tell the network stack we exist */ if (register_netdev(pnetdev) !=3D 0) goto free_drv_sw; =20 - DBG_88E("bDriverStopped:%d, bSurpriseRemoved:%d, bup:%d, hw_init_complete= d:%d\n" - , padapter->bDriverStopped - , padapter->bSurpriseRemoved - , padapter->bup - , padapter->hw_init_completed - ); - return padapter; =20 free_drv_sw: @@ -446,8 +404,6 @@ static void rtw_usb_if1_deinit(struct adapter *if1) rtw_cancel_all_timer(if1); =20 rtw_dev_unload(if1); - DBG_88E("+r871xu_dev_remove, hw_init_completed=3D%d\n", - if1->hw_init_completed); rtw_handle_dualmac(if1, 0); rtw_free_drv_sw(if1); if (pnetdev) @@ -466,12 +422,10 @@ static int rtw_drv_init(struct usb_interface *pusb_in= tf, const struct usb_device =20 if1 =3D rtw_usb_if1_init(dvobj, pusb_intf); if (!if1) { - DBG_88E("rtw_init_primarystruct adapter Failed!\n"); goto free_dvobj; } =20 if (ui_pid[1] !=3D 0) { - DBG_88E("ui_pid[1]:%d\n", ui_pid[1]); rtw_signal_process(ui_pid[1], SIGUSR2); } =20 @@ -492,8 +446,6 @@ static void rtw_dev_remove(struct usb_interface *pusb_i= ntf) struct dvobj_priv *dvobj =3D usb_get_intfdata(pusb_intf); struct adapter *padapter =3D dvobj->if1; =20 - DBG_88E("+rtw_dev_remove\n"); - if (usb_drv->drv_registered) padapter->bSurpriseRemoved =3D true; =20 @@ -505,14 +457,10 @@ static void rtw_dev_remove(struct usb_interface *pusb= _intf) rtw_usb_if1_deinit(padapter); =20 usb_dvobj_deinit(pusb_intf); - - DBG_88E("-r871xu_dev_remove, done\n"); } =20 static int __init rtw_drv_entry(void) { - DBG_88E(DRV_NAME " driver version=3D%s\n", DRIVERVERSION); - mutex_init(&usb_drv->hw_init_mutex); =20 usb_drv->drv_registered =3D true; @@ -521,13 +469,10 @@ static int __init rtw_drv_entry(void) =20 static void __exit rtw_drv_halt(void) { - DBG_88E("+rtw_drv_halt\n"); - usb_drv->drv_registered =3D false; usb_deregister(&usb_drv->usbdrv); =20 mutex_destroy(&usb_drv->hw_init_mutex); - DBG_88E("-rtw_drv_halt\n"); } =20 module_init(rtw_drv_entry); --=20 2.34.1 From nobody Sun Jun 28 02:50:42 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F2F9C433F5 for ; Wed, 16 Feb 2022 01:07:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245377AbiBPBHz (ORCPT ); Tue, 15 Feb 2022 20:07:55 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:53492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245276AbiBPBHb (ORCPT ); Tue, 15 Feb 2022 20:07:31 -0500 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 891D2F5419 for ; Tue, 15 Feb 2022 17:07:19 -0800 (PST) Received: by mail-wm1-x330.google.com with SMTP id n8so279390wms.3 for ; Tue, 15 Feb 2022 17:07:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philpotter-co-uk.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZzQCy/MScj+BTuPjhtqug3TSbF4CNKXkcyvV0JhfwZc=; b=sqhGtmBlziqPD1tj7I2PX56c4g/RoEL5vCbgrFg0DPE2HaYyd2ZXJf4cBYA5Z5JwbB aJ/TOkzkqojw7KiIcvJQOG+XMaWEsbGNufK1XmbBgHt5PjeKj5ZV5gmGY3KqeLoYe8D6 16f1zrS/OgsoE4cExkWRnyMa3nx7x2HQlyqnGkz/STp5zKu6llAXXUc2OXXbC2wXqj0o NOwS27Nw8Xqu8xc73KF7CrCwdEIkgK+hDr2zbpgoeF9TICHmF0h7AL0nhpH/TK6AqBql EYvsIrU0BtDGJoQRqyjI7JYPU52ZUbOOa/vwgyPiSwp8A34UAC/iOJwWt9mJLJuVxWLq fLIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZzQCy/MScj+BTuPjhtqug3TSbF4CNKXkcyvV0JhfwZc=; b=hTq3oQGrUxDSQHX8K8D2SQ+XU1/OXJbzdvdlkBDS3dOfxVbkjT8hzEPfGDZElflJWH 1surNzpLjEoHHZwyVy/Ldu3GMFW0OnxH0j7stU+DtCyXsLLGWydqaxU9Mm8JSDVDVzj+ wx94cY2/UloIl9Xq/IxWCpvK5qUcZGoYz7xE6JAaK6qkvw/ryQ06XLRj2s1Z03hnxLGR TVjxq7Vq6v2iXzc0ov2tvdwvUySSUALYPxip2idPg3waknR4UvC9Cyfdepwxrr2ouO+t YP8Ybs/Ty6HN9l5YyjW27r3nwZIGEZxn4xCkwljqEU3IQvWK3LKFz8rct9fNiOEnB8oR GZvQ== X-Gm-Message-State: AOAM531c4oTsJvjvBpiI3Ux0F5KZ6QVdulQmnOTuLHPsjofNeKGxw1w7 cO7S3vbE4+N1R6G/7nEZ8xejpw== X-Google-Smtp-Source: ABdhPJzDEi7e/QTeHgAKRG/LE4zW9YE81YXknKB2ghGP2WKspBHwBJjp4If9F8ErjFF08+O1ttR22g== X-Received: by 2002:a7b:cb98:0:b0:37b:dd98:f87c with SMTP id m24-20020a7bcb98000000b0037bdd98f87cmr5092364wmi.59.1644973638069; Tue, 15 Feb 2022 17:07:18 -0800 (PST) Received: from localhost.localdomain (3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.1.f.d.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:df16::3]) by smtp.gmail.com with ESMTPSA id m8sm10551185wms.4.2022.02.15.17.07.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 17:07:17 -0800 (PST) From: Phillip Potter To: gregkh@linuxfoundation.org Cc: dan.carpenter@oracle.com, Larry.Finger@lwfinger.net, straube.linux@gmail.com, martin@kaiser.cx, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, paskripkin@gmail.com Subject: [PATCH v2 08/15] staging: r8188eu: remove remaining DBG_88E call from include/usb_ops.h Date: Wed, 16 Feb 2022 01:07:02 +0000 Message-Id: <20220216010709.791-9-phil@philpotter.co.uk> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220216010709.791-1-phil@philpotter.co.uk> References: <20220216010709.791-1-phil@philpotter.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove the one remaining DBG_88E call from include/usb_ops.h. After some thought, it makes more sense to just entirely strip all of these calls, so that debugging code in the driver can be more consistent and useful going forwards. Signed-off-by: Phillip Potter --- drivers/staging/r8188eu/include/usb_ops.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/r8188eu/include/usb_ops.h b/drivers/staging/r8= 188eu/include/usb_ops.h index 62e4706c0497..edef3ad1ccd9 100644 --- a/drivers/staging/r8188eu/include/usb_ops.h +++ b/drivers/staging/r8188eu/include/usb_ops.h @@ -31,8 +31,6 @@ static inline int rtw_inc_and_chk_continual_urb_error(str= uct dvobj_priv *dvobj) int value; value =3D atomic_inc_return(&dvobj->continual_urb_error); if (value > MAX_CONTINUAL_URB_ERR) { - DBG_88E("[dvobj:%p][ERROR] continual_urb_error:%d > %d\n", - dvobj, value, MAX_CONTINUAL_URB_ERR); ret =3D true; } return ret; --=20 2.34.1 From nobody Sun Jun 28 02:50:42 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0A1EC433EF for ; Wed, 16 Feb 2022 01:08:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245398AbiBPBIK (ORCPT ); Tue, 15 Feb 2022 20:08:10 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:53558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245285AbiBPBHc (ORCPT ); Tue, 15 Feb 2022 20:07:32 -0500 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72A94F5426 for ; Tue, 15 Feb 2022 17:07:20 -0800 (PST) Received: by mail-wm1-x329.google.com with SMTP id k41so302812wms.0 for ; Tue, 15 Feb 2022 17:07:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philpotter-co-uk.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Pe1YhcenILuxLMzLegUaCOIgZ9zKkkyLJdVofXmoRlI=; b=vZsq0j+TuFR7s+y8MK7IsKnXmNwJrTHOBP6FmnPimvCKYQXz6fpf9xH1yizlkq0pFX sthBIvtqgVyEiePuMr56AYPb4v/9WL3g6wlIZvBrgJ328epHBe0cwDZ76ZJZzmtnS5vW 6uMjKPQIjzNS0y9M6/CH4MOpZnZa1d4N3AnmHxq4aeF0SyBvBtouzsIdsAjT9Y6bSiTz GBKsR6nkPP7Ref9yYZgRYif0J2QVN8fftGYmR8bZPAftMWkoJwIfNMMY5+jXQh74s7jr SrxqhlEMvjSbANAX3KZZfJkvXe2BM5AjnkCB9QG1xVWwCCsfObxgwzQ1sWDIaziiwcBT 4Gfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Pe1YhcenILuxLMzLegUaCOIgZ9zKkkyLJdVofXmoRlI=; b=FbJYkdiCLOOY9rvpSEV98WDeUUgff/BAYNnCZGqE4WYM3lzLD1f4GugoT7Es+McjlK W/NTWTIidMJeza7d4+Mhq1i0Bp0dsFjeKIj1FhNEO6ootf0BWGlDsq1QKU1xKG68nIOa KfexsvYvRM/bCSgZeOxLpCZZICeMWVoK8XEn+xF4gNm8cE1O9GF4FCW5Cy2G2j0mW/8e ls0j5EJIRcecdKo5NoY0hAW2QMtvFYZCUyO/BwjX16n381txon0Wwh4oV6uMZ4tIiZet OQRN9Wocf8OpTJXrkA59VuTs2FPBYmZr8BgD4RXpFifZFNRRtvaqXf1TlV4dcDUMfs+E dkpg== X-Gm-Message-State: AOAM53057yo4YrrvoL6z5zdawmY2rbUaEwZDn6hHqQtzvZtMyZx8QTUT e12oL04KGiHoTOAE/LSAzdERHQ== X-Google-Smtp-Source: ABdhPJxxa/CL55oEDhNXzABKxnMPmaW/dA3iDp86Y11vpgIN5YyW5jcmF76opU4n5uAX8BYlYFqEfA== X-Received: by 2002:a7b:c44c:0:b0:37b:baaf:ae36 with SMTP id l12-20020a7bc44c000000b0037bbaafae36mr367673wmi.81.1644973638941; Tue, 15 Feb 2022 17:07:18 -0800 (PST) Received: from localhost.localdomain (3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.1.f.d.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:df16::3]) by smtp.gmail.com with ESMTPSA id m8sm10551185wms.4.2022.02.15.17.07.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 17:07:18 -0800 (PST) From: Phillip Potter To: gregkh@linuxfoundation.org Cc: dan.carpenter@oracle.com, Larry.Finger@lwfinger.net, straube.linux@gmail.com, martin@kaiser.cx, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, paskripkin@gmail.com Subject: [PATCH v2 09/15] staging: r8188eu: remove all aliased DBG_88E calls Date: Wed, 16 Feb 2022 01:07:03 +0000 Message-Id: <20220216010709.791-10-phil@philpotter.co.uk> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220216010709.791-1-phil@philpotter.co.uk> References: <20220216010709.791-1-phil@philpotter.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove all remaining calls to preprocessor aliases of DBG_88E, as well as these definitions themselves. This is a prerequisite for removing the DBG_88E macro itself. Signed-off-by: Phillip Potter --- drivers/staging/r8188eu/core/rtw_br_ext.c | 39 -------------------- drivers/staging/r8188eu/core/rtw_xmit.c | 7 +--- drivers/staging/r8188eu/include/rtw_br_ext.h | 5 --- 3 files changed, 1 insertion(+), 50 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_br_ext.c b/drivers/staging/r8= 188eu/core/rtw_br_ext.c index 5c40babcd45c..6fa27b66920e 100644 --- a/drivers/staging/r8188eu/core/rtw_br_ext.c +++ b/drivers/staging/r8188eu/core/rtw_br_ext.c @@ -72,7 +72,6 @@ static int __nat25_add_pppoe_tag(struct sk_buff *skb, str= uct pppoe_tag *tag) =20 data_len =3D tag->tag_len + TAG_HDR_LEN; if (skb_tailroom(skb) < data_len) { - _DEBUG_ERR("skb_tailroom() failed in add SID tag!\n"); return -1; } =20 @@ -162,9 +161,6 @@ static int update_nd_link_layer_addr(unsigned char *dat= a, int len, unsigned char if (len >=3D 8) { mac =3D scan_tlv(&data[8], len-8, 1, 1); if (mac) { - _DEBUG_INFO("Router Solicitation, replace MAC From: %02x:%02x:%02x:%02= x:%02x:%02x, To: %02x:%02x:%02x:%02x:%02x:%02x\n", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], - replace_mac[0], replace_mac[1], replace_mac[2], replace_mac[3], repla= ce_mac[4], replace_mac[5]); memcpy(mac, replace_mac, 6); return 1; } @@ -173,9 +169,6 @@ static int update_nd_link_layer_addr(unsigned char *dat= a, int len, unsigned char if (len >=3D 16) { mac =3D scan_tlv(&data[16], len-16, 1, 1); if (mac) { - _DEBUG_INFO("Router Advertisement, replace MAC From: %02x:%02x:%02x:%0= 2x:%02x:%02x, To: %02x:%02x:%02x:%02x:%02x:%02x\n", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], - replace_mac[0], replace_mac[1], replace_mac[2], replace_mac[3], repla= ce_mac[4], replace_mac[5]); memcpy(mac, replace_mac, 6); return 1; } @@ -184,9 +177,6 @@ static int update_nd_link_layer_addr(unsigned char *dat= a, int len, unsigned char if (len >=3D 24) { mac =3D scan_tlv(&data[24], len-24, 1, 1); if (mac) { - _DEBUG_INFO("Neighbor Solicitation, replace MAC From: %02x:%02x:%02x:%= 02x:%02x:%02x, To: %02x:%02x:%02x:%02x:%02x:%02x\n", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], - replace_mac[0], replace_mac[1], replace_mac[2], replace_mac[3], repla= ce_mac[4], replace_mac[5]); memcpy(mac, replace_mac, 6); return 1; } @@ -195,9 +185,6 @@ static int update_nd_link_layer_addr(unsigned char *dat= a, int len, unsigned char if (len >=3D 24) { mac =3D scan_tlv(&data[24], len-24, 2, 1); if (mac) { - _DEBUG_INFO("Neighbor Advertisement, replace MAC From: %02x:%02x:%02x:= %02x:%02x:%02x, To: %02x:%02x:%02x:%02x:%02x:%02x\n", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], - replace_mac[0], replace_mac[1], replace_mac[2], replace_mac[3], repla= ce_mac[4], replace_mac[5]); memcpy(mac, replace_mac, 6); return 1; } @@ -206,9 +193,6 @@ static int update_nd_link_layer_addr(unsigned char *dat= a, int len, unsigned char if (len >=3D 40) { mac =3D scan_tlv(&data[40], len-40, 2, 1); if (mac) { - _DEBUG_INFO("Redirect, replace MAC From: %02x:%02x:%02x:%02x:%02x:%02= x, To: %02x:%02x:%02x:%02x:%02x:%02x\n", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], - replace_mac[0], replace_mac[1], replace_mac[2], replace_mac[3], repla= ce_mac[4], replace_mac[5]); memcpy(mac, replace_mac, 6); return 1; } @@ -400,7 +384,6 @@ int nat25_db_handle(struct adapter *priv, struct sk_buf= f *skb, int method) struct iphdr *iph =3D (struct iphdr *)(skb->data + ETH_HLEN); =20 if (((unsigned char *)(iph) + (iph->ihl<<2)) >=3D (skb->data + ETH_HLEN = + skb->len)) { - DEBUG_WARN("NAT25: malformed IP packet !\n"); return -1; } =20 @@ -413,7 +396,6 @@ int nat25_db_handle(struct adapter *priv, struct sk_buf= f *skb, int method) if (iph->saddr =3D=3D 0) return 0; tmp =3D be32_to_cpu(iph->saddr); - DEBUG_INFO("NAT25: Insert IP, SA =3D%08x, DA =3D%08x\n", tmp, iph->dadd= r); __nat25_generate_ipv4_network_addr(networkAddr, &tmp); /* record source IP address and , source mac address into db */ __nat25_db_network_insert(priv, skb->data+ETH_ALEN, networkAddr); @@ -430,7 +412,6 @@ int nat25_db_handle(struct adapter *priv, struct sk_buf= f *skb, int method) unsigned int *sender; =20 if (arp->ar_pro !=3D __constant_htons(ETH_P_IP)) { - DEBUG_WARN("NAT25: arp protocol unknown (%4x)!\n", be16_to_cpu(arp->ar_= pro)); return -1; } =20 @@ -438,9 +419,6 @@ int nat25_db_handle(struct adapter *priv, struct sk_buf= f *skb, int method) case NAT25_CHECK: return 0; /* skb_copy for all ARP frame */ case NAT25_INSERT: - DEBUG_INFO("NAT25: Insert ARP, MAC =3D%02x%02x%02x%02x%02x%02x\n", arp_= ptr[0], - arp_ptr[1], arp_ptr[2], arp_ptr[3], arp_ptr[4], arp_ptr[5]); - /* change to ARP sender mac address to wlan STA address */ memcpy(arp_ptr, GET_MY_HWADDR(priv), ETH_ALEN); arp_ptr +=3D arp->ar_hln; @@ -477,7 +455,6 @@ int nat25_db_handle(struct adapter *priv, struct sk_buf= f *skb, int method) if (pOldTag) { /* if SID existed, copy old value and delete it */ old_tag_len =3D ntohs(pOldTag->tag_len); if (old_tag_len+TAG_HDR_LEN+MAGIC_CODE_LEN+RTL_RELAY_TAG_LEN > size= of(tag_buf)) { - DEBUG_ERR("SID tag length too long!\n"); return -1; } =20 @@ -485,7 +462,6 @@ int nat25_db_handle(struct adapter *priv, struct sk_buf= f *skb, int method) pOldTag->tag_data, old_tag_len); =20 if (skb_pull_and_merge(skb, (unsigned char *)pOldTag, TAG_HDR_LEN+o= ld_tag_len) < 0) { - DEBUG_ERR("call skb_pull_and_merge() failed in PADI/R packet!\n"); return -1; } ph->length =3D htons(ntohs(ph->length)-TAG_HDR_LEN-old_tag_len); @@ -502,13 +478,9 @@ int nat25_db_handle(struct adapter *priv, struct sk_bu= ff *skb, int method) /* Add relay tag */ if (__nat25_add_pppoe_tag(skb, tag) < 0) return -1; - - DEBUG_INFO("NAT25: Insert PPPoE, forward %s packet\n", - (ph->code =3D=3D PADI_CODE ? "PADI" : "PADR")); } else { /* not add relay tag */ if (priv->pppoe_connection_in_progress && memcmp(skb->data+ETH_ALEN, priv->pppoe_addr, ETH_ALEN)) { - DEBUG_ERR("Discard PPPoE packet due to another PPPoE connection is = in progress!\n"); return -2; } =20 @@ -521,8 +493,6 @@ int nat25_db_handle(struct adapter *priv, struct sk_buf= f *skb, int method) return -1; } } else { /* session phase */ - DEBUG_INFO("NAT25: Insert PPPoE, insert session packet to %s\n", skb->= dev->name); - __nat25_generate_pppoe_network_addr(networkAddr, skb->data, &ph->sid); =20 __nat25_db_network_insert(priv, skb->data+ETH_ALEN, networkAddr); @@ -567,7 +537,6 @@ int nat25_db_handle(struct adapter *priv, struct sk_buf= f *skb, int method) struct ipv6hdr *iph =3D (struct ipv6hdr *)(skb->data + ETH_HLEN); =20 if (sizeof(*iph) >=3D (skb->len - ETH_HLEN)) { - DEBUG_WARN("NAT25: malformed IPv6 packet !\n"); return -1; } =20 @@ -577,13 +546,6 @@ int nat25_db_handle(struct adapter *priv, struct sk_bu= ff *skb, int method) return 0; return -1; case NAT25_INSERT: - DEBUG_INFO("NAT25: Insert IP, SA =3D%4x:%4x:%4x:%4x:%4x:%4x:%4x:%4x," - " DA =3D%4x:%4x:%4x:%4x:%4x:%4x:%4x:%4x\n", - iph->saddr.s6_addr16[0], iph->saddr.s6_addr16[1], iph->saddr.s6_addr16= [2], iph->saddr.s6_addr16[3], - iph->saddr.s6_addr16[4], iph->saddr.s6_addr16[5], iph->saddr.s6_addr16= [6], iph->saddr.s6_addr16[7], - iph->daddr.s6_addr16[0], iph->daddr.s6_addr16[1], iph->daddr.s6_addr16= [2], iph->daddr.s6_addr16[3], - iph->daddr.s6_addr16[4], iph->daddr.s6_addr16[5], iph->daddr.s6_addr16= [6], iph->daddr.s6_addr16[7]); - if (memcmp(&iph->saddr, "\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\= x0", 16)) { __nat25_generate_ipv6_network_addr(networkAddr, (unsigned int *)&iph->= saddr); __nat25_db_network_insert(priv, skb->data+ETH_ALEN, networkAddr); @@ -658,7 +620,6 @@ void dhcp_flag_bcast(struct adapter *priv, struct sk_bu= ff *skb) /* if not broadcast */ register int sum =3D 0; =20 - DEBUG_INFO("DHCP: change flag of DHCP request to broadcast.\n"); /* or BROADCAST flag */ dhcph->flags |=3D htons(BROADCAST_FLAG); /* recalculate checksum */ diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r818= 8eu/core/rtw_xmit.c index 7d616a409c0c..3ad124f6f3c7 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -1589,7 +1589,6 @@ static int rtw_br_client_tx(struct adapter *padapter,= struct sk_buff **pskb) =20 newskb =3D skb_copy(skb, GFP_ATOMIC); if (!newskb) { - DEBUG_ERR("TX DROP: skb_copy fail!\n"); return -1; } dev_kfree_skb_any(skb); @@ -1604,18 +1603,16 @@ static int rtw_br_client_tx(struct adapter *padapte= r, struct sk_buff **pskb) } =20 if (skb_is_nonlinear(skb)) - DEBUG_ERR("%s(): skb_is_nonlinear!!\n", __func__); + ; =20 res =3D skb_linearize(skb); if (res < 0) { - DEBUG_ERR("TX DROP: skb_linearize fail!\n"); return -1; } =20 res =3D nat25_db_handle(padapter, skb, NAT25_INSERT); if (res < 0) { if (res =3D=3D -2) { - DEBUG_ERR("TX DROP: nat25_db_handle fail!\n"); return -1; } return 0; @@ -1637,8 +1634,6 @@ static int rtw_br_client_tx(struct adapter *padapter,= struct sk_buff **pskb) =20 /* check if SA is equal to our MAC */ if (memcmp(skb->data + ETH_ALEN, GET_MY_HWADDR(padapter), ETH_ALEN)) { - DEBUG_ERR("TX DROP: untransformed frame SA:%02X%02X%02X%02X%02X%02X!\n", - skb->data[6], skb->data[7], skb->data[8], skb->data[9], skb->data[10]= , skb->data[11]); return -1; } return 0; diff --git a/drivers/staging/r8188eu/include/rtw_br_ext.h b/drivers/staging= /r8188eu/include/rtw_br_ext.h index 17a6154e760a..56772af3bec5 100644 --- a/drivers/staging/r8188eu/include/rtw_br_ext.h +++ b/drivers/staging/r8188eu/include/rtw_br_ext.h @@ -4,11 +4,6 @@ #ifndef _RTW_BR_EXT_H_ #define _RTW_BR_EXT_H_ =20 -#define _DEBUG_ERR DBG_88E -#define _DEBUG_INFO DBG_88E -#define DEBUG_WARN DBG_88E -#define DEBUG_INFO DBG_88E -#define DEBUG_ERR DBG_88E #define GET_MY_HWADDR(padapter) ((padapter)->eeprompriv.mac_addr) =20 #define NAT25_HASH_BITS 4 --=20 2.34.1 From nobody Sun Jun 28 02:50:42 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1AC8FC433F5 for ; Wed, 16 Feb 2022 01:07:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245326AbiBPBIH (ORCPT ); Tue, 15 Feb 2022 20:08:07 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:53560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245284AbiBPBHc (ORCPT ); Tue, 15 Feb 2022 20:07:32 -0500 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26C2AED941 for ; Tue, 15 Feb 2022 17:07:21 -0800 (PST) Received: by mail-wm1-x32b.google.com with SMTP id q198-20020a1ca7cf000000b0037bb52545c6so2649590wme.1 for ; Tue, 15 Feb 2022 17:07:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philpotter-co-uk.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=h/tZwH09eYlURsU9ovNUrKKrqJAZOzfkUhLGHlZxAp8=; b=unwxR8WWm7ag8THNs5ELWKzhcrTV9g3QkZLSvlnQSBwpWf8FaRJ1P5vPfGhvb03Bxm qiV6dRd4sscYsoEZlK51aPyFdgEnI5TA3ryd9NVIOp6ELHa3Je8Wx/MgKapMxnX8+zFC tha9Z8j9kzhBLQx4kkhPeEhUy+to683FyHf4YhF1ZibderZdFs1w1Tcq/iG3Ap/F0CLs /6C9l7+d9Wf7X9iljmgol9N+ZQgf2sFqDMgFPGggs9N2riO1rBpHFrM8IXx9u+21GtnH 8mkzdy4e/EGxdp3Q9XWUft2+8Cjt2X+M08ztZRy2yvvEPNMa1XuWnWeulULXYS7gOEmj PArQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=h/tZwH09eYlURsU9ovNUrKKrqJAZOzfkUhLGHlZxAp8=; b=aDV02Iei029V/NEsoWQIrkANKSxnY+rMd819DupfSgWe25CVCiUxOjA5zbbEDtl2tK TTf7SkLhRwKpgCOzb7Xnkw4gteeaF4T7zbzIpYP43p6zBQux7PRGxE46IWPuBSoMtwZa BbDAD8tfxMV/C3s1+W071tiC4SyijMSQcmcbTAnnn4A5Og7cTtRtfAIpvZD+/OSP8r/O ECNnZyblOtoQoXTY4qM7+VFaIkFVoI45KH4QAqDF6c1y3tQuGmt+uyWA+hvCltmFT+Dr mjGDed1hRHTW+YjY17gbg8iMWEDXm3Pp/vERH/vsr/Ig0B+wwIizbH9dWp5gVckd73w5 qlkA== X-Gm-Message-State: AOAM533Lefa4m5kn/torz4aQ4koZsKyAlN57C8cjM9geGdLIS8rF3eH4 IGB9g87qNaAt43InwvochBoqaQ== X-Google-Smtp-Source: ABdhPJwmgkc8Pceapw6vfah49O7mao+Bg49sp3kmyHae27wH2ipTs30Lnt1yFrFLfJCN6TBCf9TrXw== X-Received: by 2002:a05:600c:3588:b0:37c:306a:9eb7 with SMTP id p8-20020a05600c358800b0037c306a9eb7mr4872102wmq.107.1644973639777; Tue, 15 Feb 2022 17:07:19 -0800 (PST) Received: from localhost.localdomain (3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.1.f.d.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:df16::3]) by smtp.gmail.com with ESMTPSA id m8sm10551185wms.4.2022.02.15.17.07.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 17:07:19 -0800 (PST) From: Phillip Potter To: gregkh@linuxfoundation.org Cc: dan.carpenter@oracle.com, Larry.Finger@lwfinger.net, straube.linux@gmail.com, martin@kaiser.cx, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, paskripkin@gmail.com Subject: [PATCH v2 10/15] staging: r8188eu: remove DBG_88E macro definition Date: Wed, 16 Feb 2022 01:07:04 +0000 Message-Id: <20220216010709.791-11-phil@philpotter.co.uk> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220216010709.791-1-phil@philpotter.co.uk> References: <20220216010709.791-1-phil@philpotter.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove DBG_88E macro definition as it has no remaining callers within the driver. This is part of the ongoing effort to cleanup the driver to use standard debug mechanisms where appropriate. Signed-off-by: Phillip Potter --- drivers/staging/r8188eu/include/rtw_debug.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/staging/r8188eu/include/rtw_debug.h b/drivers/staging/= r8188eu/include/rtw_debug.h index 311051757715..959fb6bd25ca 100644 --- a/drivers/staging/r8188eu/include/rtw_debug.h +++ b/drivers/staging/r8188eu/include/rtw_debug.h @@ -54,10 +54,4 @@ =20 extern u32 GlobalDebugLevel; =20 -#define DBG_88E(...) \ - do { \ - if (_drv_err_ <=3D GlobalDebugLevel) \ - pr_info(DRIVER_PREFIX __VA_ARGS__); \ - } while (0) - #endif /* __RTW_DEBUG_H__ */ --=20 2.34.1 From nobody Sun Jun 28 02:50:42 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B03F2C433EF for ; Wed, 16 Feb 2022 01:08:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245406AbiBPBIO (ORCPT ); Tue, 15 Feb 2022 20:08:14 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:53596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245287AbiBPBHc (ORCPT ); Tue, 15 Feb 2022 20:07:32 -0500 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5803C7916 for ; Tue, 15 Feb 2022 17:07:21 -0800 (PST) Received: by mail-wr1-x432.google.com with SMTP id e3so911244wra.0 for ; Tue, 15 Feb 2022 17:07:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philpotter-co-uk.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PMyMSUP7asF/s/oKu8jRzLvnYQUdmW1URZT8HnFSQy0=; b=jTJuJoASvQOgDzLtakBXSmhb4VYtpwi36BD8mZavRx52KG560ZXf8dEKL+hsksqAHK skNexb+VDcvR6BlgA8yWRO+H2u1Pq/sOl/itQHRk/I8xY2Mz6WeGDP02utMKPEVWgcsm bWKZDhDqDih2sZT1dpIzyBo7m4AUrG4wdLWTQlqHfZk1iQ5wd4o6uTdTAfk+1GkkupBa tYOxUX7tskRABT8uRquoNebIGAJX7yTOVy58vrytFhk2NTorGjRfDCXlGdnhndpqxJM1 1jqGbJpxLpxlX+hrGl4jqa1ZGnD1Nry8xO9b/oWVxh2hHEsE4Be9YZRv5Ze6Ves/CsKo ICdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PMyMSUP7asF/s/oKu8jRzLvnYQUdmW1URZT8HnFSQy0=; b=HtjbdGLvs9J9TdqvnfDgW/mihtz1EFMgpZL64MO9IwFqjZP0FLoOZ1RPY0iJHNjVpd HIUuHGUOVrtDvsT0C4yoDEuSRAHoEQk5Dq7uT5jhXLepEf81+sJo82WPd8dnOO2zbBqV A/tHnMnuACOdj1JMbhLXiO1HBZl9MzQMZ1B+A9kQesUU+liU3jSu23e8kaXP+looZevX mHQ/Tez5MP08LgnXKcy7u6WHOGJvruSUnXjII99SqWp4dohqIIS84vh7J7z54tISrSP0 e1b6Rq6trqVVVY6KyYqeSk2UUZBoep1MARL0NgbfPRfFCHdCNjyLqSOHlQji8Gzpm9j/ TzTw== X-Gm-Message-State: AOAM533pGx9xY08nQqWo13RlA79x5ELd/Az8ODTxKkjxVd8puDYtNeAK 17wI+WcdpY/PoMS8J7tz1krpaQ== X-Google-Smtp-Source: ABdhPJwKg5di3jjMCxCFW200EG/nexWDgvCjwt97MfKEHu2CrXJMwunEAx2zz3adAtk3IhDo6Bas2Q== X-Received: by 2002:a05:6000:1847:b0:1e6:2783:b3e6 with SMTP id c7-20020a056000184700b001e62783b3e6mr371068wri.163.1644973640528; Tue, 15 Feb 2022 17:07:20 -0800 (PST) Received: from localhost.localdomain (3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.1.f.d.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:df16::3]) by smtp.gmail.com with ESMTPSA id m8sm10551185wms.4.2022.02.15.17.07.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 17:07:20 -0800 (PST) From: Phillip Potter To: gregkh@linuxfoundation.org Cc: dan.carpenter@oracle.com, Larry.Finger@lwfinger.net, straube.linux@gmail.com, martin@kaiser.cx, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, paskripkin@gmail.com Subject: [PATCH v2 11/15] staging: r8188eu: remove rtw_debug module parameter Date: Wed, 16 Feb 2022 01:07:05 +0000 Message-Id: <20220216010709.791-12-phil@philpotter.co.uk> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220216010709.791-1-phil@philpotter.co.uk> References: <20220216010709.791-1-phil@philpotter.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove rtw_debug module parameter, and also the internal GlobalDebugLevel flag and all places where it is referenced. As hal/odm_debug.c is now essentially empty, also remove this file and edit the Makefile to no longer reference it. The DBG_88E macro was the last user of these and has now been removed, making the parameter and flag redundant. Signed-off-by: Phillip Potter --- drivers/staging/r8188eu/Makefile | 1 - drivers/staging/r8188eu/hal/odm_debug.c | 6 ------ drivers/staging/r8188eu/include/rtw_debug.h | 2 -- drivers/staging/r8188eu/os_dep/os_intfs.c | 4 ---- 4 files changed, 13 deletions(-) delete mode 100644 drivers/staging/r8188eu/hal/odm_debug.c diff --git a/drivers/staging/r8188eu/Makefile b/drivers/staging/r8188eu/Mak= efile index 84627fc89ec9..1d7982b618ba 100644 --- a/drivers/staging/r8188eu/Makefile +++ b/drivers/staging/r8188eu/Makefile @@ -10,7 +10,6 @@ r8188eu-y =3D \ hal/hal_intf.o \ hal/hal_com.o \ hal/odm.o \ - hal/odm_debug.o \ hal/odm_HWConfig.o \ hal/odm_RegConfig8188E.o \ hal/odm_RTL8188E.o \ diff --git a/drivers/staging/r8188eu/hal/odm_debug.c b/drivers/staging/r818= 8eu/hal/odm_debug.c deleted file mode 100644 index 7a134229fe39..000000000000 --- a/drivers/staging/r8188eu/hal/odm_debug.c +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* Copyright(c) 2007 - 2011 Realtek Corporation. */ - -#include "../include/rtw_debug.h" - -u32 GlobalDebugLevel; diff --git a/drivers/staging/r8188eu/include/rtw_debug.h b/drivers/staging/= r8188eu/include/rtw_debug.h index 959fb6bd25ca..01a7d987d6cc 100644 --- a/drivers/staging/r8188eu/include/rtw_debug.h +++ b/drivers/staging/r8188eu/include/rtw_debug.h @@ -52,6 +52,4 @@ =20 #define DRIVER_PREFIX "R8188EU: " =20 -extern u32 GlobalDebugLevel; - #endif /* __RTW_DEBUG_H__ */ diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8= 188eu/os_dep/os_intfs.c index 4230819cbf8c..9884dbc6eab5 100644 --- a/drivers/staging/r8188eu/os_dep/os_intfs.c +++ b/drivers/staging/r8188eu/os_dep/os_intfs.c @@ -45,7 +45,6 @@ static int rtw_smart_ps =3D 2; module_param(rtw_ips_mode, int, 0644); MODULE_PARM_DESC(rtw_ips_mode, "The default IPS mode"); =20 -static int rtw_debug =3D 1; static int rtw_radio_enable =3D 1; static int rtw_long_retry_lmt =3D 7; static int rtw_short_retry_lmt =3D 7; @@ -148,14 +147,11 @@ MODULE_PARM_DESC(rtw_80211d, "Enable 802.11d mechanis= m"); static uint rtw_notch_filter =3D RTW_NOTCH_FILTER; module_param(rtw_notch_filter, uint, 0644); MODULE_PARM_DESC(rtw_notch_filter, "0:Disable, 1:Enable, 2:Enable only for= P2P"); -module_param_named(debug, rtw_debug, int, 0444); -MODULE_PARM_DESC(debug, "Set debug level (1-9) (default 1)"); =20 static uint loadparam(struct adapter *padapter) { struct registry_priv *registry_par =3D &padapter->registrypriv; =20 - GlobalDebugLevel =3D rtw_debug; registry_par->chip_version =3D (u8)rtw_chip_version; registry_par->rfintfs =3D (u8)rtw_rfintfs; registry_par->lbkmode =3D (u8)rtw_lbkmode; --=20 2.34.1 From nobody Sun Jun 28 02:50:42 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D363C433EF for ; Wed, 16 Feb 2022 01:08:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245342AbiBPBI3 (ORCPT ); Tue, 15 Feb 2022 20:08:29 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:53870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245294AbiBPBHg (ORCPT ); Tue, 15 Feb 2022 20:07:36 -0500 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53B97C7916 for ; Tue, 15 Feb 2022 17:07:23 -0800 (PST) Received: by mail-wm1-x331.google.com with SMTP id d14-20020a05600c34ce00b0037bf4d14dc7so506865wmq.3 for ; Tue, 15 Feb 2022 17:07:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philpotter-co-uk.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sQeUL6hBFjGG5/ri65zEZYIgiZNYomsNgGD83ZDdqSg=; b=LLlNisjsbePSFTLapisou9ipJBC7jTqBn9chMDefehiCh7BB8qJvVcBBg8n2ytwkyS i+fwHtdohwl7rTJWoUdBiZx/090Oj6ateBF+m88W8BoYta992SIW+u6wX5DLWr/8QwK2 mPu0e750zOdDzHkB9P8ScxBsbAfFE5cg3WOxWk4tdqpYlC3J9s/qQPTfO3CCVKs1B5lo oikxIpDk+Sgp7UruEljQrsYdky+4cBTcmVJy+O//wOp4SnQgbazFFW5+SpafW39TSWL7 9ctf3xHj3V12gn/hklvduSOfG85E5dJp4JSbtzA41hxYLDRB50A1HwDWel/8Av3VGSyo 4hrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sQeUL6hBFjGG5/ri65zEZYIgiZNYomsNgGD83ZDdqSg=; b=oJ4+ESYhLjeu0iO8bwEl4MyohmW9Zfw3GmVmKVOcmXS9TK7CIgbRbFJfcjI9gN26FQ ZNd/QNIApil4iSS+VXlX2V9+Vxp21AkqSl8akM6RZVH4Eu6SAsGZ5QPuuAHWLJXMkb7p uiEb11pwkSGblwuRUhB/h0na9dpOykg2jAHLnBE1ZW2NIHBS6lbdeC5SVvFSdzKHDpz1 WVeIH09G+m10VHIKyRvbKy5Y24qctP66JEiKjim+iAMP5ghoG7+rQrhugYTTtMyn9G49 oJARf/93GtTZQZuTcrV/SyuSB3rDFkd3iaGj64L/woSCs6zHPaF0bGxV69moySrAwmwO mvMw== X-Gm-Message-State: AOAM530BaXDSrQ4Or3mUTcZcDoPJmpVwjwTGIgxSIMAhH3MEVKxVZpW8 xpRsq4oZr6P7XVY74bY1RLCeNoghZNYhJ4JG X-Google-Smtp-Source: ABdhPJzw7u5v6zczrnPV+omBUYP7kjMIxq5eKgIuFeUEXuzUoErkK7imd9+pFbhRomfcpOtkZiOkjQ== X-Received: by 2002:a7b:c7c7:0:b0:37b:d0a7:c98d with SMTP id z7-20020a7bc7c7000000b0037bd0a7c98dmr365426wmk.191.1644973641562; Tue, 15 Feb 2022 17:07:21 -0800 (PST) Received: from localhost.localdomain (3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.1.f.d.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:df16::3]) by smtp.gmail.com with ESMTPSA id m8sm10551185wms.4.2022.02.15.17.07.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 17:07:20 -0800 (PST) From: Phillip Potter To: gregkh@linuxfoundation.org Cc: dan.carpenter@oracle.com, Larry.Finger@lwfinger.net, straube.linux@gmail.com, martin@kaiser.cx, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, paskripkin@gmail.com Subject: [PATCH v2 12/15] staging: r8188eu: fix lines modified by DBG_88E cleanup Date: Wed, 16 Feb 2022 01:07:06 +0000 Message-Id: <20220216010709.791-13-phil@philpotter.co.uk> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220216010709.791-1-phil@philpotter.co.uk> References: <20220216010709.791-1-phil@philpotter.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" A number of style problems were left behind by the DBG_88E cleanup: (1) Empty if/else blocks. (2) Parenthesised if/while statements containing only one line. (3) Entire blocks which server zero purpose after removal of DBG_88E. (4) Various warnings about whitespace, and constant comparison order. (5) Use of __constant_htons instead when htons should be used. Fix up these issues across the driver in any file touched by the previous cleanup. Long line warnings will be addresses in a later patch. Signed-off-by: Phillip Potter --- drivers/staging/r8188eu/core/rtw_ap.c | 4 - drivers/staging/r8188eu/core/rtw_br_ext.c | 22 ++-- drivers/staging/r8188eu/core/rtw_cmd.c | 6 +- drivers/staging/r8188eu/core/rtw_fw.c | 12 +- drivers/staging/r8188eu/core/rtw_ieee80211.c | 18 +-- drivers/staging/r8188eu/core/rtw_iol.c | 6 +- drivers/staging/r8188eu/core/rtw_mlme.c | 11 +- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 123 ++++-------------- drivers/staging/r8188eu/core/rtw_p2p.c | 25 ++-- drivers/staging/r8188eu/core/rtw_pwrctrl.c | 14 +- drivers/staging/r8188eu/core/rtw_recv.c | 41 ++---- drivers/staging/r8188eu/core/rtw_security.c | 3 +- drivers/staging/r8188eu/core/rtw_sta_mgt.c | 10 +- drivers/staging/r8188eu/core/rtw_wlan_util.c | 57 +++----- drivers/staging/r8188eu/core/rtw_xmit.c | 43 +++--- drivers/staging/r8188eu/hal/HalPwrSeqCmd.c | 3 +- drivers/staging/r8188eu/hal/hal_intf.c | 2 - drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 24 +--- .../staging/r8188eu/hal/rtl8188e_hal_init.c | 31 ++--- drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 3 - drivers/staging/r8188eu/hal/rtl8188eu_recv.c | 5 - drivers/staging/r8188eu/hal/rtl8188eu_xmit.c | 6 +- drivers/staging/r8188eu/hal/usb_halinit.c | 22 +--- drivers/staging/r8188eu/hal/usb_ops_linux.c | 12 +- drivers/staging/r8188eu/include/usb_ops.h | 4 +- drivers/staging/r8188eu/os_dep/ioctl_linux.c | 115 +++------------- drivers/staging/r8188eu/os_dep/os_intfs.c | 9 +- drivers/staging/r8188eu/os_dep/usb_intf.c | 24 ++-- .../staging/r8188eu/os_dep/usb_ops_linux.c | 3 +- drivers/staging/r8188eu/os_dep/xmit_linux.c | 3 +- 30 files changed, 161 insertions(+), 500 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_ap.c b/drivers/staging/r8188e= u/core/rtw_ap.c index 505517dbbf8c..ed66331de319 100644 --- a/drivers/staging/r8188eu/core/rtw_ap.c +++ b/drivers/staging/r8188eu/core/rtw_ap.c @@ -382,7 +382,6 @@ void add_RATid(struct adapter *padapter, struct sta_inf= o *psta, u8 rssi_level) psta->raid =3D raid; psta->init_rate =3D init_rate; =20 - } else { } } =20 @@ -457,7 +456,6 @@ void update_bmc_sta(struct adapter *padapter) psta->state =3D _FW_LINKED; spin_unlock_bh(&psta->lock); =20 - } else { } } =20 @@ -873,8 +871,6 @@ void bss_cap_update_on_sta_join(struct adapter *padapte= r, struct sta_info *psta) psta->no_ht_set =3D 1; pmlmepriv->num_sta_no_ht++; } - if (pmlmepriv->htpriv.ht_option) { - } } =20 if (rtw_ht_operation_update(padapter) > 0) { diff --git a/drivers/staging/r8188eu/core/rtw_br_ext.c b/drivers/staging/r8= 188eu/core/rtw_br_ext.c index 6fa27b66920e..ddc3a2c8aaca 100644 --- a/drivers/staging/r8188eu/core/rtw_br_ext.c +++ b/drivers/staging/r8188eu/core/rtw_br_ext.c @@ -71,9 +71,8 @@ static int __nat25_add_pppoe_tag(struct sk_buff *skb, str= uct pppoe_tag *tag) int data_len; =20 data_len =3D tag->tag_len + TAG_HDR_LEN; - if (skb_tailroom(skb) < data_len) { + if (skb_tailroom(skb) < data_len) return -1; - } =20 skb_put(skb, data_len); /* have a room for new tag */ @@ -383,9 +382,8 @@ int nat25_db_handle(struct adapter *priv, struct sk_buf= f *skb, int method) if (protocol =3D=3D ETH_P_IP) { struct iphdr *iph =3D (struct iphdr *)(skb->data + ETH_HLEN); =20 - if (((unsigned char *)(iph) + (iph->ihl<<2)) >=3D (skb->data + ETH_HLEN = + skb->len)) { + if (((unsigned char *)(iph) + (iph->ihl<<2)) >=3D (skb->data + ETH_HLEN = + skb->len)) return -1; - } =20 switch (method) { case NAT25_CHECK: @@ -411,9 +409,8 @@ int nat25_db_handle(struct adapter *priv, struct sk_buf= f *skb, int method) unsigned char *arp_ptr =3D (unsigned char *)(arp + 1); unsigned int *sender; =20 - if (arp->ar_pro !=3D __constant_htons(ETH_P_IP)) { + if (arp->ar_pro !=3D htons(ETH_P_IP)) return -1; - } =20 switch (method) { case NAT25_CHECK: @@ -454,16 +451,15 @@ int nat25_db_handle(struct adapter *priv, struct sk_b= uff *skb, int method) pOldTag =3D (struct pppoe_tag *)__nat25_find_pppoe_tag(ph, ntohs(PTT= _RELAY_SID)); if (pOldTag) { /* if SID existed, copy old value and delete it */ old_tag_len =3D ntohs(pOldTag->tag_len); - if (old_tag_len+TAG_HDR_LEN+MAGIC_CODE_LEN+RTL_RELAY_TAG_LEN > size= of(tag_buf)) { + if (old_tag_len+TAG_HDR_LEN+MAGIC_CODE_LEN+RTL_RELAY_TAG_LEN > size= of(tag_buf)) return -1; - } =20 memcpy(tag->tag_data+MAGIC_CODE_LEN+RTL_RELAY_TAG_LEN, pOldTag->tag_data, old_tag_len); =20 - if (skb_pull_and_merge(skb, (unsigned char *)pOldTag, TAG_HDR_LEN+o= ld_tag_len) < 0) { + if (skb_pull_and_merge(skb, (unsigned char *)pOldTag, TAG_HDR_LEN+o= ld_tag_len) < 0) return -1; - } + ph->length =3D htons(ntohs(ph->length)-TAG_HDR_LEN-old_tag_len); } =20 @@ -480,9 +476,8 @@ int nat25_db_handle(struct adapter *priv, struct sk_buf= f *skb, int method) return -1; } else { /* not add relay tag */ if (priv->pppoe_connection_in_progress && - memcmp(skb->data+ETH_ALEN, priv->pppoe_addr, ETH_ALEN)) { + memcmp(skb->data+ETH_ALEN, priv->pppoe_addr, ETH_ALEN)) return -2; - } =20 if (priv->pppoe_connection_in_progress =3D=3D 0) memcpy(priv->pppoe_addr, skb->data+ETH_ALEN, ETH_ALEN); @@ -536,9 +531,8 @@ int nat25_db_handle(struct adapter *priv, struct sk_buf= f *skb, int method) /*------------------------------------------------*/ struct ipv6hdr *iph =3D (struct ipv6hdr *)(skb->data + ETH_HLEN); =20 - if (sizeof(*iph) >=3D (skb->len - ETH_HLEN)) { + if (sizeof(*iph) >=3D (skb->len - ETH_HLEN)) return -1; - } =20 switch (method) { case NAT25_CHECK: diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188= eu/core/rtw_cmd.c index 0ef74eb47893..a2ab4f0029bd 100644 --- a/drivers/staging/r8188eu/core/rtw_cmd.c +++ b/drivers/staging/r8188eu/core/rtw_cmd.c @@ -252,9 +252,8 @@ int rtw_cmd_thread(void *context) =20 _next: if (padapter->bDriverStopped || - padapter->bSurpriseRemoved) { + padapter->bSurpriseRemoved) break; - } =20 pcmd =3D rtw_dequeue_cmd(pcmdpriv); if (!pcmd) @@ -938,9 +937,8 @@ static void rtl8188e_sreset_xmit_status_check(struct ad= apter *padapter) u32 txdma_status; =20 txdma_status =3D rtw_read32(padapter, REG_TXDMA_STATUS); - if (txdma_status !=3D 0x00) { + if (txdma_status !=3D 0x00) rtw_write32(padapter, REG_TXDMA_STATUS, txdma_status); - } /* total xmit irp =3D 4 */ } =20 diff --git a/drivers/staging/r8188eu/core/rtw_fw.c b/drivers/staging/r8188e= u/core/rtw_fw.c index 6d07927397de..625d186c3647 100644 --- a/drivers/staging/r8188eu/core/rtw_fw.c +++ b/drivers/staging/r8188eu/core/rtw_fw.c @@ -190,9 +190,8 @@ static int fw_free_to_go(struct adapter *padapter) break; } while (counter++ < POLLING_READY_TIMEOUT_COUNT); =20 - if (counter >=3D POLLING_READY_TIMEOUT_COUNT) { + if (counter >=3D POLLING_READY_TIMEOUT_COUNT) return _FAIL; - } =20 value32 =3D rtw_read32(padapter, REG_MCUFWDL); value32 |=3D MCUFWDL_RDY; @@ -205,9 +204,8 @@ static int fw_free_to_go(struct adapter *padapter) counter =3D 0; do { value32 =3D rtw_read32(padapter, REG_MCUFWDL); - if (value32 & WINTINI_RDY) { + if (value32 & WINTINI_RDY) return _SUCCESS; - } udelay(5); } while (counter++ < POLLING_READY_TIMEOUT_COUNT); =20 @@ -304,14 +302,12 @@ int rtl8188e_firmware_download(struct adapter *padapt= er) break; } fw_download_enable(padapter, false); - if (ret !=3D _SUCCESS) { + if (ret !=3D _SUCCESS) goto exit; - } =20 ret =3D fw_free_to_go(padapter); - if (ret !=3D _SUCCESS) { + if (ret !=3D _SUCCESS) goto exit; - } =20 exit: return ret; diff --git a/drivers/staging/r8188eu/core/rtw_ieee80211.c b/drivers/staging= /r8188eu/core/rtw_ieee80211.c index c8998cb276be..62354c3194bd 100644 --- a/drivers/staging/r8188eu/core/rtw_ieee80211.c +++ b/drivers/staging/r8188eu/core/rtw_ieee80211.c @@ -653,11 +653,8 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *po= s, uint elen, /* first 3 bytes in vendor specific information element are the IEEE * OUI of the vendor. The following byte is used a vendor specific * sub-type. */ - if (elen < 4) { - if (show_errors) { - } + if (elen < 4) return -1; - } =20 oui =3D RTW_GET_BE24(pos); switch (oui) { @@ -672,9 +669,8 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos= , uint elen, elems->wpa_ie_len =3D elen; break; case WME_OUI_TYPE: /* this is a Wi-Fi WME info. element */ - if (elen < 5) { + if (elen < 5) return -1; - } switch (pos[4]) { case WME_OUI_SUBTYPE_INFORMATION_ELEMENT: case WME_OUI_SUBTYPE_PARAMETER_ELEMENT: @@ -740,11 +736,8 @@ enum parse_res rtw_ieee802_11_parse_elems(u8 *start, u= int len, elen =3D *pos++; left -=3D 2; =20 - if (elen > left) { - if (show_errors) { - } + if (elen > left) return ParseFailed; - } =20 switch (id) { case WLAN_EID_SSID: @@ -825,8 +818,6 @@ enum parse_res rtw_ieee802_11_parse_elems(u8 *start, ui= nt len, break; default: unknown++; - if (!show_errors) - break; break; } left -=3D elen; @@ -874,9 +865,8 @@ void rtw_macaddr_cfg(u8 *mac_addr) ether_addr_copy(mac, mac_addr); } =20 - 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); - } } =20 /** diff --git a/drivers/staging/r8188eu/core/rtw_iol.c b/drivers/staging/r8188= eu/core/rtw_iol.c index 5f73413a4511..e14e3746efdd 100644 --- a/drivers/staging/r8188eu/core/rtw_iol.c +++ b/drivers/staging/r8188eu/core/rtw_iol.c @@ -11,9 +11,8 @@ struct xmit_frame *rtw_IOL_accquire_xmit_frame(struct ada= pter *adapter) struct xmit_priv *pxmitpriv =3D &adapter->xmitpriv; =20 xmit_frame =3D rtw_alloc_xmitframe(pxmitpriv); - if (!xmit_frame) { + if (!xmit_frame) return NULL; - } =20 xmitbuf =3D rtw_alloc_xmitbuf(pxmitpriv); if (!xmitbuf) { @@ -46,9 +45,8 @@ int rtw_IOL_append_cmds(struct xmit_frame *xmit_frame, u8= *IOL_cmds, u32 cmd_len ori_len =3D buf_offset + pattrib->pktlen; =20 /* check if the io_buf can accommodate new cmds */ - if (ori_len + cmd_len + 8 > MAX_XMITBUF_SZ) { + if (ori_len + cmd_len + 8 > MAX_XMITBUF_SZ) return _FAIL; - } =20 memcpy(xmit_frame->buf_addr + buf_offset + pattrib->pktlen, IOL_cmds, cmd= _len); pattrib->pktlen +=3D cmd_len; diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r818= 8eu/core/rtw_mlme.c index d7494d820756..45eff3018d73 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme.c +++ b/drivers/staging/r8188eu/core/rtw_mlme.c @@ -610,9 +610,8 @@ static int rtw_is_desired_network(struct adapter *adapt= er, struct wlan_network * } } =20 - if ((desired_encmode !=3D Ndis802_11EncryptionDisabled) && (privacy =3D= =3D 0)) { + if ((desired_encmode !=3D Ndis802_11EncryptionDisabled) && (privacy =3D= =3D 0)) bselected =3D false; - } =20 if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) { if (pnetwork->network.InfrastructureMode !=3D pmlmepriv->cur_network.net= work.InfrastructureMode) @@ -1318,9 +1317,8 @@ void _rtw_join_timeout_handler (struct adapter *adapt= er) pmlmepriv->to_roaming--; if (rtw_to_roaming(adapter) !=3D 0) { /* try another */ do_join_r =3D rtw_do_join(adapter); - if (_SUCCESS !=3D do_join_r) { + if (do_join_r !=3D _SUCCESS) continue; - } break; } else { rtw_indicate_disconnect(adapter); @@ -1446,8 +1444,6 @@ static int rtw_check_join_candidate(struct mlme_priv = *pmlmepriv *candidate =3D competitor; updated =3D true; } - if (updated) { - } =20 exit: return updated; @@ -1486,7 +1482,6 @@ int rtw_select_and_join_from_scanned_queue(struct mlm= e_priv *pmlmepriv) if (!candidate) { ret =3D _FAIL; goto exit; - } else { } =20 /* check for situation of _FW_LINKED */ @@ -1960,8 +1955,6 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 *= pie, uint ie_len) =20 /* Config SM Power Save setting */ pmlmeinfo->SM_PS =3D (le16_to_cpu(pmlmeinfo->HT_caps.u.HT_cap_element.HT_= caps_info) & 0x0C) >> 2; - if (pmlmeinfo->SM_PS =3D=3D WLAN_HT_CAP_SM_PS_STATIC) - ; =20 /* Config current HT Protection mode. */ pmlmeinfo->HT_protection =3D pmlmeinfo->HT_info.infos[1] & 0x3; diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/= r8188eu/core/rtw_mlme_ext.c index 4c557c279818..2b6dbabe47c8 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -314,9 +314,8 @@ static u8 init_channel_set(struct adapter *padapter, u8= ChannelPlan, struct rt_c =20 memset(channel_set, 0, sizeof(struct rt_channel_info) * MAX_CHANNEL_NUM); =20 - if (ChannelPlan >=3D RT_CHANNEL_DOMAIN_MAX && ChannelPlan !=3D RT_CHANNEL= _DOMAIN_REALTEK_DEFINE) { + if (ChannelPlan >=3D RT_CHANNEL_DOMAIN_MAX && ChannelPlan !=3D RT_CHANNEL= _DOMAIN_REALTEK_DEFINE) return chanset_size; - } =20 if (padapter->registrypriv.wireless_mode & WIRELESS_11G) { b2_4GBand =3D true; @@ -433,10 +432,9 @@ void mgt_dispatcher(struct adapter *padapter, struct r= ecv_frame *precv_frame) =20 if (psta) { if (GetRetry(pframe)) { - if (precv_frame->attrib.seq_num =3D=3D psta->RxMgmtFrameSeqNum) { + if (precv_frame->attrib.seq_num =3D=3D psta->RxMgmtFrameSeqNum) /* drop the duplicate management frame */ return; - } } psta->RxMgmtFrameSeqNum =3D precv_frame->attrib.seq_num; } @@ -931,15 +929,13 @@ unsigned int OnAssocReq(struct adapter *padapter, str= uct recv_frame *precv_frame return _FAIL; =20 frame_type =3D GetFrameSubType(pframe); - if (frame_type =3D=3D WIFI_ASSOCREQ) { + if (frame_type =3D=3D WIFI_ASSOCREQ) ie_offset =3D _ASOCREQ_IE_OFFSET_; - } else { /* WIFI_REASSOCREQ */ + else /* WIFI_REASSOCREQ */ ie_offset =3D _REASOCREQ_IE_OFFSET_; - } =20 - if (pkt_len < IEEE80211_3ADDR_LEN + ie_offset) { + if (pkt_len < IEEE80211_3ADDR_LEN + ie_offset) return _FAIL; - } =20 pstat =3D rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe)); if (pstat =3D=3D (struct sta_info *)NULL) { @@ -1085,14 +1081,13 @@ unsigned int OnAssocReq(struct adapter *padapter, s= truct recv_frame *precv_frame =20 pstat->flags &=3D ~(WLAN_STA_WPS | WLAN_STA_MAYBE_WPS); if (!wpa_ie) { - if (elems.wps_ie) { + if (elems.wps_ie) pstat->flags |=3D WLAN_STA_WPS; /* wpabuf_free(sta->wps_ie); */ /* sta->wps_ie =3D wpabuf_alloc_copy(elems.wps_ie + 4, */ /* elems.wps_ie_len - 4); */ - } else { + else pstat->flags |=3D WLAN_STA_MAYBE_WPS; - } =20 /* AP support WPA/RSN, and sta is going to do WPS, but AP is not ready = */ /* that the selected registrar of AP is _FLASE */ @@ -1202,14 +1197,6 @@ unsigned int OnAssocReq(struct adapter *padapter, st= ruct recv_frame *precv_frame goto OnAssocReqFail; } =20 - if ((pstat->flags & WLAN_STA_HT) && - ((pstat->wpa2_pairwise_cipher & WPA_CIPHER_TKIP) || - (pstat->wpa_pairwise_cipher & WPA_CIPHER_TKIP))) { - - /* status =3D WLAN_STATUS_CIPHER_REJECTED_PER_POLICY; */ - /* goto OnAssocReqFail; */ - } - pstat->flags |=3D WLAN_STA_NONERP; for (i =3D 0; i < pstat->bssratelen; i++) { if ((pstat->bssrateset[i] & 0x7f) > 22) { @@ -1248,8 +1235,7 @@ unsigned int OnAssocReq(struct adapter *padapter, str= uct recv_frame *precv_frame /* Customer proprietary IE */ =20 /* get a unique AID */ - if (pstat->aid > 0) { - } else { + if (pstat->aid =3D=3D 0) { for (pstat->aid =3D 1; pstat->aid <=3D NUM_STA; pstat->aid++) if (!pstapriv->sta_aid[pstat->aid - 1]) break; @@ -3597,13 +3583,11 @@ static s32 rtw_action_public_decache(struct recv_fr= ame *recv_frame, s32 token) =20 if (GetRetry(frame)) { if (token >=3D 0) { - if ((seq_ctrl =3D=3D mlmeext->action_public_rxseq) && (token =3D=3D mlm= eext->action_public_dialog_token)) { + if ((seq_ctrl =3D=3D mlmeext->action_public_rxseq) && (token =3D=3D mlm= eext->action_public_dialog_token)) return _FAIL; - } } else { - if (seq_ctrl =3D=3D mlmeext->action_public_rxseq) { + if (seq_ctrl =3D=3D mlmeext->action_public_rxseq) return _FAIL; - } } } =20 @@ -3693,7 +3677,6 @@ static unsigned int on_action_public_p2p(struct recv_= frame *precv_frame) pwdinfo->negotiation_dialog_token =3D 1; if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_FAIL)) _set_timer(&pwdinfo->restore_p2p_state_timer, 5000); - } else { } break; case P2P_GO_NEGO_CONF: @@ -3728,9 +3711,6 @@ static unsigned int on_action_public_p2p(struct recv_= frame *precv_frame) /* #> iwpriv wlan0 p2p_get peer_ifa */ /* After having the peer interface address, the sigma can find the cor= rect conf file for wpa_supplicant. */ =20 - if (attr_contentlen) { - } - if (invitation_flag & P2P_INVITATION_FLAGS_PERSISTENT) { /* Re-invoke the persistent group. */ =20 @@ -4022,9 +4002,8 @@ struct xmit_frame *alloc_mgtxmitframe(struct xmit_pri= v *pxmitpriv) struct xmit_buf *pxmitbuf; =20 pmgntframe =3D rtw_alloc_xmitframe(pxmitpriv); - if (!pmgntframe) { + if (!pmgntframe) return NULL; - } =20 pxmitbuf =3D rtw_alloc_xmitbuf_ext(pxmitpriv); if (!pxmitbuf) { @@ -4184,9 +4163,8 @@ void issue_beacon(struct adapter *padapter, int timeo= ut_ms) struct wifidirect_info *pwdinfo =3D &padapter->wdinfo; =20 pmgntframe =3D alloc_mgtxmitframe(pxmitpriv); - if (!pmgntframe) { + if (!pmgntframe) return; - } spin_lock_bh(&pmlmepriv->bcn_update_lock); =20 /* update attribute */ @@ -4366,9 +4344,8 @@ void issue_beacon(struct adapter *padapter, int timeo= ut_ms) =20 spin_unlock_bh(&pmlmepriv->bcn_update_lock); =20 - if ((pattrib->pktlen + TXDESC_SIZE) > 512) { + if ((pattrib->pktlen + TXDESC_SIZE) > 512) return; - } =20 pattrib->last_txcmdsz =3D pattrib->pktlen; =20 @@ -4397,9 +4374,8 @@ void issue_probersp(struct adapter *padapter, unsigne= d char *da, u8 is_valid_p2p struct wifidirect_info *pwdinfo =3D &padapter->wdinfo; =20 pmgntframe =3D alloc_mgtxmitframe(pxmitpriv); - if (!pmgntframe) { + if (!pmgntframe) return; - } =20 /* update attribute */ pattrib =3D &pmgntframe->attrib; @@ -4641,13 +4617,6 @@ int issue_probereq_ex(struct adapter *padapter, stru= ct ndis_802_11_ssid *pssid, ret =3D _SUCCESS; goto exit; } - - if (try_cnt && wait_ms) { - if (da) - ; - else - ; - } exit: return ret; } @@ -4979,11 +4948,6 @@ void issue_assocreq(struct adapter *padapter) if (pmlmeext->cur_channel =3D=3D 14)/* for JAPAN, channel 14 can only us= es B Mode(CCK) */ sta_bssrate_len =3D 4; =20 - for (i =3D 0; i < NDIS_802_11_LENGTH_RATES_EX; i++) { - if (pmlmeinfo->network.SupportedRates[i] =3D=3D 0) - break; - } - for (i =3D 0; i < NDIS_802_11_LENGTH_RATES_EX; i++) { if (pmlmeinfo->network.SupportedRates[i] =3D=3D 0) break; @@ -4996,12 +4960,9 @@ void issue_assocreq(struct adapter *padapter) break; } =20 - if (j =3D=3D sta_bssrate_len) { - /* the rate is not supported by STA */ - } else { + if (j !=3D sta_bssrate_len) /* the rate is supported by STA */ bssrate[index++] =3D pmlmeinfo->network.SupportedRates[i]; - } } =20 bssrate_len =3D index; @@ -5312,13 +5273,6 @@ int issue_nulldata(struct adapter *padapter, unsigne= d char *da, unsigned int pow ret =3D _SUCCESS; goto exit; } - - if (try_cnt && wait_ms) { - if (da) - ; - else - ; - } exit: return ret; } @@ -5425,13 +5379,6 @@ int issue_qos_nulldata(struct adapter *padapter, uns= igned char *da, u16 tid, int ret =3D _SUCCESS; goto exit; } - - if (try_cnt && wait_ms) { - if (da) - ; - else - ; - } exit: return ret; } @@ -5526,13 +5473,6 @@ int issue_deauth_ex(struct adapter *padapter, u8 *da= , unsigned short reason, int ret =3D _SUCCESS; goto exit; } - - if (try_cnt && wait_ms) { - if (da) - ; - else - ; - } exit: return ret; } @@ -5839,10 +5779,7 @@ unsigned int send_beacon(struct adapter *padapter) if (!bxmitok) { return _FAIL; } else { - u32 passing_time =3D rtw_get_passing_time_ms(start); - - if (passing_time > 100 || issue > 3) - ; + rtw_get_passing_time_ms(start); =20 return _SUCCESS; } @@ -6051,14 +5988,12 @@ u8 collect_bss_info(struct adapter *padapter, struc= t recv_frame *precv_frame, st =20 /* checking SSID */ p =3D rtw_get_ie(bssid->IEs + ie_offset, _SSID_IE_, &len, bssid->IELength= - ie_offset); - if (!p) { + if (!p) return _FAIL; - } =20 if (*(p + 1)) { - if (len > NDIS_802_11_LENGTH_SSID) { + if (len > NDIS_802_11_LENGTH_SSID) return _FAIL; - } memcpy(bssid->Ssid.Ssid, (p + 2), *(p + 1)); bssid->Ssid.SsidLength =3D *(p + 1); } else { @@ -6071,18 +6006,16 @@ u8 collect_bss_info(struct adapter *padapter, struc= t recv_frame *precv_frame, st i =3D 0; p =3D rtw_get_ie(bssid->IEs + ie_offset, _SUPPORTEDRATES_IE_, &len, bssid= ->IELength - ie_offset); if (p) { - if (len > NDIS_802_11_LENGTH_RATES_EX) { + if (len > NDIS_802_11_LENGTH_RATES_EX) return _FAIL; - } memcpy(bssid->SupportedRates, (p + 2), len); i =3D len; } =20 p =3D rtw_get_ie(bssid->IEs + ie_offset, _EXT_SUPPORTEDRATES_IE_, &len, b= ssid->IELength - ie_offset); if (p) { - if (len > (NDIS_802_11_LENGTH_RATES_EX - i)) { + if (len > (NDIS_802_11_LENGTH_RATES_EX - i)) return _FAIL; - } memcpy(bssid->SupportedRates + i, (p + 2), len); } =20 @@ -6936,17 +6869,11 @@ static u8 chk_ap_is_alive(struct sta_info *psta) static void rtl8188e_sreset_linked_status_check(struct adapter *padapter) { u32 rx_dma_status =3D rtw_read32(padapter, REG_RXDMA_STATUS); - u8 fw_status; =20 - if (rx_dma_status !=3D 0x00) { + if (rx_dma_status !=3D 0x00) rtw_write32(padapter, REG_RXDMA_STATUS, rx_dma_status); - } =20 - fw_status =3D rtw_read8(padapter, REG_FMETHR); - if (fw_status =3D=3D 1) - ; - else if (fw_status =3D=3D 2) - ; + rtw_read8(padapter, REG_FMETHR); } =20 void linked_status_chk(struct adapter *padapter) @@ -7320,8 +7247,7 @@ u8 join_cmd_hdl(struct adapter *padapter, u8 *pbuf) default: pmlmeext->cur_ch_offset =3D HAL_PRIME_CHNL_OFFSET_DONT_CARE; break; - } - + } } } break; @@ -7574,9 +7500,8 @@ u8 set_stakey_hdl(struct adapter *padapter, u8 *pbuf) if (psta) { ctrl =3D (BIT(15) | ((pparm->algorithm) << 2)); =20 - if ((psta->mac_id < 1) || (psta->mac_id > (NUM_STA - 4))) { + if ((psta->mac_id < 1) || (psta->mac_id > (NUM_STA - 4))) return H2C_REJECTED; - } =20 cam_id =3D (psta->mac_id + 3);/* 0~3 for default key, cmd_id =3D macid = + 3, macid =3D aid+1; */ =20 diff --git a/drivers/staging/r8188eu/core/rtw_p2p.c b/drivers/staging/r8188= eu/core/rtw_p2p.c index 8f4bad399bc4..9467a5dcc990 100644 --- a/drivers/staging/r8188eu/core/rtw_p2p.c +++ b/drivers/staging/r8188eu/core/rtw_p2p.c @@ -818,10 +818,8 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *p= wdinfo, u8 *pframe, uint l =20 p2p_ie =3D rtw_get_p2p_ie(ies, ies_len, NULL, &p2p_ielen); =20 - if (!p2p_ie) { + if (!p2p_ie) status_code =3D P2P_STATUS_FAIL_INVALID_PARAM; - } else { - } =20 while (p2p_ie) { /* Check P2P Capability ATTR */ @@ -1156,15 +1154,14 @@ u8 process_p2p_group_negotation_req(struct wifidire= ct_info *pwdinfo, u8 *pframe, peer_operating_ch =3D operatingch_info[4]; =20 if (rtw_p2p_is_channel_list_ok(peer_operating_ch, - ch_list_inclusioned, ch_num_inclusioned)) { + ch_list_inclusioned, ch_num_inclusioned)) /** * Change our operating channel as peer's for compatibility. */ pwdinfo->operating_channel =3D peer_operating_ch; - } else { + else /* Take first channel of ch_list_inclusioned as operating channel */ pwdinfo->operating_channel =3D ch_list_inclusioned[0]; - } } } } @@ -1189,8 +1186,7 @@ u8 process_p2p_group_negotation_resp(struct wifidirec= t_info *pwdinfo, u8 *pframe =20 /* Be able to know which one is the P2P GO and which one is P2P client. */ =20 - if (rtw_get_wps_ie(ies, ies_len, NULL, &wps_ielen)) { - } else { + if (!rtw_get_wps_ie(ies, ies_len, NULL, &wps_ielen)) { result =3D P2P_STATUS_FAIL_INCOMPATIBLE_PARAM; rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_FAIL); } @@ -1274,9 +1270,8 @@ u8 process_p2p_group_negotation_resp(struct wifidirec= t_info *pwdinfo, u8 *pframe /* Try to get the operation channel information */ =20 attr_contentlen =3D 0; - if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, = operatingch_info, &attr_contentlen)) { + if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, = operatingch_info, &attr_contentlen)) pwdinfo->peer_operating_ch =3D operatingch_info[4]; - } =20 /* Try to get the channel list information */ if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CH_LIST, pwdin= fo->channel_list_attr, &pwdinfo->channel_list_attr_len)) { @@ -1300,18 +1295,16 @@ u8 process_p2p_group_negotation_resp(struct wifidir= ect_info *pwdinfo, u8 *pframe peer_operating_ch =3D operatingch_info[4]; =20 if (rtw_p2p_is_channel_list_ok(peer_operating_ch, - ch_list_inclusioned, ch_num_inclusioned)) { + ch_list_inclusioned, ch_num_inclusioned)) /** * Change our operating channel as peer's for compatibility. */ pwdinfo->operating_channel =3D peer_operating_ch; - } else { + else /* Take first channel of ch_list_inclusioned as operating channel = */ pwdinfo->operating_channel =3D ch_list_inclusioned[0]; - } } } - } else { } =20 /* Try to get the group id information if peer is GO */ @@ -1384,9 +1377,8 @@ u8 process_p2p_group_negotation_confirm(struct wifidi= rect_info *pwdinfo, u8 *pfr } =20 attr_contentlen =3D 0; - if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, o= peratingch_info, &attr_contentlen)) { + if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, o= peratingch_info, &attr_contentlen)) pwdinfo->peer_operating_ch =3D operatingch_info[4]; - } =20 /* Get the next P2P IE */ p2p_ie =3D rtw_get_p2p_ie(p2p_ie + p2p_ielen, ies_len - (p2p_ie - ies + = p2p_ielen), NULL, &p2p_ielen); @@ -1743,7 +1735,6 @@ static void pre_tx_scan_timer_process(struct timer_li= st *t) } else if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_INVITE_REQ)) { if (pwdinfo->invitereq_info.benable) p2p_protocol_wk_cmd(adapter, P2P_PRE_TX_INVITEREQ_PROCESS_WK); - } else { } =20 spin_unlock_bh(&pmlmepriv->lock); diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r= 8188eu/core/rtw_pwrctrl.c index db7074bf5741..c7c79cd9e213 100644 --- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c +++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c @@ -14,9 +14,8 @@ void ips_enter(struct adapter *padapter) struct xmit_priv *pxmit_priv =3D &padapter->xmitpriv; =20 if (pxmit_priv->free_xmitbuf_cnt !=3D NR_XMITBUFF || - pxmit_priv->free_xmit_extbuf_cnt !=3D NR_XMIT_EXTBUFF) { + pxmit_priv->free_xmit_extbuf_cnt !=3D NR_XMIT_EXTBUFF) return; - } =20 mutex_lock(&pwrpriv->lock); =20 @@ -172,9 +171,8 @@ static u8 PS_RDY_CHECK(struct adapter *padapter) return false; if (pwrpriv->bInSuspend) return false; - if (padapter->securitypriv.dot11AuthAlgrthm =3D=3D dot11AuthAlgrthm_8021X= && !padapter->securitypriv.binstallGrpkey) { + if (padapter->securitypriv.dot11AuthAlgrthm =3D=3D dot11AuthAlgrthm_8021X= && !padapter->securitypriv.binstallGrpkey) return false; - } return true; } =20 @@ -367,10 +365,6 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_= deffer_ms, const char *cal if (pwrpriv->ps_processing) { while (pwrpriv->ps_processing && rtw_get_passing_time_ms(start) <=3D 300= 0) msleep(10); - if (pwrpriv->ps_processing) - ; - else - ; } =20 /* System suspend is not allowed to wakeup */ @@ -379,10 +373,6 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_= deffer_ms, const char *cal (rtw_get_passing_time_ms(start) <=3D 3000 || (rtw_get_passing_time_ms(start) <=3D 500))) msleep(10); - if (pwrpriv->bInSuspend) - ; - else - ; } =20 /* I think this should be check in IPS, LPS, autosuspend functions... */ diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r818= 8eu/core/rtw_recv.c index 0f8f757de02a..0144c4642911 100644 --- a/drivers/staging/r8188eu/core/rtw_recv.c +++ b/drivers/staging/r8188eu/core/rtw_recv.c @@ -299,10 +299,9 @@ static int recvframe_chkmic(struct adapter *adapter, = struct recv_frame *precvfr if (is_multicast_ether_addr(prxattrib->ra) && prxattrib->key_index != =3D pmlmeinfo->key_index) brpt_micerror =3D false; =20 - if ((prxattrib->bdecrypted) && (brpt_micerror)) { + if ((prxattrib->bdecrypted) && (brpt_micerror)) rtw_handle_tkip_mic_err(adapter, (u8)is_multicast_ether_addr(prxattri= b->ra)); - } else { - } + res =3D _FAIL; } else { /* mic checked ok */ @@ -679,9 +678,8 @@ static int ap2sta_data_frame( if (!memcmp(pattrib->bssid, "\x0\x0\x0\x0\x0\x0", ETH_ALEN) || !memcmp(mybssid, "\x0\x0\x0\x0\x0\x0", ETH_ALEN) || (memcmp(pattrib->bssid, mybssid, ETH_ALEN))) { - if (!bmcast) { + if (!bmcast) issue_deauth(adapter, pattrib->bssid, WLAN_REASON_CLASS3_FRAME_FROM_NO= NASSOC_STA); - } =20 ret =3D _FAIL; goto exit; @@ -729,9 +727,8 @@ static int ap2sta_data_frame( } else { if (!memcmp(myhwaddr, pattrib->dst, ETH_ALEN) && (!bmcast)) { *psta =3D rtw_get_stainfo(pstapriv, pattrib->bssid); /* get sta_info */ - if (!*psta) { + if (!*psta) issue_deauth(adapter, pattrib->bssid, WLAN_REASON_CLASS3_FRAME_FROM_NO= NASSOC_STA); - } } =20 ret =3D _FAIL; @@ -889,12 +886,11 @@ static int validate_recv_ctrl_frame(struct adapter *p= adapter, } } else { if (pstapriv->tim_bitmap & BIT(psta->aid)) { - if (psta->sleepq_len =3D=3D 0) { + if (psta->sleepq_len =3D=3D 0) /* issue nulldata with More data bit =3D 0 to indicate we have no bu= ffered packets */ issue_nulldata(padapter, psta->hwaddr, 0, 0, 0); - } else { + else psta->sleepq_len =3D 0; - } =20 pstapriv->tim_bitmap &=3D ~BIT(psta->aid); =20 @@ -1097,25 +1093,6 @@ static int validate_recv_frame(struct adapter *adapt= er, struct recv_frame *precv =20 /* Dump rx packets */ GetHalDefVar8188EUsb(adapter, HAL_DEF_DBG_DUMP_RXPKT, &bDumpRxPkt); - if (bDumpRxPkt =3D=3D 1) {/* dump all rx packets */ - int i; - - for (i =3D 0; i < 64; i =3D i + 8) - ; - } else if (bDumpRxPkt =3D=3D 2) { - if (type =3D=3D WIFI_MGT_TYPE) { - int i; - - for (i =3D 0; i < 64; i =3D i + 8) - ; - } - } else if (bDumpRxPkt =3D=3D 3) { - if (type =3D=3D WIFI_DATA_TYPE) { - int i; - for (i =3D 0; i < 64; i =3D i + 8) - ; - } - } switch (type) { case WIFI_MGT_TYPE: /* mgnt */ validate_recv_mgnt_frame(adapter, precv_frame); @@ -1419,9 +1396,8 @@ static int amsdu_to_msdu(struct adapter *padapter, st= ruct recv_frame *prframe) /* Offset 12 denote 2 mac address */ nSubframe_Length =3D RTW_GET_BE16(pdata + 12); =20 - if (a_len < ETH_HLEN + nSubframe_Length) { + if (a_len < ETH_HLEN + nSubframe_Length) goto exit; - } =20 /* move the data point to data content */ pdata +=3D ETH_HLEN; @@ -1446,9 +1422,8 @@ static int amsdu_to_msdu(struct adapter *padapter, st= ruct recv_frame *prframe) =20 subframes[nr_subframes++] =3D sub_skb; =20 - if (nr_subframes >=3D MAX_SUBFRAME_COUNT) { + if (nr_subframes >=3D MAX_SUBFRAME_COUNT) break; - } =20 pdata +=3D nSubframe_Length; a_len -=3D nSubframe_Length; diff --git a/drivers/staging/r8188eu/core/rtw_security.c b/drivers/staging/= r8188eu/core/rtw_security.c index fdd2dbf65eb7..7861dfa235c0 100644 --- a/drivers/staging/r8188eu/core/rtw_security.c +++ b/drivers/staging/r8188eu/core/rtw_security.c @@ -1327,9 +1327,8 @@ static int aes_decipher(struct adapter *padapter, u8 = *key, uint hdrlen, =20 /* compare the mic */ for (i =3D 0; i < 8; i++) { - if (pframe[hdrlen + 8 + plen - 8 + i] !=3D message[hdrlen + 8 + plen - 8= + i]) { + if (pframe[hdrlen + 8 + plen - 8 + i] !=3D message[hdrlen + 8 + plen - 8= + i]) res =3D _FAIL; - } } =20 return res; diff --git a/drivers/staging/r8188eu/core/rtw_sta_mgt.c b/drivers/staging/r= 8188eu/core/rtw_sta_mgt.c index 1fb9b6cc7eda..91ff82f24f1f 100644 --- a/drivers/staging/r8188eu/core/rtw_sta_mgt.c +++ b/drivers/staging/r8188eu/core/rtw_sta_mgt.c @@ -101,19 +101,11 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv) =20 inline int rtw_stainfo_offset(struct sta_priv *stapriv, struct sta_info *s= ta) { - int offset =3D (((u8 *)sta) - stapriv->pstainfo_buf) / sizeof(struct sta_= info); - - if (!stainfo_offset_valid(offset)) - ; - - return offset; + return (((u8 *)sta) - stapriv->pstainfo_buf) / sizeof(struct sta_info); } =20 inline struct sta_info *rtw_get_stainfo_by_offset(struct sta_priv *stapriv= , int offset) { - if (!stainfo_offset_valid(offset)) - ; - return (struct sta_info *)(stapriv->pstainfo_buf + offset * sizeof(struct= sta_info)); } =20 diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging= /r8188eu/core/rtw_wlan_util.c index abc2386dc8d9..e8bf5672ff6c 100644 --- a/drivers/staging/r8188eu/core/rtw_wlan_util.c +++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c @@ -334,9 +334,6 @@ void set_channel_bwmode(struct adapter *padapter, unsig= ned char channel, unsigne { u8 center_ch; =20 - if (padapter->bNotifyChannelChange) - ; - if ((bwmode =3D=3D HT_CHANNEL_WIDTH_20) || (channel_offset =3D=3D HAL_PRIME_CHNL_OFFSET_DONT_CARE)) { /* SelectChannel(padapter, channel); */ @@ -606,9 +603,8 @@ void WMMOnAssocRsp(struct adapter *padapter) } } =20 - for (i =3D 0; i < 4; i++) { + for (i =3D 0; i < 4; i++) pxmitpriv->wmm_para_seq[i] =3D inx[i]; - } } =20 static void bwmode_update_check(struct adapter *padapter, struct ndis_802_= 11_var_ie *pIE) @@ -852,13 +848,11 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *= pframe, u32 packet_len) =20 len =3D packet_len - sizeof(struct rtw_ieee80211_hdr_3addr); =20 - if (len > MAX_IE_SZ) { + if (len > MAX_IE_SZ) return _FAIL; - } =20 - if (memcmp(cur_network->network.MacAddress, pbssid, 6)) { + if (memcmp(cur_network->network.MacAddress, pbssid, 6)) return true; - } =20 bssid =3D kzalloc(sizeof(struct wlan_bssid_ex), GFP_ATOMIC); if (!bssid) @@ -907,23 +901,20 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *= pframe, u32 packet_len) bcn_channel =3D *(p + 2); } else {/* In 5G, some ap do not have DSSET IE checking HT info for chann= el */ p =3D rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _HT_ADD_INFO_IE_, &len= , bssid->IELength - _FIXED_IE_LENGTH_); - if (pht_info) { - bcn_channel =3D pht_info->primary_channel; - } else { /* we don't find channel IE, so don't check it */ - bcn_channel =3D Adapter->mlmeextpriv.cur_channel; - } - } - if (bcn_channel !=3D Adapter->mlmeextpriv.cur_channel) { - goto _mismatch; + if (pht_info) + bcn_channel =3D pht_info->primary_channel; + else /* we don't find channel IE, so don't check it */ + bcn_channel =3D Adapter->mlmeextpriv.cur_channel; } + if (bcn_channel !=3D Adapter->mlmeextpriv.cur_channel) + goto _mismatch; =20 /* checking SSID */ p =3D rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _SSID_IE_, &len, bssid->= IELength - _FIXED_IE_LENGTH_); - if (!p) { + if (!p) hidden_ssid =3D true; - } else { + else hidden_ssid =3D false; - } =20 if ((NULL !=3D p) && (false =3D=3D hidden_ssid && (*(p + 1)))) { memcpy(bssid->Ssid.Ssid, (p + 2), *(p + 1)); @@ -935,9 +926,8 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pf= rame, u32 packet_len) =20 if (memcmp(bssid->Ssid.Ssid, cur_network->network.Ssid.Ssid, 32) || bssid->Ssid.SsidLength !=3D cur_network->network.Ssid.SsidLength) { - if (bssid->Ssid.Ssid[0] !=3D '\0' && bssid->Ssid.SsidLength !=3D 0) { /*= not hidden ssid */ + if (bssid->Ssid.Ssid[0] !=3D '\0' && bssid->Ssid.SsidLength !=3D 0) /* n= ot hidden ssid */ goto _mismatch; - } } =20 /* check encryption info */ @@ -948,9 +938,8 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pf= rame, u32 packet_len) else bssid->Privacy =3D 0; =20 - if (cur_network->network.Privacy !=3D bssid->Privacy) { + if (cur_network->network.Privacy !=3D bssid->Privacy) goto _mismatch; - } =20 rtw_get_sec_ie(bssid->IEs, bssid->IELength, NULL, &rsn_len, NULL, &wpa_le= n); =20 @@ -963,9 +952,8 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pf= rame, u32 packet_len) encryp_protocol =3D ENCRYP_PROTOCOL_WEP; } =20 - if (cur_network->BcnInfo.encryp_protocol !=3D encryp_protocol) { + if (cur_network->BcnInfo.encryp_protocol !=3D encryp_protocol) goto _mismatch; - } =20 if (encryp_protocol =3D=3D ENCRYP_PROTOCOL_WPA || encryp_protocol =3D=3D = ENCRYP_PROTOCOL_WPA2) { pbuf =3D rtw_get_wpa_ie(&bssid->IEs[12], &wpa_ielen, bssid->IELength - 1= 2); @@ -978,13 +966,11 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *= pframe, u32 packet_len) rtw_parse_wpa2_ie(pbuf, wpa_ielen + 2, &group_cipher, &pairwise_cipher= , &is_8021x); } =20 - if (pairwise_cipher !=3D cur_network->BcnInfo.pairwise_cipher || group_c= ipher !=3D cur_network->BcnInfo.group_cipher) { + if (pairwise_cipher !=3D cur_network->BcnInfo.pairwise_cipher || group_c= ipher !=3D cur_network->BcnInfo.group_cipher) goto _mismatch; - } =20 - if (is_8021x !=3D cur_network->BcnInfo.is_8021x) { + if (is_8021x !=3D cur_network->BcnInfo.is_8021x) goto _mismatch; - } } =20 kfree(bssid); @@ -1253,10 +1239,8 @@ unsigned char check_assoc_AP(u8 *pframe, uint len) return HT_IOT_PEER_AIRGO; } else if (!memcmp(pIE->data, EPIGRAM_OUI, 3)) { epigram_vendor_flag =3D 1; - if (ralink_vendor_flag) { + if (ralink_vendor_flag) return HT_IOT_PEER_TENDA; - } else { - } } else { break; } @@ -1268,13 +1252,12 @@ unsigned char check_assoc_AP(u8 *pframe, uint len) i +=3D (pIE->Length + 2); } =20 - if (ralink_vendor_flag && !epigram_vendor_flag) { + if (ralink_vendor_flag && !epigram_vendor_flag) return HT_IOT_PEER_RALINK; - } else if (ralink_vendor_flag && epigram_vendor_flag) { + else if (ralink_vendor_flag && epigram_vendor_flag) return HT_IOT_PEER_TENDA; - } else { + else return HT_IOT_PEER_UNKNOWN; - } } =20 void update_IOT_info(struct adapter *padapter) diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r818= 8eu/core/rtw_xmit.c index 3ad124f6f3c7..0b87ce342bfb 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -458,7 +458,6 @@ static s32 update_attrib(struct adapter *padapter, stru= ct sk_buff *pkt, struct p } } } - } else if (0x888e =3D=3D pattrib->ether_type) { } =20 if ((pattrib->ether_type =3D=3D 0x888e) || (pattrib->dhcp_pkt =3D=3D 1)) @@ -887,9 +886,8 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, st= ruct sk_buff *pkt, struct if (!psta) return _FAIL; =20 - if (!pxmitframe->buf_addr) { + if (!pxmitframe->buf_addr) return _FAIL; - } =20 pbuf_start =3D pxmitframe->buf_addr; =20 @@ -1123,9 +1121,8 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_pr= iv *pxmitpriv) pxmitbuf->priv_data =3D NULL; /* pxmitbuf->ext_tag =3D true; */ =20 - if (pxmitbuf->sctx) { + if (pxmitbuf->sctx) rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_BUF_ALLOC); - } } =20 spin_unlock_irqrestore(&pfree_queue->lock, flags); @@ -1177,9 +1174,8 @@ struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *= pxmitpriv) if (pxmitbuf) { pxmitpriv->free_xmitbuf_cnt--; pxmitbuf->priv_data =3D NULL; - if (pxmitbuf->sctx) { + if (pxmitbuf->sctx) rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_BUF_ALLOC); - } } spin_unlock_irqrestore(&pfree_xmitbuf_queue->lock, flags); =20 @@ -1194,9 +1190,8 @@ s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, str= uct xmit_buf *pxmitbuf) if (!pxmitbuf) return _FAIL; =20 - if (pxmitbuf->sctx) { + if (pxmitbuf->sctx) rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_BUF_FREE); - } =20 if (pxmitbuf->ext_tag) { rtw_free_xmitbuf_ext(pxmitpriv, pxmitbuf); @@ -1588,9 +1583,8 @@ static int rtw_br_client_tx(struct adapter *padapter,= struct sk_buff **pskb) } =20 newskb =3D skb_copy(skb, GFP_ATOMIC); - if (!newskb) { + if (!newskb) return -1; - } dev_kfree_skb_any(skb); =20 *pskb =3D skb =3D newskb; @@ -1602,19 +1596,15 @@ static int rtw_br_client_tx(struct adapter *padapte= r, struct sk_buff **pskb) } } =20 - if (skb_is_nonlinear(skb)) - ; - res =3D skb_linearize(skb); - if (res < 0) { - return -1; - } + if (res < 0) + return -1; =20 res =3D nat25_db_handle(padapter, skb, NAT25_INSERT); if (res < 0) { - if (res =3D=3D -2) { + if (res =3D=3D -2) return -1; - } + return 0; } } @@ -1633,9 +1623,9 @@ static int rtw_br_client_tx(struct adapter *padapter,= struct sk_buff **pskb) } =20 /* check if SA is equal to our MAC */ - if (memcmp(skb->data + ETH_ALEN, GET_MY_HWADDR(padapter), ETH_ALEN)) { + if (memcmp(skb->data + ETH_ALEN, GET_MY_HWADDR(padapter), ETH_ALEN)) return -1; - } + return 0; } =20 @@ -1702,9 +1692,8 @@ s32 rtw_xmit(struct adapter *padapter, struct sk_buff= **ppkt) s32 res; =20 pxmitframe =3D rtw_alloc_xmitframe(pxmitpriv); - if (!pxmitframe) { + if (!pxmitframe) return -1; - } =20 rcu_read_lock(); br_port =3D rcu_dereference(padapter->pnetdev->rx_handler_data); @@ -2124,12 +2113,11 @@ int rtw_sctx_wait(struct submit_ctx *sctx) int status =3D 0; =20 expire =3D sctx->timeout_ms ? msecs_to_jiffies(sctx->timeout_ms) : MAX_SC= HEDULE_TIMEOUT; - if (!wait_for_completion_timeout(&sctx->done, expire)) { + if (!wait_for_completion_timeout(&sctx->done, expire)) /* timeout, do something?? */ status =3D RTW_SCTX_DONE_TIMEOUT; - } else { + else status =3D sctx->status; - } =20 if (status =3D=3D RTW_SCTX_DONE_SUCCESS) ret =3D _SUCCESS; @@ -2155,8 +2143,7 @@ static bool rtw_sctx_chk_waring_status(int status) void rtw_sctx_done_err(struct submit_ctx **sctx, int status) { if (*sctx) { - if (rtw_sctx_chk_waring_status(status)) - ; + rtw_sctx_chk_waring_status(status); (*sctx)->status =3D status; complete(&((*sctx)->done)); *sctx =3D NULL; diff --git a/drivers/staging/r8188eu/hal/HalPwrSeqCmd.c b/drivers/staging/r= 8188eu/hal/HalPwrSeqCmd.c index eb22ac17c586..5b91aec6a7e3 100644 --- a/drivers/staging/r8188eu/hal/HalPwrSeqCmd.c +++ b/drivers/staging/r8188eu/hal/HalPwrSeqCmd.c @@ -63,9 +63,8 @@ u8 HalPwrSeqCmdParsing(struct adapter *padapter, struct w= l_pwr_cfg pwrseqcmd[]) else udelay(10); =20 - if (poll_count++ > max_poll_count) { + if (poll_count++ > max_poll_count) return false; - } } while (!poll_bit); break; case PWR_CMD_DELAY: diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188= eu/hal/hal_intf.c index 008098040a07..37935aef71ea 100644 --- a/drivers/staging/r8188eu/hal/hal_intf.c +++ b/drivers/staging/r8188eu/hal/hal_intf.c @@ -34,8 +34,6 @@ uint rtw_hal_deinit(struct adapter *adapt) =20 if (status =3D=3D _SUCCESS) adapt->hw_init_completed =3D false; - else - ; =20 return status; } diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r= 8188eu/hal/rtl8188e_cmd.c index 93dfd3dee59b..f1464e4ba429 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c @@ -54,9 +54,8 @@ static s32 FillH2CCmd_88E(struct adapter *adapt, u8 Eleme= ntID, u32 CmdLen, u8 *p u32 h2c_cmd =3D 0; u32 h2c_cmd_ex =3D 0; =20 - if (!adapt->bFWReady) { + if (!adapt->bFWReady) return _FAIL; - } =20 if (!pCmdBuffer || CmdLen > RTL88E_MAX_CMD_LEN || adapt->bSurpriseRemoved) return _FAIL; @@ -65,9 +64,8 @@ static s32 FillH2CCmd_88E(struct adapter *adapt, u8 Eleme= ntID, u32 CmdLen, u8 *p do { h2c_box_num =3D haldata->LastHMEBoxNum; =20 - if (!_is_fw_read_cmd_down(adapt, h2c_box_num)) { + if (!_is_fw_read_cmd_down(adapt, h2c_box_num)) return _FAIL; - } =20 *(u8 *)(&h2c_cmd) =3D ElementID; =20 @@ -275,9 +273,8 @@ static void ConstructBeacon(struct adapter *adapt, u8 *= pframe, u32 *pLength) =20 _ConstructBeacon: =20 - if ((pktlen + TXDESC_SIZE) > 512) { + if ((pktlen + TXDESC_SIZE) > 512) return; - } =20 *pLength =3D pktlen; } @@ -443,9 +440,8 @@ static void SetFwRsvdPagePkt(struct adapter *adapt, boo= l bDLFinished) struct rsvdpage_loc RsvdPageLoc; =20 ReservedPagePacket =3D kzalloc(1000, GFP_KERNEL); - if (!ReservedPagePacket) { + if (!ReservedPagePacket) return; - } =20 pxmitpriv =3D &adapt->xmitpriv; pmlmeext =3D &adapt->mlmeextpriv; @@ -554,9 +550,8 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *a= dapt, u8 mstatus) rtw_write8(adapt, REG_BCN_CTRL, rtw_read8(adapt, REG_BCN_CTRL) & (~BIT(3= ))); rtw_write8(adapt, REG_BCN_CTRL, rtw_read8(adapt, REG_BCN_CTRL) | BIT(4)); =20 - if (haldata->RegFwHwTxQCtrl & BIT(6)) { + if (haldata->RegFwHwTxQCtrl & BIT(6)) bSendBeacon =3D true; - } =20 /* Set FWHW_TXQ_CTRL 0x422[6]=3D0 to tell Hw the packet is not a real b= eacon frame. */ rtw_write8(adapt, REG_FWHW_TXQ_CTRL + 2, (haldata->RegFwHwTxQCtrl & (~BI= T(6)))); @@ -579,12 +574,6 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *= adapt, u8 mstatus) } while (!bcn_valid && (poll % 10) !=3D 0 && !adapt->bSurpriseRemoved &= & !adapt->bDriverStopped); } while (!bcn_valid && DLBcnCount <=3D 100 && !adapt->bSurpriseRemoved &= & !adapt->bDriverStopped); =20 - if (adapt->bSurpriseRemoved || adapt->bDriverStopped) - ; - else if (!bcn_valid) - ; - else - ; /* */ /* We just can send the reserved page twice during the time that Tx thr= ead is stopped (e.g. pnpsetpower) */ /* because we need to free the Tx BCN Desc which is used by the first r= eserved page packet. */ @@ -607,9 +596,8 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *a= dapt, u8 mstatus) } =20 /* Update RSVD page location H2C to Fw. */ - if (bcn_valid) { + if (bcn_valid) SetHwReg8188EU(adapt, HW_VAR_BCN_VALID, NULL); - } =20 /* Do not enable HW DMA BCN or it will cause Pcie interface hang by tim= ing issue. 2011.11.24. by tynli. */ /* Clear CR[8] or beacon packet will not be send to TxBuf anymore. */ diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/stag= ing/r8188eu/hal/rtl8188e_hal_init.c index f83ae7a7e5d9..cf58dfc3ff4d 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c @@ -19,9 +19,8 @@ static void iol_mode_enable(struct adapter *padapter, u8 = enable) reg_0xf0 =3D rtw_read8(padapter, REG_SYS_CFG); rtw_write8(padapter, REG_SYS_CFG, reg_0xf0 | SW_OFFLOAD_EN); =20 - if (!padapter->bFWReady) { + if (!padapter->bFWReady) rtw_reset_8051(padapter); - } =20 } else { /* disable initial offload */ @@ -76,14 +75,12 @@ efuse_phymap_to_logical(u8 *phymap, u16 _offset, u16 _s= ize_byte, u8 *pbuf) u8 u1temp =3D 0; =20 efuseTbl =3D kzalloc(EFUSE_MAP_LEN_88E, GFP_KERNEL); - if (!efuseTbl) { + if (!efuseTbl) goto exit; - } =20 eFuseWord =3D rtw_malloc2d(EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, si= zeof(u16)); - if (!eFuseWord) { + if (!eFuseWord) goto exit; - } =20 /* 0. Refresh efuse init map as all oxFF. */ for (i =3D 0; i < EFUSE_MAX_SECTION_88E; i++) @@ -213,9 +210,8 @@ static void efuse_read_phymap_from_txpktbuf( rtw_write8(adapter, REG_TXPKTBUF_DBG, 0); start =3D jiffies; while (!(reg_0x143 =3D rtw_read8(adapter, REG_TXPKTBUF_DBG)) && - (passing_time =3D rtw_get_passing_time_ms(start)) < 1000) { + (passing_time =3D rtw_get_passing_time_ms(start)) < 1000) rtw_usleep_os(100); - } =20 /* data from EEPROM needs to be in LE */ lo32 =3D cpu_to_le32(rtw_read32(adapter, REG_PKTBUF_DBG_DATA_L)); @@ -373,19 +369,16 @@ static void Hal_EfuseReadEFuse88E(struct adapter *Ada= pter, /* */ /* Do NOT excess total size of EFuse table. Added by Roger, 2008.11.10. = */ /* */ - if ((_offset + _size_byte) > EFUSE_MAP_LEN_88E) {/* total E-Fuse table i= s 512bytes */ + if ((_offset + _size_byte) > EFUSE_MAP_LEN_88E) /* total E-Fuse table is= 512bytes */ goto exit; - } =20 efuseTbl =3D kzalloc(EFUSE_MAP_LEN_88E, GFP_KERNEL); - if (!efuseTbl) { + if (!efuseTbl) goto exit; - } =20 eFuseWord =3D rtw_malloc2d(EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, si= zeof(u16)); - if (!eFuseWord) { + if (!eFuseWord) goto exit; - } =20 /* 0. Refresh efuse init map as all oxFF. */ for (i =3D 0; i < EFUSE_MAX_SECTION_88E; i++) @@ -536,11 +529,10 @@ void rtl8188e_SetHalODMVar(struct adapter *Adapter, v= oid *pValue1, bool bSet) =20 void hal_notch_filter_8188e(struct adapter *adapter, bool enable) { - if (enable) { + if (enable) rtw_write8(adapter, rOFDM0_RxDSP + 1, rtw_read8(adapter, rOFDM0_RxDSP + = 1) | BIT(1)); - } else { + else rtw_write8(adapter, rOFDM0_RxDSP + 1, rtw_read8(adapter, rOFDM0_RxDSP + = 1) & ~BIT(1)); - } } =20 u8 GetEEPROMSize8188E(struct adapter *padapter) @@ -764,15 +756,14 @@ static void hal_get_chnl_group_88e(u8 chnl, u8 *group) =20 void Hal_ReadPowerSavingMode88E(struct adapter *padapter, u8 *hwinfo, bool= AutoLoadFail) { - if (AutoLoadFail) { + if (AutoLoadFail) padapter->pwrctrlpriv.bSupportRemoteWakeup =3D false; - } else { + else /* hw power down mode selection , 0:rf-off / 1:power down */ =20 /* decide hw if support remote wakeup function */ /* if hw supported, 8051 (SIE) will generate WeakUP signal(D+/D- toggle= ) when autoresume */ padapter->pwrctrlpriv.bSupportRemoteWakeup =3D (hwinfo[EEPROM_USB_OPTION= AL_FUNCTION0] & BIT(1)) ? true : false; - } } =20 void Hal_ReadTxPowerInfo88E(struct adapter *padapter, u8 *PROMContent, boo= l AutoLoadFail) diff --git a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c b/drivers/stagin= g/r8188eu/hal/rtl8188e_phycfg.c index 5c8d43014603..ea75ff11ad17 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c @@ -684,9 +684,6 @@ static void _PHY_SwChnl8192C(struct adapter *Adapter, u= 8 channel) u32 param1, param2; struct hal_data_8188e *pHalData =3D &Adapter->haldata; =20 - if (Adapter->bNotifyChannelChange) - ; - /* s1. pre common command - CmdID_SetTxPowerLevel */ PHY_SetTxPowerLevel8188E(Adapter, channel); =20 diff --git a/drivers/staging/r8188eu/hal/rtl8188eu_recv.c b/drivers/staging= /r8188eu/hal/rtl8188eu_recv.c index 08bdf715d872..6af72b3e7a7d 100644 --- a/drivers/staging/r8188eu/hal/rtl8188eu_recv.c +++ b/drivers/staging/r8188eu/hal/rtl8188eu_recv.c @@ -106,12 +106,7 @@ void rtl8188eu_free_recv_priv(struct adapter *padapter) =20 kfree(precvpriv->pallocated_recv_buf); =20 - if (skb_queue_len(&precvpriv->rx_skb_queue)) - ; skb_queue_purge(&precvpriv->rx_skb_queue); =20 - if (skb_queue_len(&precvpriv->free_recv_skb_queue)) - ; - skb_queue_purge(&precvpriv->free_recv_skb_queue); } diff --git a/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c b/drivers/staging= /r8188eu/hal/rtl8188eu_xmit.c index db6ad97d6a2b..69b66eb458b0 100644 --- a/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c +++ b/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c @@ -264,8 +264,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe,= u8 *pmem, s32 sz, u8 bag ptxdesc->txdw5 |=3D cpu_to_le32(0x00300000);/* retry limit =3D 12 */ =20 ptxdesc->txdw5 |=3D cpu_to_le32(MRateToHwRate(pmlmeext->tx_rate)); - } else if ((pxmitframe->frame_tag & 0x0f) =3D=3D TXAGG_FRAMETAG) { - } else { + } else if ((pxmitframe->frame_tag & 0x0f) !=3D TXAGG_FRAMETAG) { /* offset 4 */ ptxdesc->txdw1 |=3D cpu_to_le32((4) & 0x3f);/* CAM_ID(MAC_ID) */ =20 @@ -569,8 +568,7 @@ static s32 xmitframe_direct(struct adapter *adapt, stru= ct xmit_frame *pxmitframe res =3D rtw_xmitframe_coalesce(adapt, pxmitframe->pkt, pxmitframe); if (res =3D=3D _SUCCESS) rtw_dump_xframe(adapt, pxmitframe); - else - ; + return res; } =20 diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8= 188eu/hal/usb_halinit.c index cc11ddac86b7..b3d6c4b0af15 100644 --- a/drivers/staging/r8188eu/hal/usb_halinit.c +++ b/drivers/staging/r8188eu/hal/usb_halinit.c @@ -57,9 +57,8 @@ u32 rtl8188eu_InitPowerOn(struct adapter *adapt) if (haldata->bMacPwrCtrlOn) return _SUCCESS; =20 - if (!HalPwrSeqCmdParsing(adapt, Rtl8188E_NIC_PWR_ON_FLOW)) { + if (!HalPwrSeqCmdParsing(adapt, Rtl8188E_NIC_PWR_ON_FLOW)) return _FAIL; - } =20 /* Enable MAC DMA/WMAC/SCHEDULE/SEC block */ /* Set CR bit10 to enable 32k calibration. Suggested by SD1 Gimmy. Added= by tynli. 2011.08.31. */ @@ -582,27 +581,23 @@ u32 rtl8188eu_hal_init(struct adapter *Adapter) haldata->LastHMEBoxNum =3D 0; =20 status =3D PHY_MACConfig8188E(Adapter); - if (status =3D=3D _FAIL) { + if (status =3D=3D _FAIL) goto exit; - } =20 /* */ /* d. Initialize BB related configurations. */ /* */ status =3D PHY_BBConfig8188E(Adapter); - if (status =3D=3D _FAIL) { + if (status =3D=3D _FAIL) goto exit; - } =20 status =3D PHY_RFConfig8188E(Adapter); - if (status =3D=3D _FAIL) { + if (status =3D=3D _FAIL) goto exit; - } =20 status =3D rtl8188e_iol_efuse_patch(Adapter); - if (status =3D=3D _FAIL) { + if (status =3D=3D _FAIL) goto exit; - } =20 _InitTxBufferBoundary(Adapter, txpktbuf_bndy); =20 @@ -1336,8 +1331,6 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 varia= ble, u8 *val) if (!(rtw_read32(Adapter, REG_RXPKT_NUM) & RXDMA_IDLE)) break; } while (trycnt--); - if (trycnt =3D=3D 0) - ; =20 /* RQPN Load 0 */ rtw_write16(Adapter, REG_RQPN_NPQ, 0x0); @@ -1431,10 +1424,7 @@ void GetHalDefVar8188EUsb(struct adapter *Adapter, e= num hal_def_variable eVariab *((u32 *)pValue) =3D haldata->odmpriv.SupportAbility; break; case HW_DEF_RA_INFO_DUMP: - { - if (check_fwstate(&Adapter->mlmepriv, _FW_LINKED)) { - } - } + check_fwstate(&Adapter->mlmepriv, _FW_LINKED); break; case HAL_DEF_DBG_DUMP_RXPKT: *((u8 *)pValue) =3D haldata->bDumpRxPkt; diff --git a/drivers/staging/r8188eu/hal/usb_ops_linux.c b/drivers/staging/= r8188eu/hal/usb_ops_linux.c index 2f3cdc356d2a..6bd2164ce1fa 100644 --- a/drivers/staging/r8188eu/hal/usb_ops_linux.c +++ b/drivers/staging/r8188eu/hal/usb_ops_linux.c @@ -209,9 +209,8 @@ static int recvbuf2recvframe(struct adapter *adapt, str= uct sk_buff *pskb) prxstat =3D (struct recv_stat *)pbuf; =20 precvframe =3D rtw_alloc_recvframe(pfree_recv_queue); - if (!precvframe) { + if (!precvframe) goto _exit_recvbuf2recvframe; - } =20 INIT_LIST_HEAD(&precvframe->list); precvframe->precvbuf =3D NULL; /* can't access the precvbuf for new arch= . */ @@ -435,9 +434,8 @@ u32 rtw_read_port(struct adapter *adapter, u8 *rmem) /* re-assign for linux based on skb */ if (!precvbuf->reuse || !precvbuf->pskb) { precvbuf->pskb =3D netdev_alloc_skb(adapter->pnetdev, MAX_RECVBUF_SZ + R= ECVBUFF_ALIGN_SZ); - if (!precvbuf->pskb) { + if (!precvbuf->pskb) return _FAIL; - } =20 tmpaddr =3D (size_t)precvbuf->pskb->data; alignment =3D tmpaddr & (RECVBUFF_ALIGN_SZ - 1); @@ -472,9 +470,8 @@ u32 rtw_read_port(struct adapter *adapter, u8 *rmem) precvbuf);/* context is precvbuf */ =20 err =3D usb_submit_urb(purb, GFP_ATOMIC); - if ((err) && (err !=3D (-EPERM))) { + if ((err) && (err !=3D (-EPERM))) ret =3D _FAIL; - } =20 return ret; } @@ -491,9 +488,8 @@ void rtl8188eu_xmit_tasklet(unsigned long priv) while (1) { if ((adapt->bDriverStopped) || (adapt->bSurpriseRemoved) || - (adapt->bWritePortCancel)) { + (adapt->bWritePortCancel)) break; - } =20 ret =3D rtl8188eu_xmitframe_complete(adapt, pxmitpriv, NULL); =20 diff --git a/drivers/staging/r8188eu/include/usb_ops.h b/drivers/staging/r8= 188eu/include/usb_ops.h index edef3ad1ccd9..14526fcff4ae 100644 --- a/drivers/staging/r8188eu/include/usb_ops.h +++ b/drivers/staging/r8188eu/include/usb_ops.h @@ -30,9 +30,9 @@ static inline int rtw_inc_and_chk_continual_urb_error(str= uct dvobj_priv *dvobj) int ret =3D false; int value; value =3D atomic_inc_return(&dvobj->continual_urb_error); - if (value > MAX_CONTINUAL_URB_ERR) { + if (value > MAX_CONTINUAL_URB_ERR) ret =3D true; - } + return ret; } =20 diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging= /r8188eu/os_dep/ioctl_linux.c index 97cce74b2b28..eb9375b0c660 100644 --- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c +++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c @@ -355,8 +355,7 @@ static int wpa_set_auth_algs(struct net_device *dev, u3= 2 value) padapter->securitypriv.ndisauthtype =3D Ndis802_11AuthModeOpen; padapter->securitypriv.dot11AuthAlgrthm =3D dot11AuthAlgrthm_Open; } - } else if (value & AUTH_ALG_LEAP) { - } else { + } else if (!(value & AUTH_ALG_LEAP)) { ret =3D -EINVAL; } return ret; @@ -521,13 +520,6 @@ static int rtw_set_wpa_ie(struct adapter *padapter, ch= ar *pie, unsigned short ie goto exit; } =20 - /* dump */ - { - int i; - for (i =3D 0; i < ielen; i +=3D 8) - ; - } - if (ielen < RSN_HEADER_LEN) { ret =3D -1; goto exit; @@ -1118,7 +1110,6 @@ static int rtw_wx_set_scan(struct net_device *dev, st= ruct iw_request_info *a, _status =3D rtw_sitesurvey_cmd(padapter, ssid, 1, NULL, 0); =20 spin_unlock_bh(&pmlmepriv->lock); - } else if (req->scan_type =3D=3D IW_SCAN_TYPE_PASSIVE) { } } else { if (wrqu->data.length >=3D WEXT_CSCAN_HEADER_SIZE && @@ -1284,9 +1275,6 @@ static int rtw_wx_set_essid(struct net_device *dev, if (wrqu->essid.flags && wrqu->essid.length) { len =3D (wrqu->essid.length < IW_ESSID_MAX_SIZE) ? wrqu->essid.length : = IW_ESSID_MAX_SIZE; =20 - if (wrqu->essid.length !=3D 33) - ; - memset(&ndis_ssid, 0, sizeof(struct ndis_802_11_ssid)); ndis_ssid.SsidLength =3D len; memcpy(ndis_ssid.Ssid, extra, len); @@ -2028,9 +2016,7 @@ static int rtw_wx_set_channel_plan(struct net_device = *dev, struct adapter *padapter =3D (struct adapter *)rtw_netdev_priv(dev); u8 channel_plan_req =3D (u8)(*((int *)wrqu)); =20 - if (_SUCCESS =3D=3D rtw_set_chplan_cmd(padapter, channel_plan_req)) - ; - else + if (rtw_set_chplan_cmd(padapter, channel_plan_req) !=3D _SUCCESS) return -EPERM; =20 return 0; @@ -2137,7 +2123,6 @@ static int rtw_set_pid(struct net_device *dev, if (selector < 3 && selector >=3D 0) { padapter->pid[selector] =3D *(pdata + 1); ui_pid[selector] =3D *(pdata + 1); - } else { } exit: return ret; @@ -2385,9 +2370,6 @@ static void rtw_p2p_get_status(struct net_device *dev, struct adapter *padapter =3D (struct adapter *)rtw_netdev_priv(dev); struct wifidirect_info *pwdinfo =3D &padapter->wdinfo; =20 - if (padapter->bShowGetP2PState) - ; - /* Commented by Albert 2010/10/12 */ /* Because of the output size limitation, I had removed the "Role" inform= ation. */ /* About the "Role" information, we will use the new private IOCTL to get= the "Role" information. */ @@ -2870,9 +2852,8 @@ static int rtw_p2p_connect(struct net_device *dev, /* Format: 00:E0:4C:00:00:05 */ /* Format: 00:E0:4C:00:00:05 */ =20 - if (pwdinfo->p2p_state =3D=3D P2P_STATE_NONE) { + if (pwdinfo->p2p_state =3D=3D P2P_STATE_NONE) return ret; - } =20 if (pwdinfo->ui_got_wps_info =3D=3D P2P_NO_WPSINFO) return -1; @@ -2945,9 +2926,8 @@ static void rtw_p2p_invite_req(struct net_device *dev, /* Command line sample: iwpriv wlan0 p2p_set invite =3D"00:11:22:33:44:55= 00:E0:4C:00:00:05 DIRECT-xy" */ /* Format: 00:11:22:33:44:55 00:E0:4C:00:00:05 DIRECT-xy */ =20 - if (wrqu->data.length <=3D 37) { + if (wrqu->data.length <=3D 37) return; - } =20 if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) { return; @@ -3020,7 +3000,6 @@ static void rtw_p2p_invite_req(struct net_device *dev, _set_timer(&pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT); =20 _set_timer(&pwdinfo->restore_p2p_state_timer, P2P_INVITE_TIMEOUT); - } else { } } =20 @@ -3088,17 +3067,16 @@ static void rtw_p2p_prov_disc(struct net_device *de= v, for (jj =3D 0, kk =3D 0; jj < ETH_ALEN; jj++, kk +=3D 3) peerMAC[jj] =3D key_2char2num(extra[kk], extra[kk + 1]); =20 - if (!memcmp(&extra[18], "display", 7)) { + if (!memcmp(&extra[18], "display", 7)) pwdinfo->tx_prov_disc_info.wps_config_method_request =3D WPS_CM_DISPLYA; - } else if (!memcmp(&extra[18], "keypad", 7)) { + else if (!memcmp(&extra[18], "keypad", 7)) pwdinfo->tx_prov_disc_info.wps_config_method_request =3D WPS_CM_KEYPAD; - } else if (!memcmp(&extra[18], "pbc", 3)) { + else if (!memcmp(&extra[18], "pbc", 3)) pwdinfo->tx_prov_disc_info.wps_config_method_request =3D WPS_CM_PUSH_BUT= TON; - } else if (!memcmp(&extra[18], "label", 5)) { + else if (!memcmp(&extra[18], "label", 5)) pwdinfo->tx_prov_disc_info.wps_config_method_request =3D WPS_CM_LABEL; - } else { + else return; - } =20 spin_lock_bh(&pmlmepriv->scanned_queue.lock); =20 @@ -3165,7 +3143,6 @@ static void rtw_p2p_prov_disc(struct net_device *dev, _set_timer(&pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT); =20 _set_timer(&pwdinfo->restore_p2p_state_timer, P2P_PROVISION_TIMEOUT); - } else { } } =20 @@ -3256,10 +3233,6 @@ static int rtw_p2p_get(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { - struct adapter *padapter =3D (struct adapter *)rtw_netdev_priv(dev); - - if (padapter->bShowGetP2PState) - ; if (!memcmp(wrqu->data.pointer, "status", 6)) { rtw_p2p_get_status(dev, info, wrqu, extra); } else if (!memcmp(wrqu->data.pointer, "role", 4)) { @@ -3425,7 +3398,6 @@ static int rtw_dbg_port(struct net_device *dev, u16 arg; s32 extra_arg; u32 *pdata, val32; - struct sta_info *psta; struct adapter *padapter =3D (struct adapter *)rtw_netdev_priv(dev); struct mlme_priv *pmlmepriv =3D &padapter->mlmepriv; struct mlme_ext_priv *pmlmeext =3D &padapter->mlmeextpriv; @@ -3545,7 +3517,6 @@ static int rtw_dbg_port(struct net_device *dev, u16 start_value =3D 0; u32 write_num =3D extra_arg; int i; - u8 final; struct xmit_frame *xmit_frame; =20 xmit_frame =3D rtw_IOL_accquire_xmit_frame(padapter); @@ -3559,11 +3530,7 @@ static int rtw_dbg_port(struct net_device *dev, if (rtl8188e_IOL_exec_cmds_sync(padapter, xmit_frame, 5000, 0) !=3D _SU= CCESS) ret =3D -EPERM; =20 - final =3D rtw_read8(padapter, reg); - if (start_value + write_num - 1 =3D=3D final) - ; - else - ; + rtw_read8(padapter, reg); } break; =20 @@ -3574,7 +3541,6 @@ static int rtw_dbg_port(struct net_device *dev, u32 write_num =3D extra_arg; =20 int i; - u16 final; struct xmit_frame *xmit_frame; =20 xmit_frame =3D rtw_IOL_accquire_xmit_frame(padapter); @@ -3588,11 +3554,7 @@ static int rtw_dbg_port(struct net_device *dev, if (rtl8188e_IOL_exec_cmds_sync(padapter, xmit_frame, 5000, 0) !=3D _SU= CCESS) ret =3D -EPERM; =20 - final =3D rtw_read16(padapter, reg); - if (start_value + write_num - 1 =3D=3D final) - ; - else - ; + rtw_read16(padapter, reg); } break; case 0x08: /* continuous write dword test */ @@ -3602,7 +3564,6 @@ static int rtw_dbg_port(struct net_device *dev, u32 write_num =3D extra_arg; =20 int i; - u32 final; struct xmit_frame *xmit_frame; =20 xmit_frame =3D rtw_IOL_accquire_xmit_frame(padapter); @@ -3616,11 +3577,7 @@ static int rtw_dbg_port(struct net_device *dev, if (rtl8188e_IOL_exec_cmds_sync(padapter, xmit_frame, 5000, 0) !=3D _SU= CCESS) ret =3D -EPERM; =20 - final =3D rtw_read32(padapter, reg); - if (start_value + write_num - 1 =3D=3D final) - ; - else - ; + rtw_read32(padapter, reg); } break; } @@ -3659,18 +3616,7 @@ static int rtw_dbg_port(struct net_device *dev, case 0x04: break; case 0x05: - psta =3D rtw_get_stainfo(pstapriv, cur_network->network.MacAddress); - if (psta) { - int i; - struct recv_reorder_ctrl *preorder_ctrl; - - for (i =3D 0; i < 16; i++) { - preorder_ctrl =3D &psta->recvreorder_ctrl[i]; - if (preorder_ctrl->enable) - ; - } - } else { - } + rtw_get_stainfo(pstapriv, cur_network->network.MacAddress); break; case 0x06: { @@ -3685,33 +3631,6 @@ static int rtw_dbg_port(struct net_device *dev, case 0x08: break; case 0x09: - { - int i, j; - struct list_head *plist, *phead; - struct recv_reorder_ctrl *preorder_ctrl; - - spin_lock_bh(&pstapriv->sta_hash_lock); - - for (i =3D 0; i < NUM_STA; i++) { - phead =3D &pstapriv->sta_hash[i]; - plist =3D phead->next; - - while (phead !=3D plist) { - psta =3D container_of(plist, struct sta_info, hash_list); - - plist =3D plist->next; - - if (extra_arg =3D=3D psta->aid) { - for (j =3D 0; j < 16; j++) { - preorder_ctrl =3D &psta->recvreorder_ctrl[j]; - if (preorder_ctrl->enable) - ; - } - } - } - } - spin_unlock_bh(&pstapriv->sta_hash_lock); - } break; case 0x0c:/* dump rx/tx packet */ if (arg =3D=3D 0) { @@ -3735,20 +3654,16 @@ static int rtw_dbg_port(struct net_device *dev, if (extra_arg =3D=3D 0 || extra_arg =3D=3D 1 || extra_arg =3D=3D 2 || - extra_arg =3D=3D 3) { + extra_arg =3D=3D 3) pregpriv->rx_stbc =3D extra_arg; - } else { - } } break; case 0x13: /* set ampdu_enable */ { struct registry_priv *pregpriv =3D &padapter->registrypriv; /* 0: disable, 0x1:enable (but wifi_spec should be 0), 0x2: force enab= le (don't care wifi_spec) */ - if (extra_arg >=3D 0 && extra_arg < 3) { + if (extra_arg >=3D 0 && extra_arg < 3) pregpriv->ampdu_enable =3D extra_arg; - } else { - } } break; case 0x14: /* get wifi_spec */ diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8= 188eu/os_dep/os_intfs.c index 9884dbc6eab5..197568422ece 100644 --- a/drivers/staging/r8188eu/os_dep/os_intfs.c +++ b/drivers/staging/r8188eu/os_dep/os_intfs.c @@ -487,17 +487,14 @@ u8 rtw_init_drv_sw(struct adapter *padapter) if (init_mlme_ext_priv(padapter) =3D=3D _FAIL) return _FAIL; =20 - if (_rtw_init_xmit_priv(&padapter->xmitpriv, padapter) =3D=3D _FAIL) { + if (_rtw_init_xmit_priv(&padapter->xmitpriv, padapter) =3D=3D _FAIL) return _FAIL; - } =20 - if (_rtw_init_recv_priv(&padapter->recvpriv, padapter) =3D=3D _FAIL) { + if (_rtw_init_recv_priv(&padapter->recvpriv, padapter) =3D=3D _FAIL) return _FAIL; - } =20 - if (_rtw_init_sta_priv(&padapter->stapriv) =3D=3D _FAIL) { + if (_rtw_init_sta_priv(&padapter->stapriv) =3D=3D _FAIL) return _FAIL; - } =20 padapter->stapriv.padapter =3D padapter; =20 diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8= 188eu/os_dep/usb_intf.c index 79d2d640ddfa..ffd727fb32e3 100644 --- a/drivers/staging/r8188eu/os_dep/usb_intf.c +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c @@ -139,14 +139,13 @@ static void usb_dvobj_deinit(struct usb_interface *us= b_intf) dvobj->NumInterfaces !=3D 3) || (dvobj->InterfaceNumber =3D=3D 1)) { if (interface_to_usbdev(usb_intf)->state !=3D - USB_STATE_NOTATTACHED) { + USB_STATE_NOTATTACHED) /* If we didn't unplug usb dongle and * remove/insert module, driver fails * on sitesurvey for the first time when * device is up . Reset usb port for sitesurvey * fail issue. */ usb_reset_device(interface_to_usbdev(usb_intf)); - } } kfree(dvobj); } @@ -204,9 +203,8 @@ static int rtw_suspend(struct usb_interface *pusb_intf,= pm_message_t message) int ret =3D 0; =20 if ((!padapter->bup) || (padapter->bDriverStopped) || - (padapter->bSurpriseRemoved)) { + (padapter->bSurpriseRemoved)) goto exit; - } =20 pwrpriv->bInSuspend =3D true; rtw_cancel_all_timer(padapter); @@ -223,9 +221,8 @@ static int rtw_suspend(struct usb_interface *pusb_intf,= pm_message_t message) rtw_disassoc_cmd(padapter, 0, false); =20 if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) && - check_fwstate(pmlmepriv, _FW_LINKED)) { + check_fwstate(pmlmepriv, _FW_LINKED)) pmlmepriv->to_roaming =3D 1; - } /* s2-2. indicate disconnect to os */ rtw_indicate_disconnect(padapter); /* s2-3. */ @@ -272,9 +269,8 @@ static int rtw_resume(struct usb_interface *pusb_intf) =20 mutex_unlock(&pwrpriv->lock); =20 - if (padapter->pid[1] !=3D 0) { + if (padapter->pid[1] !=3D 0) rtw_signal_process(padapter->pid[1], SIGUSR2); - } =20 rtw_roaming(padapter, NULL); =20 @@ -355,13 +351,11 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_= priv *dvobj, =20 /* 2012-07-11 Move here to prevent the 8723AS-VAU BT auto * suspend influence */ - if (usb_autopm_get_interface(pusb_intf) < 0) - ; + usb_autopm_get_interface(pusb_intf); =20 /* alloc dev name after read efuse. */ - if (rtw_init_netdev_name(pnetdev, padapter->registrypriv.ifname) < 0) { + if (rtw_init_netdev_name(pnetdev, padapter->registrypriv.ifname) < 0) goto free_drv_sw; - } rtw_macaddr_cfg(padapter->eeprompriv.mac_addr); rtw_init_wifidirect_addrs(padapter, padapter->eeprompriv.mac_addr, padapter->eeprompriv.mac_addr); @@ -421,13 +415,11 @@ static int rtw_drv_init(struct usb_interface *pusb_in= tf, const struct usb_device goto err; =20 if1 =3D rtw_usb_if1_init(dvobj, pusb_intf); - if (!if1) { + if (!if1) goto free_dvobj; - } =20 - if (ui_pid[1] !=3D 0) { + if (ui_pid[1] !=3D 0) rtw_signal_process(ui_pid[1], SIGUSR2); - } =20 return 0; =20 diff --git a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c b/drivers/stagi= ng/r8188eu/os_dep/usb_ops_linux.c index 82e680abcd61..c4b6dbc8d66d 100644 --- a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c @@ -62,9 +62,8 @@ static void usb_write_port_complete(struct urb *purb, str= uct pt_regs *regs) } =20 if (padapter->bSurpriseRemoved || padapter->bDriverStopped || - padapter->bWritePortCancel) { + padapter->bWritePortCancel) goto check_completion; - } =20 if (purb->status) { if (purb->status =3D=3D -EINPROGRESS) { diff --git a/drivers/staging/r8188eu/os_dep/xmit_linux.c b/drivers/staging/= r8188eu/os_dep/xmit_linux.c index 6032831364c4..717b980a8c72 100644 --- a/drivers/staging/r8188eu/os_dep/xmit_linux.c +++ b/drivers/staging/r8188eu/os_dep/xmit_linux.c @@ -78,9 +78,8 @@ int rtw_os_xmit_resource_alloc(struct adapter *padapter, = struct xmit_buf *pxmitb =20 for (i =3D 0; i < 8; i++) { pxmitbuf->pxmit_urb[i] =3D usb_alloc_urb(0, GFP_KERNEL); - if (!pxmitbuf->pxmit_urb[i]) { + if (!pxmitbuf->pxmit_urb[i]) return _FAIL; - } } return _SUCCESS; } --=20 2.34.1 From nobody Sun Jun 28 02:50:42 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 496EDC433F5 for ; Wed, 16 Feb 2022 01:08:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245373AbiBPBIV (ORCPT ); Tue, 15 Feb 2022 20:08:21 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:53730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245291AbiBPBHf (ORCPT ); Tue, 15 Feb 2022 20:07:35 -0500 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF1F7F5408 for ; Tue, 15 Feb 2022 17:07:23 -0800 (PST) Received: by mail-wm1-x32f.google.com with SMTP id k127-20020a1ca185000000b0037bc4be8713so2631299wme.3 for ; Tue, 15 Feb 2022 17:07:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philpotter-co-uk.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zZR7xiffqxgtLzMmjkgsmKhlDEmRIJt6j/5rXXfqzqc=; b=MzQU6pKbdYjhGMR5xX9JhVNIBD8aTFsewyGNpdcZluPVvFsy10wGYkX65jPCc9SM8r 0dWyBSjCPFxNOEP0TDZIT5MYr+6y7XpJsYiSWZT1Nvd+tKxl8wy8H5HGjuXOHRzuq3lH XLAfvrvhqey2GfFz2LAP+UGgKvI3q4cqZjaFqEZdQSC+XKGEi1b5W1xhTNEhb6jx9mni jaSGfx7srSIFgDMVPQS44/KsBK7+4UtLCMy3AD5ORfKjzpeFFZAbrULghtfgkPWiOe6A JWTHafIednFjk+ZQ5hdeFnJTTL6v6joGTeYKazbaVPDQ4r8JnaBjdRAzZ5qHKc/Jqqcd pPAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zZR7xiffqxgtLzMmjkgsmKhlDEmRIJt6j/5rXXfqzqc=; b=q2rdSsURq9zeH9bSWdkYI6ct8avJLpPuzo4wdagVcNoLel3qqyu23t03OW/4+ZF6Gc IQHdFohGSSEEx8qTHKMjGK2Vc90xBbtU1W6Wyd/WfNEYjeNXKpE0Ji/C6eHWP9e5y9EL fRaaFfcIaIcGnLVQeF6FzTIiSDOwJRk4KN48JJsDhMElPy2JPLKFOU9HWwMLrv2sLQ2E utfTkzDDUNCyDMLXOCsqotudFEyHxLcWElgAROggo4JPUmE6Xam6HVENXEtV/v/erRLU QdKrshnxv5FzAMD0XRWOwhy/j76Km585cIPUzmjJo3fG/m8EUJAPp1K2I8do4CpVz2Vx +3JA== X-Gm-Message-State: AOAM530icLkNn0ZMEn+rql9vFURyL+o9S+5JlgNJwoVWwRAZIfTi7EJO dFWc6Lv0ArepsJeBDPhwyKBPCa3GTHAPQ6Is X-Google-Smtp-Source: ABdhPJxmCJIH9VYS3CAtmMfl4vXT3uX8buc5qpeZc6N11Y3rMnhu8g4CtvaQDpMEZEdnz9JJXbgYAw== X-Received: by 2002:a05:600c:4e8a:b0:37d:1bcf:de22 with SMTP id f10-20020a05600c4e8a00b0037d1bcfde22mr4978082wmq.195.1644973642551; Tue, 15 Feb 2022 17:07:22 -0800 (PST) Received: from localhost.localdomain (3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.1.f.d.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:df16::3]) by smtp.gmail.com with ESMTPSA id m8sm10551185wms.4.2022.02.15.17.07.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 17:07:22 -0800 (PST) From: Phillip Potter To: gregkh@linuxfoundation.org Cc: dan.carpenter@oracle.com, Larry.Finger@lwfinger.net, straube.linux@gmail.com, martin@kaiser.cx, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, paskripkin@gmail.com Subject: [PATCH v2 13/15] staging: r8188eu: remove rtw_sctx_chk_waring_status function Date: Wed, 16 Feb 2022 01:07:07 +0000 Message-Id: <20220216010709.791-14-phil@philpotter.co.uk> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220216010709.791-1-phil@philpotter.co.uk> References: <20220216010709.791-1-phil@philpotter.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove the rtw_sctx_chk_waring_status function from core/rtw_amit.c, as it has only one caller which is unnecessary. Suggested-by: Dan Carpenter Signed-off-by: Phillip Potter --- drivers/staging/r8188eu/core/rtw_xmit.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r818= 8eu/core/rtw_xmit.c index 0b87ce342bfb..c2a550e7250e 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -2125,25 +2125,9 @@ int rtw_sctx_wait(struct submit_ctx *sctx) return ret; } =20 -static bool rtw_sctx_chk_waring_status(int status) -{ - switch (status) { - case RTW_SCTX_DONE_UNKNOWN: - case RTW_SCTX_DONE_BUF_ALLOC: - case RTW_SCTX_DONE_BUF_FREE: - - case RTW_SCTX_DONE_DRV_STOP: - case RTW_SCTX_DONE_DEV_REMOVE: - return true; - default: - return false; - } -} - void rtw_sctx_done_err(struct submit_ctx **sctx, int status) { if (*sctx) { - rtw_sctx_chk_waring_status(status); (*sctx)->status =3D status; complete(&((*sctx)->done)); *sctx =3D NULL; --=20 2.34.1 From nobody Sun Jun 28 02:50:42 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C53FEC433F5 for ; Wed, 16 Feb 2022 01:08:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245420AbiBPBIY (ORCPT ); Tue, 15 Feb 2022 20:08:24 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:53802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245280AbiBPBHg (ORCPT ); Tue, 15 Feb 2022 20:07:36 -0500 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B73A1F540B for ; Tue, 15 Feb 2022 17:07:24 -0800 (PST) Received: by mail-wr1-x431.google.com with SMTP id i14so807488wrc.10 for ; Tue, 15 Feb 2022 17:07:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philpotter-co-uk.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=G1Q9KHfCC/OhWO4R3f8f7EViIH7aioyjrinMYnTE/2s=; b=OA8gW7q0Y5pG0pfTqJHJ53P5oP0r/70Jtl+5C7oIxwS1g9tvwMzrr3K+pe6Cq2wQ1U Zhzy+jyRnuFZmR5TkMeVWwtabDlcsTKo3NYkcCseAnTTMWu/9KyvcaiEJV43baTMGnnY USaS+khrDCDZyWx3UixIMO5uVn0V5/4C1HZRrbdlJ9//d48xROEC5sv/wyLUrEk5GSbx teAZEqHLjRT1Y2c+8p8p2z+KwwewS4yI1ACVbAtegQFE2p5JhdHCgidpg8K0i1AIanTb OM4Aiyu53c0RQtWf+Sw6M/eVMCt9ToFcB4ZJmC9dGGUgkVcp2HZsUob14etGXIINEvqB m1jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=G1Q9KHfCC/OhWO4R3f8f7EViIH7aioyjrinMYnTE/2s=; b=kEx7Fv9uv21gGbr+oZWiKNo9oTEKM20IIIxf1OjhK5baE9VDMNLDtnlhckML2T/27R jv8QxB72JWEOAEjQeeQ7oT5mNNjkq3MMNyEvkM9Sht1z4DsYCKQAGbyeI5OVc5FU3+9V ++0y9yM5y+tycIreF4WHZSC8QIRXRsW3C7KLpcRbOqeoWtXasBCQ1sbZk3XOhPuHHTuv K5yBMOaEfmHdflAm5J2JCR+7MWQUs1YxoAx0fgjYTISKupg6E9ucQg9I7w/9oeyUSuIU PRdmBYdsqwi2J9rqEEF4D6RcdEsxZ3PcKqt6jh9pdOfkrLJ9R8NJE9iMTLgx3zfAa4fZ o6dg== X-Gm-Message-State: AOAM531WWSG98kwSMygMuxpRgBJazQJ+L0LZZ02Azz36sB/R8favFsE6 QRMqpCZ4X6Gd40eUnC7kOxDmig== X-Google-Smtp-Source: ABdhPJyq9vxGVpr5c1MSes2nprSlGrtG5tJFX/Is6UdgrIgki5Bv6Ix3A+V8zW6hT6fzWdUMI1nJgA== X-Received: by 2002:a5d:5705:0:b0:1e3:e023:36fc with SMTP id a5-20020a5d5705000000b001e3e02336fcmr336803wrv.613.1644973643305; Tue, 15 Feb 2022 17:07:23 -0800 (PST) Received: from localhost.localdomain (3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.1.f.d.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:df16::3]) by smtp.gmail.com with ESMTPSA id m8sm10551185wms.4.2022.02.15.17.07.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 17:07:22 -0800 (PST) From: Phillip Potter To: gregkh@linuxfoundation.org Cc: dan.carpenter@oracle.com, Larry.Finger@lwfinger.net, straube.linux@gmail.com, martin@kaiser.cx, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, paskripkin@gmail.com Subject: [PATCH v2 14/15] staging: r8188eu: remove padapter param from aes_decipher function Date: Wed, 16 Feb 2022 01:07:08 +0000 Message-Id: <20220216010709.791-15-phil@philpotter.co.uk> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220216010709.791-1-phil@philpotter.co.uk> References: <20220216010709.791-1-phil@philpotter.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove padapter parameter from aes_decipher function in core/rtw_security.c, as I added it previously during debugging tweaks and it is no longer required. Signed-off-by: Phillip Potter --- drivers/staging/r8188eu/core/rtw_security.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_security.c b/drivers/staging/= r8188eu/core/rtw_security.c index 7861dfa235c0..b73aea8a7fb5 100644 --- a/drivers/staging/r8188eu/core/rtw_security.c +++ b/drivers/staging/r8188eu/core/rtw_security.c @@ -1144,7 +1144,7 @@ u32 rtw_aes_encrypt(struct adapter *padapter, struct = xmit_frame *pxmitframe) return res; } =20 -static int aes_decipher(struct adapter *padapter, u8 *key, uint hdrlen, +static int aes_decipher(u8 *key, uint hdrlen, u8 *pframe, uint plen) { static u8 message[MAX_MSG_SIZE]; @@ -1365,7 +1365,7 @@ u32 rtw_aes_decrypt(struct adapter *padapter, struct = recv_frame *precvframe) prwskey =3D &stainfo->dot118021x_UncstKey.skey[0]; } length =3D precvframe->len - prxattrib->hdrlen - prxattrib->iv_len; - res =3D aes_decipher(padapter, prwskey, prxattrib->hdrlen, pframe, leng= th); + res =3D aes_decipher(prwskey, prxattrib->hdrlen, pframe, length); } else { res =3D _FAIL; } --=20 2.34.1 From nobody Sun Jun 28 02:50:42 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4494C433F5 for ; Wed, 16 Feb 2022 01:08:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245440AbiBPBIf (ORCPT ); Tue, 15 Feb 2022 20:08:35 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:53872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245293AbiBPBHg (ORCPT ); Tue, 15 Feb 2022 20:07:36 -0500 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A207CF5410 for ; Tue, 15 Feb 2022 17:07:25 -0800 (PST) Received: by mail-wr1-x435.google.com with SMTP id i14so807539wrc.10 for ; Tue, 15 Feb 2022 17:07:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philpotter-co-uk.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=K5XUg70gZkpOGWFRM7BsYfw7k+GheIQvpvliR21ybWI=; b=7n44dCmWW5IqB/PHOcYQFsqos7BWejhVCuPLcSY0MJ4uPUdDsIUHUCQ8AeqC5cJZUf In+LKbE5RM1xhCZUqkrykRHRBNUbc9Tf8nNM3qFh2xlMWSvNyjOAgSZbZIXEZEuSh3hA x9l+mLZG0q/y0VRVgFqiAoxRAqjMDzrtATPd1aqOb5WPZxzocGnF339JoOOhemvMZvMr SHzxYY2FzpLfn2HVBpdUQLoOxviA4uoX6USzjkdxBHS/I1AFFFpQwTCVRREKAgMVOhnm Mi80yZsHeLcAaGK4TzNoMUw8SSNplzNEkVOFqaMzwhsvSP+DDs9+UqGsCPi7CzkpW0YK 1ffg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=K5XUg70gZkpOGWFRM7BsYfw7k+GheIQvpvliR21ybWI=; b=ACgDlWX6HmKWY7ar8KRYs6lefmAe5qDu140+F1a/hfLIe4+T+me+doO9p2kKnxlMGL OjT7iC74cGJuOxaUUNx8X7WcXCv7LBRgXTmgjJDJ+hk+dajOw7OXaY5BVamQNRRpvzsD W/7/+yVIr3vRRLPbpX1xmXFirAjMCh41Wk7Pi9U8t2BgUxUMOMXFCknV2Hu7axbJ85qI HYXExqfe2jRmNq4OGAeWCDIyYGT4epwjHbt2SZRUaMT2qVLz6fs9+4WIlP7clQ4CDdUi 8CGbKhTupB3PkQ4hI6c+l8AnmLE6EZhAbHJFKP0lSFqw3or2HsrMvFtJCtcy/uUKzPhC xmgA== X-Gm-Message-State: AOAM532h3eQK5G5Eb41GvSUcAx5x0GBkdGHL+9+ga2+yz081hOxVcKqf KYYfBbXnap8zHr7MMNwwh3kiww== X-Google-Smtp-Source: ABdhPJwiJo7m8gPqzERIDDALzJeTtjox7rMaUYQSzk6N3FeygfM04lQWQe1/zBzxKRzcsVSRADNyrg== X-Received: by 2002:a5d:64e3:0:b0:1e4:a380:bb6f with SMTP id g3-20020a5d64e3000000b001e4a380bb6fmr353729wri.463.1644973644149; Tue, 15 Feb 2022 17:07:24 -0800 (PST) Received: from localhost.localdomain (3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.1.f.d.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:df16::3]) by smtp.gmail.com with ESMTPSA id m8sm10551185wms.4.2022.02.15.17.07.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 17:07:23 -0800 (PST) From: Phillip Potter To: gregkh@linuxfoundation.org Cc: dan.carpenter@oracle.com, Larry.Finger@lwfinger.net, straube.linux@gmail.com, martin@kaiser.cx, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, paskripkin@gmail.com Subject: [PATCH v2 15/15] staging: r8188eu: correct long line warnings near prior DBG_88E calls Date: Wed, 16 Feb 2022 01:07:09 +0000 Message-Id: <20220216010709.791-16-phil@philpotter.co.uk> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220216010709.791-1-phil@philpotter.co.uk> References: <20220216010709.791-1-phil@philpotter.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Where it is possible (without out-of-patch-series-scope large scale refactoring), correct code to remove checkpatch warnings about lines that are too long, also correcting operator spacing where appropriate for these lines as well. These warnings occur mostly due to so many DBG_88E removals and parentheses tweaks etc. being adjacent to such long lines, which are therefore included in the resultant diff. Signed-off-by: Phillip Potter --- drivers/staging/r8188eu/core/rtw_br_ext.c | 12 +++++++++--- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 ++- drivers/staging/r8188eu/core/rtw_p2p.c | 15 ++++++++++++--- drivers/staging/r8188eu/core/rtw_pwrctrl.c | 3 ++- drivers/staging/r8188eu/core/rtw_wlan_util.c | 6 ++++-- 5 files changed, 29 insertions(+), 10 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_br_ext.c b/drivers/staging/r8= 188eu/core/rtw_br_ext.c index ddc3a2c8aaca..d68611ef22f8 100644 --- a/drivers/staging/r8188eu/core/rtw_br_ext.c +++ b/drivers/staging/r8188eu/core/rtw_br_ext.c @@ -382,7 +382,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buf= f *skb, int method) if (protocol =3D=3D ETH_P_IP) { struct iphdr *iph =3D (struct iphdr *)(skb->data + ETH_HLEN); =20 - if (((unsigned char *)(iph) + (iph->ihl<<2)) >=3D (skb->data + ETH_HLEN = + skb->len)) + if (((unsigned char *)(iph) + (iph->ihl << 2)) >=3D (skb->data + ETH_HLE= N + skb->len)) return -1; =20 switch (method) { @@ -451,7 +451,11 @@ int nat25_db_handle(struct adapter *priv, struct sk_bu= ff *skb, int method) pOldTag =3D (struct pppoe_tag *)__nat25_find_pppoe_tag(ph, ntohs(PTT= _RELAY_SID)); if (pOldTag) { /* if SID existed, copy old value and delete it */ old_tag_len =3D ntohs(pOldTag->tag_len); - if (old_tag_len+TAG_HDR_LEN+MAGIC_CODE_LEN+RTL_RELAY_TAG_LEN > size= of(tag_buf)) + if (old_tag_len + + TAG_HDR_LEN + + MAGIC_CODE_LEN + + RTL_RELAY_TAG_LEN > + sizeof(tag_buf)) return -1; =20 memcpy(tag->tag_data+MAGIC_CODE_LEN+RTL_RELAY_TAG_LEN, @@ -476,7 +480,9 @@ int nat25_db_handle(struct adapter *priv, struct sk_buf= f *skb, int method) return -1; } else { /* not add relay tag */ if (priv->pppoe_connection_in_progress && - memcmp(skb->data+ETH_ALEN, priv->pppoe_addr, ETH_ALEN)) + memcmp(skb->data + ETH_ALEN, + priv->pppoe_addr, + ETH_ALEN)) return -2; =20 if (priv->pppoe_connection_in_progress =3D=3D 0) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/= r8188eu/core/rtw_mlme_ext.c index 2b6dbabe47c8..0d9351903ae5 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -3583,7 +3583,8 @@ static s32 rtw_action_public_decache(struct recv_fram= e *recv_frame, s32 token) =20 if (GetRetry(frame)) { if (token >=3D 0) { - if ((seq_ctrl =3D=3D mlmeext->action_public_rxseq) && (token =3D=3D mlm= eext->action_public_dialog_token)) + if ((seq_ctrl =3D=3D mlmeext->action_public_rxseq) && + (token =3D=3D mlmeext->action_public_dialog_token)) return _FAIL; } else { if (seq_ctrl =3D=3D mlmeext->action_public_rxseq) diff --git a/drivers/staging/r8188eu/core/rtw_p2p.c b/drivers/staging/r8188= eu/core/rtw_p2p.c index 9467a5dcc990..48500fb82250 100644 --- a/drivers/staging/r8188eu/core/rtw_p2p.c +++ b/drivers/staging/r8188eu/core/rtw_p2p.c @@ -1154,7 +1154,8 @@ u8 process_p2p_group_negotation_req(struct wifidirect= _info *pwdinfo, u8 *pframe, peer_operating_ch =3D operatingch_info[4]; =20 if (rtw_p2p_is_channel_list_ok(peer_operating_ch, - ch_list_inclusioned, ch_num_inclusioned)) + ch_list_inclusioned, + ch_num_inclusioned)) /** * Change our operating channel as peer's for compatibility. */ @@ -1270,7 +1271,11 @@ u8 process_p2p_group_negotation_resp(struct wifidire= ct_info *pwdinfo, u8 *pframe /* Try to get the operation channel information */ =20 attr_contentlen =3D 0; - if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, = operatingch_info, &attr_contentlen)) + if (rtw_get_p2p_attr_content(p2p_ie, + p2p_ielen, + P2P_ATTR_OPERATING_CH, + operatingch_info, + &attr_contentlen)) pwdinfo->peer_operating_ch =3D operatingch_info[4]; =20 /* Try to get the channel list information */ @@ -1377,7 +1382,11 @@ u8 process_p2p_group_negotation_confirm(struct wifid= irect_info *pwdinfo, u8 *pfr } =20 attr_contentlen =3D 0; - if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, o= peratingch_info, &attr_contentlen)) + if (rtw_get_p2p_attr_content(p2p_ie, + p2p_ielen, + P2P_ATTR_OPERATING_CH, + operatingch_info, + &attr_contentlen)) pwdinfo->peer_operating_ch =3D operatingch_info[4]; =20 /* Get the next P2P IE */ diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r= 8188eu/core/rtw_pwrctrl.c index c7c79cd9e213..b20436f75459 100644 --- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c +++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c @@ -171,7 +171,8 @@ static u8 PS_RDY_CHECK(struct adapter *padapter) return false; if (pwrpriv->bInSuspend) return false; - if (padapter->securitypriv.dot11AuthAlgrthm =3D=3D dot11AuthAlgrthm_8021X= && !padapter->securitypriv.binstallGrpkey) + if (padapter->securitypriv.dot11AuthAlgrthm =3D=3D dot11AuthAlgrthm_8021X= && + !padapter->securitypriv.binstallGrpkey) return false; return true; } diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging= /r8188eu/core/rtw_wlan_util.c index e8bf5672ff6c..33c0228204ad 100644 --- a/drivers/staging/r8188eu/core/rtw_wlan_util.c +++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c @@ -926,7 +926,8 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pf= rame, u32 packet_len) =20 if (memcmp(bssid->Ssid.Ssid, cur_network->network.Ssid.Ssid, 32) || bssid->Ssid.SsidLength !=3D cur_network->network.Ssid.SsidLength) { - if (bssid->Ssid.Ssid[0] !=3D '\0' && bssid->Ssid.SsidLength !=3D 0) /* n= ot hidden ssid */ + /* not hidden ssid */ + if (bssid->Ssid.Ssid[0] !=3D '\0' && bssid->Ssid.SsidLength !=3D 0) goto _mismatch; } =20 @@ -966,7 +967,8 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pf= rame, u32 packet_len) rtw_parse_wpa2_ie(pbuf, wpa_ielen + 2, &group_cipher, &pairwise_cipher= , &is_8021x); } =20 - if (pairwise_cipher !=3D cur_network->BcnInfo.pairwise_cipher || group_c= ipher !=3D cur_network->BcnInfo.group_cipher) + if (pairwise_cipher !=3D cur_network->BcnInfo.pairwise_cipher || + group_cipher !=3D cur_network->BcnInfo.group_cipher) goto _mismatch; =20 if (is_8021x !=3D cur_network->BcnInfo.is_8021x) --=20 2.34.1