Commit edbd606c authored by Moritz Muehlenhoff's avatar Moritz Muehlenhoff Committed by Greg Kroah-Hartman

Staging: wlan-ng: Replace WLAN_LOG_ERROR() with printk()

Signed-off-by: default avatarMoritz Muehlenhoff <jmm@debian.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2acbf9de
...@@ -1330,7 +1330,7 @@ void ...@@ -1330,7 +1330,7 @@ void
hfa384x_copy_from_aux( hfa384x_copy_from_aux(
hfa384x_t *hw, u32 cardaddr, u32 auxctl, void *buf, unsigned int len) hfa384x_t *hw, u32 cardaddr, u32 auxctl, void *buf, unsigned int len)
{ {
WLAN_LOG_ERROR("not used in USB.\n"); printk(KERN_ERR "not used in USB.\n");
} }
...@@ -1362,7 +1362,7 @@ void ...@@ -1362,7 +1362,7 @@ void
hfa384x_copy_to_aux( hfa384x_copy_to_aux(
hfa384x_t *hw, u32 cardaddr, u32 auxctl, void *buf, unsigned int len) hfa384x_t *hw, u32 cardaddr, u32 auxctl, void *buf, unsigned int len)
{ {
WLAN_LOG_ERROR("not used in USB.\n"); printk(KERN_ERR "not used in USB.\n");
} }
...@@ -1395,7 +1395,7 @@ int hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime, int genesis) ...@@ -1395,7 +1395,7 @@ int hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime, int genesis)
result=usb_reset_device(hw->usb); result=usb_reset_device(hw->usb);
if(result<0) { if(result<0) {
WLAN_LOG_ERROR("usb_reset_device() failed, result=%d.\n",result); printk(KERN_ERR "usb_reset_device() failed, result=%d.\n",result);
} }
return result; return result;
...@@ -2289,7 +2289,7 @@ WLAN_LOG_WARNING("dlbuf@0x%06lx len=%d to=%d\n", dlbufaddr, hw->bufinfo.len, hw- ...@@ -2289,7 +2289,7 @@ WLAN_LOG_WARNING("dlbuf@0x%06lx len=%d to=%d\n", dlbufaddr, hw->bufinfo.len, hw-
result = hfa384x_cmd_download(hw, HFA384x_PROGMODE_NV, result = hfa384x_cmd_download(hw, HFA384x_PROGMODE_NV,
burnlo, burnhi, burnlen); burnlo, burnhi, burnlen);
if ( result ) { if ( result ) {
WLAN_LOG_ERROR("download(NV,lo=%x,hi=%x,len=%x) " printk(KERN_ERR "download(NV,lo=%x,hi=%x,len=%x) "
"cmd failed, result=%d. Aborting d/l\n", "cmd failed, result=%d. Aborting d/l\n",
burnlo, burnhi, burnlen, result); burnlo, burnhi, burnlen, result);
goto exit_proc; goto exit_proc;
...@@ -2322,7 +2322,7 @@ WLAN_LOG_WARNING("dlbuf@0x%06lx len=%d to=%d\n", dlbufaddr, hw->bufinfo.len, hw- ...@@ -2322,7 +2322,7 @@ WLAN_LOG_WARNING("dlbuf@0x%06lx len=%d to=%d\n", dlbufaddr, hw->bufinfo.len, hw-
Comment out for debugging, assume the write was successful. Comment out for debugging, assume the write was successful.
if (result) { if (result) {
WLAN_LOG_ERROR( printk(KERN_ERR
"Write to dl buffer failed, " "Write to dl buffer failed, "
"result=0x%04x. Aborting.\n", "result=0x%04x. Aborting.\n",
result); result);
...@@ -2337,7 +2337,7 @@ Comment out for debugging, assume the write was successful. ...@@ -2337,7 +2337,7 @@ Comment out for debugging, assume the write was successful.
HFA384x_PROGMODE_NVWRITE, HFA384x_PROGMODE_NVWRITE,
0,0,0); 0,0,0);
if ( result ) { if ( result ) {
WLAN_LOG_ERROR( printk(KERN_ERR
"download(NVWRITE,lo=%x,hi=%x,len=%x) " "download(NVWRITE,lo=%x,hi=%x,len=%x) "
"cmd failed, result=%d. Aborting d/l\n", "cmd failed, result=%d. Aborting d/l\n",
burnlo, burnhi, burnlen, result); burnlo, burnhi, burnlen, result);
...@@ -2486,7 +2486,7 @@ hfa384x_drvr_setconfig_async( ...@@ -2486,7 +2486,7 @@ hfa384x_drvr_setconfig_async(
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int hfa384x_drvr_handover( hfa384x_t *hw, u8 *addr) int hfa384x_drvr_handover( hfa384x_t *hw, u8 *addr)
{ {
WLAN_LOG_ERROR("Not currently supported in USB!\n"); printk(KERN_ERR "Not currently supported in USB!\n");
return -EIO; return -EIO;
} }
...@@ -2585,7 +2585,7 @@ hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr) ...@@ -2585,7 +2585,7 @@ hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr)
/* Check that a port isn't active */ /* Check that a port isn't active */
for ( i = 0; i < HFA384x_PORTID_MAX; i++) { for ( i = 0; i < HFA384x_PORTID_MAX; i++) {
if ( hw->port_enabled[i] ) { if ( hw->port_enabled[i] ) {
WLAN_LOG_ERROR( printk(KERN_ERR
"Can't download with a macport enabled.\n"); "Can't download with a macport enabled.\n");
return -EINVAL; return -EINVAL;
} }
...@@ -2593,7 +2593,7 @@ hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr) ...@@ -2593,7 +2593,7 @@ hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr)
/* Check that we're not already in a download state */ /* Check that we're not already in a download state */
if ( hw->dlstate != HFA384x_DLSTATE_DISABLED ) { if ( hw->dlstate != HFA384x_DLSTATE_DISABLED ) {
WLAN_LOG_ERROR( printk(KERN_ERR
"Download state not disabled.\n"); "Download state not disabled.\n");
return -EINVAL; return -EINVAL;
} }
...@@ -2778,14 +2778,14 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len) ...@@ -2778,14 +2778,14 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len)
pdrcode = hfa384x2host_16(pda[currpdr+1]); pdrcode = hfa384x2host_16(pda[currpdr+1]);
/* Test the record length */ /* Test the record length */
if ( pdrlen > HFA384x_PDR_LEN_MAX || pdrlen == 0) { if ( pdrlen > HFA384x_PDR_LEN_MAX || pdrlen == 0) {
WLAN_LOG_ERROR("pdrlen invalid=%d\n", printk(KERN_ERR "pdrlen invalid=%d\n",
pdrlen); pdrlen);
pdaok = 0; pdaok = 0;
break; break;
} }
/* Test the code */ /* Test the code */
if ( !hfa384x_isgood_pdrcode(pdrcode) ) { if ( !hfa384x_isgood_pdrcode(pdrcode) ) {
WLAN_LOG_ERROR("pdrcode invalid=%d\n", printk(KERN_ERR "pdrcode invalid=%d\n",
pdrcode); pdrcode);
pdaok = 0; pdaok = 0;
break; break;
...@@ -2883,23 +2883,23 @@ int hfa384x_drvr_start(hfa384x_t *hw) ...@@ -2883,23 +2883,23 @@ int hfa384x_drvr_start(hfa384x_t *hw)
*/ */
result = usb_get_status(hw->usb, USB_RECIP_ENDPOINT, hw->endp_in, &status); result = usb_get_status(hw->usb, USB_RECIP_ENDPOINT, hw->endp_in, &status);
if (result < 0) { if (result < 0) {
WLAN_LOG_ERROR( printk(KERN_ERR
"Cannot get bulk in endpoint status.\n"); "Cannot get bulk in endpoint status.\n");
goto done; goto done;
} }
if ((status == 1) && usb_clear_halt(hw->usb, hw->endp_in)) { if ((status == 1) && usb_clear_halt(hw->usb, hw->endp_in)) {
WLAN_LOG_ERROR( printk(KERN_ERR
"Failed to reset bulk in endpoint.\n"); "Failed to reset bulk in endpoint.\n");
} }
result = usb_get_status(hw->usb, USB_RECIP_ENDPOINT, hw->endp_out, &status); result = usb_get_status(hw->usb, USB_RECIP_ENDPOINT, hw->endp_out, &status);
if (result < 0) { if (result < 0) {
WLAN_LOG_ERROR( printk(KERN_ERR
"Cannot get bulk out endpoint status.\n"); "Cannot get bulk out endpoint status.\n");
goto done; goto done;
} }
if ((status == 1) && usb_clear_halt(hw->usb, hw->endp_out)) { if ((status == 1) && usb_clear_halt(hw->usb, hw->endp_out)) {
WLAN_LOG_ERROR( printk(KERN_ERR
"Failed to reset bulk out endpoint.\n"); "Failed to reset bulk out endpoint.\n");
} }
...@@ -2909,7 +2909,7 @@ int hfa384x_drvr_start(hfa384x_t *hw) ...@@ -2909,7 +2909,7 @@ int hfa384x_drvr_start(hfa384x_t *hw)
/* Post the IN urb */ /* Post the IN urb */
result = submit_rx_urb(hw, GFP_KERNEL); result = submit_rx_urb(hw, GFP_KERNEL);
if (result != 0) { if (result != 0) {
WLAN_LOG_ERROR( printk(KERN_ERR
"Fatal, failed to submit RX URB, result=%d\n", "Fatal, failed to submit RX URB, result=%d\n",
result); result);
goto done; goto done;
...@@ -2930,7 +2930,7 @@ int hfa384x_drvr_start(hfa384x_t *hw) ...@@ -2930,7 +2930,7 @@ int hfa384x_drvr_start(hfa384x_t *hw)
result = result2 = hfa384x_cmd_initialize(hw); result = result2 = hfa384x_cmd_initialize(hw);
if (result1 != 0) { if (result1 != 0) {
if (result2 != 0) { if (result2 != 0) {
WLAN_LOG_ERROR( printk(KERN_ERR
"cmd_initialize() failed on two attempts, results %d and %d\n", "cmd_initialize() failed on two attempts, results %d and %d\n",
result1, result2); result1, result2);
usb_kill_urb(&hw->rx_urb); usb_kill_urb(&hw->rx_urb);
...@@ -3112,7 +3112,7 @@ int hfa384x_drvr_txframe(hfa384x_t *hw, struct sk_buff *skb, p80211_hdr_t *p8021 ...@@ -3112,7 +3112,7 @@ int hfa384x_drvr_txframe(hfa384x_t *hw, struct sk_buff *skb, p80211_hdr_t *p8021
result = 1; result = 1;
ret = submit_tx_urb(hw, &hw->tx_urb, GFP_ATOMIC); ret = submit_tx_urb(hw, &hw->tx_urb, GFP_ATOMIC);
if ( ret != 0 ) { if ( ret != 0 ) {
WLAN_LOG_ERROR( printk(KERN_ERR
"submit_tx_urb() failed, error=%d\n", ret); "submit_tx_urb() failed, error=%d\n", ret);
result = 3; result = 3;
} }
...@@ -3337,7 +3337,7 @@ static void unlocked_usbctlx_complete(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx) ...@@ -3337,7 +3337,7 @@ static void unlocked_usbctlx_complete(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx)
break; break;
default: default:
WLAN_LOG_ERROR("CTLX[%d] not in a terminating state(%s)\n", printk(KERN_ERR "CTLX[%d] not in a terminating state(%s)\n",
hfa384x2host_16(ctlx->outbuf.type), hfa384x2host_16(ctlx->outbuf.type),
ctlxstr(ctlx->state)); ctlxstr(ctlx->state));
break; break;
...@@ -3437,7 +3437,7 @@ hfa384x_usbctlxq_run(hfa384x_t *hw) ...@@ -3437,7 +3437,7 @@ hfa384x_usbctlxq_run(hfa384x_t *hw)
break; break;
} }
WLAN_LOG_ERROR("Failed to submit CTLX[%d]: error=%d\n", printk(KERN_ERR "Failed to submit CTLX[%d]: error=%d\n",
hfa384x2host_16(head->outbuf.type), result); hfa384x2host_16(head->outbuf.type), result);
unlocked_usbctlx_complete(hw, head); unlocked_usbctlx_complete(hw, head);
} /* while */ } /* while */
...@@ -3559,7 +3559,7 @@ static void hfa384x_usbin_callback(struct urb *urb) ...@@ -3559,7 +3559,7 @@ static void hfa384x_usbin_callback(struct urb *urb)
result = submit_rx_urb(hw, GFP_ATOMIC); result = submit_rx_urb(hw, GFP_ATOMIC);
if (result != 0) { if (result != 0) {
WLAN_LOG_ERROR( printk(KERN_ERR
"Fatal, failed to resubmit rx_urb. error=%d\n", "Fatal, failed to resubmit rx_urb. error=%d\n",
result); result);
} }
...@@ -3733,7 +3733,7 @@ static void hfa384x_usbin_ctlx(hfa384x_t *hw, hfa384x_usbin_t *usbin, ...@@ -3733,7 +3733,7 @@ static void hfa384x_usbin_ctlx(hfa384x_t *hw, hfa384x_usbin_t *usbin,
/* /*
* Throw this CTLX away ... * Throw this CTLX away ...
*/ */
WLAN_LOG_ERROR("Matched IN URB, CTLX[%d] in invalid state(%s)." printk(KERN_ERR "Matched IN URB, CTLX[%d] in invalid state(%s)."
" Discarded.\n", " Discarded.\n",
hfa384x2host_16(ctlx->outbuf.type), hfa384x2host_16(ctlx->outbuf.type),
ctlxstr(ctlx->state)); ctlxstr(ctlx->state));
...@@ -3938,7 +3938,7 @@ static void hfa384x_int_rxmonitor( wlandevice_t *wlandev, hfa384x_usb_rxfrm_t *r ...@@ -3938,7 +3938,7 @@ static void hfa384x_int_rxmonitor( wlandevice_t *wlandev, hfa384x_usb_rxfrm_t *r
} }
if ( (skb = dev_alloc_skb(skblen)) == NULL ) { if ( (skb = dev_alloc_skb(skblen)) == NULL ) {
WLAN_LOG_ERROR("alloc_skb failed trying to allocate %d bytes\n", skblen); printk(KERN_ERR "alloc_skb failed trying to allocate %d bytes\n", skblen);
return; return;
} }
...@@ -4183,7 +4183,7 @@ static void hfa384x_ctlxout_callback(struct urb *urb) ...@@ -4183,7 +4183,7 @@ static void hfa384x_ctlxout_callback(struct urb *urb)
default: default:
/* This is NOT a valid CTLX "success" state! */ /* This is NOT a valid CTLX "success" state! */
WLAN_LOG_ERROR( printk(KERN_ERR
"Illegal CTLX[%d] success state(%s, %d) in OUT URB\n", "Illegal CTLX[%d] success state(%s, %d) in OUT URB\n",
hfa384x2host_16(ctlx->outbuf.type), hfa384x2host_16(ctlx->outbuf.type),
ctlxstr(ctlx->state), urb->status); ctlxstr(ctlx->state), urb->status);
......
...@@ -215,7 +215,7 @@ int skb_ether_to_p80211( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb ...@@ -215,7 +215,7 @@ int skb_ether_to_p80211( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb
memcpy(p80211_hdr->a3.a3, &e_hdr.saddr, ETH_ALEN); memcpy(p80211_hdr->a3.a3, &e_hdr.saddr, ETH_ALEN);
break; break;
default: default:
WLAN_LOG_ERROR("Error: Converting eth to wlan in unknown mode.\n"); printk(KERN_ERR "Error: Converting eth to wlan in unknown mode.\n");
return 1; return 1;
break; break;
} }
...@@ -326,7 +326,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb ...@@ -326,7 +326,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb
} else { } else {
payload_offset = WLAN_HDR_A4_LEN; payload_offset = WLAN_HDR_A4_LEN;
if (payload_length < WLAN_HDR_A4_LEN - WLAN_HDR_A3_LEN) { if (payload_length < WLAN_HDR_A4_LEN - WLAN_HDR_A3_LEN) {
WLAN_LOG_ERROR("A4 frame too short!\n"); printk(KERN_ERR "A4 frame too short!\n");
return 1; return 1;
} }
payload_length -= (WLAN_HDR_A4_LEN - WLAN_HDR_A3_LEN); payload_length -= (WLAN_HDR_A4_LEN - WLAN_HDR_A3_LEN);
...@@ -337,7 +337,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb ...@@ -337,7 +337,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb
/* perform de-wep if necessary.. */ /* perform de-wep if necessary.. */
if ((wlandev->hostwep & HOSTWEP_PRIVACYINVOKED) && WLAN_GET_FC_ISWEP(fc) && (wlandev->hostwep & HOSTWEP_DECRYPT)) { if ((wlandev->hostwep & HOSTWEP_PRIVACYINVOKED) && WLAN_GET_FC_ISWEP(fc) && (wlandev->hostwep & HOSTWEP_DECRYPT)) {
if (payload_length <= 8) { if (payload_length <= 8) {
WLAN_LOG_ERROR("WEP frame too short (%u).\n", printk(KERN_ERR "WEP frame too short (%u).\n",
skb->len); skb->len);
return 1; return 1;
} }
...@@ -377,7 +377,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb ...@@ -377,7 +377,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb
if ( payload_length > (netdev->mtu + WLAN_ETHHDR_LEN)) { if ( payload_length > (netdev->mtu + WLAN_ETHHDR_LEN)) {
/* A bogus length ethfrm has been encap'd. */ /* A bogus length ethfrm has been encap'd. */
/* Is someone trying an oflow attack? */ /* Is someone trying an oflow attack? */
WLAN_LOG_ERROR("ENCAP frame too large (%d > %d)\n", printk(KERN_ERR "ENCAP frame too large (%d > %d)\n",
payload_length, netdev->mtu + WLAN_ETHHDR_LEN); payload_length, netdev->mtu + WLAN_ETHHDR_LEN);
return 1; return 1;
} }
...@@ -404,7 +404,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb ...@@ -404,7 +404,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb
if ( payload_length > netdev->mtu ) { if ( payload_length > netdev->mtu ) {
/* A bogus length ethfrm has been sent. */ /* A bogus length ethfrm has been sent. */
/* Is someone trying an oflow attack? */ /* Is someone trying an oflow attack? */
WLAN_LOG_ERROR("SNAP frame too large (%d > %d)\n", printk(KERN_ERR "SNAP frame too large (%d > %d)\n",
payload_length, netdev->mtu); payload_length, netdev->mtu);
return 1; return 1;
} }
...@@ -434,7 +434,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb ...@@ -434,7 +434,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb
> netdev->mtu) { > netdev->mtu) {
/* A bogus length ethfrm has been sent. */ /* A bogus length ethfrm has been sent. */
/* Is someone trying an oflow attack? */ /* Is someone trying an oflow attack? */
WLAN_LOG_ERROR("DIXII frame too large (%ld > %d)\n", printk(KERN_ERR "DIXII frame too large (%ld > %d)\n",
(long int) (payload_length - sizeof(wlan_llc_t) - (long int) (payload_length - sizeof(wlan_llc_t) -
sizeof(wlan_snap_t)), sizeof(wlan_snap_t)),
netdev->mtu); netdev->mtu);
...@@ -469,7 +469,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb ...@@ -469,7 +469,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb
if ( payload_length > netdev->mtu ) { if ( payload_length > netdev->mtu ) {
/* A bogus length ethfrm has been sent. */ /* A bogus length ethfrm has been sent. */
/* Is someone trying an oflow attack? */ /* Is someone trying an oflow attack? */
WLAN_LOG_ERROR("OTHER frame too large (%d > %d)\n", printk(KERN_ERR "OTHER frame too large (%d > %d)\n",
payload_length, payload_length,
netdev->mtu); netdev->mtu);
return 1; return 1;
...@@ -613,7 +613,7 @@ p80211skb_rxmeta_attach(struct wlandevice *wlandev, struct sk_buff *skb) ...@@ -613,7 +613,7 @@ p80211skb_rxmeta_attach(struct wlandevice *wlandev, struct sk_buff *skb)
/* If these already have metadata, we error out! */ /* If these already have metadata, we error out! */
if (P80211SKB_RXMETA(skb) != NULL) { if (P80211SKB_RXMETA(skb) != NULL) {
WLAN_LOG_ERROR("%s: RXmeta already attached!\n", printk(KERN_ERR "%s: RXmeta already attached!\n",
wlandev->name); wlandev->name);
result = 0; result = 0;
goto exit; goto exit;
...@@ -623,7 +623,7 @@ p80211skb_rxmeta_attach(struct wlandevice *wlandev, struct sk_buff *skb) ...@@ -623,7 +623,7 @@ p80211skb_rxmeta_attach(struct wlandevice *wlandev, struct sk_buff *skb)
rxmeta = kmalloc(sizeof(p80211_rxmeta_t), GFP_ATOMIC); rxmeta = kmalloc(sizeof(p80211_rxmeta_t), GFP_ATOMIC);
if ( rxmeta == NULL ) { if ( rxmeta == NULL ) {
WLAN_LOG_ERROR("%s: Failed to allocate rxmeta.\n", printk(KERN_ERR "%s: Failed to allocate rxmeta.\n",
wlandev->name); wlandev->name);
result = 1; result = 1;
goto exit; goto exit;
...@@ -668,7 +668,7 @@ p80211skb_free(struct wlandevice *wlandev, struct sk_buff *skb) ...@@ -668,7 +668,7 @@ p80211skb_free(struct wlandevice *wlandev, struct sk_buff *skb)
if ( meta && meta->rx) { if ( meta && meta->rx) {
p80211skb_rxmeta_detach(skb); p80211skb_rxmeta_detach(skb);
} else { } else {
WLAN_LOG_ERROR("Freeing an skb (%p) w/ no frmmeta.\n", skb); printk(KERN_ERR "Freeing an skb (%p) w/ no frmmeta.\n", skb);
} }
dev_kfree_skb(skb); dev_kfree_skb(skb);
......
...@@ -719,7 +719,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr) ...@@ -719,7 +719,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
* change the netdev address * change the netdev address
*/ */
if ( result != 0 || resultcode->data != P80211ENUM_resultcode_success) { if ( result != 0 || resultcode->data != P80211ENUM_resultcode_success) {
WLAN_LOG_ERROR( printk(KERN_ERR
"Low-level driver failed dot11req_mibset(dot11MACAddress).\n"); "Low-level driver failed dot11req_mibset(dot11MACAddress).\n");
result = -EADDRNOTAVAIL; result = -EADDRNOTAVAIL;
} else { } else {
...@@ -785,7 +785,7 @@ int wlan_setup(wlandevice_t *wlandev) ...@@ -785,7 +785,7 @@ int wlan_setup(wlandevice_t *wlandev)
/* Allocate and initialize the struct device */ /* Allocate and initialize the struct device */
dev = alloc_netdev(0,"wlan%d",ether_setup); dev = alloc_netdev(0,"wlan%d",ether_setup);
if ( dev == NULL ) { if ( dev == NULL ) {
WLAN_LOG_ERROR("Failed to alloc netdev.\n"); printk(KERN_ERR "Failed to alloc netdev.\n");
result = 1; result = 1;
} else { } else {
wlandev->netdev = dev; wlandev->netdev = dev;
...@@ -852,7 +852,7 @@ int wlan_unsetup(wlandevice_t *wlandev) ...@@ -852,7 +852,7 @@ int wlan_unsetup(wlandevice_t *wlandev)
tasklet_kill(&wlandev->rx_bh); tasklet_kill(&wlandev->rx_bh);
if (wlandev->netdev == NULL ) { if (wlandev->netdev == NULL ) {
WLAN_LOG_ERROR("called without wlandev->netdev set.\n"); printk(KERN_ERR "called without wlandev->netdev set.\n");
result = 1; result = 1;
} else { } else {
free_netdev(wlandev->netdev); free_netdev(wlandev->netdev);
......
...@@ -141,7 +141,7 @@ int p80211req_dorequest( wlandevice_t *wlandev, u8 *msgbuf) ...@@ -141,7 +141,7 @@ int p80211req_dorequest( wlandevice_t *wlandev, u8 *msgbuf)
/* Check Permissions */ /* Check Permissions */
if (!capable(CAP_NET_ADMIN) && if (!capable(CAP_NET_ADMIN) &&
(msg->msgcode != DIDmsg_dot11req_mibget)) { (msg->msgcode != DIDmsg_dot11req_mibget)) {
WLAN_LOG_ERROR("%s: only dot11req_mibget allowed for non-root.\n", wlandev->name); printk(KERN_ERR "%s: only dot11req_mibget allowed for non-root.\n", wlandev->name);
return -EPERM; return -EPERM;
} }
......
...@@ -1274,7 +1274,7 @@ static int p80211wext_siwscan(netdevice_t *dev, ...@@ -1274,7 +1274,7 @@ static int p80211wext_siwscan(netdevice_t *dev,
int i = 0; int i = 0;
if (wlandev->macmode == WLAN_MACMODE_ESS_AP) { if (wlandev->macmode == WLAN_MACMODE_ESS_AP) {
WLAN_LOG_ERROR("Can't scan in AP mode\n"); printk(KERN_ERR "Can't scan in AP mode\n");
err = (-EOPNOTSUPP); err = (-EOPNOTSUPP);
goto exit; goto exit;
} }
......
This diff is collapsed.
...@@ -795,7 +795,7 @@ void *data) ...@@ -795,7 +795,7 @@ void *data)
break; break;
} }
default: default:
WLAN_LOG_ERROR("Unhandled DID 0x%08x\n", mib->did); printk(KERN_ERR "Unhandled DID 0x%08x\n", mib->did);
} }
return(0); return(0);
......
...@@ -495,7 +495,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate) ...@@ -495,7 +495,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
* for firmware loading. * for firmware loading.
*/ */
if ((result=hfa384x_drvr_start(hw))) { if ((result=hfa384x_drvr_start(hw))) {
WLAN_LOG_ERROR( printk(KERN_ERR
"hfa384x_drvr_start() failed," "hfa384x_drvr_start() failed,"
"result=%d\n", (int)result); "result=%d\n", (int)result);
result = result =
...@@ -539,7 +539,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate) ...@@ -539,7 +539,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
* of the hardware or a previous firmware load. * of the hardware or a previous firmware load.
*/ */
if ((result=hfa384x_drvr_start(hw))) { if ((result=hfa384x_drvr_start(hw))) {
WLAN_LOG_ERROR( printk(KERN_ERR
"hfa384x_drvr_start() failed," "hfa384x_drvr_start() failed,"
"result=%d\n", (int)result); "result=%d\n", (int)result);
result = result =
...@@ -549,7 +549,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate) ...@@ -549,7 +549,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
} }
if ((result=prism2sta_getcardinfo(wlandev))) { if ((result=prism2sta_getcardinfo(wlandev))) {
WLAN_LOG_ERROR( printk(KERN_ERR
"prism2sta_getcardinfo() failed," "prism2sta_getcardinfo() failed,"
"result=%d\n", (int)result); "result=%d\n", (int)result);
result = result =
...@@ -559,7 +559,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate) ...@@ -559,7 +559,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
break; break;
} }
if ((result=prism2sta_globalsetup(wlandev))) { if ((result=prism2sta_globalsetup(wlandev))) {
WLAN_LOG_ERROR( printk(KERN_ERR
"prism2sta_globalsetup() failed," "prism2sta_globalsetup() failed,"
"result=%d\n", (int)result); "result=%d\n", (int)result);
result = result =
...@@ -661,7 +661,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) ...@@ -661,7 +661,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
result = hfa384x_drvr_getconfig(hw, HFA384x_RID_NICIDENTITY, result = hfa384x_drvr_getconfig(hw, HFA384x_RID_NICIDENTITY,
&hw->ident_nic, sizeof(hfa384x_compident_t)); &hw->ident_nic, sizeof(hfa384x_compident_t));
if ( result ) { if ( result ) {
WLAN_LOG_ERROR("Failed to retrieve NICIDENTITY\n"); printk(KERN_ERR "Failed to retrieve NICIDENTITY\n");
goto failed; goto failed;
} }
...@@ -679,7 +679,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) ...@@ -679,7 +679,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
result = hfa384x_drvr_getconfig(hw, HFA384x_RID_PRIIDENTITY, result = hfa384x_drvr_getconfig(hw, HFA384x_RID_PRIIDENTITY,
&hw->ident_pri_fw, sizeof(hfa384x_compident_t)); &hw->ident_pri_fw, sizeof(hfa384x_compident_t));
if ( result ) { if ( result ) {
WLAN_LOG_ERROR("Failed to retrieve PRIIDENTITY\n"); printk(KERN_ERR "Failed to retrieve PRIIDENTITY\n");
goto failed; goto failed;
} }
...@@ -697,12 +697,12 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) ...@@ -697,12 +697,12 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
result = hfa384x_drvr_getconfig(hw, HFA384x_RID_STAIDENTITY, result = hfa384x_drvr_getconfig(hw, HFA384x_RID_STAIDENTITY,
&hw->ident_sta_fw, sizeof(hfa384x_compident_t)); &hw->ident_sta_fw, sizeof(hfa384x_compident_t));
if ( result ) { if ( result ) {
WLAN_LOG_ERROR("Failed to retrieve STAIDENTITY\n"); printk(KERN_ERR "Failed to retrieve STAIDENTITY\n");
goto failed; goto failed;
} }
if (hw->ident_nic.id < 0x8000) { if (hw->ident_nic.id < 0x8000) {
WLAN_LOG_ERROR("FATAL: Card is not an Intersil Prism2/2.5/3\n"); printk(KERN_ERR "FATAL: Card is not an Intersil Prism2/2.5/3\n");
result = -1; result = -1;
goto failed; goto failed;
} }
...@@ -727,7 +727,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) ...@@ -727,7 +727,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
"ident: ap f/w: id=0x%02x %d.%d.%d\n", "ident: ap f/w: id=0x%02x %d.%d.%d\n",
hw->ident_sta_fw.id, hw->ident_sta_fw.major, hw->ident_sta_fw.id, hw->ident_sta_fw.major,
hw->ident_sta_fw.minor, hw->ident_sta_fw.variant); hw->ident_sta_fw.minor, hw->ident_sta_fw.variant);
WLAN_LOG_ERROR("Unsupported Tertiary AP firmeare loaded!\n"); printk(KERN_ERR "Unsupported Tertiary AP firmeare loaded!\n");
goto failed; goto failed;
} }
...@@ -735,7 +735,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) ...@@ -735,7 +735,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
result = hfa384x_drvr_getconfig(hw, HFA384x_RID_MFISUPRANGE, result = hfa384x_drvr_getconfig(hw, HFA384x_RID_MFISUPRANGE,
&hw->cap_sup_mfi, sizeof(hfa384x_caplevel_t)); &hw->cap_sup_mfi, sizeof(hfa384x_caplevel_t));
if ( result ) { if ( result ) {
WLAN_LOG_ERROR("Failed to retrieve MFISUPRANGE\n"); printk(KERN_ERR "Failed to retrieve MFISUPRANGE\n");
goto failed; goto failed;
} }
...@@ -757,7 +757,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) ...@@ -757,7 +757,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
result = hfa384x_drvr_getconfig(hw, HFA384x_RID_CFISUPRANGE, result = hfa384x_drvr_getconfig(hw, HFA384x_RID_CFISUPRANGE,
&hw->cap_sup_cfi, sizeof(hfa384x_caplevel_t)); &hw->cap_sup_cfi, sizeof(hfa384x_caplevel_t));
if ( result ) { if ( result ) {
WLAN_LOG_ERROR("Failed to retrieve CFISUPRANGE\n"); printk(KERN_ERR "Failed to retrieve CFISUPRANGE\n");
goto failed; goto failed;
} }
...@@ -779,7 +779,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) ...@@ -779,7 +779,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
result = hfa384x_drvr_getconfig(hw, HFA384x_RID_PRISUPRANGE, result = hfa384x_drvr_getconfig(hw, HFA384x_RID_PRISUPRANGE,
&hw->cap_sup_pri, sizeof(hfa384x_caplevel_t)); &hw->cap_sup_pri, sizeof(hfa384x_caplevel_t));
if ( result ) { if ( result ) {
WLAN_LOG_ERROR("Failed to retrieve PRISUPRANGE\n"); printk(KERN_ERR "Failed to retrieve PRISUPRANGE\n");
goto failed; goto failed;
} }
...@@ -801,7 +801,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) ...@@ -801,7 +801,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
result = hfa384x_drvr_getconfig(hw, HFA384x_RID_STASUPRANGE, result = hfa384x_drvr_getconfig(hw, HFA384x_RID_STASUPRANGE,
&hw->cap_sup_sta, sizeof(hfa384x_caplevel_t)); &hw->cap_sup_sta, sizeof(hfa384x_caplevel_t));
if ( result ) { if ( result ) {
WLAN_LOG_ERROR("Failed to retrieve STASUPRANGE\n"); printk(KERN_ERR "Failed to retrieve STASUPRANGE\n");
goto failed; goto failed;
} }
...@@ -831,7 +831,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) ...@@ -831,7 +831,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
result = hfa384x_drvr_getconfig(hw, HFA384x_RID_PRI_CFIACTRANGES, result = hfa384x_drvr_getconfig(hw, HFA384x_RID_PRI_CFIACTRANGES,
&hw->cap_act_pri_cfi, sizeof(hfa384x_caplevel_t)); &hw->cap_act_pri_cfi, sizeof(hfa384x_caplevel_t));
if ( result ) { if ( result ) {
WLAN_LOG_ERROR("Failed to retrieve PRI_CFIACTRANGES\n"); printk(KERN_ERR "Failed to retrieve PRI_CFIACTRANGES\n");
goto failed; goto failed;
} }
...@@ -853,7 +853,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) ...@@ -853,7 +853,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
result = hfa384x_drvr_getconfig(hw, HFA384x_RID_STA_CFIACTRANGES, result = hfa384x_drvr_getconfig(hw, HFA384x_RID_STA_CFIACTRANGES,
&hw->cap_act_sta_cfi, sizeof(hfa384x_caplevel_t)); &hw->cap_act_sta_cfi, sizeof(hfa384x_caplevel_t));
if ( result ) { if ( result ) {
WLAN_LOG_ERROR("Failed to retrieve STA_CFIACTRANGES\n"); printk(KERN_ERR "Failed to retrieve STA_CFIACTRANGES\n");
goto failed; goto failed;
} }
...@@ -875,7 +875,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) ...@@ -875,7 +875,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
result = hfa384x_drvr_getconfig(hw, HFA384x_RID_STA_MFIACTRANGES, result = hfa384x_drvr_getconfig(hw, HFA384x_RID_STA_MFIACTRANGES,
&hw->cap_act_sta_mfi, sizeof(hfa384x_caplevel_t)); &hw->cap_act_sta_mfi, sizeof(hfa384x_caplevel_t));
if ( result ) { if ( result ) {
WLAN_LOG_ERROR("Failed to retrieve STA_MFIACTRANGES\n"); printk(KERN_ERR "Failed to retrieve STA_MFIACTRANGES\n");
goto failed; goto failed;
} }
...@@ -901,7 +901,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) ...@@ -901,7 +901,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
pstr, sizeof(pstr)); pstr, sizeof(pstr));
printk(KERN_INFO "Prism2 card SN: %s\n", pstr); printk(KERN_INFO "Prism2 card SN: %s\n", pstr);
} else { } else {
WLAN_LOG_ERROR("Failed to retrieve Prism2 Card SN\n"); printk(KERN_ERR "Failed to retrieve Prism2 Card SN\n");
goto failed; goto failed;
} }
...@@ -909,7 +909,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) ...@@ -909,7 +909,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
result = hfa384x_drvr_getconfig(hw, HFA384x_RID_CNFOWNMACADDR, result = hfa384x_drvr_getconfig(hw, HFA384x_RID_CNFOWNMACADDR,
wlandev->netdev->dev_addr, ETH_ALEN); wlandev->netdev->dev_addr, ETH_ALEN);
if ( result != 0 ) { if ( result != 0 ) {
WLAN_LOG_ERROR("Failed to retrieve mac address\n"); printk(KERN_ERR "Failed to retrieve mac address\n");
goto failed; goto failed;
} }
...@@ -937,7 +937,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) ...@@ -937,7 +937,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
goto done; goto done;
failed: failed:
WLAN_LOG_ERROR("Failed, result=%d\n", result); printk(KERN_ERR "Failed, result=%d\n", result);
done: done:
return result; return result;
} }
...@@ -1126,7 +1126,7 @@ static void prism2sta_inf_scanresults(wlandevice_t *wlandev, ...@@ -1126,7 +1126,7 @@ static void prism2sta_inf_scanresults(wlandevice_t *wlandev,
HFA384x_RID_JOINREQUEST, HFA384x_RID_JOINREQUEST,
&joinreq, HFA384x_RID_JOINREQUEST_LEN); &joinreq, HFA384x_RID_JOINREQUEST_LEN);
if (result) { if (result) {
WLAN_LOG_ERROR("setconfig(joinreq) failed, result=%d\n", result); printk(KERN_ERR "setconfig(joinreq) failed, result=%d\n", result);
} }
return; return;
...@@ -1751,7 +1751,7 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev, ...@@ -1751,7 +1751,7 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev,
&rec, sizeof(rec)); &rec, sizeof(rec));
if (result) { if (result) {
if (added) hw->authlist.cnt--; if (added) hw->authlist.cnt--;
WLAN_LOG_ERROR("setconfig(authenticatestation) failed, result=%d\n", result); printk(KERN_ERR "setconfig(authenticatestation) failed, result=%d\n", result);
} }
return; return;
} }
...@@ -2029,7 +2029,7 @@ static wlandevice_t *create_wlan(void) ...@@ -2029,7 +2029,7 @@ static wlandevice_t *create_wlan(void)
hw = kmalloc(sizeof(hfa384x_t), GFP_KERNEL); hw = kmalloc(sizeof(hfa384x_t), GFP_KERNEL);
if (!wlandev || !hw) { if (!wlandev || !hw) {
WLAN_LOG_ERROR("%s: Memory allocation failure.\n", dev_info); printk(KERN_ERR "%s: Memory allocation failure.\n", dev_info);
if (wlandev) kfree(wlandev); if (wlandev) kfree(wlandev);
if (hw) kfree(hw); if (hw) kfree(hw);
return NULL; return NULL;
...@@ -2083,7 +2083,7 @@ void prism2sta_commsqual_defer(struct work_struct *data) ...@@ -2083,7 +2083,7 @@ void prism2sta_commsqual_defer(struct work_struct *data)
HFA384x_RID_DBMCOMMSQUALITY_LEN); HFA384x_RID_DBMCOMMSQUALITY_LEN);
if (result) { if (result) {
WLAN_LOG_ERROR("error fetching commsqual\n"); printk(KERN_ERR "error fetching commsqual\n");
goto done; goto done;
} }
......
...@@ -88,14 +88,14 @@ static int prism2sta_probe_usb( ...@@ -88,14 +88,14 @@ static int prism2sta_probe_usb(
dev = interface_to_usbdev(interface); dev = interface_to_usbdev(interface);
if ((wlandev = create_wlan()) == NULL) { if ((wlandev = create_wlan()) == NULL) {
WLAN_LOG_ERROR("%s: Memory allocation failure.\n", dev_info); printk(KERN_ERR "%s: Memory allocation failure.\n", dev_info);
result = -EIO; result = -EIO;
goto failed; goto failed;
} }
hw = wlandev->priv; hw = wlandev->priv;
if ( wlan_setup(wlandev) != 0 ) { if ( wlan_setup(wlandev) != 0 ) {
WLAN_LOG_ERROR("%s: wlan_setup() failed.\n", dev_info); printk(KERN_ERR "%s: wlan_setup() failed.\n", dev_info);
result = -EIO; result = -EIO;
goto failed; goto failed;
} }
...@@ -118,7 +118,7 @@ static int prism2sta_probe_usb( ...@@ -118,7 +118,7 @@ static int prism2sta_probe_usb(
unregister_wlandev(wlandev); unregister_wlandev(wlandev);
hfa384x_destroy(hw); hfa384x_destroy(hw);
result = -EIO; result = -EIO;
WLAN_LOG_ERROR( printk(KERN_ERR
"%s: hfa384x_corereset() failed.\n", "%s: hfa384x_corereset() failed.\n",
dev_info); dev_info);
goto failed; goto failed;
...@@ -130,7 +130,7 @@ static int prism2sta_probe_usb( ...@@ -130,7 +130,7 @@ static int prism2sta_probe_usb(
wlandev->msdstate = WLAN_MSD_HWPRESENT; wlandev->msdstate = WLAN_MSD_HWPRESENT;
if ( register_wlandev(wlandev) != 0 ) { if ( register_wlandev(wlandev) != 0 ) {
WLAN_LOG_ERROR("%s: register_wlandev() failed.\n", dev_info); printk(KERN_ERR "%s: register_wlandev() failed.\n", dev_info);
result = -EIO; result = -EIO;
goto failed; goto failed;
} }
......
...@@ -58,8 +58,6 @@ ...@@ -58,8 +58,6 @@
#include <linux/hardirq.h> #include <linux/hardirq.h>
#define WLAN_LOG_ERROR(x,args...) printk(KERN_ERR "%s: " x , __func__ , ##args);
#define WLAN_LOG_WARNING(x,args...) printk(KERN_WARNING "%s: " x , __func__ , ##args); #define WLAN_LOG_WARNING(x,args...) printk(KERN_WARNING "%s: " x , __func__ , ##args);
#if defined(WLAN_INCLUDE_DEBUG) #if defined(WLAN_INCLUDE_DEBUG)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment