rtl8712: replace printk with better solutions

Replace printk with netdev_printk helpers, dev_printk helpers or
pr_err/warn/info if there is no device info available.

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Przemo Firszt 2012-12-10 23:21:21 +00:00 committed by Greg Kroah-Hartman
parent 94973b63e1
commit 87a573ada0
8 changed files with 61 additions and 77 deletions

View file

@ -49,7 +49,7 @@ static void rtl871x_load_fw_cb(const struct firmware *firmware, void *context)
if (!firmware) { if (!firmware) {
struct usb_device *udev = padapter->dvobjpriv.pusbdev; struct usb_device *udev = padapter->dvobjpriv.pusbdev;
struct usb_interface *pusb_intf = padapter->pusb_intf; struct usb_interface *pusb_intf = padapter->pusb_intf;
printk(KERN_ERR "r8712u: Firmware request failed\n"); dev_err(&udev->dev, "r8712u: Firmware request failed\n");
padapter->fw_found = false; padapter->fw_found = false;
usb_put_dev(udev); usb_put_dev(udev);
usb_set_intfdata(pusb_intf, NULL); usb_set_intfdata(pusb_intf, NULL);
@ -69,12 +69,11 @@ int rtl871x_load_fw(struct _adapter *padapter)
int rc; int rc;
init_completion(&padapter->rtl8712_fw_ready); init_completion(&padapter->rtl8712_fw_ready);
printk(KERN_INFO "r8712u: Loading firmware from \"%s\"\n", dev_info(dev, "r8712u: Loading firmware from \"%s\"\n", firmware_file);
firmware_file);
rc = request_firmware_nowait(THIS_MODULE, 1, firmware_file, dev, rc = request_firmware_nowait(THIS_MODULE, 1, firmware_file, dev,
GFP_KERNEL, padapter, rtl871x_load_fw_cb); GFP_KERNEL, padapter, rtl871x_load_fw_cb);
if (rc) if (rc)
printk(KERN_ERR "r8712u: Firmware request error %d\n", rc); dev_err(dev, "r8712u: Firmware request error %d\n", rc);
return rc; return rc;
} }
MODULE_FIRMWARE("rtlwifi/rtl8712u.bin"); MODULE_FIRMWARE("rtlwifi/rtl8712u.bin");
@ -84,8 +83,8 @@ static u32 rtl871x_open_fw(struct _adapter *padapter, const u8 **ppmappedfw)
const struct firmware **praw = &padapter->fw; const struct firmware **praw = &padapter->fw;
if (padapter->fw->size > 200000) { if (padapter->fw->size > 200000) {
printk(KERN_ERR "r8172u: Badfw->size of %d\n", dev_err(&padapter->pnetdev->dev, "r8172u: Badfw->size of %d\n",
(int)padapter->fw->size); (int)padapter->fw->size);
return 0; return 0;
} }
*ppmappedfw = (u8 *)((*praw)->data); *ppmappedfw = (u8 *)((*praw)->data);
@ -334,11 +333,13 @@ uint rtl8712_hal_init(struct _adapter *padapter)
if (rtl8712_dl_fw(padapter) != _SUCCESS) if (rtl8712_dl_fw(padapter) != _SUCCESS)
return _FAIL; return _FAIL;
printk(KERN_INFO "r8712u: 1 RCR=0x%x\n", r8712_read32(padapter, RCR)); netdev_info(padapter->pnetdev, "1 RCR=0x%x\n",
r8712_read32(padapter, RCR));
val32 = r8712_read32(padapter, RCR); val32 = r8712_read32(padapter, RCR);
r8712_write32(padapter, RCR, (val32 | BIT(26))); /* Enable RX TCP r8712_write32(padapter, RCR, (val32 | BIT(26))); /* Enable RX TCP
Checksum offload */ Checksum offload */
printk(KERN_INFO "r8712u: 2 RCR=0x%x\n", r8712_read32(padapter, RCR)); netdev_info(padapter->pnetdev, "2 RCR=0x%x\n",
r8712_read32(padapter, RCR));
val32 = r8712_read32(padapter, RCR); val32 = r8712_read32(padapter, RCR);
r8712_write32(padapter, RCR, (val32|BIT(25))); /* Append PHY status */ r8712_write32(padapter, RCR, (val32|BIT(25))); /* Append PHY status */
val32 = 0; val32 = 0;

View file

@ -224,8 +224,7 @@ struct net_device *r8712_init_netdev(void)
} }
padapter = (struct _adapter *) netdev_priv(pnetdev); padapter = (struct _adapter *) netdev_priv(pnetdev);
padapter->pnetdev = pnetdev; padapter->pnetdev = pnetdev;
printk(KERN_INFO "r8712u: register rtl8712_netdev_ops to" pr_info("r8712u: register rtl8712_netdev_ops to netdev_ops\n");
" netdev_ops\n");
pnetdev->netdev_ops = &rtl8712_netdev_ops; pnetdev->netdev_ops = &rtl8712_netdev_ops;
pnetdev->watchdog_timeo = HZ; /* 1 second timeout */ pnetdev->watchdog_timeo = HZ; /* 1 second timeout */
pnetdev->wireless_handlers = (struct iw_handler_def *) pnetdev->wireless_handlers = (struct iw_handler_def *)

View file

@ -115,11 +115,11 @@ void r8712_free_recv_priv(struct recv_priv *precvpriv)
kfree(precvpriv->pallocated_recv_buf); kfree(precvpriv->pallocated_recv_buf);
skb_queue_purge(&precvpriv->rx_skb_queue); skb_queue_purge(&precvpriv->rx_skb_queue);
if (skb_queue_len(&precvpriv->rx_skb_queue)) if (skb_queue_len(&precvpriv->rx_skb_queue))
printk(KERN_WARNING "r8712u: rx_skb_queue not empty\n"); netdev_warn(padapter->pnetdev, "r8712u: rx_skb_queue not empty\n");
skb_queue_purge(&precvpriv->free_recv_skb_queue); skb_queue_purge(&precvpriv->free_recv_skb_queue);
if (skb_queue_len(&precvpriv->free_recv_skb_queue)) if (skb_queue_len(&precvpriv->free_recv_skb_queue))
printk(KERN_WARNING "r8712u: free_recv_skb_queue not empty " netdev_warn(padapter->pnetdev, "r8712u: free_recv_skb_queue not empty %d\n",
"%d\n", skb_queue_len(&precvpriv->free_recv_skb_queue)); skb_queue_len(&precvpriv->free_recv_skb_queue));
} }
int r8712_init_recvbuf(struct _adapter *padapter, struct recv_buf *precvbuf) int r8712_init_recvbuf(struct _adapter *padapter, struct recv_buf *precvbuf)
@ -364,9 +364,8 @@ static int amsdu_to_msdu(struct _adapter *padapter, union recv_frame *prframe)
nSubframe_Length = (nSubframe_Length >> 8) + nSubframe_Length = (nSubframe_Length >> 8) +
(nSubframe_Length << 8); (nSubframe_Length << 8);
if (a_len < (ETHERNET_HEADER_SIZE + nSubframe_Length)) { if (a_len < (ETHERNET_HEADER_SIZE + nSubframe_Length)) {
printk(KERN_WARNING "r8712u: nRemain_Length is %d and" netdev_warn(padapter->pnetdev, "r8712u: nRemain_Length is %d and nSubframe_Length is: %d\n",
" nSubframe_Length is: %d\n", a_len, nSubframe_Length);
a_len, nSubframe_Length);
goto exit; goto exit;
} }
/* move the data point to data content */ /* move the data point to data content */
@ -381,8 +380,7 @@ static int amsdu_to_msdu(struct _adapter *padapter, union recv_frame *prframe)
memcpy(data_ptr, pdata, nSubframe_Length); memcpy(data_ptr, pdata, nSubframe_Length);
subframes[nr_subframes++] = sub_skb; subframes[nr_subframes++] = sub_skb;
if (nr_subframes >= MAX_SUBFRAME_COUNT) { if (nr_subframes >= MAX_SUBFRAME_COUNT) {
printk(KERN_WARNING "r8712u: ParseSubframe(): Too" netdev_warn(padapter->pnetdev, "r8712u: ParseSubframe(): Too many Subframes! Packets dropped!\n");
" many Subframes! Packets dropped!\n");
break; break;
} }
pdata += nSubframe_Length; pdata += nSubframe_Length;

View file

@ -415,8 +415,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
} else } else
return -EINVAL; return -EINVAL;
if (strcmp(param->u.crypt.alg, "WEP") == 0) { if (strcmp(param->u.crypt.alg, "WEP") == 0) {
printk(KERN_INFO "r8712u: wpa_set_encryption, crypt.alg =" netdev_info(dev, "r8712u: %s: crypt.alg = WEP\n", __func__);
" WEP\n");
padapter->securitypriv.ndisencryptstatus = padapter->securitypriv.ndisencryptstatus =
Ndis802_11Encryption1Enabled; Ndis802_11Encryption1Enabled;
padapter->securitypriv.PrivacyAlgrthm = _WEP40_; padapter->securitypriv.PrivacyAlgrthm = _WEP40_;
@ -608,8 +607,7 @@ static int r871x_set_wpa_ie(struct _adapter *padapter, char *pie,
if ((eid == _VENDOR_SPECIFIC_IE_) && if ((eid == _VENDOR_SPECIFIC_IE_) &&
(!memcmp(&buf[cnt+2], wps_oui, 4))) { (!memcmp(&buf[cnt+2], wps_oui, 4))) {
printk(KERN_INFO "r8712u: " netdev_info(padapter->pnetdev, "r8712u: SET WPS_IE\n");
"SET WPS_IE\n");
padapter->securitypriv.wps_ie_len = padapter->securitypriv.wps_ie_len =
((buf[cnt+1] + 2) < ((buf[cnt+1] + 2) <
(MAX_WPA_IE_LEN << 2)) ? (MAX_WPA_IE_LEN << 2)) ?
@ -620,8 +618,7 @@ static int r871x_set_wpa_ie(struct _adapter *padapter, char *pie,
padapter->securitypriv.wps_ie_len); padapter->securitypriv.wps_ie_len);
padapter->securitypriv.wps_phase = padapter->securitypriv.wps_phase =
true; true;
printk(KERN_INFO "r8712u: SET WPS_IE," netdev_info(padapter->pnetdev, "r8712u: SET WPS_IE, wps_phase==true\n");
" wps_phase==true\n");
cnt += buf[cnt+1]+2; cnt += buf[cnt+1]+2;
break; break;
} else } else
@ -829,8 +826,8 @@ static int r871x_wx_set_pmkid(struct net_device *dev,
strIssueBssid, ETH_ALEN)) { strIssueBssid, ETH_ALEN)) {
/* BSSID is matched, the same AP => rewrite /* BSSID is matched, the same AP => rewrite
* with new PMKID. */ * with new PMKID. */
printk(KERN_INFO "r8712u: r871x_wx_set_pmkid:" netdev_info(dev, "r8712u: %s: BSSID exists in the PMKList.\n",
" BSSID exists in the PMKList.\n"); __func__);
memcpy(psecuritypriv->PMKIDList[j].PMKID, memcpy(psecuritypriv->PMKIDList[j].PMKID,
pPMK->pmkid, IW_PMKID_LEN); pPMK->pmkid, IW_PMKID_LEN);
psecuritypriv->PMKIDList[j].bUsed = true; psecuritypriv->PMKIDList[j].bUsed = true;
@ -841,9 +838,8 @@ static int r871x_wx_set_pmkid(struct net_device *dev,
} }
if (!blInserted) { if (!blInserted) {
/* Find a new entry */ /* Find a new entry */
printk(KERN_INFO "r8712u: r871x_wx_set_pmkid: Use the" netdev_info(dev, "r8712u: %s: Use the new entry index = %d for this PMKID.\n",
" new entry index = %d for this PMKID.\n", __func__, psecuritypriv->PMKIDIndex);
psecuritypriv->PMKIDIndex);
memcpy(psecuritypriv->PMKIDList[psecuritypriv-> memcpy(psecuritypriv->PMKIDList[psecuritypriv->
PMKIDIndex].Bssid, strIssueBssid, ETH_ALEN); PMKIDIndex].Bssid, strIssueBssid, ETH_ALEN);
memcpy(psecuritypriv->PMKIDList[psecuritypriv-> memcpy(psecuritypriv->PMKIDList[psecuritypriv->
@ -876,8 +872,7 @@ static int r871x_wx_set_pmkid(struct net_device *dev,
intReturn = true; intReturn = true;
break; break;
default: default:
printk(KERN_INFO "r8712u: r871x_wx_set_pmkid: " netdev_info(dev, "r8712u: %s: unknown Command\n", __func__);
"unknown Command\n");
intReturn = false; intReturn = false;
break; break;
} }
@ -1045,8 +1040,8 @@ static int r871x_wx_set_priv(struct net_device *dev,
); );
sprintf(ext, "OK"); sprintf(ext, "OK");
} else { } else {
printk(KERN_INFO "r8712u: r871x_wx_set_priv: unknown Command" netdev_info(dev, "r8712u: %s: unknown Command %s.\n",
" %s.\n", ext); __func__, ext);
goto FREE_EXT; goto FREE_EXT;
} }
if (copy_to_user(dwrq->pointer, ext, if (copy_to_user(dwrq->pointer, ext,
@ -1183,8 +1178,8 @@ static int r8711_wx_set_scan(struct net_device *dev,
u8 status = true; u8 status = true;
if (padapter->bDriverStopped == true) { if (padapter->bDriverStopped == true) {
printk(KERN_WARNING "r8712u: in r8711_wx_set_scan: " netdev_info(dev, "In %s: bDriverStopped=%d\n",
"bDriverStopped=%d\n", padapter->bDriverStopped); __func__, padapter->bDriverStopped);
return -1; return -1;
} }
if (padapter->bup == false) if (padapter->bup == false)
@ -1556,8 +1551,7 @@ static int r8711_wx_set_enc(struct net_device *dev,
key = erq->flags & IW_ENCODE_INDEX; key = erq->flags & IW_ENCODE_INDEX;
memset(&wep, 0, sizeof(struct NDIS_802_11_WEP)); memset(&wep, 0, sizeof(struct NDIS_802_11_WEP));
if (erq->flags & IW_ENCODE_DISABLED) { if (erq->flags & IW_ENCODE_DISABLED) {
printk(KERN_INFO "r8712u: r8711_wx_set_enc: " netdev_info(dev, "r8712u: %s: EncryptionDisabled\n", __func__);
"EncryptionDisabled\n");
padapter->securitypriv.ndisencryptstatus = padapter->securitypriv.ndisencryptstatus =
Ndis802_11EncryptionDisabled; Ndis802_11EncryptionDisabled;
padapter->securitypriv.PrivacyAlgrthm = _NO_PRIVACY_; padapter->securitypriv.PrivacyAlgrthm = _NO_PRIVACY_;
@ -1578,8 +1572,7 @@ static int r8711_wx_set_enc(struct net_device *dev,
} }
/* set authentication mode */ /* set authentication mode */
if (erq->flags & IW_ENCODE_OPEN) { if (erq->flags & IW_ENCODE_OPEN) {
printk(KERN_INFO "r8712u: r8711_wx_set_enc: " netdev_info(dev, "r8712u: %s: IW_ENCODE_OPEN\n", __func__);
"IW_ENCODE_OPEN\n");
padapter->securitypriv.ndisencryptstatus = padapter->securitypriv.ndisencryptstatus =
Ndis802_11Encryption1Enabled; Ndis802_11Encryption1Enabled;
padapter->securitypriv.AuthAlgrthm = 0; /* open system */ padapter->securitypriv.AuthAlgrthm = 0; /* open system */
@ -1588,8 +1581,7 @@ static int r8711_wx_set_enc(struct net_device *dev,
authmode = Ndis802_11AuthModeOpen; authmode = Ndis802_11AuthModeOpen;
padapter->securitypriv.ndisauthtype = authmode; padapter->securitypriv.ndisauthtype = authmode;
} else if (erq->flags & IW_ENCODE_RESTRICTED) { } else if (erq->flags & IW_ENCODE_RESTRICTED) {
printk(KERN_INFO "r8712u: r8711_wx_set_enc: " netdev_info(dev, "r8712u: %s: IW_ENCODE_RESTRICTED\n", __func__);
"IW_ENCODE_RESTRICTED\n");
padapter->securitypriv.ndisencryptstatus = padapter->securitypriv.ndisencryptstatus =
Ndis802_11Encryption1Enabled; Ndis802_11Encryption1Enabled;
padapter->securitypriv.AuthAlgrthm = 1; /* shared system */ padapter->securitypriv.AuthAlgrthm = 1; /* shared system */
@ -1977,9 +1969,9 @@ static int r871x_mp_ioctl_hdl(struct net_device *dev,
status = phandler->handler(&oid_par); status = phandler->handler(&oid_par);
/* todo:check status, BytesNeeded, etc. */ /* todo:check status, BytesNeeded, etc. */
} else { } else {
printk(KERN_INFO "r8712u: r871x_mp_ioctl_hdl(): err!," netdev_info(dev, "r8712u: %s: err!, subcode=%d, oid=%d, handler=%p\n",
" subcode=%d, oid=%d, handler=%p\n", __func__, poidparam->subcode, phandler->oid,
poidparam->subcode, phandler->oid, phandler->handler); phandler->handler);
ret = -EFAULT; ret = -EFAULT;
goto _r871x_mp_ioctl_hdl_exit; goto _r871x_mp_ioctl_hdl_exit;
} }
@ -2034,13 +2026,13 @@ static int r871x_get_ap_info(struct net_device *dev,
break; break;
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list); pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
if (hwaddr_aton_i(data, bssid)) { if (hwaddr_aton_i(data, bssid)) {
printk(KERN_INFO "r8712u: Invalid BSSID '%s'.\n", netdev_info(dev, "r8712u: Invalid BSSID '%s'.\n",
(u8 *)data); (u8 *)data);
spin_unlock_irqrestore(&(pmlmepriv->scanned_queue.lock), spin_unlock_irqrestore(&(pmlmepriv->scanned_queue.lock),
irqL); irqL);
return -EINVAL; return -EINVAL;
} }
printk(KERN_INFO "r8712u: BSSID:%pM\n", bssid); netdev_info(dev, "r8712u: BSSID:%pM\n", bssid);
if (!memcmp(bssid, pnetwork->network.MacAddress, ETH_ALEN)) { if (!memcmp(bssid, pnetwork->network.MacAddress, ETH_ALEN)) {
/* BSSID match, then check if supporting wpa/wpa2 */ /* BSSID match, then check if supporting wpa/wpa2 */
pbuf = r8712_get_wpa_ie(&pnetwork->network.IEs[12], pbuf = r8712_get_wpa_ie(&pnetwork->network.IEs[12],

View file

@ -1043,8 +1043,8 @@ void r8712_got_addbareq_event_callback(struct _adapter *adapter, u8 *pbuf)
struct sta_priv *pstapriv = &adapter->stapriv; struct sta_priv *pstapriv = &adapter->stapriv;
struct recv_reorder_ctrl *precvreorder_ctrl = NULL; struct recv_reorder_ctrl *precvreorder_ctrl = NULL;
printk(KERN_INFO "r8712u: [%s] mac = %pM, seq = %d, tid = %d\n", netdev_info(adapter->pnetdev, "%s: mac = %pM, seq = %d, tid = %d\n",
__func__, pAddbareq_pram->MacAddress, __func__, pAddbareq_pram->MacAddress,
pAddbareq_pram->StartSeqNum, pAddbareq_pram->tid); pAddbareq_pram->StartSeqNum, pAddbareq_pram->tid);
psta = r8712_get_stainfo(pstapriv, pAddbareq_pram->MacAddress); psta = r8712_get_stainfo(pstapriv, pAddbareq_pram->MacAddress);
if (psta) { if (psta) {

View file

@ -205,9 +205,9 @@ static int r871x_suspend(struct usb_interface *pusb_intf, pm_message_t state)
{ {
struct net_device *pnetdev = usb_get_intfdata(pusb_intf); struct net_device *pnetdev = usb_get_intfdata(pusb_intf);
printk(KERN_INFO "r8712: suspending...\n"); netdev_info(pnetdev, "Suspending...\n");
if (!pnetdev || !netif_running(pnetdev)) { if (!pnetdev || !netif_running(pnetdev)) {
printk(KERN_INFO "r8712: unable to suspend\n"); netdev_info(pnetdev, "Unable to suspend\n");
return 0; return 0;
} }
if (pnetdev->netdev_ops->ndo_stop) if (pnetdev->netdev_ops->ndo_stop)
@ -221,9 +221,9 @@ static int r871x_resume(struct usb_interface *pusb_intf)
{ {
struct net_device *pnetdev = usb_get_intfdata(pusb_intf); struct net_device *pnetdev = usb_get_intfdata(pusb_intf);
printk(KERN_INFO "r8712: resuming...\n"); netdev_info(pnetdev, "Resuming...\n");
if (!pnetdev || !netif_running(pnetdev)) { if (!pnetdev || !netif_running(pnetdev)) {
printk(KERN_INFO "r8712: unable to resume\n"); netdev_info(pnetdev, "Unable to resume\n");
return 0; return 0;
} }
netif_device_attach(pnetdev); netif_device_attach(pnetdev);
@ -273,12 +273,12 @@ static uint r8712_usb_dvobj_init(struct _adapter *padapter)
pdvobjpriv->nr_endpoint = piface_desc->bNumEndpoints; pdvobjpriv->nr_endpoint = piface_desc->bNumEndpoints;
if (pusbd->speed == USB_SPEED_HIGH) { if (pusbd->speed == USB_SPEED_HIGH) {
pdvobjpriv->ishighspeed = true; pdvobjpriv->ishighspeed = true;
printk(KERN_INFO "r8712u: USB_SPEED_HIGH with %d endpoints\n", dev_info(&pusbd->dev, "r8712u: USB_SPEED_HIGH with %d endpoints\n",
pdvobjpriv->nr_endpoint); pdvobjpriv->nr_endpoint);
} else { } else {
pdvobjpriv->ishighspeed = false; pdvobjpriv->ishighspeed = false;
printk(KERN_INFO "r8712u: USB_SPEED_LOW with %d endpoints\n", dev_info(&pusbd->dev, "r8712u: USB_SPEED_LOW with %d endpoints\n",
pdvobjpriv->nr_endpoint); pdvobjpriv->nr_endpoint);
} }
if ((r8712_alloc_io_queue(padapter)) == _FAIL) if ((r8712_alloc_io_queue(padapter)) == _FAIL)
status = _FAIL; status = _FAIL;
@ -423,9 +423,9 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf,
tmpU1b = r8712_read8(padapter, EE_9346CR);/*CR9346*/ tmpU1b = r8712_read8(padapter, EE_9346CR);/*CR9346*/
/* To check system boot selection.*/ /* To check system boot selection.*/
printk(KERN_INFO "r8712u: Boot from %s: Autoload %s\n", dev_info(&udev->dev, "r8712u: Boot from %s: Autoload %s\n",
(tmpU1b & _9356SEL) ? "EEPROM" : "EFUSE", (tmpU1b & _9356SEL) ? "EEPROM" : "EFUSE",
(tmpU1b & _EEPROM_EN) ? "OK" : "Failed"); (tmpU1b & _EEPROM_EN) ? "OK" : "Failed");
/* To check autoload success or not.*/ /* To check autoload success or not.*/
if (tmpU1b & _EEPROM_EN) { if (tmpU1b & _EEPROM_EN) {
@ -533,8 +533,8 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf,
RT_CID_DEFAULT; RT_CID_DEFAULT;
break; break;
} }
printk(KERN_INFO "r8712u: CustomerID = 0x%.4x\n", dev_info(&udev->dev, "r8712u: CustomerID = 0x%.4x\n",
padapter->eeprompriv.CustomerID); padapter->eeprompriv.CustomerID);
/* Led mode */ /* Led mode */
switch (padapter->eeprompriv.CustomerID) { switch (padapter->eeprompriv.CustomerID) {
case RT_CID_DEFAULT: case RT_CID_DEFAULT:
@ -590,11 +590,9 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf,
* address by setting bit 1 of first octet. * address by setting bit 1 of first octet.
*/ */
mac[0] &= 0xFE; mac[0] &= 0xFE;
printk(KERN_INFO "r8712u: MAC Address from user = " dev_info(&udev->dev, "r8712u: MAC Address from user = %pM\n", mac);
"%pM\n", mac);
} else } else
printk(KERN_INFO "r8712u: MAC Address from efuse = " dev_info(&udev->dev, "r8712u: MAC Address from efuse = %pM\n", mac);
"%pM\n", mac);
memcpy(pnetdev->dev_addr, mac, ETH_ALEN); memcpy(pnetdev->dev_addr, mac, ETH_ALEN);
} }
/* step 6. Load the firmware asynchronously */ /* step 6. Load the firmware asynchronously */
@ -661,7 +659,6 @@ static void __exit r8712u_drv_halt(void)
{ {
drvpriv.drv_registered = false; drvpriv.drv_registered = false;
usb_deregister(&drvpriv.r871xu_drv); usb_deregister(&drvpriv.r871xu_drv);
printk(KERN_INFO "r8712u: Driver unloaded\n");
} }
module_init(r8712u_drv_entry); module_init(r8712u_drv_entry);

View file

@ -243,8 +243,7 @@ static void r8712_usb_read_port_complete(struct urb *purb)
(unsigned char *)precvbuf); (unsigned char *)precvbuf);
break; break;
case -EINPROGRESS: case -EINPROGRESS:
printk(KERN_ERR "r8712u: ERROR: URB IS IN" netdev_err(padapter->pnetdev, "ERROR: URB IS IN PROGRESS!\n");
" PROGRESS!/n");
break; break;
default: default:
break; break;
@ -336,8 +335,7 @@ void r8712_xmit_bh(void *priv)
if ((padapter->bDriverStopped == true) || if ((padapter->bDriverStopped == true) ||
(padapter->bSurpriseRemoved == true)) { (padapter->bSurpriseRemoved == true)) {
printk(KERN_ERR "r8712u: xmit_bh => bDriverStopped" netdev_err(padapter->pnetdev, "xmit_bh => bDriverStopped or bSurpriseRemoved\n");
" or bSurpriseRemoved\n");
return; return;
} }
ret = r8712_xmitframe_complete(padapter, pxmitpriv, NULL); ret = r8712_xmitframe_complete(padapter, pxmitpriv, NULL);
@ -387,7 +385,7 @@ static void usb_write_port_complete(struct urb *purb)
case 0: case 0:
break; break;
default: default:
printk(KERN_WARNING "r8712u: pipe error: (%d)\n", purb->status); netdev_warn(padapter->pnetdev, "r8712u: pipe error: (%d)\n", purb->status);
break; break;
} }
/* not to consider tx fragment */ /* not to consider tx fragment */
@ -502,8 +500,8 @@ int r8712_usbctrl_vendorreq(struct intf_priv *pintfpriv, u8 request, u16 value,
palloc_buf = _malloc((u32) len + 16); palloc_buf = _malloc((u32) len + 16);
if (palloc_buf == NULL) { if (palloc_buf == NULL) {
printk(KERN_ERR "r8712u: [%s] Can't alloc memory for vendor" dev_err(&udev->dev, "%s: Can't alloc memory for vendor request\n",
" request\n", __func__); __func__);
return -1; return -1;
} }
pIo_buf = palloc_buf + 16 - ((addr_t)(palloc_buf) & 0x0f); pIo_buf = palloc_buf + 16 - ((addr_t)(palloc_buf) & 0x0f);

View file

@ -134,8 +134,7 @@ int r8712_xmit_resource_alloc(struct _adapter *padapter,
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
pxmitbuf->pxmit_urb[i] = usb_alloc_urb(0, GFP_KERNEL); pxmitbuf->pxmit_urb[i] = usb_alloc_urb(0, GFP_KERNEL);
if (pxmitbuf->pxmit_urb[i] == NULL) { if (pxmitbuf->pxmit_urb[i] == NULL) {
printk(KERN_ERR "r8712u: pxmitbuf->pxmit_urb[i]" netdev_err(padapter->pnetdev, "pxmitbuf->pxmit_urb[i] == NULL\n");
" == NULL");
return _FAIL; return _FAIL;
} }
} }