linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Phillip Potter <phil@philpotter.co.uk>
To: gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, dan.carpenter@oracle.com,
	linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev
Subject: [PATCH 04/28] staging: rtl8188eu: remove all DBG_88E calls from core/rtw_wlan_util.c
Date: Tue, 15 Jun 2021 01:14:43 +0100	[thread overview]
Message-ID: <20210615001507.1171-5-phil@philpotter.co.uk> (raw)
In-Reply-To: <20210615001507.1171-1-phil@philpotter.co.uk>

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

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
---
 .../staging/rtl8188eu/core/rtw_wlan_util.c    | 80 ++++---------------
 1 file changed, 16 insertions(+), 64 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
index c9043f49ec9e..e3c8bdc9cbc1 100644
--- a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
@@ -521,8 +521,6 @@ void WMMOnAssocRsp(struct adapter *padapter)
 			edca[XMIT_VO_QUEUE] = acParm;
 			break;
 		}
-
-		DBG_88E("WMM(%x): %x, %x\n", ACI, ACM, acParm);
 	}
 
 	if (padapter->registrypriv.acm_method == 1)
@@ -556,10 +554,8 @@ void WMMOnAssocRsp(struct adapter *padapter)
 		}
 	}
 
-	for (i = 0; i < 4; i++) {
+	for (i = 0; i < 4; i++)
 		pxmitpriv->wmm_para_seq[i] = inx[i];
-		DBG_88E("wmm_para_seq(%d): %d\n", i, pxmitpriv->wmm_para_seq[i]);
-	}
 }
 
 static void bwmode_update_check(struct adapter *padapter, struct ndis_802_11_var_ie *pIE)
@@ -708,8 +704,6 @@ void HTOnAssocRsp(struct adapter *padapter)
 	struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
 	struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
 
-	DBG_88E("%s\n", __func__);
-
 	if ((pmlmeinfo->HT_info_enable) && (pmlmeinfo->HT_caps_enable)) {
 		pmlmeinfo->HT_enable = 1;
 	} else {
@@ -803,16 +797,11 @@ int rtw_check_bcn_info(struct adapter  *Adapter, u8 *pframe, u32 packet_len)
 
 	len = packet_len - sizeof(struct ieee80211_hdr_3addr);
 
-	if (len > MAX_IE_SZ) {
-		DBG_88E("%s IE too long for survey event\n", __func__);
+	if (len > MAX_IE_SZ)
 		return _FAIL;
-	}
 
-	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));
+	if (memcmp(cur_network->network.MacAddress, pbssid, 6))
 		return true;
-	}
 
 	bssid = kzalloc(sizeof(struct wlan_bssid_ex), GFP_ATOMIC);
 	if (!bssid)
@@ -850,11 +839,6 @@ int rtw_check_bcn_info(struct adapter  *Adapter, u8 *pframe, u32 packet_len)
 	}
 	if (ht_cap_info != cur_network->BcnInfo.ht_cap_info ||
 	    ((ht_info_infos_0 & 0x03) != (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 = ht_cap_info;
 		cur_network->BcnInfo.ht_info_infos_0 = ht_info_infos_0;
@@ -868,18 +852,13 @@ int rtw_check_bcn_info(struct adapter  *Adapter, u8 *pframe, u32 packet_len)
 		bcn_channel = *(p + 2);
 	} else {/* In 5G, some ap do not have DSSET IE checking HT info for channel */
 		p = rtw_get_ie(bssid->ies + _FIXED_IE_LENGTH_, WLAN_EID_HT_OPERATION, &len, bssid->ie_length - _FIXED_IE_LENGTH_);
-		if (pht_info) {
+		if (pht_info)
 			bcn_channel = 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", __func__);
+		else /* we don't find channel IE, so don't check it */
 			bcn_channel = Adapter->mlmeextpriv.cur_channel;
-		}
 	}
-	if (bcn_channel != Adapter->mlmeextpriv.cur_channel) {
-		DBG_88E("%s beacon channel:%d cur channel:%d disconnect\n", __func__,
-			bcn_channel, Adapter->mlmeextpriv.cur_channel);
+	if (bcn_channel != Adapter->mlmeextpriv.cur_channel)
 		goto _mismatch;
-	}
 
 	/* checking SSID */
 	ssid_len = 0;
@@ -899,10 +878,8 @@ int rtw_check_bcn_info(struct adapter  *Adapter, u8 *pframe, u32 packet_len)
 
 	if (memcmp(bssid->ssid.ssid, cur_network->network.ssid.ssid, 32) ||
 	    bssid->ssid.ssid_length != cur_network->network.ssid.ssid_length) {
-		if (bssid->ssid.ssid[0] != '\0' && bssid->ssid.ssid_length != 0) { /* not hidden ssid */
-			DBG_88E("%s(), SSID is not match return FAIL\n", __func__);
+		if (bssid->ssid.ssid[0] != '\0' && bssid->ssid.ssid_length != 0) /* not hidden ssid */
 			goto _mismatch;
-		}
 	}
 
 	/* check encryption info */
@@ -916,10 +893,8 @@ int rtw_check_bcn_info(struct adapter  *Adapter, u8 *pframe, u32 packet_len)
 	RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
 		 ("%s(): cur_network->network.Privacy is %d, bssid.Privacy is %d\n",
 		 __func__, cur_network->network.Privacy, bssid->Privacy));
-	if (cur_network->network.Privacy != bssid->Privacy) {
-		DBG_88E("%s(), privacy is not match return FAIL\n", __func__);
+	if (cur_network->network.Privacy != bssid->Privacy)
 		goto _mismatch;
-	}
 
 	rtw_get_sec_ie(bssid->ies, bssid->ie_length, NULL, &rsn_len, NULL, &wpa_len);
 
@@ -932,10 +907,8 @@ int rtw_check_bcn_info(struct adapter  *Adapter, u8 *pframe, u32 packet_len)
 			encryp_protocol = ENCRYP_PROTOCOL_WEP;
 	}
 
-	if (cur_network->BcnInfo.encryp_protocol != encryp_protocol) {
-		DBG_88E("%s(): encryption protocol is not match , return FAIL\n", __func__);
+	if (cur_network->BcnInfo.encryp_protocol != encryp_protocol)
 		goto _mismatch;
-	}
 
 	if (encryp_protocol == ENCRYP_PROTOCOL_WPA || encryp_protocol == ENCRYP_PROTOCOL_WPA2) {
 		pbuf = rtw_get_wpa_ie(&bssid->ies[12], &wpa_ielen,
@@ -961,17 +934,11 @@ int rtw_check_bcn_info(struct adapter  *Adapter, u8 *pframe, u32 packet_len)
 
 		RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
 			 ("%s cur_network->group_cipher is %d: %d\n", __func__, cur_network->BcnInfo.group_cipher, group_cipher));
-		if (pairwise_cipher != cur_network->BcnInfo.pairwise_cipher || group_cipher != 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);
+		if (pairwise_cipher != cur_network->BcnInfo.pairwise_cipher || group_cipher != cur_network->BcnInfo.group_cipher)
 			goto _mismatch;
-		}
 
-		if (is_8021x != cur_network->BcnInfo.is_8021x) {
-			DBG_88E("%s authentication is not match , return FAIL\n", __func__);
+		if (is_8021x != cur_network->BcnInfo.is_8021x)
 			goto _mismatch;
-		}
 	}
 
 	kfree(bssid);
@@ -1192,38 +1159,27 @@ unsigned char check_assoc_AP(u8 *pframe, uint len)
 		case WLAN_EID_VENDOR_SPECIFIC:
 			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) {
+				if (!ralink_vendor_flag)
 					ralink_vendor_flag = 1;
-				} else {
-					DBG_88E("link to Ralink AP\n");
+				else
 					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 = 1;
-				if (ralink_vendor_flag) {
-					DBG_88E("link to Tenda W311R AP\n");
+				if (ralink_vendor_flag)
 					return HT_IOT_PEER_TENDA;
-				}
-				DBG_88E("Capture EPIGRAM_OUI\n");
 			} else {
 				break;
 			}
@@ -1235,14 +1191,10 @@ unsigned char check_assoc_AP(u8 *pframe, uint len)
 		i += (pIE->Length + 2);
 	}
 
-	if (ralink_vendor_flag && !epigram_vendor_flag) {
-		DBG_88E("link to Ralink AP\n");
+	if (ralink_vendor_flag && !epigram_vendor_flag)
 		return HT_IOT_PEER_RALINK;
-	} else if (ralink_vendor_flag && epigram_vendor_flag) {
-		DBG_88E("link to Tenda W311R AP\n");
+	else if (ralink_vendor_flag && epigram_vendor_flag)
 		return HT_IOT_PEER_TENDA;
-	}
-	DBG_88E("link to new AP\n");
 	return HT_IOT_PEER_UNKNOWN;
 }
 
-- 
2.30.2


  parent reply	other threads:[~2021-06-15  0:15 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-15  0:14 [PATCH 00/28] staging: rtl8188eu: remove DBG_88E callers and macro Phillip Potter
2021-06-15  0:14 ` [PATCH 01/28] staging: rtl8188eu: remove all DBG_88E calls from core/rtw_efuse.c Phillip Potter
2021-06-15  0:14 ` [PATCH 02/28] staging: rtl8188eu: remove all DBG_88E calls from core/rtw_xmit.c Phillip Potter
2021-06-15  0:14 ` [PATCH 03/28] staging: rtl8188eu: remove all DBG_88E calls from core/rtw_mlme_ext.c Phillip Potter
2021-06-15 10:32   ` Dan Carpenter
2021-06-15 21:15     ` Phillip Potter
2021-06-15  0:14 ` Phillip Potter [this message]
2021-06-15  0:14 ` [PATCH 05/28] staging: rtl8188eu: remove all DBG_88E calls from core/rtw_ap.c Phillip Potter
2021-06-15  0:14 ` [PATCH 06/28] staging: rtl8188eu: remove all DBG_88E calls from core/rtw_pwrctrl.c Phillip Potter
2021-06-15  0:14 ` [PATCH 07/28] staging: rtl8188eu: remove all DBG_88E calls from core/rtw_ieee80211.c Phillip Potter
2021-06-15  0:14 ` [PATCH 08/28] staging: rtl8188eu: remove all DBG_88E calls from core/rtw_security.c Phillip Potter
2021-06-15  0:14 ` [PATCH 09/28] staging: rtl8188eu: remove all DBG_88E calls from core/rtw_ioctl_set.c Phillip Potter
2021-06-15  0:14 ` [PATCH 10/28] staging: rtl8188eu: remove all DBG_88E calls from core/rtw_mlme.c Phillip Potter
2021-06-15  0:14 ` [PATCH 11/28] staging: rtl8188eu: remove all DBG_88E calls from os_dep/ioctl_linux.c Phillip Potter
2021-06-15  0:14 ` [PATCH 12/28] staging: rtl8188eu: remove all DBG_88E calls from os_dep/usb_intf.c Phillip Potter
2021-06-15  0:14 ` [PATCH 13/28] staging: rtl8188eu: remove all DBG_88E calls from os_dep/os_intfs.c Phillip Potter
2021-06-15  0:14 ` [PATCH 14/28] staging: rtl8188eu: remove all DBG_88E calls from os_dep/mlme_linux.c Phillip Potter
2021-06-15  0:14 ` [PATCH 15/28] staging: rtl8188eu: remove all DBG_88E calls from os_dep/xmit_linux.c Phillip Potter
2021-06-15  0:14 ` [PATCH 16/28] staging: rtl8188eu: remove all DBG_88E calls from os_dep/rtw_android.c Phillip Potter
2021-06-15  0:14 ` [PATCH 17/28] staging: rtl8188eu: remove all DBG_88E calls from hal/hal_intf.c Phillip Potter
2021-06-15  0:14 ` [PATCH 18/28] staging: rtl8188eu: remove all DBG_88E calls from hal/rtl8188e_cmd.c Phillip Potter
2021-06-15  0:14 ` [PATCH 19/28] staging: rtl8188eu: remove all DBG_88E calls from hal/pwrseqcmd.c Phillip Potter
2021-06-15  0:14 ` [PATCH 20/28] staging: rtl8188eu: remove all DBG_88E calls from hal/rtl8188e_hal_init.c Phillip Potter
2021-06-15  0:15 ` [PATCH 21/28] staging: rtl8188eu: remove all DBG_88E calls from hal/rtl8188e_xmit.c Phillip Potter
2021-06-15  0:15 ` [PATCH 22/28] staging: rtl8188eu: remove all DBG_88E calls from hal/usb_halinit.c Phillip Potter
2021-06-15 12:41   ` Dan Carpenter
2021-06-15 21:08     ` Phillip Potter
2021-06-15  0:15 ` [PATCH 23/28] staging: rtl8188eu: remove all DBG_88E calls from hal/rtl8188eu_recv.c Phillip Potter
2021-06-15  0:15 ` [PATCH 24/28] staging: rtl8188eu: remove all DBG_88E calls from hal/rtl8188eu_xmit.c Phillip Potter
2021-06-15  0:15 ` [PATCH 25/28] staging: rtl8188eu: remove converted netdev_dbg calls from core/rtw_recv.c Phillip Potter
2021-06-15  0:15 ` [PATCH 26/28] staging: rtl8188eu: remove converted netdev_dbg calls from core/rtw_sta_mgt.c Phillip Potter
2021-06-15  0:15 ` [PATCH 27/28] staging: rtl8188eu: remove core/rtw_debug.c Phillip Potter
2021-06-15  0:15 ` [PATCH 28/28] staging: rtl8188eu: remove DBG_88E macro definition Phillip Potter
2021-06-15 11:57 ` [PATCH 00/28] staging: rtl8188eu: remove DBG_88E callers and macro Greg KH
2021-06-15 21:05   ` Phillip Potter
2021-06-15 12:51 ` Dan Carpenter
2021-06-15 21:10   ` Phillip Potter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210615001507.1171-5-phil@philpotter.co.uk \
    --to=phil@philpotter.co.uk \
    --cc=Larry.Finger@lwfinger.net \
    --cc=dan.carpenter@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).