Commit 1663e5f8 authored by Phillip Potter's avatar Phillip Potter Committed by Greg Kroah-Hartman
Browse files

staging: r8188eu: remove smaller sets of converted DBG_88E calls



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: default avatarPhillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220216010709.791-3-phil@philpotter.co.uk


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 973aeaee
Loading
Loading
Loading
Loading
+0 −65
Original line number Original line Diff line number Diff line
@@ -179,10 +179,6 @@ void expire_timeout_chk(struct adapter *padapter)
				list_del_init(&psta->auth_list);
				list_del_init(&psta->auth_list);
				pstapriv->auth_list_cnt--;
				pstapriv->auth_list_cnt--;


				netdev_dbg(padapter->pnetdev,
					   "auth expire %6ph\n",
					   psta->hwaddr);

				spin_unlock_bh(&pstapriv->auth_list_lock);
				spin_unlock_bh(&pstapriv->auth_list_lock);


				spin_lock_bh(&pstapriv->sta_hash_lock);
				spin_lock_bh(&pstapriv->sta_hash_lock);
@@ -250,19 +246,11 @@ void expire_timeout_chk(struct adapter *padapter)
			list_del_init(&psta->asoc_list);
			list_del_init(&psta->asoc_list);
			pstapriv->asoc_list_cnt--;
			pstapriv->asoc_list_cnt--;


			netdev_dbg(padapter->pnetdev,
				   "asoc expire %pM, state = 0x%x\n",
				   (psta->hwaddr), psta->state);
			updated = ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING);
			updated = ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING);
		} else {
		} else {
			/* TODO: Aging mechanism to digest frames in sleep_q to avoid running out of xmitframe */
			/* TODO: Aging mechanism to digest frames in sleep_q to avoid running out of xmitframe */
			if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt) &&
			if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt) &&
			    padapter->xmitpriv.free_xmitframe_cnt < (NR_XMITFRAME / pstapriv->asoc_list_cnt / 2)) {
			    padapter->xmitpriv.free_xmitframe_cnt < (NR_XMITFRAME / pstapriv->asoc_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);
				wakeup_sta_to_xmit(padapter, psta);
			}
			}
		}
		}
@@ -292,25 +280,16 @@ void expire_timeout_chk(struct adapter *padapter)


			psta->keep_alive_trycnt++;
			psta->keep_alive_trycnt++;
			if (ret == _SUCCESS) {
			if (ret == _SUCCESS) {
				netdev_dbg(padapter->pnetdev,
					   "asoc check, sta(%pM) is alive\n",
					   (psta->hwaddr));
				psta->expire_to = pstapriv->expire_to;
				psta->expire_to = pstapriv->expire_to;
				psta->keep_alive_trycnt = 0;
				psta->keep_alive_trycnt = 0;
				continue;
				continue;
			} else if (psta->keep_alive_trycnt <= 3) {
			} else if (psta->keep_alive_trycnt <= 3) {
				netdev_dbg(padapter->pnetdev,
					   "ack check for asoc expire, keep_alive_trycnt =%d\n",
					   psta->keep_alive_trycnt);
				psta->expire_to = 1;
				psta->expire_to = 1;
				continue;
				continue;
			}
			}


			psta->keep_alive_trycnt = 0;
			psta->keep_alive_trycnt = 0;


			netdev_dbg(padapter->pnetdev,
				   "asoc expire %pM, state = 0x%x\n",
				   (psta->hwaddr), psta->state);
			spin_lock_bh(&pstapriv->asoc_list_lock);
			spin_lock_bh(&pstapriv->asoc_list_lock);
			list_del_init(&psta->asoc_list);
			list_del_init(&psta->asoc_list);
			pstapriv->asoc_list_cnt--;
			pstapriv->asoc_list_cnt--;
@@ -390,10 +369,6 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)


		tx_ra_bitmap |= ((raid << 28) & 0xf0000000);
		tx_ra_bitmap |= ((raid << 28) & 0xf0000000);


		netdev_dbg(padapter->pnetdev,
			   "mac_id:%d, raid:%d, bitmap = 0x%x, arg = 0x%x\n",
			   psta->mac_id, raid, tx_ra_bitmap, arg);

		/* bitmap[0:27] = tx_rate_bitmap */
		/* bitmap[0:27] = tx_rate_bitmap */
		/* bitmap[28:31]= Rate Adaptive id */
		/* bitmap[28:31]= Rate Adaptive id */
		/* arg[0:4] = macid */
		/* arg[0:4] = macid */
@@ -408,9 +383,6 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
		psta->init_rate = init_rate;
		psta->init_rate = init_rate;


	} else {
	} else {
		netdev_dbg(padapter->pnetdev,
			   "station aid %d exceed the max number\n",
			   psta->aid);
	}
	}
}
}


@@ -468,9 +440,6 @@ void update_bmc_sta(struct adapter *padapter)
			arg = psta->mac_id & 0x1f;
			arg = psta->mac_id & 0x1f;
			arg |= BIT(7);
			arg |= BIT(7);
			tx_ra_bitmap |= ((raid << 28) & 0xf0000000);
			tx_ra_bitmap |= ((raid << 28) & 0xf0000000);
			netdev_dbg(padapter->pnetdev,
				   "mask = 0x%x, arg = 0x%x\n",
				   tx_ra_bitmap, arg);


			/* bitmap[0:27] = tx_rate_bitmap */
			/* bitmap[0:27] = tx_rate_bitmap */
			/* bitmap[28:31]= Rate Adaptive id */
			/* bitmap[28:31]= Rate Adaptive id */
@@ -489,7 +458,6 @@ void update_bmc_sta(struct adapter *padapter)
		spin_unlock_bh(&psta->lock);
		spin_unlock_bh(&psta->lock);


	} else {
	} else {
		netdev_dbg(padapter->pnetdev, "add_RATid_bmc_sta error!\n");
	}
	}
}
}


@@ -575,8 +543,6 @@ static void update_bcn_erpinfo_ie(struct adapter *padapter)
	unsigned char *p, *ie = pnetwork->IEs;
	unsigned char *p, *ie = pnetwork->IEs;
	u32 len = 0;
	u32 len = 0;


	netdev_dbg(padapter->pnetdev, "ERP_enable = %d\n", pmlmeinfo->ERP_enable);

	if (!pmlmeinfo->ERP_enable)
	if (!pmlmeinfo->ERP_enable)
		return;
		return;


@@ -659,8 +625,6 @@ static void update_bcn_vendor_spec_ie(struct adapter *padapter, u8 *oui)
		update_bcn_wps_ie(padapter);
		update_bcn_wps_ie(padapter);
	else if (!memcmp(P2P_OUI, oui, 4))
	else if (!memcmp(P2P_OUI, oui, 4))
		update_bcn_p2p_ie(padapter);
		update_bcn_p2p_ie(padapter);
	else
		netdev_dbg(padapter->pnetdev, "unknown/unused OUI type!\n");
}
}


void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
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 *padapter)
	if (pmlmepriv->htpriv.ht_option)
	if (pmlmepriv->htpriv.ht_option)
		return 0;
		return 0;


	netdev_dbg(padapter->pnetdev,
		   "current operation mode = 0x%X\n",
		   pmlmepriv->ht_op_mode);

	if (!(pmlmepriv->ht_op_mode & HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT) &&
	if (!(pmlmepriv->ht_op_mode & HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT) &&
	    pmlmepriv->num_sta_ht_no_gf) {
	    pmlmepriv->num_sta_ht_no_gf) {
		pmlmepriv->ht_op_mode |=
		pmlmepriv->ht_op_mode |=
@@ -776,10 +736,6 @@ static int rtw_ht_operation_update(struct adapter *padapter)
		op_mode_changes++;
		op_mode_changes++;
	}
	}


	netdev_dbg(padapter->pnetdev,
		   "new operation mode = 0x%X changes = %d\n",
		   pmlmepriv->ht_op_mode, op_mode_changes);

	return op_mode_changes;
	return op_mode_changes;
}
}


@@ -894,10 +850,6 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta)
	if (psta->flags & WLAN_STA_HT) {
	if (psta->flags & WLAN_STA_HT) {
		u16 ht_capab = le16_to_cpu(psta->htpriv.ht_cap.cap_info);
		u16 ht_capab = le16_to_cpu(psta->htpriv.ht_cap.cap_info);


		netdev_dbg(padapter->pnetdev,
			   "HT: STA %pM HT Capabilities Info: 0x%04x\n",
			   (psta->hwaddr), ht_capab);

		if (psta->no_ht_set) {
		if (psta->no_ht_set) {
			psta->no_ht_set = 0;
			psta->no_ht_set = 0;
			pmlmepriv->num_sta_no_ht--;
			pmlmepriv->num_sta_no_ht--;
@@ -908,9 +860,6 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta)
				psta->no_ht_gf_set = 1;
				psta->no_ht_gf_set = 1;
				pmlmepriv->num_sta_ht_no_gf++;
				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);
		}
		}


		if ((ht_capab & IEEE80211_HT_CAP_SUP_WIDTH_20_40) == 0) {
		if ((ht_capab & IEEE80211_HT_CAP_SUP_WIDTH_20_40) == 0) {
@@ -918,9 +867,6 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta)
				psta->ht_20mhz_set = 1;
				psta->ht_20mhz_set = 1;
				pmlmepriv->num_sta_ht_20mhz++;
				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 {
	} else {
		if (!psta->no_ht_set) {
		if (!psta->no_ht_set) {
@@ -928,9 +874,6 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta)
			pmlmepriv->num_sta_no_ht++;
			pmlmepriv->num_sta_no_ht++;
		}
		}
		if (pmlmepriv->htpriv.ht_option) {
		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);
		}
		}
	}
	}


@@ -941,8 +884,6 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta)


	/* update associated stations cap. */
	/* update associated stations cap. */
	associated_clients_update(padapter,  beacon_updated);
	associated_clients_update(padapter,  beacon_updated);

	netdev_dbg(padapter->pnetdev, "updated = %d\n", beacon_updated);
}
}


u8 bss_cap_update_on_sta_leave(struct adapter *padapter, struct sta_info *psta)
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 *padapter, struct sta_info *psta)


	/* update associated stations cap. */
	/* update associated stations cap. */


	netdev_dbg(padapter->pnetdev, "updated = %d\n", beacon_updated);

	return beacon_updated;
	return beacon_updated;
}
}


@@ -1201,10 +1140,6 @@ void stop_ap_mode(struct adapter *padapter)
	}
	}
	spin_unlock_bh(&pacl_node_q->lock);
	spin_unlock_bh(&pacl_node_q->lock);


	netdev_dbg(padapter->pnetdev,
		   "free acl_node_queue, num = %d\n",
		   pacl_list->num);

	rtw_sta_flush(padapter);
	rtw_sta_flush(padapter);


	/* free_assoc_sta_resources */
	/* free_assoc_sta_resources */
+0 −8
Original line number Original line Diff line number Diff line
@@ -252,9 +252,6 @@ int rtw_cmd_thread(void *context)
_next:
_next:
		if (padapter->bDriverStopped ||
		if (padapter->bDriverStopped ||
		    padapter->bSurpriseRemoved) {
		    padapter->bSurpriseRemoved) {
			netdev_dbg(padapter->pnetdev,
				   "DriverStopped(%d) SurpriseRemoved(%d) break\n",
				   padapter->bDriverStopped, padapter->bSurpriseRemoved);
			break;
			break;
		}
		}


@@ -573,8 +570,6 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork)
	else
	else
		padapter->pwrctrlpriv.smart_ps = padapter->registrypriv.smart_ps;
		padapter->pwrctrlpriv.smart_ps = padapter->registrypriv.smart_ps;


	netdev_dbg(padapter->pnetdev, "smart_ps = %d\n", padapter->pwrctrlpriv.smart_ps);

	pcmd->cmdsz = get_wlan_bssid_ex_sz(psecnetwork);/* get cmdsz before endian conversion */
	pcmd->cmdsz = get_wlan_bssid_ex_sz(psecnetwork);/* get cmdsz before endian conversion */


	INIT_LIST_HEAD(&pcmd->list);
	INIT_LIST_HEAD(&pcmd->list);
@@ -943,9 +938,6 @@ static void rtl8188e_sreset_xmit_status_check(struct adapter *padapter)


	txdma_status = rtw_read32(padapter, REG_TXDMA_STATUS);
	txdma_status = rtw_read32(padapter, REG_TXDMA_STATUS);
	if (txdma_status != 0x00) {
	if (txdma_status != 0x00) {
		netdev_dbg(padapter->pnetdev,
			   "REG_TXDMA_STATUS: 0x%08x\n",
			   txdma_status);
		rtw_write32(padapter, REG_TXDMA_STATUS, txdma_status);
		rtw_write32(padapter, REG_TXDMA_STATUS, txdma_status);
	}
	}
	/* total xmit irp = 4 */
	/* total xmit irp = 4 */
+0 −19
Original line number Original line Diff line number Diff line
@@ -655,8 +655,6 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
	 * sub-type. */
	 * sub-type. */
	if (elen < 4) {
	if (elen < 4) {
		if (show_errors) {
		if (show_errors) {
			pr_debug("short vendor specific information element ignored (len=%lu)\n",
				 (unsigned long)elen);
		}
		}
		return -1;
		return -1;
	}
	}
@@ -675,8 +673,6 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
			break;
			break;
		case WME_OUI_TYPE: /* this is a Wi-Fi WME info. element */
		case WME_OUI_TYPE: /* this is a Wi-Fi WME info. element */
			if (elen < 5) {
			if (elen < 5) {
				pr_debug("short WME information element ignored (len=%lu)\n",
					 (unsigned long)elen);
				return -1;
				return -1;
			}
			}
			switch (pos[4]) {
			switch (pos[4]) {
@@ -690,8 +686,6 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
				elems->wme_tspec_len = elen;
				elems->wme_tspec_len = elen;
				break;
				break;
			default:
			default:
				pr_debug("unknown WME information element ignored (subtype=%d len=%lu)\n",
					 pos[4], (unsigned long)elen);
				return -1;
				return -1;
			}
			}
			break;
			break;
@@ -701,8 +695,6 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
			elems->wps_ie_len = elen;
			elems->wps_ie_len = elen;
			break;
			break;
		default:
		default:
			pr_debug("Unknown Microsoft information element ignored (type=%d len=%lu)\n",
				 pos[3], (unsigned long)elen);
			return -1;
			return -1;
		}
		}
		break;
		break;
@@ -714,14 +706,10 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
			elems->vendor_ht_cap_len = elen;
			elems->vendor_ht_cap_len = elen;
			break;
			break;
		default:
		default:
			pr_debug("Unknown Broadcom information element ignored (type=%d len=%lu)\n",
				 pos[3], (unsigned long)elen);
			return -1;
			return -1;
		}
		}
		break;
		break;
	default:
	default:
		pr_debug("unknown vendor specific information element ignored (vendor OUI %02x:%02x:%02x len=%lu)\n",
			 pos[0], pos[1], pos[2], (unsigned long)elen);
		return -1;
		return -1;
	}
	}
	return 0;
	return 0;
@@ -754,8 +742,6 @@ enum parse_res rtw_ieee802_11_parse_elems(u8 *start, uint len,


		if (elen > left) {
		if (elen > left) {
			if (show_errors) {
			if (show_errors) {
				pr_debug("IEEE 802.11 element parse failed (id=%d elen=%d left=%lu)\n",
					 id, elen, (unsigned long)left);
			}
			}
			return ParseFailed;
			return ParseFailed;
		}
		}
@@ -841,8 +827,6 @@ enum parse_res rtw_ieee802_11_parse_elems(u8 *start, uint len,
			unknown++;
			unknown++;
			if (!show_errors)
			if (!show_errors)
				break;
				break;
			pr_debug("IEEE 802.11 element parse ignored unknown element (id=%d elen=%d)\n",
				 id, elen);
			break;
			break;
		}
		}
		left -= elen;
		left -= elen;
@@ -892,10 +876,7 @@ void rtw_macaddr_cfg(u8 *mac_addr)


	if (is_broadcast_ether_addr(mac) || is_zero_ether_addr(mac)) {
	if (is_broadcast_ether_addr(mac) || is_zero_ether_addr(mac)) {
		eth_random_addr(mac_addr);
		eth_random_addr(mac_addr);
		pr_debug("MAC Address from efuse error, assign random one !!!\n");
	}
	}

	pr_debug("MAC Address = %pM\n", mac_addr);
}
}


/**
/**
+0 −5
Original line number Original line Diff line number Diff line
@@ -120,8 +120,6 @@ u8 rtw_set_802_11_bssid(struct adapter *padapter, u8 *bssid)


	spin_lock_bh(&pmlmepriv->lock);
	spin_lock_bh(&pmlmepriv->lock);


	netdev_dbg(padapter->pnetdev, "Set BSSID under fw_state = 0x%08x\n",
		   get_fwstate(pmlmepriv));
	if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY))
	if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY))
		goto handle_tkip_countermeasure;
		goto handle_tkip_countermeasure;
	else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING))
	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)


	spin_lock_bh(&pmlmepriv->lock);
	spin_lock_bh(&pmlmepriv->lock);


	netdev_dbg(padapter->pnetdev, "Set SSID under fw_state = 0x%08x\n",
		   get_fwstate(pmlmepriv));
	if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)) {
	if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)) {
		goto handle_tkip_countermeasure;
		goto handle_tkip_countermeasure;
	} else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) {
	} else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) {
@@ -359,7 +355,6 @@ u8 rtw_set_802_11_bssid_list_scan(struct adapter *padapter, struct ndis_802_11_s
		res = true;
		res = true;
	} else {
	} else {
		if (rtw_is_scan_deny(padapter)) {
		if (rtw_is_scan_deny(padapter)) {
			netdev_dbg(padapter->pnetdev, "scan deny\n");
			indicate_wx_scan_complete_event(padapter);
			indicate_wx_scan_complete_event(padapter);
			return _SUCCESS;
			return _SUCCESS;
		}
		}
+0 −6
Original line number Original line Diff line number Diff line
@@ -12,15 +12,11 @@ struct xmit_frame *rtw_IOL_accquire_xmit_frame(struct adapter *adapter)


	xmit_frame = rtw_alloc_xmitframe(pxmitpriv);
	xmit_frame = rtw_alloc_xmitframe(pxmitpriv);
	if (!xmit_frame) {
	if (!xmit_frame) {
		netdev_dbg(adapter->pnetdev,
			   "rtw_alloc_xmitframe return null\n");
		return NULL;
		return NULL;
	}
	}


	xmitbuf = rtw_alloc_xmitbuf(pxmitpriv);
	xmitbuf = rtw_alloc_xmitbuf(pxmitpriv);
	if (!xmitbuf) {
	if (!xmitbuf) {
		netdev_dbg(adapter->pnetdev,
			   "rtw_alloc_xmitbuf return null\n");
		rtw_free_xmitframe(pxmitpriv, xmit_frame);
		rtw_free_xmitframe(pxmitpriv, xmit_frame);
		return NULL;
		return NULL;
	}
	}
@@ -51,8 +47,6 @@ int rtw_IOL_append_cmds(struct xmit_frame *xmit_frame, u8 *IOL_cmds, u32 cmd_len


	/* check if the io_buf can accommodate new cmds */
	/* 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) {
		pr_debug("%u is larger than MAX_XMITBUF_SZ:%u, can't accommodate new cmds\n",
			 ori_len + cmd_len + 8, MAX_XMITBUF_SZ);
		return _FAIL;
		return _FAIL;
	}
	}


Loading