Commit b03d968b authored by Larry Finger's avatar Larry Finger Committed by Kalle Valo
Browse files

rtlwifi: Remove RT_TRACE messages that use DBG_EMERG



These messages are always logged and represent error conditions, thus
we can use pr_err().

Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Cc: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 531940f9
Loading
Loading
Loading
Loading
+6 −9
Original line number Diff line number Diff line
@@ -207,8 +207,7 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw,
	 *highest supported RX rate
	 */
	if (rtlpriv->dm.supp_phymode_switch) {
		RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG,
			 "Support phy mode switch\n");
		pr_info("Support phy mode switch\n");

		ht_cap->mcs.rx_mask[0] = 0xFF;
		ht_cap->mcs.rx_mask[1] = 0xFF;
@@ -389,7 +388,7 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw)
			/* <4> set mac->sband to wiphy->sband */
			hw->wiphy->bands[NL80211_BAND_5GHZ] = sband;
		} else {
			RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "Err BAND %d\n",
			pr_err("Err BAND %d\n",
			       rtlhal->current_bandtype);
		}
	}
@@ -544,7 +543,7 @@ int rtl_init_core(struct ieee80211_hw *hw)
	 * mac80211 hw  in _rtl_init_mac80211.
	 */
	if (rtl_regd_init(hw, rtl_reg_notifier)) {
		RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "REGD init failed\n");
		pr_err("REGD init failed\n");
		return 1;
	}

@@ -1694,8 +1693,7 @@ void rtl_watchdog_wq_callback(void *data)
			 * we should reconnect this AP
			 */
			if (rtlpriv->link_info.roam_times >= 5) {
				RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
					 "AP off, try to reconnect now\n");
				pr_err("AP off, try to reconnect now\n");
				rtlpriv->link_info.roam_times = 0;
				ieee80211_connection_loss(
					rtlpriv->mac80211.vif);
@@ -1886,8 +1884,7 @@ void rtl_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation)
						      (u8 *)&iotype);
			break;
		default:
			RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
				 "Unknown Scan Backup operation.\n");
			pr_err("Unknown Scan Backup operation.\n");
			break;
		}
	}
+5 −9
Original line number Diff line number Diff line
@@ -285,8 +285,7 @@ u8 rtl_cam_get_free_entry(struct ieee80211_hw *hw, u8 *sta_addr)
	u8 i, *addr;

	if (NULL == sta_addr) {
		RT_TRACE(rtlpriv, COMP_SEC, DBG_EMERG,
			 "sta_addr is NULL.\n");
		pr_err("sta_addr is NULL.\n");
		return TOTAL_CAM_ENTRY;
	}
	/* Does STA already exist? */
@@ -298,8 +297,7 @@ u8 rtl_cam_get_free_entry(struct ieee80211_hw *hw, u8 *sta_addr)
	/* Get a free CAM entry. */
	for (entry_idx = 4; entry_idx < TOTAL_CAM_ENTRY; entry_idx++) {
		if ((bitmap & BIT(0)) == 0) {
			RT_TRACE(rtlpriv, COMP_SEC, DBG_EMERG,
				 "-----hwsec_cam_bitmap: 0x%x entry_idx=%d\n",
			pr_err("-----hwsec_cam_bitmap: 0x%x entry_idx=%d\n",
			       rtlpriv->sec.hwsec_cam_bitmap, entry_idx);
			rtlpriv->sec.hwsec_cam_bitmap |= BIT(0) << entry_idx;
			memcpy(rtlpriv->sec.hwsec_cam_sta_addr[entry_idx],
@@ -319,14 +317,12 @@ void rtl_cam_del_entry(struct ieee80211_hw *hw, u8 *sta_addr)
	u8 i, *addr;

	if (NULL == sta_addr) {
		RT_TRACE(rtlpriv, COMP_SEC, DBG_EMERG,
			 "sta_addr is NULL.\n");
		pr_err("sta_addr is NULL.\n");
		return;
	}

	if (is_zero_ether_addr(sta_addr)) {
		RT_TRACE(rtlpriv, COMP_SEC, DBG_EMERG,
			 "sta_addr is %pM\n", sta_addr);
		pr_err("sta_addr is %pM\n", sta_addr);
		return;
	}
	/* Does STA already exist? */
+8 −13
Original line number Diff line number Diff line
@@ -117,8 +117,7 @@ static void rtl_fw_do_work(const struct firmware *firmware, void *context,
	}
found_alt:
	if (firmware->size > rtlpriv->max_fw_size) {
		RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
			 "Firmware is too big!\n");
		pr_err("Firmware is too big!\n");
		release_firmware(firmware);
		return;
	}
@@ -303,8 +302,8 @@ static int rtl_op_add_interface(struct ieee80211_hw *hw,
				(u8 *)(&mac->basic_rates));
		break;
	default:
		RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
			 "operation mode %d is not support!\n", vif->type);
		pr_err("operation mode %d is not supported!\n",
		       vif->type);
		err = -EOPNOTSUPP;
		goto out;
	}
@@ -764,8 +763,7 @@ static int rtl_op_config(struct ieee80211_hw *hw, u32 changed)
			default:
					mac->bw_40 = false;
					mac->bw_80 = false;
					RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
						 "switch case %#x not processed\n",
					pr_err("switch case %#x not processed\n",
					       channel_type);
					break;
			}
@@ -1399,8 +1397,7 @@ static int rtl_op_ampdu_action(struct ieee80211_hw *hw,
			 "IEEE80211_AMPDU_RX_STOP:TID:%d\n", tid);
		return rtl_rx_agg_stop(hw, sta, tid);
	default:
		RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
			 "IEEE80211_AMPDU_ERR!!!!:\n");
		pr_err("IEEE80211_AMPDU_ERR!!!!:\n");
		return -EOPNOTSUPP;
	}
	return 0;
@@ -1536,8 +1533,7 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
		err = -EOPNOTSUPP;
		goto out_unlock;
	default:
		RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
			 "alg_err:%x!!!!:\n", key->cipher);
		pr_err("alg_err:%x!!!!:\n", key->cipher);
		goto out_unlock;
	}
	if (key_type == WEP40_ENCRYPTION ||
@@ -1662,8 +1658,7 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
		rtl_cam_delete_one_entry(hw, mac_addr, key_idx);
		break;
	default:
		RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
			 "cmd_err:%x!!!!:\n", cmd);
		pr_err("cmd_err:%x!!!!:\n", cmd);
	}
out_unlock:
	mutex_unlock(&rtlpriv->locks.conf_mutex);
+1 −2
Original line number Diff line number Diff line
@@ -1259,8 +1259,7 @@ int rtl_get_hwinfo(struct ieee80211_hw *hw, struct rtl_priv *rtlpriv,
		break;

	case EEPROM_93C46:
		RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
			 "RTL8XXX did not boot from eeprom, check it !!\n");
		pr_err("RTL8XXX did not boot from eeprom, check it !!\n");
		return 1;

	default:
+13 −23
Original line number Diff line number Diff line
@@ -174,8 +174,7 @@ static void _rtl_pci_update_default_setting(struct ieee80211_hw *hw)
		}
		break;
	default:
		RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
			 "switch case %#x not processed\n",
		pr_err("switch case %#x not processed\n",
		       rtlpci->const_support_pciaspm);
		break;
	}
@@ -1247,8 +1246,7 @@ static int _rtl_pci_init_tx_ring(struct ieee80211_hw *hw,
					 &buffer_desc_dma);

		if (!buffer_desc || (unsigned long)buffer_desc & 0xFF) {
			RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
				 "Cannot allocate TX ring (prio = %d)\n",
			pr_err("Cannot allocate TX ring (prio = %d)\n",
			       prio);
			return -ENOMEM;
		}
@@ -1266,8 +1264,7 @@ static int _rtl_pci_init_tx_ring(struct ieee80211_hw *hw,
				     sizeof(*desc) * entries, &desc_dma);

	if (!desc || (unsigned long)desc & 0xFF) {
		RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
			 "Cannot allocate TX ring (prio = %d)\n", prio);
		pr_err("Cannot allocate TX ring (prio = %d)\n", prio);
		return -ENOMEM;
	}

@@ -1314,8 +1311,7 @@ static int _rtl_pci_init_rx_ring(struct ieee80211_hw *hw, int rxring_idx)
					  &rtlpci->rx_ring[rxring_idx].dma);
		if (!rtlpci->rx_ring[rxring_idx].buffer_desc ||
		    (ulong)rtlpci->rx_ring[rxring_idx].buffer_desc & 0xFF) {
			RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
				 "Cannot allocate RX ring\n");
			pr_err("Cannot allocate RX ring\n");
			return -ENOMEM;
		}

@@ -1338,8 +1334,7 @@ static int _rtl_pci_init_rx_ring(struct ieee80211_hw *hw, int rxring_idx)
					  &rtlpci->rx_ring[rxring_idx].dma);
		if (!rtlpci->rx_ring[rxring_idx].desc ||
		    (unsigned long)rtlpci->rx_ring[rxring_idx].desc & 0xFF) {
			RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
				 "Cannot allocate RX ring\n");
			pr_err("Cannot allocate RX ring\n");
			return -ENOMEM;
		}

@@ -1799,15 +1794,13 @@ static void rtl_pci_deinit(struct ieee80211_hw *hw)

static int rtl_pci_init(struct ieee80211_hw *hw, struct pci_dev *pdev)
{
	struct rtl_priv *rtlpriv = rtl_priv(hw);
	int err;

	_rtl_pci_init_struct(hw, pdev);

	err = _rtl_pci_init_trx_ring(hw);
	if (err) {
		RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
			 "tx ring initialization failed\n");
		pr_err("tx ring initialization failed\n");
		return err;
	}

@@ -2275,7 +2268,7 @@ int rtl_pci_probe(struct pci_dev *pdev,
	rtlpriv->cfg->ops->read_eeprom_info(hw);

	if (rtlpriv->cfg->ops->init_sw_vars(hw)) {
		RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Can't init_sw_vars\n");
		pr_err("Can't init_sw_vars\n");
		err = -ENODEV;
		goto fail3;
	}
@@ -2287,22 +2280,20 @@ int rtl_pci_probe(struct pci_dev *pdev,
	/* Init mac80211 sw */
	err = rtl_init_core(hw);
	if (err) {
		RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
			 "Can't allocate sw for mac80211\n");
		pr_err("Can't allocate sw for mac80211\n");
		goto fail3;
	}

	/* Init PCI sw */
	err = rtl_pci_init(hw, pdev);
	if (err) {
		RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Failed to init PCI\n");
		pr_err("Failed to init PCI\n");
		goto fail3;
	}

	err = ieee80211_register_hw(hw);
	if (err) {
		RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
			 "Can't register mac80211 hw.\n");
		pr_err("Can't register mac80211 hw.\n");
		err = -ENODEV;
		goto fail3;
	}
@@ -2310,8 +2301,7 @@ int rtl_pci_probe(struct pci_dev *pdev,

	err = sysfs_create_group(&pdev->dev.kobj, &rtl_attribute_group);
	if (err) {
		RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
			 "failed to create sysfs device attributes\n");
		pr_err("failed to create sysfs device attributes\n");
		goto fail3;
	}

Loading