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: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
Larry Finger 2016-12-15 12:22:58 -06:00 committed by Kalle Valo
parent 531940f964
commit b03d968b66
8 changed files with 49 additions and 92 deletions

View File

@ -207,8 +207,7 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw,
*highest supported RX rate *highest supported RX rate
*/ */
if (rtlpriv->dm.supp_phymode_switch) { if (rtlpriv->dm.supp_phymode_switch) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, pr_info("Support phy mode switch\n");
"Support phy mode switch\n");
ht_cap->mcs.rx_mask[0] = 0xFF; ht_cap->mcs.rx_mask[0] = 0xFF;
ht_cap->mcs.rx_mask[1] = 0xFF; ht_cap->mcs.rx_mask[1] = 0xFF;
@ -389,8 +388,8 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw)
/* <4> set mac->sband to wiphy->sband */ /* <4> set mac->sband to wiphy->sband */
hw->wiphy->bands[NL80211_BAND_5GHZ] = sband; hw->wiphy->bands[NL80211_BAND_5GHZ] = sband;
} else { } else {
RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "Err BAND %d\n", pr_err("Err BAND %d\n",
rtlhal->current_bandtype); rtlhal->current_bandtype);
} }
} }
/* <5> set hw caps */ /* <5> set hw caps */
@ -544,7 +543,7 @@ int rtl_init_core(struct ieee80211_hw *hw)
* mac80211 hw in _rtl_init_mac80211. * mac80211 hw in _rtl_init_mac80211.
*/ */
if (rtl_regd_init(hw, rtl_reg_notifier)) { 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; return 1;
} }
@ -1694,8 +1693,7 @@ void rtl_watchdog_wq_callback(void *data)
* we should reconnect this AP * we should reconnect this AP
*/ */
if (rtlpriv->link_info.roam_times >= 5) { if (rtlpriv->link_info.roam_times >= 5) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("AP off, try to reconnect now\n");
"AP off, try to reconnect now\n");
rtlpriv->link_info.roam_times = 0; rtlpriv->link_info.roam_times = 0;
ieee80211_connection_loss( ieee80211_connection_loss(
rtlpriv->mac80211.vif); rtlpriv->mac80211.vif);
@ -1886,8 +1884,7 @@ void rtl_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation)
(u8 *)&iotype); (u8 *)&iotype);
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("Unknown Scan Backup operation.\n");
"Unknown Scan Backup operation.\n");
break; break;
} }
} }

View File

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

View File

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

View File

@ -1259,8 +1259,7 @@ int rtl_get_hwinfo(struct ieee80211_hw *hw, struct rtl_priv *rtlpriv,
break; break;
case EEPROM_93C46: case EEPROM_93C46:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("RTL8XXX did not boot from eeprom, check it !!\n");
"RTL8XXX did not boot from eeprom, check it !!\n");
return 1; return 1;
default: default:

View File

@ -174,9 +174,8 @@ static void _rtl_pci_update_default_setting(struct ieee80211_hw *hw)
} }
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("switch case %#x not processed\n",
"switch case %#x not processed\n", rtlpci->const_support_pciaspm);
rtlpci->const_support_pciaspm);
break; break;
} }
@ -1247,9 +1246,8 @@ static int _rtl_pci_init_tx_ring(struct ieee80211_hw *hw,
&buffer_desc_dma); &buffer_desc_dma);
if (!buffer_desc || (unsigned long)buffer_desc & 0xFF) { if (!buffer_desc || (unsigned long)buffer_desc & 0xFF) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("Cannot allocate TX ring (prio = %d)\n",
"Cannot allocate TX ring (prio = %d)\n", prio);
prio);
return -ENOMEM; return -ENOMEM;
} }
@ -1266,8 +1264,7 @@ static int _rtl_pci_init_tx_ring(struct ieee80211_hw *hw,
sizeof(*desc) * entries, &desc_dma); sizeof(*desc) * entries, &desc_dma);
if (!desc || (unsigned long)desc & 0xFF) { if (!desc || (unsigned long)desc & 0xFF) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("Cannot allocate TX ring (prio = %d)\n", prio);
"Cannot allocate TX ring (prio = %d)\n", prio);
return -ENOMEM; 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); &rtlpci->rx_ring[rxring_idx].dma);
if (!rtlpci->rx_ring[rxring_idx].buffer_desc || if (!rtlpci->rx_ring[rxring_idx].buffer_desc ||
(ulong)rtlpci->rx_ring[rxring_idx].buffer_desc & 0xFF) { (ulong)rtlpci->rx_ring[rxring_idx].buffer_desc & 0xFF) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("Cannot allocate RX ring\n");
"Cannot allocate RX ring\n");
return -ENOMEM; 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); &rtlpci->rx_ring[rxring_idx].dma);
if (!rtlpci->rx_ring[rxring_idx].desc || if (!rtlpci->rx_ring[rxring_idx].desc ||
(unsigned long)rtlpci->rx_ring[rxring_idx].desc & 0xFF) { (unsigned long)rtlpci->rx_ring[rxring_idx].desc & 0xFF) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("Cannot allocate RX ring\n");
"Cannot allocate RX ring\n");
return -ENOMEM; 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) static int rtl_pci_init(struct ieee80211_hw *hw, struct pci_dev *pdev)
{ {
struct rtl_priv *rtlpriv = rtl_priv(hw);
int err; int err;
_rtl_pci_init_struct(hw, pdev); _rtl_pci_init_struct(hw, pdev);
err = _rtl_pci_init_trx_ring(hw); err = _rtl_pci_init_trx_ring(hw);
if (err) { if (err) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("tx ring initialization failed\n");
"tx ring initialization failed\n");
return err; return err;
} }
@ -2275,7 +2268,7 @@ int rtl_pci_probe(struct pci_dev *pdev,
rtlpriv->cfg->ops->read_eeprom_info(hw); rtlpriv->cfg->ops->read_eeprom_info(hw);
if (rtlpriv->cfg->ops->init_sw_vars(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; err = -ENODEV;
goto fail3; goto fail3;
} }
@ -2287,22 +2280,20 @@ int rtl_pci_probe(struct pci_dev *pdev,
/* Init mac80211 sw */ /* Init mac80211 sw */
err = rtl_init_core(hw); err = rtl_init_core(hw);
if (err) { if (err) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("Can't allocate sw for mac80211\n");
"Can't allocate sw for mac80211\n");
goto fail3; goto fail3;
} }
/* Init PCI sw */ /* Init PCI sw */
err = rtl_pci_init(hw, pdev); err = rtl_pci_init(hw, pdev);
if (err) { if (err) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Failed to init PCI\n"); pr_err("Failed to init PCI\n");
goto fail3; goto fail3;
} }
err = ieee80211_register_hw(hw); err = ieee80211_register_hw(hw);
if (err) { if (err) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("Can't register mac80211 hw.\n");
"Can't register mac80211 hw.\n");
err = -ENODEV; err = -ENODEV;
goto fail3; goto fail3;
} }
@ -2310,8 +2301,7 @@ int rtl_pci_probe(struct pci_dev *pdev,
err = sysfs_create_group(&pdev->dev.kobj, &rtl_attribute_group); err = sysfs_create_group(&pdev->dev.kobj, &rtl_attribute_group);
if (err) { if (err) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("failed to create sysfs device attributes\n");
"failed to create sysfs device attributes\n");
goto fail3; goto fail3;
} }

View File

@ -150,8 +150,7 @@ static bool rtl_ps_set_rf_state(struct ieee80211_hw *hw,
break; break;
default: default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("switch case %#x not processed\n", state_toset);
"switch case %#x not processed\n", state_toset);
break; break;
} }

View File

@ -267,8 +267,7 @@ static void *rtl_rate_alloc_sta(void *ppriv,
rate_priv = kzalloc(sizeof(struct rtl_rate_priv), gfp); rate_priv = kzalloc(sizeof(struct rtl_rate_priv), gfp);
if (!rate_priv) { if (!rate_priv) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("Unable to allocate private rc structure\n");
"Unable to allocate private rc structure\n");
return NULL; return NULL;
} }

View File

@ -421,14 +421,12 @@ static void _rtl_rx_completed(struct urb *urb);
static int _rtl_prep_rx_urb(struct ieee80211_hw *hw, struct rtl_usb *rtlusb, static int _rtl_prep_rx_urb(struct ieee80211_hw *hw, struct rtl_usb *rtlusb,
struct urb *urb, gfp_t gfp_mask) struct urb *urb, gfp_t gfp_mask)
{ {
struct rtl_priv *rtlpriv = rtl_priv(hw);
void *buf; void *buf;
buf = usb_alloc_coherent(rtlusb->udev, rtlusb->rx_max_size, gfp_mask, buf = usb_alloc_coherent(rtlusb->udev, rtlusb->rx_max_size, gfp_mask,
&urb->transfer_dma); &urb->transfer_dma);
if (!buf) { if (!buf) {
RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG, pr_err("Failed to usb_alloc_coherent!!\n");
"Failed to usb_alloc_coherent!!\n");
return -ENOMEM; return -ENOMEM;
} }
@ -613,8 +611,6 @@ static unsigned int _rtl_rx_get_padding(struct ieee80211_hdr *hdr,
static void _rtl_rx_completed(struct urb *_urb) static void _rtl_rx_completed(struct urb *_urb)
{ {
struct rtl_usb *rtlusb = (struct rtl_usb *)_urb->context; struct rtl_usb *rtlusb = (struct rtl_usb *)_urb->context;
struct ieee80211_hw *hw = usb_get_intfdata(rtlusb->intf);
struct rtl_priv *rtlpriv = rtl_priv(hw);
int err = 0; int err = 0;
if (unlikely(IS_USB_STOP(rtlusb))) if (unlikely(IS_USB_STOP(rtlusb)))
@ -628,17 +624,15 @@ static void _rtl_rx_completed(struct urb *_urb)
struct ieee80211_hdr *hdr; struct ieee80211_hdr *hdr;
if (size < RTL_RX_DESC_SIZE + sizeof(struct ieee80211_hdr)) { if (size < RTL_RX_DESC_SIZE + sizeof(struct ieee80211_hdr)) {
RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG, pr_err("Too short packet from bulk IN! (len: %d)\n",
"Too short packet from bulk IN! (len: %d)\n", size);
size);
goto resubmit; goto resubmit;
} }
qlen = skb_queue_len(&rtlusb->rx_queue); qlen = skb_queue_len(&rtlusb->rx_queue);
if (qlen >= __RX_SKB_MAX_QUEUED) { if (qlen >= __RX_SKB_MAX_QUEUED) {
RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG, pr_err("Pending RX skbuff queue full! (qlen: %d)\n",
"Pending RX skbuff queue full! (qlen: %d)\n", qlen);
qlen);
goto resubmit; goto resubmit;
} }
@ -647,8 +641,7 @@ static void _rtl_rx_completed(struct urb *_urb)
skb = dev_alloc_skb(size + __RADIO_TAP_SIZE_RSV + padding); skb = dev_alloc_skb(size + __RADIO_TAP_SIZE_RSV + padding);
if (!skb) { if (!skb) {
RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG, pr_err("Can't allocate skb for bulk IN!\n");
"Can't allocate skb for bulk IN!\n");
goto resubmit; goto resubmit;
} }
@ -725,7 +718,6 @@ static int _rtl_usb_receive(struct ieee80211_hw *hw)
struct urb *urb; struct urb *urb;
int err; int err;
int i; int i;
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw)); struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
WARN_ON(0 == rtlusb->rx_urb_num); WARN_ON(0 == rtlusb->rx_urb_num);
@ -740,8 +732,7 @@ static int _rtl_usb_receive(struct ieee80211_hw *hw)
err = _rtl_prep_rx_urb(hw, rtlusb, urb, GFP_KERNEL); err = _rtl_prep_rx_urb(hw, rtlusb, urb, GFP_KERNEL);
if (err < 0) { if (err < 0) {
RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG, pr_err("Failed to prep_rx_urb!!\n");
"Failed to prep_rx_urb!!\n");
usb_free_urb(urb); usb_free_urb(urb);
goto err_out; goto err_out;
} }
@ -839,7 +830,6 @@ static void rtl_usb_stop(struct ieee80211_hw *hw)
static void _rtl_submit_tx_urb(struct ieee80211_hw *hw, struct urb *_urb) static void _rtl_submit_tx_urb(struct ieee80211_hw *hw, struct urb *_urb)
{ {
int err; int err;
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw)); struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
usb_anchor_urb(_urb, &rtlusb->tx_submitted); usb_anchor_urb(_urb, &rtlusb->tx_submitted);
@ -847,8 +837,7 @@ static void _rtl_submit_tx_urb(struct ieee80211_hw *hw, struct urb *_urb)
if (err < 0) { if (err < 0) {
struct sk_buff *skb; struct sk_buff *skb;
RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG, pr_err("Failed to submit urb\n");
"Failed to submit urb\n");
usb_unanchor_urb(_urb); usb_unanchor_urb(_urb);
skb = (struct sk_buff *)_urb->context; skb = (struct sk_buff *)_urb->context;
kfree_skb(skb); kfree_skb(skb);
@ -859,7 +848,6 @@ static void _rtl_submit_tx_urb(struct ieee80211_hw *hw, struct urb *_urb)
static int _usb_tx_post(struct ieee80211_hw *hw, struct urb *urb, static int _usb_tx_post(struct ieee80211_hw *hw, struct urb *urb,
struct sk_buff *skb) struct sk_buff *skb)
{ {
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw)); struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
struct ieee80211_tx_info *txinfo; struct ieee80211_tx_info *txinfo;
@ -870,8 +858,7 @@ static int _usb_tx_post(struct ieee80211_hw *hw, struct urb *urb,
txinfo->flags |= IEEE80211_TX_STAT_ACK; txinfo->flags |= IEEE80211_TX_STAT_ACK;
if (urb->status) { if (urb->status) {
RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG, pr_err("Urb has error status 0x%X\n", urb->status);
"Urb has error status 0x%X\n", urb->status);
goto out; goto out;
} }
/* TODO: statistics */ /* TODO: statistics */
@ -919,7 +906,6 @@ static struct urb *_rtl_usb_tx_urb_setup(struct ieee80211_hw *hw,
static void _rtl_usb_transmit(struct ieee80211_hw *hw, struct sk_buff *skb, static void _rtl_usb_transmit(struct ieee80211_hw *hw, struct sk_buff *skb,
enum rtl_txq qnum) enum rtl_txq qnum)
{ {
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw)); struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
u32 ep_num; u32 ep_num;
struct urb *_urb = NULL; struct urb *_urb = NULL;
@ -927,8 +913,7 @@ static void _rtl_usb_transmit(struct ieee80211_hw *hw, struct sk_buff *skb,
WARN_ON(NULL == rtlusb->usb_tx_aggregate_hdl); WARN_ON(NULL == rtlusb->usb_tx_aggregate_hdl);
if (unlikely(IS_USB_STOP(rtlusb))) { if (unlikely(IS_USB_STOP(rtlusb))) {
RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG, pr_err("USB device is stopping...\n");
"USB device is stopping...\n");
kfree_skb(skb); kfree_skb(skb);
return; return;
} }
@ -936,8 +921,7 @@ static void _rtl_usb_transmit(struct ieee80211_hw *hw, struct sk_buff *skb,
_skb = skb; _skb = skb;
_urb = _rtl_usb_tx_urb_setup(hw, _skb, ep_num); _urb = _rtl_usb_tx_urb_setup(hw, _skb, ep_num);
if (unlikely(!_urb)) { if (unlikely(!_urb)) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("Can't allocate urb. Drop skb!\n");
"Can't allocate urb. Drop skb!\n");
kfree_skb(skb); kfree_skb(skb);
return; return;
} }
@ -1102,20 +1086,18 @@ int rtl_usb_probe(struct usb_interface *intf,
/* Init mac80211 sw */ /* Init mac80211 sw */
err = rtl_init_core(hw); err = rtl_init_core(hw);
if (err) { if (err) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("Can't allocate sw for mac80211\n");
"Can't allocate sw for mac80211\n");
goto error_out; goto error_out;
} }
if (rtlpriv->cfg->ops->init_sw_vars(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");
goto error_out; goto error_out;
} }
rtlpriv->cfg->ops->init_sw_leds(hw); rtlpriv->cfg->ops->init_sw_leds(hw);
err = ieee80211_register_hw(hw); err = ieee80211_register_hw(hw);
if (err) { if (err) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, pr_err("Can't register mac80211 hw.\n");
"Can't register mac80211 hw.\n");
err = -ENODEV; err = -ENODEV;
goto error_out; goto error_out;
} }