Staging: wlan-ng: Replace WLAN_LOG_ERROR() with printk()
authorMoritz Muehlenhoff <jmm@debian.org>
Sun, 25 Jan 2009 20:55:00 +0000 (21:55 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 3 Apr 2009 21:53:17 +0000 (14:53 -0700)
Signed-off-by: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/wlan-ng/hfa384x_usb.c
drivers/staging/wlan-ng/p80211conv.c
drivers/staging/wlan-ng/p80211netdev.c
drivers/staging/wlan-ng/p80211req.c
drivers/staging/wlan-ng/p80211wext.c
drivers/staging/wlan-ng/prism2mgmt.c
drivers/staging/wlan-ng/prism2mib.c
drivers/staging/wlan-ng/prism2sta.c
drivers/staging/wlan-ng/prism2usb.c
drivers/staging/wlan-ng/wlan_compat.h

index 495cd12f5e6c11d9791aebf8cd139ff625215f56..bdbb2125f216a2543cb834ed72907d5137be9ea2 100644 (file)
@@ -1330,7 +1330,7 @@ void
 hfa384x_copy_from_aux(
        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
 hfa384x_copy_to_aux(
        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)
 
        result=usb_reset_device(hw->usb);
        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;
@@ -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,
                                burnlo, burnhi, burnlen);
                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",
                                burnlo, burnhi, burnlen, result);
                        goto exit_proc;
@@ -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.
                        if (result) {
-                               WLAN_LOG_ERROR(
+                               printk(KERN_ERR
                                        "Write to dl buffer failed, "
                                        "result=0x%04x. Aborting.\n",
                                        result);
@@ -2337,7 +2337,7 @@ Comment out for debugging, assume the write was successful.
                                HFA384x_PROGMODE_NVWRITE,
                                0,0,0);
                if ( result ) {
-                       WLAN_LOG_ERROR(
+                       printk(KERN_ERR
                                "download(NVWRITE,lo=%x,hi=%x,len=%x) "
                                "cmd failed, result=%d. Aborting d/l\n",
                                burnlo, burnhi, burnlen, result);
@@ -2486,7 +2486,7 @@ hfa384x_drvr_setconfig_async(
 ----------------------------------------------------------------*/
 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;
 }
 
@@ -2585,7 +2585,7 @@ hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr)
        /* Check that a port isn't active */
        for ( i = 0; i < HFA384x_PORTID_MAX; i++) {
                if ( hw->port_enabled[i] ) {
-                       WLAN_LOG_ERROR(
+                       printk(KERN_ERR
                                "Can't download with a macport enabled.\n");
                        return -EINVAL;
                }
@@ -2593,7 +2593,7 @@ hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr)
 
        /* Check that we're not already in a download state */
        if ( hw->dlstate != HFA384x_DLSTATE_DISABLED ) {
-               WLAN_LOG_ERROR(
+               printk(KERN_ERR
                        "Download state not disabled.\n");
                return -EINVAL;
        }
@@ -2778,14 +2778,14 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len)
                        pdrcode = hfa384x2host_16(pda[currpdr+1]);
                        /* Test the record length */
                        if ( pdrlen > HFA384x_PDR_LEN_MAX || pdrlen == 0) {
-                               WLAN_LOG_ERROR("pdrlen invalid=%d\n",
+                               printk(KERN_ERR "pdrlen invalid=%d\n",
                                        pdrlen);
                                pdaok = 0;
                                break;
                        }
                        /* Test the code */
                        if ( !hfa384x_isgood_pdrcode(pdrcode) ) {
-                               WLAN_LOG_ERROR("pdrcode invalid=%d\n",
+                               printk(KERN_ERR "pdrcode invalid=%d\n",
                                        pdrcode);
                                pdaok = 0;
                                break;
@@ -2883,23 +2883,23 @@ int hfa384x_drvr_start(hfa384x_t *hw)
         */
        result = usb_get_status(hw->usb, USB_RECIP_ENDPOINT, hw->endp_in, &status);
        if (result < 0) {
-               WLAN_LOG_ERROR(
+               printk(KERN_ERR
                        "Cannot get bulk in endpoint status.\n");
                goto done;
        }
        if ((status == 1) && usb_clear_halt(hw->usb, hw->endp_in)) {
-               WLAN_LOG_ERROR(
+               printk(KERN_ERR
                        "Failed to reset bulk in endpoint.\n");
        }
 
        result = usb_get_status(hw->usb, USB_RECIP_ENDPOINT, hw->endp_out, &status);
        if (result < 0) {
-               WLAN_LOG_ERROR(
+               printk(KERN_ERR
                        "Cannot get bulk out endpoint status.\n");
                goto done;
        }
        if ((status == 1) && usb_clear_halt(hw->usb, hw->endp_out)) {
-               WLAN_LOG_ERROR(
+               printk(KERN_ERR
                        "Failed to reset bulk out endpoint.\n");
        }
 
@@ -2909,7 +2909,7 @@ int hfa384x_drvr_start(hfa384x_t *hw)
        /* Post the IN urb */
        result = submit_rx_urb(hw, GFP_KERNEL);
        if (result != 0) {
-               WLAN_LOG_ERROR(
+               printk(KERN_ERR
                        "Fatal, failed to submit RX URB, result=%d\n",
                        result);
                goto done;
@@ -2930,7 +2930,7 @@ int hfa384x_drvr_start(hfa384x_t *hw)
        result = result2 = hfa384x_cmd_initialize(hw);
        if (result1 != 0) {
                if (result2 != 0) {
-                       WLAN_LOG_ERROR(
+                       printk(KERN_ERR
                                "cmd_initialize() failed on two attempts, results %d and %d\n",
                                result1, result2);
                        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
        result = 1;
        ret = submit_tx_urb(hw, &hw->tx_urb, GFP_ATOMIC);
        if ( ret != 0 ) {
-               WLAN_LOG_ERROR(
+               printk(KERN_ERR
                        "submit_tx_urb() failed, error=%d\n", ret);
                result = 3;
        }
@@ -3337,7 +3337,7 @@ static void unlocked_usbctlx_complete(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx)
                break;
 
        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),
                               ctlxstr(ctlx->state));
                break;
@@ -3437,7 +3437,7 @@ hfa384x_usbctlxq_run(hfa384x_t    *hw)
                        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);
                unlocked_usbctlx_complete(hw, head);
        } /* while */
@@ -3559,7 +3559,7 @@ static void hfa384x_usbin_callback(struct urb *urb)
                result = submit_rx_urb(hw, GFP_ATOMIC);
 
                if (result != 0) {
-                       WLAN_LOG_ERROR(
+                       printk(KERN_ERR
                                "Fatal, failed to resubmit rx_urb. error=%d\n",
                                result);
                }
@@ -3733,7 +3733,7 @@ retry:
                        /*
                         * 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",
                                       hfa384x2host_16(ctlx->outbuf.type),
                                       ctlxstr(ctlx->state));
@@ -3938,7 +3938,7 @@ static void hfa384x_int_rxmonitor( wlandevice_t *wlandev, hfa384x_usb_rxfrm_t *r
        }
 
        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;
        }
 
@@ -4183,7 +4183,7 @@ retry:
 
                default:
                        /* 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",
                            hfa384x2host_16(ctlx->outbuf.type),
                            ctlxstr(ctlx->state), urb->status);
index c3719249f0130756bc51f3c213d0424721769914..a153c4e91d5f3c67050f4e314b687ecb3461c16b 100644 (file)
@@ -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);
                break;
        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;
                break;
        }
@@ -326,7 +326,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb
        } else {
                payload_offset = WLAN_HDR_A4_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;
                }
                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
        /* perform de-wep if necessary.. */
        if ((wlandev->hostwep & HOSTWEP_PRIVACYINVOKED) && WLAN_GET_FC_ISWEP(fc) && (wlandev->hostwep & HOSTWEP_DECRYPT)) {
                if (payload_length <= 8) {
-                       WLAN_LOG_ERROR("WEP frame too short (%u).\n",
+                       printk(KERN_ERR "WEP frame too short (%u).\n",
                                        skb->len);
                        return 1;
                }
@@ -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)) {
                        /* A bogus length ethfrm has been encap'd. */
                        /* 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);
                        return 1;
                }
@@ -404,7 +404,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb
                if ( payload_length > netdev->mtu ) {
                        /* A bogus length ethfrm has been sent. */
                        /* 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);
                        return 1;
                }
@@ -434,7 +434,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb
                    > netdev->mtu) {
                        /* A bogus length ethfrm has been sent. */
                        /* 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) -
                                                    sizeof(wlan_snap_t)),
                                        netdev->mtu);
@@ -469,7 +469,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb
                if ( payload_length > netdev->mtu ) {
                        /* A bogus length ethfrm has been sent. */
                        /* 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,
                                netdev->mtu);
                        return 1;
@@ -613,7 +613,7 @@ p80211skb_rxmeta_attach(struct wlandevice *wlandev, struct sk_buff *skb)
 
        /* If these already have metadata, we error out! */
        if (P80211SKB_RXMETA(skb) != NULL) {
-               WLAN_LOG_ERROR("%s: RXmeta already attached!\n",
+               printk(KERN_ERR "%s: RXmeta already attached!\n",
                                wlandev->name);
                result = 0;
                goto exit;
@@ -623,7 +623,7 @@ p80211skb_rxmeta_attach(struct wlandevice *wlandev, struct sk_buff *skb)
        rxmeta = kmalloc(sizeof(p80211_rxmeta_t), GFP_ATOMIC);
 
        if ( rxmeta == NULL ) {
-               WLAN_LOG_ERROR("%s: Failed to allocate rxmeta.\n",
+               printk(KERN_ERR "%s: Failed to allocate rxmeta.\n",
                                wlandev->name);
                result = 1;
                goto exit;
@@ -668,7 +668,7 @@ p80211skb_free(struct wlandevice *wlandev, struct sk_buff *skb)
        if ( meta && meta->rx) {
                p80211skb_rxmeta_detach(skb);
        } 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);
index 85a686b2ecea5ccd3ebf691e7f5115402206cc99..9b99f0e3119b9a03b07d39772282dc9d75dda0f8 100644 (file)
@@ -719,7 +719,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
         * change the netdev address
         */
        if ( result != 0 || resultcode->data != P80211ENUM_resultcode_success) {
-               WLAN_LOG_ERROR(
+               printk(KERN_ERR
                "Low-level driver failed dot11req_mibset(dot11MACAddress).\n");
                result = -EADDRNOTAVAIL;
        } else {
@@ -785,7 +785,7 @@ int wlan_setup(wlandevice_t *wlandev)
        /* Allocate and initialize the struct device */
        dev = alloc_netdev(0,"wlan%d",ether_setup);
        if ( dev == NULL ) {
-               WLAN_LOG_ERROR("Failed to alloc netdev.\n");
+               printk(KERN_ERR "Failed to alloc netdev.\n");
                result = 1;
        } else {
                wlandev->netdev = dev;
@@ -852,7 +852,7 @@ int wlan_unsetup(wlandevice_t *wlandev)
        tasklet_kill(&wlandev->rx_bh);
 
        if (wlandev->netdev == NULL ) {
-               WLAN_LOG_ERROR("called without wlandev->netdev set.\n");
+               printk(KERN_ERR "called without wlandev->netdev set.\n");
                result = 1;
        } else {
                free_netdev(wlandev->netdev);
index 77bb00227c3dcda55afbd7cd49f51fc4c2169f19..8f88825ccc2ac789f0ddcdba46ba99a51ec6ce40 100644 (file)
@@ -141,7 +141,7 @@ int p80211req_dorequest( wlandevice_t *wlandev, u8 *msgbuf)
        /* Check Permissions */
        if (!capable(CAP_NET_ADMIN) &&
            (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;
        }
 
index 4834ad07c2462bc5a0290f092f03898087c1e1b1..4bd966e69488021410b47c6fc33453f2fc04c504 100644 (file)
@@ -1274,7 +1274,7 @@ static int p80211wext_siwscan(netdevice_t *dev,
        int i = 0;
 
        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);
                goto exit;
        }
index 785801e16fd5baf5c01371315e15090b89e254ad..9432a19bc1ae0af863066ee068829aab6c0915ab 100644 (file)
@@ -140,7 +140,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp)
                                      hw->ident_sta_fw.minor,
                                      hw->ident_sta_fw.variant) <
             HFA384x_FIRMWARE_VERSION(1,3,2)) {
-               WLAN_LOG_ERROR("HostScan not supported with current firmware (<1.3.2).\n");
+               printk(KERN_ERR "HostScan not supported with current firmware (<1.3.2).\n");
                 result = 1;
                 msg->resultcode.data = P80211ENUM_resultcode_not_supported;
                goto exit;
@@ -152,7 +152,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp)
         result = hfa384x_drvr_getconfig16(hw,
                         HFA384x_RID_CNFROAMINGMODE, &roamingmode);
         if ( result ) {
-                WLAN_LOG_ERROR("getconfig(ROAMMODE) failed. result=%d\n",
+                printk(KERN_ERR "getconfig(ROAMMODE) failed. result=%d\n",
                                 result);
                 msg->resultcode.data =
                         P80211ENUM_resultcode_implementation_failure;
@@ -164,7 +164,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp)
                         HFA384x_RID_CNFROAMINGMODE,
                        HFA384x_ROAMMODE_HOSTSCAN_HOSTROAM);
         if ( result ) {
-                WLAN_LOG_ERROR("setconfig(ROAMINGMODE) failed. result=%d\n",
+                printk(KERN_ERR "setconfig(ROAMINGMODE) failed. result=%d\n",
                                 result);
                 msg->resultcode.data =
                         P80211ENUM_resultcode_implementation_failure;
@@ -209,7 +209,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp)
        /* Enable the MAC port if it's not already enabled  */
        result = hfa384x_drvr_getconfig16(hw, HFA384x_RID_PORTSTATUS, &word);
        if ( result ) {
-               WLAN_LOG_ERROR("getconfig(PORTSTATUS) failed. "
+               printk(KERN_ERR "getconfig(PORTSTATUS) failed. "
                                "result=%d\n", result);
                msg->resultcode.data =
                        P80211ENUM_resultcode_implementation_failure;
@@ -222,7 +222,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp)
                        HFA384x_RID_CNFROAMINGMODE,
                        HFA384x_ROAMMODE_HOSTSCAN_HOSTROAM);
                if ( result ) {
-                       WLAN_LOG_ERROR("setconfig(ROAMINGMODE) failed. result=%d\n", result);
+                       printk(KERN_ERR "setconfig(ROAMINGMODE) failed. result=%d\n", result);
                        msg->resultcode.data =
                                P80211ENUM_resultcode_implementation_failure;
                        goto exit;
@@ -235,7 +235,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp)
                result = hfa384x_drvr_setconfig( hw, HFA384x_RID_CNFOWNSSID,
                                wordbuf, HFA384x_RID_CNFOWNSSID_LEN);
                if ( result ) {
-                       WLAN_LOG_ERROR("Failed to set OwnSSID.\n");
+                       printk(KERN_ERR "Failed to set OwnSSID.\n");
                        msg->resultcode.data =
                                P80211ENUM_resultcode_implementation_failure;
                        goto exit;
@@ -243,7 +243,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp)
                result = hfa384x_drvr_setconfig( hw, HFA384x_RID_CNFDESIREDSSID,
                                wordbuf, HFA384x_RID_CNFDESIREDSSID_LEN);
                if ( result ) {
-                       WLAN_LOG_ERROR("Failed to set DesiredSSID.\n");
+                       printk(KERN_ERR "Failed to set DesiredSSID.\n");
                        msg->resultcode.data =
                                P80211ENUM_resultcode_implementation_failure;
                        goto exit;
@@ -253,7 +253,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp)
                                HFA384x_RID_CNFPORTTYPE,
                                HFA384x_PORTTYPE_IBSS);
                if ( result ) {
-                       WLAN_LOG_ERROR("Failed to set CNFPORTTYPE.\n");
+                       printk(KERN_ERR "Failed to set CNFPORTTYPE.\n");
                        msg->resultcode.data =
                                P80211ENUM_resultcode_implementation_failure;
                        goto exit;
@@ -263,14 +263,14 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp)
                                HFA384x_RID_CREATEIBSS,
                                HFA384x_CREATEIBSS_JOINCREATEIBSS);
                if ( result ) {
-                       WLAN_LOG_ERROR("Failed to set CREATEIBSS.\n");
+                       printk(KERN_ERR "Failed to set CREATEIBSS.\n");
                        msg->resultcode.data =
                                P80211ENUM_resultcode_implementation_failure;
                        goto exit;
                }
                result = hfa384x_drvr_enable(hw, 0);
                if ( result ) {
-                       WLAN_LOG_ERROR("drvr_enable(0) failed. "
+                       printk(KERN_ERR "drvr_enable(0) failed. "
                                        "result=%d\n", result);
                        msg->resultcode.data =
                        P80211ENUM_resultcode_implementation_failure;
@@ -292,7 +292,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp)
                         HFA384x_RID_HOSTSCAN, &scanreq,
                         sizeof(hfa384x_HostScanRequest_data_t));
         if ( result ) {
-                WLAN_LOG_ERROR("setconfig(SCANREQUEST) failed. result=%d\n",
+                printk(KERN_ERR "setconfig(SCANREQUEST) failed. result=%d\n",
                                 result);
                 msg->resultcode.data =
                         P80211ENUM_resultcode_implementation_failure;
@@ -314,7 +314,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp)
        if (istmpenable) {
                result = hfa384x_drvr_disable(hw, 0);
                if ( result ) {
-                       WLAN_LOG_ERROR("drvr_disable(0) failed. "
+                       printk(KERN_ERR "drvr_disable(0) failed. "
                                        "result=%d\n", result);
                        msg->resultcode.data =
                        P80211ENUM_resultcode_implementation_failure;
@@ -326,7 +326,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp)
        result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_CNFROAMINGMODE,
                                          roamingmode);
         if ( result ) {
-                WLAN_LOG_ERROR("setconfig(ROAMMODE) failed. result=%d\n",
+                printk(KERN_ERR "setconfig(ROAMMODE) failed. result=%d\n",
                                 result);
                 msg->resultcode.data =
                         P80211ENUM_resultcode_implementation_failure;
@@ -377,7 +377,7 @@ int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp)
        req->resultcode.status = P80211ENUM_msgitem_status_data_ok;
 
        if (! hw->scanresults) {
-               WLAN_LOG_ERROR("dot11req_scan_results can only be used after a successful dot11req_scan.\n");
+               printk(KERN_ERR "dot11req_scan_results can only be used after a successful dot11req_scan.\n");
                result = 2;
                req->resultcode.data = P80211ENUM_resultcode_invalid_parameters;
                goto exit;
@@ -558,13 +558,13 @@ int prism2mgmt_start(wlandevice_t *wlandev, void *msgp)
        result = hfa384x_drvr_setconfig( hw, HFA384x_RID_CNFOWNSSID,
                                         bytebuf, HFA384x_RID_CNFOWNSSID_LEN);
        if ( result ) {
-               WLAN_LOG_ERROR("Failed to set CnfOwnSSID\n");
+               printk(KERN_ERR "Failed to set CnfOwnSSID\n");
                goto failed;
        }
        result = hfa384x_drvr_setconfig( hw, HFA384x_RID_CNFDESIREDSSID,
                                         bytebuf, HFA384x_RID_CNFDESIREDSSID_LEN);
        if ( result ) {
-               WLAN_LOG_ERROR("Failed to set CnfDesiredSSID\n");
+               printk(KERN_ERR "Failed to set CnfDesiredSSID\n");
                goto failed;
        }
 
@@ -576,7 +576,7 @@ int prism2mgmt_start(wlandevice_t *wlandev, void *msgp)
        word = msg->beaconperiod.data;
        result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_CNFAPBCNint, word);
        if ( result ) {
-               WLAN_LOG_ERROR("Failed to set beacon period=%d.\n", word);
+               printk(KERN_ERR "Failed to set beacon period=%d.\n", word);
                goto failed;
        }
 
@@ -584,7 +584,7 @@ int prism2mgmt_start(wlandevice_t *wlandev, void *msgp)
        word = msg->dschannel.data;
        result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_CNFOWNCHANNEL, word);
        if ( result ) {
-               WLAN_LOG_ERROR("Failed to set channel=%d.\n", word);
+               printk(KERN_ERR "Failed to set channel=%d.\n", word);
                goto failed;
        }
        /* Basic rates */
@@ -612,7 +612,7 @@ int prism2mgmt_start(wlandevice_t *wlandev, void *msgp)
        }
        result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_CNFBASICRATES, word);
        if ( result ) {
-               WLAN_LOG_ERROR("Failed to set basicrates=%d.\n", word);
+               printk(KERN_ERR "Failed to set basicrates=%d.\n", word);
                goto failed;
        }
 
@@ -641,13 +641,13 @@ int prism2mgmt_start(wlandevice_t *wlandev, void *msgp)
        }
        result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_CNFSUPPRATES, word);
        if ( result ) {
-               WLAN_LOG_ERROR("Failed to set supprates=%d.\n", word);
+               printk(KERN_ERR "Failed to set supprates=%d.\n", word);
                goto failed;
        }
 
        result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_TXRATECNTL, word);
        if ( result ) {
-               WLAN_LOG_ERROR("Failed to set txrates=%d.\n", word);
+               printk(KERN_ERR "Failed to set txrates=%d.\n", word);
                goto failed;
        }
 
@@ -661,7 +661,7 @@ int prism2mgmt_start(wlandevice_t *wlandev, void *msgp)
        /* Enable the Port */
        result = hfa384x_drvr_enable(hw, 0);
        if ( result ) {
-               WLAN_LOG_ERROR("Enable macport failed, result=%d.\n", result);
+               printk(KERN_ERR "Enable macport failed, result=%d.\n", result);
                goto failed;
        }
 
@@ -706,7 +706,7 @@ int prism2mgmt_readpda(wlandevice_t *wlandev, void *msgp)
         * state.
         */
        if (wlandev->msdstate != WLAN_MSD_FWLOAD) {
-               WLAN_LOG_ERROR(
+               printk(KERN_ERR
                        "PDA may only be read "
                        "in the fwload state.\n");
                msg->resultcode.data =
@@ -721,7 +721,7 @@ int prism2mgmt_readpda(wlandevice_t *wlandev, void *msgp)
                        msg->pda.data,
                        HFA384x_PDA_LEN_MAX);
                if (result) {
-                       WLAN_LOG_ERROR(
+                       printk(KERN_ERR
                                "hfa384x_drvr_readpda() failed, "
                                "result=%d\n",
                                result);
@@ -771,7 +771,7 @@ int prism2mgmt_ramdl_state(wlandevice_t *wlandev, void *msgp)
        p80211msg_p2req_ramdl_state_t   *msg = msgp;
 
        if (wlandev->msdstate != WLAN_MSD_FWLOAD) {
-               WLAN_LOG_ERROR(
+               printk(KERN_ERR
                        "ramdl_state(): may only be called "
                        "in the fwload state.\n");
                msg->resultcode.data =
@@ -830,7 +830,7 @@ int prism2mgmt_ramdl_write(wlandevice_t *wlandev, void *msgp)
        u8                      *buf;
 
        if (wlandev->msdstate != WLAN_MSD_FWLOAD) {
-               WLAN_LOG_ERROR(
+               printk(KERN_ERR
                        "ramdl_write(): may only be called "
                        "in the fwload state.\n");
                msg->resultcode.data =
@@ -891,7 +891,7 @@ int prism2mgmt_flashdl_state(wlandevice_t *wlandev, void *msgp)
        p80211msg_p2req_flashdl_state_t *msg = msgp;
 
        if (wlandev->msdstate != WLAN_MSD_FWLOAD) {
-               WLAN_LOG_ERROR(
+               printk(KERN_ERR
                        "flashdl_state(): may only be called "
                        "in the fwload state.\n");
                msg->resultcode.data =
@@ -925,7 +925,7 @@ int prism2mgmt_flashdl_state(wlandevice_t *wlandev, void *msgp)
                wlandev->msdstate = WLAN_MSD_HWPRESENT;
                result = prism2sta_ifstate(wlandev, P80211ENUM_ifstate_fwload);
                if (result != P80211ENUM_resultcode_success) {
-                       WLAN_LOG_ERROR("prism2sta_ifstate(fwload) failed,"
+                       printk(KERN_ERR "prism2sta_ifstate(fwload) failed,"
                                "P80211ENUM_resultcode=%d\n", result);
                        msg->resultcode.data =
                                P80211ENUM_resultcode_implementation_failure;
@@ -964,7 +964,7 @@ int prism2mgmt_flashdl_write(wlandevice_t *wlandev, void *msgp)
        u8                      *buf;
 
        if (wlandev->msdstate != WLAN_MSD_FWLOAD) {
-               WLAN_LOG_ERROR(
+               printk(KERN_ERR
                        "flashdl_write(): may only be called "
                        "in the fwload state.\n");
                msg->resultcode.data =
index 99c6792eb03b3f64cc97140f2a04aa7e8b208bf7..eb0ae51fd8093fdc65cfaa81468b054957e28e5b 100644 (file)
@@ -795,7 +795,7 @@ void                         *data)
                break;
        }
        default:
-               WLAN_LOG_ERROR("Unhandled DID 0x%08x\n", mib->did);
+               printk(KERN_ERR "Unhandled DID 0x%08x\n", mib->did);
        }
 
        return(0);
index 1e802fb85769789a52387564920abf9e30865acb..878b74fd9b57cc791822b448730c353a4dcefa36 100644 (file)
@@ -495,7 +495,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
                         * for firmware loading.
                         */
                        if ((result=hfa384x_drvr_start(hw))) {
-                               WLAN_LOG_ERROR(
+                               printk(KERN_ERR
                                        "hfa384x_drvr_start() failed,"
                                        "result=%d\n", (int)result);
                                result =
@@ -539,7 +539,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
                         * of the hardware or a previous firmware load.
                         */
                        if ((result=hfa384x_drvr_start(hw))) {
-                               WLAN_LOG_ERROR(
+                               printk(KERN_ERR
                                        "hfa384x_drvr_start() failed,"
                                        "result=%d\n", (int)result);
                                result =
@@ -549,7 +549,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
                        }
 
                        if ((result=prism2sta_getcardinfo(wlandev))) {
-                               WLAN_LOG_ERROR(
+                               printk(KERN_ERR
                                        "prism2sta_getcardinfo() failed,"
                                        "result=%d\n", (int)result);
                                result =
@@ -559,7 +559,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
                                break;
                        }
                        if ((result=prism2sta_globalsetup(wlandev))) {
-                               WLAN_LOG_ERROR(
+                               printk(KERN_ERR
                                        "prism2sta_globalsetup() failed,"
                                        "result=%d\n", (int)result);
                                result =
@@ -661,7 +661,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
        result = hfa384x_drvr_getconfig(hw, HFA384x_RID_NICIDENTITY,
                        &hw->ident_nic, sizeof(hfa384x_compident_t));
        if ( result ) {
-               WLAN_LOG_ERROR("Failed to retrieve NICIDENTITY\n");
+               printk(KERN_ERR "Failed to retrieve NICIDENTITY\n");
                goto failed;
        }
 
@@ -679,7 +679,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
        result = hfa384x_drvr_getconfig(hw, HFA384x_RID_PRIIDENTITY,
                        &hw->ident_pri_fw, sizeof(hfa384x_compident_t));
        if ( result ) {
-               WLAN_LOG_ERROR("Failed to retrieve PRIIDENTITY\n");
+               printk(KERN_ERR "Failed to retrieve PRIIDENTITY\n");
                goto failed;
        }
 
@@ -697,12 +697,12 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
        result = hfa384x_drvr_getconfig(hw, HFA384x_RID_STAIDENTITY,
                        &hw->ident_sta_fw, sizeof(hfa384x_compident_t));
        if ( result ) {
-               WLAN_LOG_ERROR("Failed to retrieve STAIDENTITY\n");
+               printk(KERN_ERR "Failed to retrieve STAIDENTITY\n");
                goto failed;
        }
 
        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;
                goto failed;
        }
@@ -727,7 +727,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
                        "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.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;
        }
 
@@ -735,7 +735,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
        result = hfa384x_drvr_getconfig(hw, HFA384x_RID_MFISUPRANGE,
                        &hw->cap_sup_mfi, sizeof(hfa384x_caplevel_t));
        if ( result ) {
-               WLAN_LOG_ERROR("Failed to retrieve MFISUPRANGE\n");
+               printk(KERN_ERR "Failed to retrieve MFISUPRANGE\n");
                goto failed;
        }
 
@@ -757,7 +757,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
        result = hfa384x_drvr_getconfig(hw, HFA384x_RID_CFISUPRANGE,
                        &hw->cap_sup_cfi, sizeof(hfa384x_caplevel_t));
        if ( result ) {
-               WLAN_LOG_ERROR("Failed to retrieve CFISUPRANGE\n");
+               printk(KERN_ERR "Failed to retrieve CFISUPRANGE\n");
                goto failed;
        }
 
@@ -779,7 +779,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
        result = hfa384x_drvr_getconfig(hw, HFA384x_RID_PRISUPRANGE,
                        &hw->cap_sup_pri, sizeof(hfa384x_caplevel_t));
        if ( result ) {
-               WLAN_LOG_ERROR("Failed to retrieve PRISUPRANGE\n");
+               printk(KERN_ERR "Failed to retrieve PRISUPRANGE\n");
                goto failed;
        }
 
@@ -801,7 +801,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
        result = hfa384x_drvr_getconfig(hw, HFA384x_RID_STASUPRANGE,
                        &hw->cap_sup_sta, sizeof(hfa384x_caplevel_t));
        if ( result ) {
-               WLAN_LOG_ERROR("Failed to retrieve STASUPRANGE\n");
+               printk(KERN_ERR "Failed to retrieve STASUPRANGE\n");
                goto failed;
        }
 
@@ -831,7 +831,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
        result = hfa384x_drvr_getconfig(hw, HFA384x_RID_PRI_CFIACTRANGES,
                        &hw->cap_act_pri_cfi, sizeof(hfa384x_caplevel_t));
        if ( result ) {
-               WLAN_LOG_ERROR("Failed to retrieve PRI_CFIACTRANGES\n");
+               printk(KERN_ERR "Failed to retrieve PRI_CFIACTRANGES\n");
                goto failed;
        }
 
@@ -853,7 +853,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
        result = hfa384x_drvr_getconfig(hw, HFA384x_RID_STA_CFIACTRANGES,
                        &hw->cap_act_sta_cfi, sizeof(hfa384x_caplevel_t));
        if ( result ) {
-               WLAN_LOG_ERROR("Failed to retrieve STA_CFIACTRANGES\n");
+               printk(KERN_ERR "Failed to retrieve STA_CFIACTRANGES\n");
                goto failed;
        }
 
@@ -875,7 +875,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
        result = hfa384x_drvr_getconfig(hw, HFA384x_RID_STA_MFIACTRANGES,
                        &hw->cap_act_sta_mfi, sizeof(hfa384x_caplevel_t));
        if ( result ) {
-               WLAN_LOG_ERROR("Failed to retrieve STA_MFIACTRANGES\n");
+               printk(KERN_ERR "Failed to retrieve STA_MFIACTRANGES\n");
                goto failed;
        }
 
@@ -901,7 +901,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
                                pstr, sizeof(pstr));
                printk(KERN_INFO "Prism2 card SN: %s\n", pstr);
        } else {
-               WLAN_LOG_ERROR("Failed to retrieve Prism2 Card SN\n");
+               printk(KERN_ERR "Failed to retrieve Prism2 Card SN\n");
                goto failed;
        }
 
@@ -909,7 +909,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
        result = hfa384x_drvr_getconfig(hw, HFA384x_RID_CNFOWNMACADDR,
                wlandev->netdev->dev_addr, ETH_ALEN);
        if ( result != 0 ) {
-               WLAN_LOG_ERROR("Failed to retrieve mac address\n");
+               printk(KERN_ERR "Failed to retrieve mac address\n");
                goto failed;
        }
 
@@ -937,7 +937,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
 
        goto done;
 failed:
-       WLAN_LOG_ERROR("Failed, result=%d\n", result);
+       printk(KERN_ERR "Failed, result=%d\n", result);
 done:
        return result;
 }
@@ -1126,7 +1126,7 @@ static void prism2sta_inf_scanresults(wlandevice_t *wlandev,
                        HFA384x_RID_JOINREQUEST,
                        &joinreq, HFA384x_RID_JOINREQUEST_LEN);
        if (result) {
-               WLAN_LOG_ERROR("setconfig(joinreq) failed, result=%d\n", result);
+               printk(KERN_ERR "setconfig(joinreq) failed, result=%d\n", result);
        }
 
        return;
@@ -1751,7 +1751,7 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev,
                                                        &rec, sizeof(rec));
        if (result) {
                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;
 }
@@ -2029,7 +2029,7 @@ static wlandevice_t *create_wlan(void)
        hw =            kmalloc(sizeof(hfa384x_t), GFP_KERNEL);
 
        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 (hw)         kfree(hw);
                return NULL;
@@ -2083,7 +2083,7 @@ void prism2sta_commsqual_defer(struct work_struct *data)
                                                HFA384x_RID_DBMCOMMSQUALITY_LEN);
 
                if (result) {
-                       WLAN_LOG_ERROR("error fetching commsqual\n");
+                       printk(KERN_ERR "error fetching commsqual\n");
                        goto done;
                }
 
index d91946794180767c2d65dff72e7bb40d81d7e4dd..ca9bf5f9b3e5149828157d9fe551d9b6083eecd9 100644 (file)
@@ -88,14 +88,14 @@ static int prism2sta_probe_usb(
        dev = interface_to_usbdev(interface);
 
        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;
                goto failed;
        }
        hw = wlandev->priv;
 
        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;
                goto failed;
        }
@@ -118,7 +118,7 @@ static int prism2sta_probe_usb(
                        unregister_wlandev(wlandev);
                        hfa384x_destroy(hw);
                        result = -EIO;
-                       WLAN_LOG_ERROR(
+                       printk(KERN_ERR
                                "%s: hfa384x_corereset() failed.\n",
                                dev_info);
                        goto failed;
@@ -130,7 +130,7 @@ static int prism2sta_probe_usb(
        wlandev->msdstate = WLAN_MSD_HWPRESENT;
 
         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;
                goto failed;
         }
index fd4728b35f9b0ca7d762ff76d48d055789e193fa..f42577a4ce0b0e123ea0d4b3d67fef4d09cee765 100644 (file)
@@ -58,8 +58,6 @@
 
 #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);
 
 #if defined(WLAN_INCLUDE_DEBUG)