From 9cba46dc1c1c98d9e1c44be7b8d435ad553f799e Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Wed, 21 Jan 2009 22:00:40 +0100 Subject: Staging: wlan-ng: Remove use of __WLAN_ATTRIB_PACK__ Replace all ocurrances of the __WLAN_ATTRIB_PACK__ from wlan_compat.h by __attribute__((packed)) and remove it afterwards. Signed-off-by: Moritz Muehlenhoff Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/wlan_compat.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'drivers/staging/wlan-ng/wlan_compat.h') diff --git a/drivers/staging/wlan-ng/wlan_compat.h b/drivers/staging/wlan-ng/wlan_compat.h index 8b8a510685c9..0fa1c6a8be18 100644 --- a/drivers/staging/wlan-ng/wlan_compat.h +++ b/drivers/staging/wlan-ng/wlan_compat.h @@ -85,11 +85,6 @@ #define BIT30 0x40000000 #define BIT31 0x80000000 -/*=============================================================*/ -/*------ Compiler Portability Macros --------------------------*/ -/*=============================================================*/ -#define __WLAN_ATTRIB_PACK__ __attribute__ ((packed)) - /*=============================================================*/ /*------ OS Portability Macros --------------------------------*/ /*=============================================================*/ -- cgit v1.2.3-59-g8ed1b From 1f61379e82ab9319b99eb94963325ec766bcd752 Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Wed, 21 Jan 2009 22:00:43 +0100 Subject: Staging: wlan-ng: Cleanup wlan_compat.h more Move version identifier into p80211netdev.h and rename it to 0.3.0-staging to differentiate from the out-of-tree version. Also remove the unused wlan_ethconv declaration. Signed-off-by: Moritz Muehlenhoff Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/p80211netdev.h | 2 ++ drivers/staging/wlan-ng/wlan_compat.h | 7 ------- 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'drivers/staging/wlan-ng/wlan_compat.h') diff --git a/drivers/staging/wlan-ng/p80211netdev.h b/drivers/staging/wlan-ng/p80211netdev.h index 845c02807976..456f1d351aa1 100644 --- a/drivers/staging/wlan-ng/p80211netdev.h +++ b/drivers/staging/wlan-ng/p80211netdev.h @@ -59,6 +59,8 @@ /*================================================================*/ /* Constants */ +#define WLAN_RELEASE "0.3.0-staging" + #define WLAN_DEVICE_CLOSED 0 #define WLAN_DEVICE_OPEN 1 diff --git a/drivers/staging/wlan-ng/wlan_compat.h b/drivers/staging/wlan-ng/wlan_compat.h index 0fa1c6a8be18..a331d69f4003 100644 --- a/drivers/staging/wlan-ng/wlan_compat.h +++ b/drivers/staging/wlan-ng/wlan_compat.h @@ -93,8 +93,6 @@ #define WLAN_DBVAR wlan_debug #endif -#define WLAN_RELEASE "0.3.0-lkml" - #include #define WLAN_LOG_ERROR(x,args...) printk(KERN_ERR "%s: " x , __func__ , ##args); @@ -179,10 +177,5 @@ typedef struct net_device netdevice_t; extern int wlan_debug; #endif -extern int wlan_ethconv; /* What's the default ethconv? */ - -/*=============================================================*/ -/*--- Functions -----------------------------------------------*/ -/*=============================================================*/ #endif /* _WLAN_COMPAT_H */ -- cgit v1.2.3-59-g8ed1b From 8a251b55ef34c2a03e8ddf6d17bb125b92bb4a54 Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Wed, 21 Jan 2009 22:00:44 +0100 Subject: Staging: wlan-ng: Remove DBFENTER/DBFEXIT macros Remove the ugly DBFENTER/DBFEXIT macros, which are only inserted to add "<---" and "--->" at the function start/end at higher debug levels and which make the code a lot less readable. Signed-off-by: Moritz Muehlenhoff Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/hfa384x_usb.c | 177 ++------------------------------- drivers/staging/wlan-ng/p80211conv.c | 13 +-- drivers/staging/wlan-ng/p80211netdev.c | 49 --------- drivers/staging/wlan-ng/p80211req.c | 10 -- drivers/staging/wlan-ng/p80211wext.c | 90 ----------------- drivers/staging/wlan-ng/prism2mgmt.c | 29 ------ drivers/staging/wlan-ng/prism2mib.c | 58 ----------- drivers/staging/wlan-ng/prism2sta.c | 85 +--------------- drivers/staging/wlan-ng/prism2usb.c | 16 --- drivers/staging/wlan-ng/wlan_compat.h | 4 - 10 files changed, 11 insertions(+), 520 deletions(-) (limited to 'drivers/staging/wlan-ng/wlan_compat.h') diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 8a75b50f8635..a2dddae66c92 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -404,8 +404,6 @@ submit_rx_urb(hfa384x_t *hw, gfp_t memflags) struct sk_buff *skb; int result; - DBFENTER; - skb = dev_alloc_skb(sizeof(hfa384x_usbin_t)); if (skb == NULL) { result = -ENOMEM; @@ -440,8 +438,6 @@ submit_rx_urb(hfa384x_t *hw, gfp_t memflags) } done: - - DBFEXIT; return result; } @@ -469,8 +465,6 @@ submit_tx_urb(hfa384x_t *hw, struct urb *tx_urb, gfp_t memflags) struct net_device *netdev = hw->wlandev->netdev; int result; - DBFENTER; - result = -ENOLINK; if ( netif_running(netdev) ) { @@ -489,8 +483,6 @@ submit_tx_urb(hfa384x_t *hw, struct urb *tx_urb, gfp_t memflags) } } - DBFEXIT; - return result; } @@ -516,13 +508,10 @@ hfa384x_usb_defer(struct work_struct *data) hfa384x_t *hw = container_of(data, struct hfa384x, usb_work); struct net_device *netdev = hw->wlandev->netdev; - DBFENTER; - /* Don't bother trying to reset anything if the plug * has been pulled ... */ if ( hw->wlandev->hwremoved ) { - DBFEXIT; return; } @@ -586,8 +575,6 @@ hfa384x_usb_defer(struct work_struct *data) if ( test_and_clear_bit(WORK_TX_RESUME, &hw->usb_flags) ) { netif_wake_queue(hw->wlandev->netdev); } - - DBFEXIT; } @@ -615,8 +602,6 @@ hfa384x_usb_defer(struct work_struct *data) void hfa384x_create( hfa384x_t *hw, struct usb_device *usb) { - DBFENTER; - memset(hw, 0, sizeof(hfa384x_t)); hw->usb = usb; @@ -669,8 +654,6 @@ hfa384x_create( hfa384x_t *hw, struct usb_device *usb) init_timer(&hw->commsqual_timer); hw->commsqual_timer.data = (unsigned long) hw; hw->commsqual_timer.function = prism2sta_commsqual_timer; - - DBFEXIT; } @@ -701,8 +684,6 @@ hfa384x_destroy( hfa384x_t *hw) { struct sk_buff *skb; - DBFENTER; - if ( hw->state == HFA384x_STATE_RUNNING ) { hfa384x_drvr_stop(hw); } @@ -717,8 +698,6 @@ hfa384x_destroy( hfa384x_t *hw) while ( (skb = skb_dequeue(&hw->authq)) ) { dev_kfree_skb(skb); } - - DBFEXIT; } @@ -746,8 +725,6 @@ static int usbctlx_get_status(const hfa384x_usb_cmdresp_t *cmdresp, hfa384x_cmdresult_t *result) { - DBFENTER; - result->status = hfa384x2host_16(cmdresp->status); result->resp0 = hfa384x2host_16(cmdresp->resp0); result->resp1 = hfa384x2host_16(cmdresp->resp1); @@ -760,7 +737,6 @@ usbctlx_get_status(const hfa384x_usb_cmdresp_t *cmdresp, result->resp1, result->resp2); - DBFEXIT; return (result->status & HFA384x_STATUS_RESULT); } @@ -768,13 +744,10 @@ static void usbctlx_get_rridresult(const hfa384x_usb_rridresp_t *rridresp, hfa384x_rridresult_t *result) { - DBFENTER; - result->rid = hfa384x2host_16(rridresp->rid); result->riddata = rridresp->data; result->riddata_len = ((hfa384x2host_16(rridresp->frmlen) - 1) * 2); - DBFEXIT; } @@ -934,8 +907,6 @@ init_rmem_completor(usbctlx_rmem_completor_t *completor, static void hfa384x_cb_status(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx) { - DBFENTER; - if ( ctlx->usercb != NULL ) { hfa384x_cmdresult_t cmdresult; @@ -948,8 +919,6 @@ hfa384x_cb_status(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx) ctlx->usercb(hw, &cmdresult, ctlx->usercb_data); } - - DBFEXIT; } @@ -976,8 +945,6 @@ hfa384x_cb_status(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx) static void hfa384x_cb_rrid(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx) { - DBFENTER; - if ( ctlx->usercb != NULL ) { hfa384x_rridresult_t rridresult; @@ -990,8 +957,6 @@ hfa384x_cb_rrid(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx) ctlx->usercb(hw, &rridresult, ctlx->usercb_data); } - - DBFEXIT; } static inline int @@ -1127,9 +1092,6 @@ hfa384x_cmd_initialize(hfa384x_t *hw) int i; hfa384x_metacmd_t cmd; - DBFENTER; - - cmd.cmd = HFA384x_CMDCODE_INIT; cmd.parm0 = 0; cmd.parm1 = 0; @@ -1153,7 +1115,6 @@ hfa384x_cmd_initialize(hfa384x_t *hw) hw->link_status = HFA384x_LINK_NOTCONNECTED; - DBFEXIT; return result; } @@ -1183,8 +1144,6 @@ int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport) int result = 0; hfa384x_metacmd_t cmd; - DBFENTER; - cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_DISABLE) | HFA384x_CMD_MACPORT_SET(macport); cmd.parm0 = 0; @@ -1193,7 +1152,6 @@ int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport) result = hfa384x_docmd_wait(hw, &cmd); - DBFEXIT; return result; } @@ -1223,8 +1181,6 @@ int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport) int result = 0; hfa384x_metacmd_t cmd; - DBFENTER; - cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_ENABLE) | HFA384x_CMD_MACPORT_SET(macport); cmd.parm0 = 0; @@ -1233,7 +1189,6 @@ int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport) result = hfa384x_docmd_wait(hw, &cmd); - DBFEXIT; return result; } @@ -1271,8 +1226,6 @@ int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable) int result = 0; hfa384x_metacmd_t cmd; - DBFENTER; - cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_MONITOR) | HFA384x_CMD_AINFO_SET(enable); cmd.parm0 = 0; @@ -1281,7 +1234,6 @@ int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable) result = hfa384x_docmd_wait(hw, &cmd); - DBFEXIT; return result; } @@ -1330,7 +1282,6 @@ int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr, int result = 0; hfa384x_metacmd_t cmd; - DBFENTER; WLAN_LOG_DEBUG(5, "mode=%d, lowaddr=0x%04x, highaddr=0x%04x, codelen=%d\n", mode, lowaddr, highaddr, codelen); @@ -1344,7 +1295,6 @@ int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr, result = hfa384x_docmd_wait(hw, &cmd); - DBFEXIT; return result; } @@ -1377,9 +1327,7 @@ void hfa384x_copy_from_aux( hfa384x_t *hw, u32 cardaddr, u32 auxctl, void *buf, unsigned int len) { - DBFENTER; WLAN_LOG_ERROR("not used in USB.\n"); - DBFEXIT; } @@ -1411,9 +1359,7 @@ void hfa384x_copy_to_aux( hfa384x_t *hw, u32 cardaddr, u32 auxctl, void *buf, unsigned int len) { - DBFENTER; WLAN_LOG_ERROR("not used in USB.\n"); - DBFEXIT; } @@ -1444,14 +1390,11 @@ int hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime, int genesis) { int result = 0; - DBFENTER; - result=usb_reset_device(hw->usb); if(result<0) { WLAN_LOG_ERROR("usb_reset_device() failed, result=%d.\n",result); } - DBFEXIT; return result; } @@ -1487,8 +1430,6 @@ static int hfa384x_usbctlx_complete_sync(hfa384x_t *hw, unsigned long flags; int result; - DBFENTER; - result = wait_for_completion_interruptible(&ctlx->done); spin_lock_irqsave(&hw->ctlxq.lock, flags); @@ -1566,7 +1507,6 @@ static int hfa384x_usbctlx_complete_sync(hfa384x_t *hw, kfree(ctlx); } - DBFEXIT; return result; } @@ -1614,7 +1554,6 @@ hfa384x_docmd( int result; hfa384x_usbctlx_t *ctlx; - DBFENTER; ctlx = usbctlx_alloc(); if ( ctlx == NULL ) { result = -ENOMEM; @@ -1655,7 +1594,6 @@ hfa384x_docmd( } done: - DBFEXIT; return result; } @@ -1710,7 +1648,6 @@ hfa384x_dorrid( int result; hfa384x_usbctlx_t *ctlx; - DBFENTER; ctlx = usbctlx_alloc(); if ( ctlx == NULL ) { result = -ENOMEM; @@ -1745,7 +1682,6 @@ hfa384x_dorrid( } done: - DBFEXIT; return result; } @@ -1796,7 +1732,6 @@ hfa384x_dowrid( int result; hfa384x_usbctlx_t *ctlx; - DBFENTER; ctlx = usbctlx_alloc(); if ( ctlx == NULL ) { result = -ENOMEM; @@ -1838,7 +1773,6 @@ hfa384x_dowrid( } done: - DBFEXIT; return result; } @@ -1890,7 +1824,6 @@ hfa384x_dormem( int result; hfa384x_usbctlx_t *ctlx; - DBFENTER; ctlx = usbctlx_alloc(); if ( ctlx == NULL ) { result = -ENOMEM; @@ -1937,7 +1870,6 @@ hfa384x_dormem( } done: - DBFEXIT; return result; } @@ -1991,7 +1923,6 @@ hfa384x_dowmem( int result; hfa384x_usbctlx_t *ctlx; - DBFENTER; WLAN_LOG_DEBUG(5, "page=0x%04x offset=0x%04x len=%d\n", page,offset,len); @@ -2038,7 +1969,6 @@ hfa384x_dowmem( } done: - DBFEXIT; return result; } @@ -2064,8 +1994,6 @@ int hfa384x_drvr_commtallies( hfa384x_t *hw ) { hfa384x_metacmd_t cmd; - DBFENTER; - cmd.cmd = HFA384x_CMDCODE_INQ; cmd.parm0 = HFA384x_IT_COMMTALLIES; cmd.parm1 = 0; @@ -2073,7 +2001,6 @@ int hfa384x_drvr_commtallies( hfa384x_t *hw ) hfa384x_docmd_async(hw, &cmd, NULL, NULL, NULL); - DBFEXIT; return 0; } @@ -2104,7 +2031,6 @@ int hfa384x_drvr_disable(hfa384x_t *hw, u16 macport) { int result = 0; - DBFENTER; if ((!hw->isap && macport != 0) || (hw->isap && !(macport <= HFA384x_PORTID_MAX)) || !(hw->port_enabled[macport]) ){ @@ -2115,7 +2041,6 @@ int hfa384x_drvr_disable(hfa384x_t *hw, u16 macport) hw->port_enabled[macport] = 0; } } - DBFEXIT; return result; } @@ -2146,7 +2071,6 @@ int hfa384x_drvr_enable(hfa384x_t *hw, u16 macport) { int result = 0; - DBFENTER; if ((!hw->isap && macport != 0) || (hw->isap && !(macport <= HFA384x_PORTID_MAX)) || (hw->port_enabled[macport]) ){ @@ -2157,7 +2081,6 @@ int hfa384x_drvr_enable(hfa384x_t *hw, u16 macport) hw->port_enabled[macport] = 1; } } - DBFEXIT; return result; } @@ -2188,7 +2111,6 @@ int hfa384x_drvr_flashdl_enable(hfa384x_t *hw) int result = 0; int i; - DBFENTER; /* Check that a port isn't active */ for ( i = 0; i < HFA384x_PORTID_MAX; i++) { if ( hw->port_enabled[i] ) { @@ -2219,7 +2141,7 @@ int hfa384x_drvr_flashdl_enable(hfa384x_t *hw) WLAN_LOG_DEBUG(1,"flashdl_enable\n"); hw->dlstate = HFA384x_DLSTATE_FLASHENABLED; - DBFEXIT; + return result; } @@ -2245,7 +2167,6 @@ int hfa384x_drvr_flashdl_enable(hfa384x_t *hw) ----------------------------------------------------------------*/ int hfa384x_drvr_flashdl_disable(hfa384x_t *hw) { - DBFENTER; /* Check that we're already in the download state */ if ( hw->dlstate != HFA384x_DLSTATE_FLASHENABLED ) { return -EINVAL; @@ -2258,7 +2179,6 @@ int hfa384x_drvr_flashdl_disable(hfa384x_t *hw) hfa384x_cmd_download(hw, HFA384x_PROGMODE_DISABLE, 0, 0 , 0); hw->dlstate = HFA384x_DLSTATE_DISABLED; - DBFEXIT; return 0; } @@ -2314,7 +2234,6 @@ hfa384x_drvr_flashdl_write( int i; int j; - DBFENTER; WLAN_LOG_DEBUG(5,"daddr=0x%08x len=%d\n", daddr, len); /* Check that we're in the flash download state */ @@ -2431,7 +2350,6 @@ exit_proc: /* actually disable programming mode. Remember, that will cause the */ /* the firmware to effectively reset itself. */ - DBFEXIT; return result; } @@ -2464,11 +2382,9 @@ exit_proc: int hfa384x_drvr_getconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len) { int result; - DBFENTER; result = hfa384x_dorrid_wait(hw, rid, buf, len); - DBFEXIT; return result; } @@ -2567,9 +2483,7 @@ hfa384x_drvr_setconfig_async( ----------------------------------------------------------------*/ int hfa384x_drvr_handover( hfa384x_t *hw, u8 *addr) { - DBFENTER; WLAN_LOG_ERROR("Not currently supported in USB!\n"); - DBFEXIT; return -EIO; } @@ -2588,13 +2502,11 @@ int hfa384x_drvr_handover( hfa384x_t *hw, u8 *addr) int hfa384x_drvr_low_level(hfa384x_t *hw, hfa384x_metacmd_t *cmd) { int result; - DBFENTER; /* Do i need a host2hfa... conversion ? */ result = hfa384x_docmd_wait(hw, cmd); - DBFEXIT; return result; } @@ -2619,7 +2531,6 @@ int hfa384x_drvr_low_level(hfa384x_t *hw, hfa384x_metacmd_t *cmd) int hfa384x_drvr_ramdl_disable(hfa384x_t *hw) { - DBFENTER; /* Check that we're already in the download state */ if ( hw->dlstate != HFA384x_DLSTATE_RAMENABLED ) { return -EINVAL; @@ -2632,7 +2543,6 @@ hfa384x_drvr_ramdl_disable(hfa384x_t *hw) hfa384x_cmd_download(hw, HFA384x_PROGMODE_DISABLE, 0, 0 , 0); hw->dlstate = HFA384x_DLSTATE_DISABLED; - DBFEXIT; return 0; } @@ -2668,7 +2578,7 @@ hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr) u16 lowaddr; u16 hiaddr; int i; - DBFENTER; + /* Check that a port isn't active */ for ( i = 0; i < HFA384x_PORTID_MAX; i++) { if ( hw->port_enabled[i] ) { @@ -2705,7 +2615,6 @@ hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr) result); } - DBFEXIT; return result; } @@ -2747,7 +2656,7 @@ hfa384x_drvr_ramdl_write(hfa384x_t *hw, u32 daddr, void* buf, u32 len) u16 currpage; u16 curroffset; u16 currlen; - DBFENTER; + /* Check that we're in the ram download state */ if ( hw->dlstate != HFA384x_DLSTATE_RAMENABLED ) { return -EINVAL; @@ -2782,7 +2691,6 @@ hfa384x_drvr_ramdl_write(hfa384x_t *hw, u32 daddr, void* buf, u32 len) /* TODO: We really should have a readback. */ } - DBFEXIT; return result; } @@ -2840,8 +2748,6 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len) { HFA3841_PDA_BOGUS_BASE, 0} }; - DBFENTER; - /* Read the pda from each known address. */ for ( i = 0; i < ARRAY_SIZE(pdaloc); i++) { /* Make address */ @@ -2910,7 +2816,6 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len) WLAN_LOG_DEBUG(3,"Failure: pda is not okay\n"); } - DBFEXIT; return result; } @@ -2965,7 +2870,6 @@ int hfa384x_drvr_start(hfa384x_t *hw) { int result, result1, result2; u16 status; - DBFENTER; might_sleep(); @@ -3044,7 +2948,6 @@ int hfa384x_drvr_start(hfa384x_t *hw) hw->state = HFA384x_STATE_RUNNING; done: - DBFEXIT; return result; } @@ -3073,7 +2976,6 @@ hfa384x_drvr_stop(hfa384x_t *hw) { int result = 0; int i; - DBFENTER; might_sleep(); @@ -3098,7 +3000,6 @@ hfa384x_drvr_stop(hfa384x_t *hw) hw->port_enabled[i] = 0; } - DBFEXIT; return result; } @@ -3131,8 +3032,6 @@ int hfa384x_drvr_txframe(hfa384x_t *hw, struct sk_buff *skb, p80211_hdr_t *p8021 int ret; char *ptr; - DBFENTER; - if (hw->tx_urb.status == -EINPROGRESS) { WLAN_LOG_WARNING("TX URB already in use\n"); result = 3; @@ -3216,7 +3115,6 @@ int hfa384x_drvr_txframe(hfa384x_t *hw, struct sk_buff *skb, p80211_hdr_t *p8021 } exit: - DBFEXIT; return result; } @@ -3225,8 +3123,6 @@ void hfa384x_tx_timeout(wlandevice_t *wlandev) hfa384x_t *hw = wlandev->priv; unsigned long flags; - DBFENTER; - spin_lock_irqsave(&hw->ctlxq.lock, flags); if ( !hw->wlandev->hwremoved && @@ -3238,8 +3134,6 @@ void hfa384x_tx_timeout(wlandevice_t *wlandev) } spin_unlock_irqrestore(&hw->ctlxq.lock, flags); - - DBFEXIT; } /*---------------------------------------------------------------- @@ -3262,8 +3156,6 @@ static void hfa384x_usbctlx_reaper_task(unsigned long data) struct list_head *temp; unsigned long flags; - DBFENTER; - spin_lock_irqsave(&hw->ctlxq.lock, flags); /* This list is guaranteed to be empty if someone @@ -3279,7 +3171,6 @@ static void hfa384x_usbctlx_reaper_task(unsigned long data) spin_unlock_irqrestore(&hw->ctlxq.lock, flags); - DBFEXIT; } /*---------------------------------------------------------------- @@ -3305,8 +3196,6 @@ static void hfa384x_usbctlx_completion_task(unsigned long data) int reap = 0; - DBFENTER; - spin_lock_irqsave(&hw->ctlxq.lock, flags); /* This list is guaranteed to be empty if someone @@ -3361,8 +3250,6 @@ static void hfa384x_usbctlx_completion_task(unsigned long data) if (reap) tasklet_schedule(&hw->reaper_bh); - - DBFEXIT; } /*---------------------------------------------------------------- @@ -3386,8 +3273,6 @@ static int unlocked_usbctlx_cancel_async(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx) { int ret; - DBFENTER; - /* * Try to delete the URB containing our request packet. * If we succeed, then its completion handler will be @@ -3408,8 +3293,6 @@ static int unlocked_usbctlx_cancel_async(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx) ret = 0; } - DBFEXIT; - return ret; } @@ -3437,8 +3320,6 @@ static int unlocked_usbctlx_cancel_async(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx) ----------------------------------------------------------------*/ static void unlocked_usbctlx_complete(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx) { - DBFENTER; - /* Timers have been stopped, and ctlx should be in * a terminal state. Retire it from the "active" * queue. @@ -3458,8 +3339,6 @@ static void unlocked_usbctlx_complete(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx) ctlxstr(ctlx->state)); break; } /* switch */ - - DBFEXIT; } /*---------------------------------------------------------------- @@ -3482,7 +3361,6 @@ static void hfa384x_usbctlxq_run(hfa384x_t *hw) { unsigned long flags; - DBFENTER; /* acquire lock */ spin_lock_irqsave(&hw->ctlxq.lock, flags); @@ -3563,8 +3441,6 @@ hfa384x_usbctlxq_run(hfa384x_t *hw) unlock: spin_unlock_irqrestore(&hw->ctlxq.lock, flags); - - DBFEXIT; } @@ -3600,8 +3476,6 @@ static void hfa384x_usbin_callback(struct urb *urb) ABORT } action; - DBFENTER; - if ( !wlandev || !wlandev->netdev || wlandev->hwremoved ) @@ -3747,8 +3621,6 @@ exit: if (skb) dev_kfree_skb(skb); - - DBFEXIT; } @@ -3779,8 +3651,6 @@ static void hfa384x_usbin_ctlx(hfa384x_t *hw, hfa384x_usbin_t *usbin, int run_queue = 0; unsigned long flags; - DBFENTER; - retry: spin_lock_irqsave(&hw->ctlxq.lock, flags); @@ -3875,8 +3745,6 @@ unlock: if (run_queue) hfa384x_usbctlxq_run(hw); - - DBFEXIT; } @@ -3900,7 +3768,6 @@ unlock: static void hfa384x_usbin_txcompl(wlandevice_t *wlandev, hfa384x_usbin_t *usbin) { u16 status; - DBFENTER; status = hfa384x2host_16(usbin->type); /* yeah I know it says type...*/ @@ -3911,8 +3778,6 @@ static void hfa384x_usbin_txcompl(wlandevice_t *wlandev, hfa384x_usbin_t *usbin) prism2sta_ev_tx(wlandev, status); } // prism2sta_ev_alloc(wlandev); - - DBFEXIT; } @@ -3942,8 +3807,6 @@ static void hfa384x_usbin_rx(wlandevice_t *wlandev, struct sk_buff *skb) u16 data_len; u16 fc; - DBFENTER; - /* Byte order convert once up front. */ usbin->rxfrm.desc.status = hfa384x2host_16(usbin->rxfrm.desc.status); @@ -4018,7 +3881,6 @@ static void hfa384x_usbin_rx(wlandevice_t *wlandev, struct sk_buff *skb) } done: - DBFEXIT; return; } @@ -4054,8 +3916,6 @@ static void hfa384x_int_rxmonitor( wlandevice_t *wlandev, hfa384x_usb_rxfrm_t *r struct sk_buff *skb; hfa384x_t *hw = wlandev->priv; - - DBFENTER; /* Don't forget the status, time, and data_len fields are in host order */ /* Figure out how big the frame is */ fc = ieee2host16(rxdesc->frame_control); @@ -4128,7 +3988,6 @@ static void hfa384x_int_rxmonitor( wlandevice_t *wlandev, hfa384x_usb_rxfrm_t *r /* pass it back up */ prism2sta_ev_rx(wlandev, skb); - DBFEXIT; return; } @@ -4153,12 +4012,8 @@ static void hfa384x_int_rxmonitor( wlandevice_t *wlandev, hfa384x_usb_rxfrm_t *r ----------------------------------------------------------------*/ static void hfa384x_usbin_info(wlandevice_t *wlandev, hfa384x_usbin_t *usbin) { - DBFENTER; - usbin->infofrm.info.framelen = hfa384x2host_16(usbin->infofrm.info.framelen); prism2sta_ev_info(wlandev, &usbin->infofrm.info); - - DBFEXIT; } @@ -4183,7 +4038,6 @@ static void hfa384x_usbout_callback(struct urb *urb) { wlandevice_t *wlandev = urb->context; hfa384x_usbout_t *usbout = urb->transfer_buffer; - DBFENTER; #ifdef DEBUG_USB dbprint_urb(urb); @@ -4235,8 +4089,6 @@ static void hfa384x_usbout_callback(struct urb *urb) break; } /* switch */ } - - DBFEXIT; } @@ -4265,8 +4117,6 @@ static void hfa384x_ctlxout_callback(struct urb *urb) hfa384x_usbctlx_t *ctlx; unsigned long flags; - DBFENTER; - WLAN_LOG_DEBUG(3,"urb->status=%d\n", urb->status); #ifdef DEBUG_USB dbprint_urb(urb); @@ -4372,7 +4222,7 @@ retry: hfa384x_usbctlxq_run(hw); done: - DBFEXIT; + ; } @@ -4399,7 +4249,6 @@ hfa384x_usbctlx_reqtimerfn(unsigned long data) { hfa384x_t *hw = (hfa384x_t*)data; unsigned long flags; - DBFENTER; spin_lock_irqsave(&hw->ctlxq.lock, flags); @@ -4436,8 +4285,6 @@ hfa384x_usbctlx_reqtimerfn(unsigned long data) } spin_unlock_irqrestore(&hw->ctlxq.lock, flags); - - DBFEXIT; } @@ -4465,8 +4312,6 @@ hfa384x_usbctlx_resptimerfn(unsigned long data) hfa384x_t *hw = (hfa384x_t*)data; unsigned long flags; - DBFENTER; - spin_lock_irqsave(&hw->ctlxq.lock, flags); hw->resp_timer_done = 1; @@ -4489,7 +4334,8 @@ hfa384x_usbctlx_resptimerfn(unsigned long data) spin_unlock_irqrestore(&hw->ctlxq.lock, flags); done: - DBFEXIT; + ; + } /*---------------------------------------------------------------- @@ -4513,8 +4359,6 @@ hfa384x_usb_throttlefn(unsigned long data) hfa384x_t *hw = (hfa384x_t*)data; unsigned long flags; - DBFENTER; - spin_lock_irqsave(&hw->ctlxq.lock, flags); /* @@ -4535,8 +4379,6 @@ hfa384x_usb_throttlefn(unsigned long data) } spin_unlock_irqrestore(&hw->ctlxq.lock, flags); - - DBFEXIT; } @@ -4566,8 +4408,6 @@ hfa384x_usbctlx_submit( unsigned long flags; int ret; - DBFENTER; - spin_lock_irqsave(&hw->ctlxq.lock, flags); if (hw->wlandev->hwremoved) { @@ -4582,7 +4422,6 @@ hfa384x_usbctlx_submit( ret = 0; } - DBFEXIT; return ret; } @@ -4608,11 +4447,7 @@ hfa384x_usbctlx_submit( ----------------------------------------------------------------*/ static void hfa384x_usbout_tx(wlandevice_t *wlandev, hfa384x_usbout_t *usbout) { - DBFENTER; - prism2sta_ev_alloc(wlandev); - - DBFEXIT; } /*---------------------------------------------------------------- diff --git a/drivers/staging/wlan-ng/p80211conv.c b/drivers/staging/wlan-ng/p80211conv.c index 342715af82d7..53b17c3b1ed0 100644 --- a/drivers/staging/wlan-ng/p80211conv.c +++ b/drivers/staging/wlan-ng/p80211conv.c @@ -140,7 +140,6 @@ int skb_ether_to_p80211( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb wlan_snap_t *e_snap; int foo; - DBFENTER; memcpy(&e_hdr, skb->data, sizeof(e_hdr)); if (skb->len <= 0) { @@ -248,7 +247,6 @@ int skb_ether_to_p80211( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb p80211_hdr->a3.dur = 0; p80211_hdr->a3.seq = 0; - DBFEXIT; return 0; } @@ -308,8 +306,6 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb int foo; - DBFENTER; - payload_length = skb->len - WLAN_HDR_A3_LEN - WLAN_CRC_LEN; payload_offset = WLAN_HDR_A3_LEN; @@ -511,7 +507,6 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb /* Free the metadata */ p80211skb_rxmeta_detach(skb); - DBFEXIT; return 0; } @@ -567,7 +562,6 @@ p80211skb_rxmeta_detach(struct sk_buff *skb) p80211_rxmeta_t *rxmeta; p80211_frmmeta_t *frmmeta; - DBFENTER; /* Sanity checks */ if ( skb==NULL ) { /* bad skb */ WLAN_LOG_DEBUG(1, "Called w/ null skb.\n"); @@ -590,7 +584,6 @@ p80211skb_rxmeta_detach(struct sk_buff *skb) /* Clear skb->cb */ memset(skb->cb, 0, sizeof(skb->cb)); exit: - DBFEXIT; return; } @@ -617,8 +610,6 @@ p80211skb_rxmeta_attach(struct wlandevice *wlandev, struct sk_buff *skb) p80211_rxmeta_t *rxmeta; p80211_frmmeta_t *frmmeta; - DBFENTER; - /* If these already have metadata, we error out! */ if (P80211SKB_RXMETA(skb) != NULL) { WLAN_LOG_ERROR("%s: RXmeta already attached!\n", @@ -648,7 +639,6 @@ p80211skb_rxmeta_attach(struct wlandevice *wlandev, struct sk_buff *skb) frmmeta->magic = P80211_FRMMETA_MAGIC; frmmeta->rx = rxmeta; exit: - DBFEXIT; return result; } @@ -672,7 +662,7 @@ void p80211skb_free(struct wlandevice *wlandev, struct sk_buff *skb) { p80211_frmmeta_t *meta; - DBFENTER; + meta = P80211SKB_FRMMETA(skb); if ( meta && meta->rx) { p80211skb_rxmeta_detach(skb); @@ -681,6 +671,5 @@ p80211skb_free(struct wlandevice *wlandev, struct sk_buff *skb) } dev_kfree_skb(skb); - DBFEXIT; return; } diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c index 8081058ebe9a..1ebba6a06aaf 100644 --- a/drivers/staging/wlan-ng/p80211netdev.c +++ b/drivers/staging/wlan-ng/p80211netdev.c @@ -157,12 +157,10 @@ MODULE_PARM_DESC(wlan_debug, "p80211 debug level"); ----------------------------------------------------------------*/ static int p80211knetdev_init( netdevice_t *netdev) { - DBFENTER; /* Called in response to register_netdev */ /* This is usually the probe function, but the probe has */ /* already been done by the MSD and the create_kdev */ /* function. All we do here is return success */ - DBFEXIT; return 0; } @@ -185,12 +183,10 @@ static struct net_device_stats* p80211knetdev_get_stats(netdevice_t *netdev) { wlandevice_t *wlandev = netdev->ml_priv; - DBFENTER; /* TODO: review the MIB stats for items that correspond to linux stats */ - DBFEXIT; return &(wlandev->linux_stats); } @@ -214,8 +210,6 @@ static int p80211knetdev_open( netdevice_t *netdev ) int result = 0; /* success */ wlandevice_t *wlandev = netdev->ml_priv; - DBFENTER; - /* Check to make sure the MSD is running */ if ( wlandev->msdstate != WLAN_MSD_RUNNING ) { return -ENODEV; @@ -232,7 +226,6 @@ static int p80211knetdev_open( netdevice_t *netdev ) result = -EAGAIN; } - DBFEXIT; return result; } @@ -254,8 +247,6 @@ static int p80211knetdev_stop( netdevice_t *netdev ) int result = 0; wlandevice_t *wlandev = netdev->ml_priv; - DBFENTER; - if ( wlandev->close != NULL ) { result = wlandev->close(wlandev); } @@ -263,7 +254,6 @@ static int p80211knetdev_stop( netdevice_t *netdev ) netif_stop_queue(wlandev->netdev); wlandev->state = WLAN_DEVICE_CLOSED; - DBFEXIT; return result; } @@ -283,14 +273,11 @@ static int p80211knetdev_stop( netdevice_t *netdev ) void p80211netdev_rx(wlandevice_t *wlandev, struct sk_buff *skb ) { - DBFENTER; - /* Enqueue for post-irq processing */ skb_queue_tail(&wlandev->nsd_rxq, skb); tasklet_schedule(&wlandev->rx_bh); - DBFEXIT; return; } @@ -315,8 +302,6 @@ static void p80211netdev_rx_bh(unsigned long arg) p80211_hdr_a3_t *hdr; u16 fc; - DBFENTER; - /* Let's empty our our queue */ while ( (skb = skb_dequeue(&wlandev->nsd_rxq)) ) { if (wlandev->state == WLAN_DEVICE_OPEN) { @@ -369,8 +354,6 @@ static void p80211netdev_rx_bh(unsigned long arg) } dev_kfree_skb(skb); } - - DBFEXIT; } @@ -401,8 +384,6 @@ static int p80211knetdev_hard_start_xmit( struct sk_buff *skb, netdevice_t *netd p80211_hdr_t p80211_hdr; p80211_metawep_t p80211_wep; - DBFENTER; - if (skb == NULL) { return 0; } @@ -506,7 +487,6 @@ static int p80211knetdev_hard_start_xmit( struct sk_buff *skb, netdevice_t *netd if (!result) dev_kfree_skb(skb); - DBFEXIT; return result; } @@ -527,14 +507,11 @@ static void p80211knetdev_set_multicast_list(netdevice_t *dev) { wlandevice_t *wlandev = dev->ml_priv; - DBFENTER; - /* TODO: real multicast support as well */ if (wlandev->set_multicast_list) wlandev->set_multicast_list(wlandev, dev); - DBFEXIT; } #ifdef SIOCETHTOOL @@ -620,7 +597,6 @@ static int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd) p80211ioctl_req_t *req = (p80211ioctl_req_t*)ifr; wlandevice_t *wlandev = dev->ml_priv; u8 *msgbuf; - DBFENTER; WLAN_LOG_DEBUG(2, "rx'd ioctl, cmd=%d, len=%d\n", cmd, req->len); @@ -663,8 +639,6 @@ static int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd) result = -ENOMEM; } bail: - DBFEXIT; - return result; /* If allocate,copyfrom or copyto fails, return errno */ } @@ -702,7 +676,6 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr) p80211item_uint32_t *resultcode; int result = 0; - DBFENTER; /* If we're running, we don't allow MAC address changes */ if (netif_running(dev)) { return -EBUSY; @@ -753,13 +726,11 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr) memcpy(dev->dev_addr, new_addr->sa_data, dev->addr_len); } - DBFEXIT; return result; } static int wlan_change_mtu(netdevice_t *dev, int new_mtu) { - DBFENTER; // 2312 is max 802.11 payload, 20 is overhead, (ether + llc +snap) // and another 8 for wep. if ( (new_mtu < 68) || (new_mtu > (2312 - 20 - 8))) @@ -767,8 +738,6 @@ static int wlan_change_mtu(netdevice_t *dev, int new_mtu) dev->mtu = new_mtu; - DBFEXIT; - return 0; } @@ -801,8 +770,6 @@ int wlan_setup(wlandevice_t *wlandev) int result = 0; netdevice_t *dev; - DBFENTER; - /* Set up the wlandev */ wlandev->state = WLAN_DEVICE_CLOSED; wlandev->ethconv = WLAN_ETHCONV_8021h; @@ -853,7 +820,6 @@ int wlan_setup(wlandevice_t *wlandev) netif_carrier_off(dev); } - DBFEXIT; return result; } @@ -882,8 +848,6 @@ int wlan_unsetup(wlandevice_t *wlandev) { int result = 0; - DBFENTER; - tasklet_kill(&wlandev->rx_bh); if (wlandev->netdev == NULL ) { @@ -894,7 +858,6 @@ int wlan_unsetup(wlandevice_t *wlandev) wlandev->netdev = NULL; } - DBFEXIT; return 0; } @@ -923,13 +886,10 @@ int register_wlandev(wlandevice_t *wlandev) { int i = 0; - DBFENTER; - i = register_netdev(wlandev->netdev); if (i) return i; - DBFEXIT; return 0; } @@ -955,8 +915,6 @@ int unregister_wlandev(wlandevice_t *wlandev) { struct sk_buff *skb; - DBFENTER; - unregister_netdev(wlandev->netdev); /* Now to clean out the rx queue */ @@ -964,7 +922,6 @@ int unregister_wlandev(wlandevice_t *wlandev) dev_kfree_skb(skb); } - DBFEXIT; return 0; } @@ -1001,15 +958,12 @@ int unregister_wlandev(wlandevice_t *wlandev) ----------------------------------------------------------------*/ void p80211netdev_hwremoved(wlandevice_t *wlandev) { - DBFENTER; wlandev->hwremoved = 1; if ( wlandev->state == WLAN_DEVICE_OPEN) { netif_stop_queue(wlandev->netdev); } netif_device_detach(wlandev->netdev); - - DBFEXIT; } @@ -1196,7 +1150,6 @@ static int p80211_rx_typedrop( wlandevice_t *wlandev, u16 fc) static void p80211knetdev_tx_timeout( netdevice_t *netdev) { wlandevice_t *wlandev = netdev->ml_priv; - DBFENTER; if (wlandev->tx_timeout) { wlandev->tx_timeout(wlandev); @@ -1205,6 +1158,4 @@ static void p80211knetdev_tx_timeout( netdevice_t *netdev) wlandev->nsdname); netif_wake_queue(wlandev->netdev); } - - DBFEXIT; } diff --git a/drivers/staging/wlan-ng/p80211req.c b/drivers/staging/wlan-ng/p80211req.c index 6e20bff0e67e..77bb00227c3d 100644 --- a/drivers/staging/wlan-ng/p80211req.c +++ b/drivers/staging/wlan-ng/p80211req.c @@ -129,8 +129,6 @@ int p80211req_dorequest( wlandevice_t *wlandev, u8 *msgbuf) int result = 0; p80211msg_t *msg = (p80211msg_t*)msgbuf; - DBFENTER; - /* Check to make sure the MSD is running */ if ( !((wlandev->msdstate == WLAN_MSD_HWPRESENT && @@ -162,7 +160,6 @@ int p80211req_dorequest( wlandevice_t *wlandev, u8 *msgbuf) wlandev->mlmerequest(wlandev, msg); clear_bit( 1, &(wlandev->request_pending)); - DBFEXIT; return result; /* if result==0, msg->status still may contain an err */ } @@ -186,8 +183,6 @@ int p80211req_dorequest( wlandevice_t *wlandev, u8 *msgbuf) ----------------------------------------------------------------*/ static void p80211req_handlemsg( wlandevice_t *wlandev, p80211msg_t *msg) { - DBFENTER; - switch (msg->msgcode) { case DIDmsg_lnxreq_hostwep: { @@ -211,8 +206,6 @@ static void p80211req_handlemsg( wlandevice_t *wlandev, p80211msg_t *msg) ; } /* switch msg->msgcode */ - DBFEXIT; - return; } @@ -224,8 +217,6 @@ static int p80211req_mibset_mibget(wlandevice_t *wlandev, p80211pstrd_t *pstr = (p80211pstrd_t*) mibitem->data; u8 *key = mibitem->data + sizeof(p80211pstrd_t); - DBFENTER; - switch (mibitem->did) { case DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0: { if (!isget) @@ -294,7 +285,6 @@ static int p80211req_mibset_mibget(wlandevice_t *wlandev, ; } - DBFEXIT; return 0; } diff --git a/drivers/staging/wlan-ng/p80211wext.c b/drivers/staging/wlan-ng/p80211wext.c index f817fe4c16f5..9c4c934731f3 100644 --- a/drivers/staging/wlan-ng/p80211wext.c +++ b/drivers/staging/wlan-ng/p80211wext.c @@ -148,15 +148,12 @@ static int p80211wext_dorequest(wlandevice_t *wlandev, u32 did, u32 data) p80211item_uint32_t mibitem; int result; - DBFENTER; - msg.msgcode = DIDmsg_dot11req_mibset; mibitem.did = did; mibitem.data = data; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); result = p80211req_dorequest(wlandev, (u8*)&msg); - DBFEXIT; return result; } @@ -169,8 +166,6 @@ static int p80211wext_autojoin(wlandevice_t *wlandev) int result; int err = 0; - DBFENTER; - /* Get ESSID */ result = p80211wext_giwessid(wlandev->netdev, NULL, &data, ssid); @@ -204,7 +199,6 @@ static int p80211wext_autojoin(wlandevice_t *wlandev) exit: - DBFEXIT; return err; } @@ -217,7 +211,6 @@ struct iw_statistics* p80211wext_get_wireless_stats (netdevice_t *dev) struct iw_statistics* wstats = &wlandev->wstats; int retval; - DBFENTER; /* Check */ if ( (wlandev == NULL) || (wlandev->msdstate != WLAN_MSD_RUNNING) ) return NULL; @@ -249,8 +242,6 @@ struct iw_statistics* p80211wext_get_wireless_stats (netdevice_t *dev) wstats->discard.retries = 0; // tx retries. wstats->miss.beacon = 0; - DBFEXIT; - return wstats; } @@ -262,8 +253,6 @@ static int p80211wext_giwname(netdevice_t *dev, int result; int err = 0; - DBFENTER; - result = p80211wext_giwrate(dev, NULL, &rate, NULL); if (result) { @@ -282,7 +271,6 @@ static int p80211wext_giwname(netdevice_t *dev, break; } exit: - DBFEXIT; return err; } @@ -296,8 +284,6 @@ static int p80211wext_giwfreq(netdevice_t *dev, int result; int err = 0; - DBFENTER; - msg.msgcode = DIDmsg_dot11req_mibget; mibitem.did = DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); @@ -320,7 +306,6 @@ static int p80211wext_giwfreq(netdevice_t *dev, freq->m = p80211_channel_to_mhz(mibitem.data, 0) * 100000; exit: - DBFEXIT; return err; } @@ -334,8 +319,6 @@ static int p80211wext_siwfreq(netdevice_t *dev, int result; int err = 0; - DBFENTER; - if (!wlan_wext_write) { err = (-EOPNOTSUPP); goto exit; @@ -359,7 +342,6 @@ static int p80211wext_siwfreq(netdevice_t *dev, } exit: - DBFEXIT; return err; } @@ -369,8 +351,6 @@ static int p80211wext_giwmode(netdevice_t *dev, { wlandevice_t *wlandev = dev->ml_priv; - DBFENTER; - switch (wlandev->macmode) { case WLAN_MACMODE_IBSS_STA: *mode = IW_MODE_ADHOC; @@ -386,7 +366,6 @@ static int p80211wext_giwmode(netdevice_t *dev, *mode = IW_MODE_AUTO; } - DBFEXIT; return 0; } @@ -400,8 +379,6 @@ static int p80211wext_siwmode(netdevice_t *dev, int result; int err = 0; - DBFENTER; - if (!wlan_wext_write) { err = (-EOPNOTSUPP); goto exit; @@ -444,8 +421,6 @@ static int p80211wext_siwmode(netdevice_t *dev, err = -EFAULT; exit: - DBFEXIT; - return err; } @@ -457,8 +432,6 @@ static int p80211wext_giwrange(netdevice_t *dev, struct iw_range *range = (struct iw_range *) extra; int i, val; - DBFENTER; - // for backward compatability set size & zero everything we don't understand data->length = sizeof(*range); memset(range,0,sizeof(*range)); @@ -518,7 +491,6 @@ static int p80211wext_giwrange(netdevice_t *dev, // XXX need to cap it if we're running at ~2Mbps.. range->throughput = 5500000; - DBFEXIT; return 0; } @@ -529,12 +501,9 @@ static int p80211wext_giwap(netdevice_t *dev, wlandevice_t *wlandev = dev->ml_priv; - DBFENTER; - memcpy(ap_addr->sa_data, wlandev->bssid, WLAN_BSSID_LEN); ap_addr->sa_family = ARPHRD_ETHER; - DBFEXIT; return 0; } @@ -546,8 +515,6 @@ static int p80211wext_giwencode(netdevice_t *dev, int err = 0; int i; - DBFENTER; - i = (erq->flags & IW_ENCODE_INDEX) - 1; erq->flags = 0; @@ -578,7 +545,6 @@ static int p80211wext_giwencode(netdevice_t *dev, memcpy(key, wlandev->wep_keys[i], erq->length); exit: - DBFEXIT; return err; } @@ -594,7 +560,6 @@ static int p80211wext_siwencode(netdevice_t *dev, int result = 0; int i; - DBFENTER; if (!wlan_wext_write) { err = (-EOPNOTSUPP); goto exit; @@ -711,7 +676,6 @@ static int p80211wext_siwencode(netdevice_t *dev, exit: - DBFEXIT; return err; } @@ -721,8 +685,6 @@ static int p80211wext_giwessid(netdevice_t *dev, { wlandevice_t *wlandev = dev->ml_priv; - DBFENTER; - if (wlandev->ssid.len) { data->length = wlandev->ssid.len; data->flags = 1; @@ -737,7 +699,6 @@ static int p80211wext_giwessid(netdevice_t *dev, data->flags = 0; } - DBFEXIT; return 0; } @@ -752,8 +713,6 @@ static int p80211wext_siwessid(netdevice_t *dev, int err = 0; int length = data->length; - DBFENTER; - if (!wlan_wext_write) { err = (-EOPNOTSUPP); goto exit; @@ -790,7 +749,6 @@ static int p80211wext_siwessid(netdevice_t *dev, } exit: - DBFEXIT; return err; } @@ -802,8 +760,6 @@ static int p80211wext_siwcommit(netdevice_t *dev, wlandevice_t *wlandev = dev->ml_priv; int err = 0; - DBFENTER; - if (!wlan_wext_write) { err = (-EOPNOTSUPP); goto exit; @@ -813,7 +769,6 @@ static int p80211wext_siwcommit(netdevice_t *dev, err = p80211wext_autojoin(wlandev); exit: - DBFEXIT; return err; } @@ -828,8 +783,6 @@ static int p80211wext_giwrate(netdevice_t *dev, int result; int err = 0; - DBFENTER; - msg.msgcode = DIDmsg_dot11req_mibget; mibitem.did = DIDmib_p2_p2MAC_p2CurrentTxRate; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); @@ -868,7 +821,6 @@ static int p80211wext_giwrate(netdevice_t *dev, err = -EINVAL; } exit: - DBFEXIT; return err; } @@ -882,8 +834,6 @@ static int p80211wext_giwrts(netdevice_t *dev, int result; int err = 0; - DBFENTER; - msg.msgcode = DIDmsg_dot11req_mibget; mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); @@ -901,7 +851,6 @@ static int p80211wext_giwrts(netdevice_t *dev, rts->fixed = 1; exit: - DBFEXIT; return err; } @@ -916,8 +865,6 @@ static int p80211wext_siwrts(netdevice_t *dev, int result; int err = 0; - DBFENTER; - if (!wlan_wext_write) { err = (-EOPNOTSUPP); goto exit; @@ -939,7 +886,6 @@ static int p80211wext_siwrts(netdevice_t *dev, } exit: - DBFEXIT; return err; } @@ -953,8 +899,6 @@ static int p80211wext_giwfrag(netdevice_t *dev, int result; int err = 0; - DBFENTER; - msg.msgcode = DIDmsg_dot11req_mibget; mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); @@ -972,7 +916,6 @@ static int p80211wext_giwfrag(netdevice_t *dev, frag->fixed = 1; exit: - DBFEXIT; return err; } @@ -986,8 +929,6 @@ static int p80211wext_siwfrag(netdevice_t *dev, int result; int err = 0; - DBFENTER; - if (!wlan_wext_write) { err = (-EOPNOTSUPP); goto exit; @@ -1010,7 +951,6 @@ static int p80211wext_siwfrag(netdevice_t *dev, } exit: - DBFEXIT; return err; } @@ -1033,8 +973,6 @@ static int p80211wext_giwretry(netdevice_t *dev, int err = 0; u16 shortretry, longretry, lifetime; - DBFENTER; - msg.msgcode = DIDmsg_dot11req_mibget; mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11ShortRetryLimit; @@ -1096,7 +1034,6 @@ static int p80211wext_giwretry(netdevice_t *dev, } exit: - DBFEXIT; return err; } @@ -1111,8 +1048,6 @@ static int p80211wext_siwretry(netdevice_t *dev, int result; int err = 0; - DBFENTER; - if (!wlan_wext_write) { err = (-EOPNOTSUPP); goto exit; @@ -1165,7 +1100,6 @@ static int p80211wext_siwretry(netdevice_t *dev, } exit: - DBFEXIT; return err; } @@ -1180,8 +1114,6 @@ static int p80211wext_siwtxpow(netdevice_t *dev, int result; int err = 0; - DBFENTER; - if (!wlan_wext_write) { err = (-EOPNOTSUPP); goto exit; @@ -1202,7 +1134,6 @@ static int p80211wext_siwtxpow(netdevice_t *dev, } exit: - DBFEXIT; return err; } @@ -1216,8 +1147,6 @@ static int p80211wext_giwtxpow(netdevice_t *dev, int result; int err = 0; - DBFENTER; - msg.msgcode = DIDmsg_dot11req_mibget; mibitem.did = DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel; @@ -1239,7 +1168,6 @@ static int p80211wext_giwtxpow(netdevice_t *dev, rrq->value = mibitem.data; exit: - DBFEXIT; return err; } @@ -1252,7 +1180,6 @@ static int p80211wext_siwspy(netdevice_t *dev, int number = srq->length; int i; - DBFENTER; /* Copy the data from the input buffer */ memcpy(address, extra, sizeof(struct sockaddr)*number); @@ -1274,7 +1201,6 @@ static int p80211wext_siwspy(netdevice_t *dev, wlandev->spy_number = number; } - DBFEXIT; return 0; } @@ -1290,8 +1216,6 @@ static int p80211wext_giwspy(netdevice_t *dev, int number; int i; - DBFENTER; - number = wlandev->spy_number; if (number > 0) { @@ -1313,7 +1237,6 @@ static int p80211wext_giwspy(netdevice_t *dev, memcpy(extra, address, sizeof(struct sockaddr)*number); memcpy(extra+sizeof(struct sockaddr)*number, spy_stat, sizeof(struct iw_quality)*number); - DBFEXIT; return 0; } @@ -1349,8 +1272,6 @@ static int p80211wext_siwscan(netdevice_t *dev, int err = 0; int i = 0; - DBFENTER; - if (wlandev->macmode == WLAN_MACMODE_ESS_AP) { WLAN_LOG_ERROR("Can't scan in AP mode\n"); err = (-EOPNOTSUPP); @@ -1379,7 +1300,6 @@ static int p80211wext_siwscan(netdevice_t *dev, err = prism2_result2err (msg.resultcode.data); exit: - DBFEXIT; return err; } @@ -1474,8 +1394,6 @@ static int p80211wext_giwscan(netdevice_t *dev, int scan_good = 0; char *current_ev = extra; - DBFENTER; - /* Since wireless tools doesn't really have a way of passing how * many scan results results there were back here, keep grabbing them * until we fail. @@ -1502,7 +1420,6 @@ static int p80211wext_giwscan(netdevice_t *dev, if (result && !scan_good) err = prism2_result2err (msg.resultcode.data); - DBFEXIT; return err; } @@ -1598,8 +1515,6 @@ static int p80211wext_get_encodeext(struct net_device *dev, int max_len; int idx; - DBFENTER; - WLAN_LOG_DEBUG(1,"get_encode_ext flags[%d] alg[%d] keylen[%d]\n",ext->ext_flags,(int)ext->alg,(int)ext->key_len); @@ -1634,8 +1549,6 @@ static int p80211wext_get_encodeext(struct net_device *dev, encoding->flags |= IW_ENCODE_ENABLED; exit: - DBFEXIT; - return result; } @@ -1801,8 +1714,6 @@ int p80211wext_event_associated(wlandevice_t *wlandev, int assoc) { union iwreq_data data; - DBFENTER; - /* Send the association state first */ data.ap_addr.sa_family = ARPHRD_ETHER; if (assoc) { @@ -1819,7 +1730,6 @@ int p80211wext_event_associated(wlandevice_t *wlandev, int assoc) // XXX send association data, like IEs, etc etc. done: - DBFEXIT; return 0; } diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c index f1727ba6ec6f..b1055af8c249 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.c +++ b/drivers/staging/wlan-ng/prism2mgmt.c @@ -134,8 +134,6 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp) hfa384x_HostScanRequest_data_t scanreq; - DBFENTER; - /* gatekeeper check */ if (HFA384x_FIRMWARE_VERSION(hw->ident_sta_fw.major, hw->ident_sta_fw.minor, @@ -340,7 +338,6 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp) exit: msg->resultcode.status = P80211ENUM_msgitem_status_data_ok; - DBFEXIT; return result; } @@ -374,8 +371,6 @@ int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp) int count; - DBFENTER; - req = (p80211msg_dot11req_scan_results_t *) msgp; req->resultcode.status = P80211ENUM_msgitem_status_data_ok; @@ -502,7 +497,6 @@ int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp) req->resultcode.data = P80211ENUM_resultcode_success; exit: - DBFEXIT; return result; } @@ -535,7 +529,6 @@ int prism2mgmt_start(wlandevice_t *wlandev, void *msgp) u8 bytebuf[80]; hfa384x_bytestr_t *p2bytestr = (hfa384x_bytestr_t*)bytebuf; u16 word; - DBFENTER; wlandev->macmode = WLAN_MACMODE_NONE; @@ -681,7 +674,6 @@ failed: done: result = 0; - DBFEXIT; return result; } @@ -708,7 +700,6 @@ int prism2mgmt_readpda(wlandevice_t *wlandev, void *msgp) hfa384x_t *hw = wlandev->priv; p80211msg_p2req_readpda_t *msg = msgp; int result; - DBFENTER; /* We only support collecting the PDA when in the FWLOAD * state. @@ -738,7 +729,6 @@ int prism2mgmt_readpda(wlandevice_t *wlandev, void *msgp) P80211ENUM_resultcode_implementation_failure; msg->resultcode.status = P80211ENUM_msgitem_status_data_ok; - DBFEXIT; return 0; } msg->pda.status = P80211ENUM_msgitem_status_data_ok; @@ -746,7 +736,6 @@ int prism2mgmt_readpda(wlandevice_t *wlandev, void *msgp) msg->resultcode.status = P80211ENUM_msgitem_status_data_ok; } - DBFEXIT; return 0; } @@ -779,7 +768,6 @@ int prism2mgmt_ramdl_state(wlandevice_t *wlandev, void *msgp) { hfa384x_t *hw = wlandev->priv; p80211msg_p2req_ramdl_state_t *msg = msgp; - DBFENTER; if (wlandev->msdstate != WLAN_MSD_FWLOAD) { WLAN_LOG_ERROR( @@ -788,7 +776,6 @@ int prism2mgmt_ramdl_state(wlandevice_t *wlandev, void *msgp) msg->resultcode.data = P80211ENUM_resultcode_implementation_failure; msg->resultcode.status = P80211ENUM_msgitem_status_data_ok; - DBFEXIT; return 0; } @@ -809,7 +796,6 @@ int prism2mgmt_ramdl_state(wlandevice_t *wlandev, void *msgp) msg->resultcode.data = P80211ENUM_resultcode_success; } - DBFEXIT; return 0; } @@ -841,7 +827,6 @@ int prism2mgmt_ramdl_write(wlandevice_t *wlandev, void *msgp) u32 addr; u32 len; u8 *buf; - DBFENTER; if (wlandev->msdstate != WLAN_MSD_FWLOAD) { WLAN_LOG_ERROR( @@ -850,7 +835,6 @@ int prism2mgmt_ramdl_write(wlandevice_t *wlandev, void *msgp) msg->resultcode.data = P80211ENUM_resultcode_implementation_failure; msg->resultcode.status = P80211ENUM_msgitem_status_data_ok; - DBFEXIT; return 0; } @@ -870,7 +854,6 @@ int prism2mgmt_ramdl_write(wlandevice_t *wlandev, void *msgp) } msg->resultcode.data = P80211ENUM_resultcode_success; - DBFEXIT; return 0; } @@ -905,7 +888,6 @@ int prism2mgmt_flashdl_state(wlandevice_t *wlandev, void *msgp) int result = 0; hfa384x_t *hw = wlandev->priv; p80211msg_p2req_flashdl_state_t *msg = msgp; - DBFENTER; if (wlandev->msdstate != WLAN_MSD_FWLOAD) { WLAN_LOG_ERROR( @@ -914,7 +896,6 @@ int prism2mgmt_flashdl_state(wlandevice_t *wlandev, void *msgp) msg->resultcode.data = P80211ENUM_resultcode_implementation_failure; msg->resultcode.status = P80211ENUM_msgitem_status_data_ok; - DBFEXIT; return 0; } @@ -951,7 +932,6 @@ int prism2mgmt_flashdl_state(wlandevice_t *wlandev, void *msgp) } } - DBFEXIT; return 0; } @@ -981,7 +961,6 @@ int prism2mgmt_flashdl_write(wlandevice_t *wlandev, void *msgp) u32 addr; u32 len; u8 *buf; - DBFENTER; if (wlandev->msdstate != WLAN_MSD_FWLOAD) { WLAN_LOG_ERROR( @@ -990,7 +969,6 @@ int prism2mgmt_flashdl_write(wlandevice_t *wlandev, void *msgp) msg->resultcode.data = P80211ENUM_resultcode_implementation_failure; msg->resultcode.status = P80211ENUM_msgitem_status_data_ok; - DBFEXIT; return 0; } @@ -1016,7 +994,6 @@ int prism2mgmt_flashdl_write(wlandevice_t *wlandev, void *msgp) } msg->resultcode.data = P80211ENUM_resultcode_success; - DBFEXIT; return 0; } @@ -1049,7 +1026,6 @@ int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp) p80211pstrd_t *pstr; u8 bytebuf[256]; hfa384x_bytestr_t *p2bytestr = (hfa384x_bytestr_t*)bytebuf; - DBFENTER; wlandev->macmode = WLAN_MACMODE_NONE; @@ -1107,7 +1083,6 @@ int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp) msg->resultcode.status = P80211ENUM_msgitem_status_data_ok; msg->resultcode.data = P80211ENUM_resultcode_success; - DBFEXIT; return result; } @@ -1139,8 +1114,6 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) hfa384x_t *hw = wlandev->priv; u16 word; - DBFENTER; - msg->resultcode.status = P80211ENUM_msgitem_status_data_ok; switch (msg->enable.data) { @@ -1357,7 +1330,5 @@ failed: msg->resultcode.data = P80211ENUM_resultcode_refused; result = 0; exit: - - DBFEXIT; return result; } diff --git a/drivers/staging/wlan-ng/prism2mib.c b/drivers/staging/wlan-ng/prism2mib.c index 539c4479d381..873b29f1944a 100644 --- a/drivers/staging/wlan-ng/prism2mib.c +++ b/drivers/staging/wlan-ng/prism2mib.c @@ -304,8 +304,6 @@ int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp) p80211msg_dot11req_mibset_t *msg = msgp; p80211itemd_t *mibitem; - DBFENTER; - msg->resultcode.status = P80211ENUM_msgitem_status_data_ok; msg->resultcode.data = P80211ENUM_resultcode_success; @@ -383,8 +381,6 @@ int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp) } done: - DBFEXIT; - return(0); } @@ -425,8 +421,6 @@ void *data) p80211pstrd_t *pstr = (p80211pstrd_t*) data; u8 bytebuf[MIB_TMP_MAXLEN]; - DBFENTER; - if (isget) { result = hfa384x_drvr_getconfig(hw, mib->parm1, bytebuf, mib->parm2); prism2mgmt_bytearea2pstr(bytebuf, pstr, mib->parm2); @@ -436,7 +430,6 @@ void *data) result = hfa384x_drvr_setconfig(hw, mib->parm1, bytebuf, mib->parm2); } - DBFEXIT; return(result); } @@ -478,8 +471,6 @@ void *data) u8 bytebuf[MIB_TMP_MAXLEN]; u16 *wordbuf = (u16*) bytebuf; - DBFENTER; - if (isget) { result = hfa384x_drvr_getconfig16(hw, mib->parm1, wordbuf); *uint32 = *wordbuf; @@ -494,7 +485,6 @@ void *data) result = hfa384x_drvr_setconfig16(hw, mib->parm1, *wordbuf); } - DBFEXIT; return(result); } @@ -537,8 +527,6 @@ void *data) u16 *wordbuf = (u16*) bytebuf; u32 flags; - DBFENTER; - result = hfa384x_drvr_getconfig16(hw, mib->parm1, wordbuf); if (result == 0) { /* [MSM] Removed, getconfig16 returns the value in host order. @@ -561,7 +549,6 @@ void *data) } } - DBFEXIT; return(result); } @@ -603,8 +590,6 @@ void *data) u8 bytebuf[MIB_TMP_MAXLEN]; u16 len; - DBFENTER; - if (isget) { result = 0; /* Should never happen. */ } else { @@ -615,7 +600,6 @@ void *data) result = hfa384x_drvr_setconfig(hw, mib->parm1, bytebuf, len); } - DBFEXIT; return(result); } @@ -654,8 +638,6 @@ void *data) { int result; - DBFENTER; - if (wlandev->hostwep & HOSTWEP_DECRYPT) { if (wlandev->hostwep & HOSTWEP_DECRYPT) mib->parm2 |= HFA384x_WEPFLAGS_DISABLE_RXCRYPT; @@ -665,7 +647,6 @@ void *data) result = prism2mib_flag(mib, isget, wlandev, hw, msg, data); - DBFEXIT; return(result); } @@ -704,11 +685,8 @@ void *data) { int result; - DBFENTER; - result = prism2mib_flag(mib, isget, wlandev, hw, msg, data); - DBFEXIT; return(result); } @@ -748,8 +726,6 @@ void *data) int result; u32 *uint32 = (u32*) data; - DBFENTER; - if (!isget) if ((*uint32) % 2) { WLAN_LOG_WARNING("Attempt to set odd number " @@ -760,7 +736,6 @@ void *data) result = prism2mib_uint32(mib, isget, wlandev, hw, msg, data); - DBFEXIT; return(result); } @@ -801,8 +776,6 @@ void *data) int result; - DBFENTER; - switch (mib->did) { case DIDmib_lnx_lnxConfigTable_lnxRSNAIE: { hfa384x_WPAData_t wpa; @@ -824,7 +797,6 @@ void *data) WLAN_LOG_ERROR("Unhandled DID 0x%08x\n", mib->did); } - DBFEXIT; return(0); } @@ -845,11 +817,8 @@ void *data) void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr) { - DBFENTER; - bytestr->len = host2hfa384x_16((u16)(pstr->len)); memcpy(bytestr->data, pstr->data, pstr->len); - DBFEXIT; } @@ -870,10 +839,7 @@ void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr) void prism2mgmt_pstr2bytearea(u8 *bytearea, p80211pstrd_t *pstr) { - DBFENTER; - memcpy(bytearea, pstr->data, pstr->len); - DBFEXIT; } @@ -894,11 +860,8 @@ void prism2mgmt_pstr2bytearea(u8 *bytearea, p80211pstrd_t *pstr) void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr) { - DBFENTER; - pstr->len = (u8)(hfa384x2host_16((u16)(bytestr->len))); memcpy(pstr->data, bytestr->data, pstr->len); - DBFEXIT; } @@ -919,11 +882,8 @@ void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr) void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len) { - DBFENTER; - pstr->len = (u8)len; memcpy(pstr->data, bytearea, len); - DBFEXIT; } @@ -943,10 +903,7 @@ void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len) void prism2mgmt_prism2int2p80211int(u16 *prism2int, u32 *wlanint) { - DBFENTER; - *wlanint = (u32)hfa384x2host_16(*prism2int); - DBFEXIT; } @@ -966,10 +923,7 @@ void prism2mgmt_prism2int2p80211int(u16 *prism2int, u32 *wlanint) void prism2mgmt_p80211int2prism2int(u16 *prism2int, u32 *wlanint) { - DBFENTER; - *prism2int = host2hfa384x_16((u16)(*wlanint)); - DBFEXIT; } @@ -989,12 +943,9 @@ void prism2mgmt_p80211int2prism2int(u16 *prism2int, u32 *wlanint) ----------------------------------------------------------------*/ void prism2mgmt_prism2enum2p80211enum(u16 *prism2enum, u32 *wlanenum, u16 rid) { - DBFENTER; - /* At the moment, the need for this functionality hasn't presented itself. All the wlan enumerated values are a 1-to-1 match against the Prism2 enumerated values*/ - DBFEXIT; return; } @@ -1015,12 +966,9 @@ void prism2mgmt_prism2enum2p80211enum(u16 *prism2enum, u32 *wlanenum, u16 rid) ----------------------------------------------------------------*/ void prism2mgmt_p80211enum2prism2enum(u16 *prism2enum, u32 *wlanenum, u16 rid) { - DBFENTER; - /* At the moment, the need for this functionality hasn't presented itself. All the wlan enumerated values are a 1-to-1 match against the Prism2 enumerated values*/ - DBFEXIT; return; } @@ -1044,8 +992,6 @@ void prism2mgmt_get_oprateset(u16 *rate, p80211pstrd_t *pstr) u8 len; u8 *datarate; - DBFENTER; - len = 0; datarate = pstr->data; @@ -1079,7 +1025,6 @@ void prism2mgmt_get_oprateset(u16 *rate, p80211pstrd_t *pstr) pstr->len = len; - DBFEXIT; return; } @@ -1103,8 +1048,6 @@ void prism2mgmt_set_oprateset(u16 *rate, p80211pstrd_t *pstr) u8 *datarate; int i; - DBFENTER; - *rate = 0; datarate = pstr->data; @@ -1130,6 +1073,5 @@ void prism2mgmt_set_oprateset(u16 *rate, p80211pstrd_t *pstr) } } - DBFEXIT; return; } diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index a871cbb158d8..7a0b960f2c58 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -218,8 +218,6 @@ inline void dmpmem(void *buf, int n) ----------------------------------------------------------------*/ static int prism2sta_open(wlandevice_t *wlandev) { - DBFENTER; - /* We don't currently have to do anything else. * The setup of the MAC should be subsequently completed via * the mlme commands. @@ -228,7 +226,6 @@ static int prism2sta_open(wlandevice_t *wlandev) * frames because of dev->flags&IFF_UP is true. */ - DBFEXIT; return 0; } @@ -256,15 +253,12 @@ static int prism2sta_open(wlandevice_t *wlandev) ----------------------------------------------------------------*/ static int prism2sta_close(wlandevice_t *wlandev) { - DBFENTER; - /* We don't currently have to do anything else. * Higher layers know we're not ready from dev->start==0 and * dev->tbusy==1. Our rx path knows to not pass up received * frames because of dev->flags&IFF_UP is false. */ - DBFEXIT; return 0; } @@ -288,8 +282,6 @@ static int prism2sta_close(wlandevice_t *wlandev) ----------------------------------------------------------------*/ static void prism2sta_reset(wlandevice_t *wlandev ) { - DBFENTER; - DBFEXIT; return; } @@ -321,7 +313,6 @@ static int prism2sta_txframe(wlandevice_t *wlandev, struct sk_buff *skb, { hfa384x_t *hw = (hfa384x_t *)wlandev->priv; int result; - DBFENTER; /* If necessary, set the 802.11 WEP bit */ if ((wlandev->hostwep & (HOSTWEP_PRIVACYINVOKED | HOSTWEP_ENCRYPT)) == HOSTWEP_PRIVACYINVOKED) { @@ -330,7 +321,6 @@ static int prism2sta_txframe(wlandevice_t *wlandev, struct sk_buff *skb, result = hfa384x_drvr_txframe(hw, skb, p80211_hdr, p80211_wep); - DBFEXIT; return result; } @@ -364,7 +354,6 @@ static int prism2sta_mlmerequest(wlandevice_t *wlandev, p80211msg_t *msg) hfa384x_t *hw = (hfa384x_t *)wlandev->priv; int result = 0; - DBFENTER; switch( msg->msgcode ) { @@ -459,7 +448,6 @@ static int prism2sta_mlmerequest(wlandevice_t *wlandev, p80211msg_t *msg) break; } - DBFEXIT; return result; } @@ -489,7 +477,6 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate) { hfa384x_t *hw = (hfa384x_t *)wlandev->priv; u32 result; - DBFENTER; result = P80211ENUM_resultcode_implementation_failure; @@ -635,7 +622,6 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate) break; } - DBFEXIT; return result; } @@ -667,8 +653,6 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) u8 snum[HFA384x_RID_NICSERIALNUMBER_LEN]; char pstr[(HFA384x_RID_NICSERIALNUMBER_LEN * 4) + 1]; - DBFENTER; - /* Collect version and compatibility info */ /* Some are critical, some are not */ /* NIC identity */ @@ -953,7 +937,6 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) failed: WLAN_LOG_ERROR("Failed, result=%d\n", result); done: - DBFEXIT; return result; } @@ -992,8 +975,6 @@ static int prism2sta_setmulticast(wlandevice_t *wlandev, netdevice_t *dev) u16 promisc; - DBFENTER; - /* If we're not ready, what's the point? */ if ( hw->state != HFA384x_STATE_RUNNING ) goto exit; @@ -1014,7 +995,6 @@ static int prism2sta_setmulticast(wlandevice_t *wlandev, netdevice_t *dev) // } exit: - DBFEXIT; return result; } @@ -1038,9 +1018,7 @@ static int prism2sta_setmulticast(wlandevice_t *wlandev, netdevice_t *dev) ----------------------------------------------------------------*/ static void prism2sta_inf_handover(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf) { - DBFENTER; WLAN_LOG_DEBUG(2,"received infoframe:HANDOVER (unhandled)\n"); - DBFEXIT; return; } @@ -1071,8 +1049,6 @@ static void prism2sta_inf_tallies(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf int i; int cnt; - DBFENTER; - /* ** Determine if these are 16-bit or 32-bit tallies, based on the ** record length of the info record. @@ -1091,8 +1067,6 @@ static void prism2sta_inf_tallies(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf *dst += hfa384x2host_16(*src16); } - DBFEXIT; - return; } @@ -1123,7 +1097,6 @@ static void prism2sta_inf_scanresults(wlandevice_t *wlandev, int i; hfa384x_JoinRequest_data_t joinreq; int result; - DBFENTER; /* Get the number of results, first in bytes, then in results */ nbss = (inf->framelen * sizeof(u16)) - @@ -1154,7 +1127,6 @@ static void prism2sta_inf_scanresults(wlandevice_t *wlandev, WLAN_LOG_ERROR("setconfig(joinreq) failed, result=%d\n", result); } - DBFEXIT; return; } @@ -1180,7 +1152,6 @@ static void prism2sta_inf_hostscanresults(wlandevice_t *wlandev, { hfa384x_t *hw = (hfa384x_t *)wlandev->priv; int nbss; - DBFENTER; nbss = (inf->framelen - 3) / 32; WLAN_LOG_DEBUG(1, "Received %d hostscan results\n", nbss); @@ -1200,8 +1171,6 @@ static void prism2sta_inf_hostscanresults(wlandevice_t *wlandev, /* Notify/wake the sleeping caller. */ hw->scanflag = nbss; wake_up_interruptible(&hw->cmdq); - - DBFEXIT; }; /*---------------------------------------------------------------- @@ -1227,7 +1196,6 @@ static void prism2sta_inf_chinforesults(wlandevice_t *wlandev, hfa384x_t *hw = (hfa384x_t *)wlandev->priv; unsigned int i, n; - DBFENTER; hw->channel_info.results.scanchannels = hfa384x2host_16(inf->info.chinforesult.scanchannels); #if 0 @@ -1255,7 +1223,6 @@ static void prism2sta_inf_chinforesults(wlandevice_t *wlandev, atomic_set(&hw->channel_info.done, 2); hw->channel_info.count = n; - DBFEXIT; return; } @@ -1266,7 +1233,6 @@ void prism2sta_processing_defer(struct work_struct *data) hfa384x_bytestr32_t ssid; int result; - DBFENTER; /* First let's process the auth frames */ { struct sk_buff *skb; @@ -1511,7 +1477,7 @@ void prism2sta_processing_defer(struct work_struct *data) #endif failed: - DBFEXIT; + return; } /*---------------------------------------------------------------- @@ -1536,13 +1502,10 @@ static void prism2sta_inf_linkstatus(wlandevice_t *wlandev, { hfa384x_t *hw = (hfa384x_t *)wlandev->priv; - DBFENTER; - hw->link_status_new = hfa384x2host_16(inf->info.linkstatus.linkstatus); schedule_work(&hw->link_bh); - DBFEXIT; return; } @@ -1571,8 +1534,6 @@ static void prism2sta_inf_assocstatus(wlandevice_t *wlandev, hfa384x_AssocStatus_t rec; int i; - DBFENTER; - memcpy(&rec, &inf->info.assocstatus, sizeof(rec)); rec.assocstatus = hfa384x2host_16(rec.assocstatus); rec.reason = hfa384x2host_16(rec.reason); @@ -1604,8 +1565,6 @@ static void prism2sta_inf_assocstatus(wlandevice_t *wlandev, WLAN_LOG_WARNING("authfail assocstatus info frame received for authenticated station.\n"); } - DBFEXIT; - return; } @@ -1634,8 +1593,6 @@ static void prism2sta_inf_authreq(wlandevice_t *wlandev, hfa384x_t *hw = (hfa384x_t *)wlandev->priv; struct sk_buff *skb; - DBFENTER; - skb = dev_alloc_skb(sizeof(*inf)); if (skb) { skb_put(skb, sizeof(*inf)); @@ -1643,8 +1600,6 @@ static void prism2sta_inf_authreq(wlandevice_t *wlandev, skb_queue_tail(&hw->authq, skb); schedule_work(&hw->link_bh); } - - DBFEXIT; } static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev, @@ -1656,8 +1611,6 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev, int i, added, result, cnt; u8 *addr; - DBFENTER; - /* ** Build the AuthenticateStation record. Initialize it for denying ** authentication. @@ -1798,9 +1751,6 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev, if (added) hw->authlist.cnt--; WLAN_LOG_ERROR("setconfig(authenticatestation) failed, result=%d\n", result); } - - DBFEXIT; - return; } @@ -1828,12 +1778,8 @@ static void prism2sta_inf_psusercnt(wlandevice_t *wlandev, { hfa384x_t *hw = (hfa384x_t *)wlandev->priv; - DBFENTER; - hw->psusercount = hfa384x2host_16(inf->info.psusercnt.usercnt); - DBFEXIT; - return; } @@ -1858,9 +1804,7 @@ void prism2sta_ev_dtim(wlandevice_t *wlandev) #if 0 hfa384x_t *hw = (hfa384x_t *)wlandev->priv; #endif - DBFENTER; WLAN_LOG_DEBUG(3, "DTIM event, currently unhandled.\n"); - DBFEXIT; return; } @@ -1886,9 +1830,7 @@ void prism2sta_ev_infdrop(wlandevice_t *wlandev) #if 0 hfa384x_t *hw = (hfa384x_t *)wlandev->priv; #endif - DBFENTER; WLAN_LOG_DEBUG(3, "Info frame dropped due to card mem low.\n"); - DBFEXIT; return; } @@ -1912,7 +1854,6 @@ void prism2sta_ev_infdrop(wlandevice_t *wlandev) ----------------------------------------------------------------*/ void prism2sta_ev_info(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf) { - DBFENTER; inf->infotype = hfa384x2host_16(inf->infotype); /* Dispatch */ switch ( inf->infotype ) { @@ -1957,7 +1898,6 @@ void prism2sta_ev_info(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf) "Unknown info type=0x%02x\n", inf->infotype); break; } - DBFEXIT; return; } @@ -1983,11 +1923,8 @@ void prism2sta_ev_info(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf) ----------------------------------------------------------------*/ void prism2sta_ev_txexc(wlandevice_t *wlandev, u16 status) { - DBFENTER; - WLAN_LOG_DEBUG(3, "TxExc status=0x%x.\n", status); - DBFEXIT; return; } @@ -2010,11 +1947,9 @@ void prism2sta_ev_txexc(wlandevice_t *wlandev, u16 status) ----------------------------------------------------------------*/ void prism2sta_ev_tx(wlandevice_t *wlandev, u16 status) { - DBFENTER; WLAN_LOG_DEBUG(4, "Tx Complete, status=0x%04x\n", status); /* update linux network stats */ wlandev->linux_stats.tx_packets++; - DBFEXIT; return; } @@ -2037,11 +1972,7 @@ void prism2sta_ev_tx(wlandevice_t *wlandev, u16 status) ----------------------------------------------------------------*/ void prism2sta_ev_rx(wlandevice_t *wlandev, struct sk_buff *skb) { - DBFENTER; - p80211netdev_rx(wlandev, skb); - - DBFEXIT; return; } @@ -2063,11 +1994,7 @@ void prism2sta_ev_rx(wlandevice_t *wlandev, struct sk_buff *skb) ----------------------------------------------------------------*/ void prism2sta_ev_alloc(wlandevice_t *wlandev) { - DBFENTER; - netif_wake_queue(wlandev->netdev); - - DBFEXIT; return; } @@ -2138,8 +2065,6 @@ void prism2sta_commsqual_defer(struct work_struct *data) hfa384x_bytestr32_t ssid; int result = 0; - DBFENTER; - if (hw->wlandev->hwremoved) goto done; @@ -2198,16 +2123,14 @@ void prism2sta_commsqual_defer(struct work_struct *data) mod_timer(&hw->commsqual_timer, jiffies + HZ); done: - DBFEXIT; + ; } void prism2sta_commsqual_timer(unsigned long data) { hfa384x_t *hw = (hfa384x_t *) data; - DBFENTER; - schedule_work(&hw->commsqual_bh); - - DBFEXIT; } + + diff --git a/drivers/staging/wlan-ng/prism2usb.c b/drivers/staging/wlan-ng/prism2usb.c index 8f7b1f281f0a..d91946794180 100644 --- a/drivers/staging/wlan-ng/prism2usb.c +++ b/drivers/staging/wlan-ng/prism2usb.c @@ -85,8 +85,6 @@ static int prism2sta_probe_usb( hfa384x_t *hw = NULL; int result = 0; - DBFENTER; - dev = interface_to_usbdev(interface); if ((wlandev = create_wlan()) == NULL) { @@ -148,8 +146,6 @@ static int prism2sta_probe_usb( wlandev = NULL; done: - DBFEXIT; - usb_set_intfdata(interface, wlandev); return result; } @@ -179,8 +175,6 @@ prism2sta_disconnect_usb(struct usb_interface *interface) { wlandevice_t *wlandev; - DBFENTER; - wlandev = (wlandevice_t *) usb_get_intfdata(interface); if ( wlandev != NULL ) { @@ -265,9 +259,7 @@ prism2sta_disconnect_usb(struct usb_interface *interface) } exit: - usb_set_intfdata(interface, NULL); - DBFEXIT; } @@ -281,21 +273,13 @@ static struct usb_driver prism2_usb_driver = { static int __init prism2usb_init(void) { - DBFENTER; - /* This call will result in calls to prism2sta_probe_usb. */ return usb_register(&prism2_usb_driver); - - DBFEXIT; }; static void __exit prism2usb_cleanup(void) { - DBFENTER; - usb_deregister(&prism2_usb_driver); - - DBFEXIT; }; module_init(prism2usb_init); diff --git a/drivers/staging/wlan-ng/wlan_compat.h b/drivers/staging/wlan-ng/wlan_compat.h index a331d69f4003..0c852359b0c0 100644 --- a/drivers/staging/wlan-ng/wlan_compat.h +++ b/drivers/staging/wlan-ng/wlan_compat.h @@ -110,14 +110,10 @@ for( __i__=0; __i__ < (n); __i__++) \ printk( " %02x", ((u8*)(p))[__i__]); \ printk("\n"); } - #define DBFENTER { if ( WLAN_DBVAR >= 5 ){ WLAN_LOG_DEBUG(3,"---->\n"); } } - #define DBFEXIT { if ( WLAN_DBVAR >= 5 ){ WLAN_LOG_DEBUG(3,"<----\n"); } } #define WLAN_LOG_DEBUG(l,x,args...) if ( WLAN_DBVAR >= (l)) printk(KERN_DEBUG "%s(%lu): " x , __func__, (preempt_count() & PREEMPT_MASK), ##args ); #else #define WLAN_HEX_DUMP( l, s, p, n) - #define DBFENTER - #define DBFEXIT #define WLAN_LOG_DEBUG(l, s, args...) #endif -- cgit v1.2.3-59-g8ed1b From ae26230bf93d37de73febdd1990090dcbd489b38 Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Wed, 21 Jan 2009 22:00:45 +0100 Subject: Staging: wlan-ng: Use generic byteorder macros This patch removes the ieee2host16(), ieee2host32(), host2ieee16() and host2ieee32() macros and replaces them with the generic ones. Signed-off-by: Moritz Muehlenhoff Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/hfa384x_usb.c | 5 +++-- drivers/staging/wlan-ng/p80211conv.c | 13 +++++++------ drivers/staging/wlan-ng/p80211netdev.c | 3 ++- drivers/staging/wlan-ng/prism2sta.c | 3 ++- drivers/staging/wlan-ng/wlan_compat.h | 9 --------- 5 files changed, 14 insertions(+), 19 deletions(-) (limited to 'drivers/staging/wlan-ng/wlan_compat.h') diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index a2dddae66c92..cea033411e47 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -130,6 +130,7 @@ #include #include #include +#include #include "wlan_compat.h" @@ -3817,7 +3818,7 @@ static void hfa384x_usbin_rx(wlandevice_t *wlandev, struct sk_buff *skb) switch( HFA384x_RXSTATUS_MACPORT_GET(usbin->rxfrm.desc.status) ) { case 0: - fc = ieee2host16(usbin->rxfrm.desc.frame_control); + fc = le16_to_cpu(usbin->rxfrm.desc.frame_control); /* If exclude and we receive an unencrypted, drop it */ if ( (wlandev->hostwep & HOSTWEP_EXCLUDEUNENCRYPTED) && @@ -3918,7 +3919,7 @@ static void hfa384x_int_rxmonitor( wlandevice_t *wlandev, hfa384x_usb_rxfrm_t *r /* Don't forget the status, time, and data_len fields are in host order */ /* Figure out how big the frame is */ - fc = ieee2host16(rxdesc->frame_control); + fc = le16_to_cpu(rxdesc->frame_control); hdrlen = p80211_headerlen(fc); datalen = hfa384x2host_16(rxdesc->data_len); diff --git a/drivers/staging/wlan-ng/p80211conv.c b/drivers/staging/wlan-ng/p80211conv.c index 53b17c3b1ed0..c3719249f013 100644 --- a/drivers/staging/wlan-ng/p80211conv.c +++ b/drivers/staging/wlan-ng/p80211conv.c @@ -63,6 +63,7 @@ #include #include #include +#include #include @@ -192,7 +193,7 @@ int skb_ether_to_p80211( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb /* Set up the 802.11 header */ /* It's a data frame */ - fc = host2ieee16( WLAN_SET_FC_FTYPE(WLAN_FTYPE_DATA) | + fc = cpu_to_le16( WLAN_SET_FC_FTYPE(WLAN_FTYPE_DATA) | WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_DATAONLY)); switch ( wlandev->macmode ) { @@ -202,13 +203,13 @@ int skb_ether_to_p80211( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb memcpy(p80211_hdr->a3.a3, wlandev->bssid, ETH_ALEN); break; case WLAN_MACMODE_ESS_STA: - fc |= host2ieee16(WLAN_SET_FC_TODS(1)); + fc |= cpu_to_le16(WLAN_SET_FC_TODS(1)); memcpy(p80211_hdr->a3.a1, wlandev->bssid, ETH_ALEN); memcpy(p80211_hdr->a3.a2, wlandev->netdev->dev_addr, ETH_ALEN); memcpy(p80211_hdr->a3.a3, &e_hdr.daddr, ETH_ALEN); break; case WLAN_MACMODE_ESS_AP: - fc |= host2ieee16(WLAN_SET_FC_FROMDS(1)); + fc |= cpu_to_le16(WLAN_SET_FC_FROMDS(1)); memcpy(p80211_hdr->a3.a1, &e_hdr.daddr, ETH_ALEN); memcpy(p80211_hdr->a3.a2, wlandev->bssid, ETH_ALEN); memcpy(p80211_hdr->a3.a3, &e_hdr.saddr, ETH_ALEN); @@ -237,7 +238,7 @@ int skb_ether_to_p80211( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb WLAN_LOG_WARNING("Host en-WEP failed, dropping frame (%d).\n", foo); return 2; } - fc |= host2ieee16(WLAN_SET_FC_ISWEP(1)); + fc |= cpu_to_le16(WLAN_SET_FC_ISWEP(1)); } @@ -312,7 +313,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb w_hdr = (p80211_hdr_t *) skb->data; /* setup some vars for convenience */ - fc = ieee2host16(w_hdr->a3.fc); + fc = le16_to_cpu(w_hdr->a3.fc); if ( (WLAN_GET_FC_TODS(fc) == 0) && (WLAN_GET_FC_FROMDS(fc) == 0) ) { memcpy(daddr, w_hdr->a3.a1, WLAN_ETHADDR_LEN); memcpy(saddr, w_hdr->a3.a2, WLAN_ETHADDR_LEN); @@ -392,7 +393,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb (e_llc->ctl == 0x03) && (((memcmp( e_snap->oui, oui_rfc1042, WLAN_IEEE_OUI_LEN)==0) && (ethconv == WLAN_ETHCONV_8021h) && - (p80211_stt_findproto(ieee2host16(e_snap->type)))) || + (p80211_stt_findproto(le16_to_cpu(e_snap->type)))) || (memcmp( e_snap->oui, oui_rfc1042, WLAN_IEEE_OUI_LEN)!=0))) { WLAN_LOG_DEBUG(3, "SNAP+RFC1042 len: %d\n", payload_length); diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c index 1ebba6a06aaf..7be8efaf7c6f 100644 --- a/drivers/staging/wlan-ng/p80211netdev.c +++ b/drivers/staging/wlan-ng/p80211netdev.c @@ -71,6 +71,7 @@ #include #include #include +#include #include #include @@ -324,7 +325,7 @@ static void p80211netdev_rx_bh(unsigned long arg) continue; } else { hdr = (p80211_hdr_a3_t *)skb->data; - fc = ieee2host16(hdr->fc); + fc = le16_to_cpu(hdr->fc); if (p80211_rx_typedrop(wlandev, fc)) { dev_kfree_skb(skb); continue; diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index 7a0b960f2c58..45d4455f11d7 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -65,6 +65,7 @@ #include #include #include +#include #include #include @@ -316,7 +317,7 @@ static int prism2sta_txframe(wlandevice_t *wlandev, struct sk_buff *skb, /* If necessary, set the 802.11 WEP bit */ if ((wlandev->hostwep & (HOSTWEP_PRIVACYINVOKED | HOSTWEP_ENCRYPT)) == HOSTWEP_PRIVACYINVOKED) { - p80211_hdr->a3.fc |= host2ieee16(WLAN_SET_FC_ISWEP(1)); + p80211_hdr->a3.fc |= cpu_to_le16(WLAN_SET_FC_ISWEP(1)); } result = hfa384x_drvr_txframe(hw, skb, p80211_hdr, p80211_wep); diff --git a/drivers/staging/wlan-ng/wlan_compat.h b/drivers/staging/wlan-ng/wlan_compat.h index 0c852359b0c0..cd7bcae689de 100644 --- a/drivers/staging/wlan-ng/wlan_compat.h +++ b/drivers/staging/wlan-ng/wlan_compat.h @@ -124,15 +124,6 @@ typedef struct net_device netdevice_t; #define URB_ASYNC_UNLINK 0 #define USB_QUEUE_BULK 0 -/*=============================================================*/ -/*------ Hardware Portability Macros --------------------------*/ -/*=============================================================*/ - -#define ieee2host16(n) __le16_to_cpu(n) -#define ieee2host32(n) __le32_to_cpu(n) -#define host2ieee16(n) __cpu_to_le16(n) -#define host2ieee32(n) __cpu_to_le32(n) - /*=============================================================*/ /*--- General Macros ------------------------------------------*/ /*=============================================================*/ -- cgit v1.2.3-59-g8ed1b From 7f6e0e449c00bafe1c46471409fa1b8e4222dcf2 Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Sun, 25 Jan 2009 21:54:55 +0100 Subject: Staging: wlan-ng: Replace BITx with the generic BIT(x) Signed-off-by: Moritz Muehlenhoff Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/hfa384x.h | 176 ++++++++++++++++----------------- drivers/staging/wlan-ng/p80211hdr.h | 28 +++--- drivers/staging/wlan-ng/p80211ioctl.h | 6 +- drivers/staging/wlan-ng/p80211mgmt.h | 16 +-- drivers/staging/wlan-ng/p80211netdev.h | 10 +- drivers/staging/wlan-ng/p80211wext.c | 3 +- drivers/staging/wlan-ng/prism2mgmt.c | 11 ++- drivers/staging/wlan-ng/prism2mib.c | 17 ++-- drivers/staging/wlan-ng/prism2sta.c | 5 +- drivers/staging/wlan-ng/wlan_compat.h | 38 ------- 10 files changed, 138 insertions(+), 172 deletions(-) (limited to 'drivers/staging/wlan-ng/wlan_compat.h') diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h index b88bfe437822..d3f3cce76eee 100644 --- a/drivers/staging/wlan-ng/hfa384x.h +++ b/drivers/staging/wlan-ng/hfa384x.h @@ -97,17 +97,17 @@ #define HFA384x_PORTTYPE_WDS ((u16)2) #define HFA384x_PORTTYPE_PSUEDOIBSS ((u16)3) #define HFA384x_PORTTYPE_HOSTAP ((u16)6) -#define HFA384x_WEPFLAGS_PRIVINVOKED ((u16)BIT0) -#define HFA384x_WEPFLAGS_EXCLUDE ((u16)BIT1) -#define HFA384x_WEPFLAGS_DISABLE_TXCRYPT ((u16)BIT4) -#define HFA384x_WEPFLAGS_DISABLE_RXCRYPT ((u16)BIT7) -#define HFA384x_WEPFLAGS_DISALLOW_MIXED ((u16)BIT11) +#define HFA384x_WEPFLAGS_PRIVINVOKED ((u16)BIT(0)) +#define HFA384x_WEPFLAGS_EXCLUDE ((u16)BIT(1)) +#define HFA384x_WEPFLAGS_DISABLE_TXCRYPT ((u16)BIT(4)) +#define HFA384x_WEPFLAGS_DISABLE_RXCRYPT ((u16)BIT(7)) +#define HFA384x_WEPFLAGS_DISALLOW_MIXED ((u16)BIT(11)) #define HFA384x_WEPFLAGS_IV_intERVAL1 ((u16)0) -#define HFA384x_WEPFLAGS_IV_intERVAL10 ((u16)BIT5) -#define HFA384x_WEPFLAGS_IV_intERVAL50 ((u16)BIT6) -#define HFA384x_WEPFLAGS_IV_intERVAL100 ((u16)(BIT5 | BIT6)) -#define HFA384x_WEPFLAGS_FIRMWARE_WPA ((u16)BIT8) -#define HFA384x_WEPFLAGS_HOST_MIC ((u16)BIT9) +#define HFA384x_WEPFLAGS_IV_intERVAL10 ((u16)BIT(5)) +#define HFA384x_WEPFLAGS_IV_intERVAL50 ((u16)BIT(6)) +#define HFA384x_WEPFLAGS_IV_intERVAL100 ((u16)(BIT(5) | BIT(6))) +#define HFA384x_WEPFLAGS_FIRMWARE_WPA ((u16)BIT(8)) +#define HFA384x_WEPFLAGS_HOST_MIC ((u16)BIT(9)) #define HFA384x_ROAMMODE_FWSCAN_FWROAM ((u16)1) #define HFA384x_ROAMMODE_FWSCAN_HOSTROAM ((u16)2) #define HFA384x_ROAMMODE_HOSTSCAN_HOSTROAM ((u16)3) @@ -248,59 +248,59 @@ #define HFA384x_PCI_M1_CTL_OFF (0xac) /*--- Register Field Masks --------------------------*/ -#define HFA384x_CMD_BUSY ((u16)BIT15) -#define HFA384x_CMD_AINFO ((u16)(BIT14 | BIT13 | BIT12 | BIT11 | BIT10 | BIT9 | BIT8)) -#define HFA384x_CMD_MACPORT ((u16)(BIT10 | BIT9 | BIT8)) -#define HFA384x_CMD_RECL ((u16)BIT8) -#define HFA384x_CMD_WRITE ((u16)BIT8) -#define HFA384x_CMD_PROGMODE ((u16)(BIT9 | BIT8)) -#define HFA384x_CMD_CMDCODE ((u16)(BIT5 | BIT4 | BIT3 | BIT2 | BIT1 | BIT0)) - -#define HFA384x_STATUS_RESULT ((u16)(BIT14 | BIT13 | BIT12 | BIT11 | BIT10 | BIT9 | BIT8)) -#define HFA384x_STATUS_CMDCODE ((u16)(BIT5 | BIT4 | BIT3 | BIT2 | BIT1 | BIT0)) - -#define HFA384x_OFFSET_BUSY ((u16)BIT15) -#define HFA384x_OFFSET_ERR ((u16)BIT14) -#define HFA384x_OFFSET_DATAOFF ((u16)(BIT11 | BIT10 | BIT9 | BIT8 | BIT7 | BIT6 | BIT5 | BIT4 | BIT3 | BIT2 | BIT1)) - -#define HFA384x_EVSTAT_TICK ((u16)BIT15) -#define HFA384x_EVSTAT_WTERR ((u16)BIT14) -#define HFA384x_EVSTAT_INFDROP ((u16)BIT13) -#define HFA384x_EVSTAT_INFO ((u16)BIT7) -#define HFA384x_EVSTAT_DTIM ((u16)BIT5) -#define HFA384x_EVSTAT_CMD ((u16)BIT4) -#define HFA384x_EVSTAT_ALLOC ((u16)BIT3) -#define HFA384x_EVSTAT_TXEXC ((u16)BIT2) -#define HFA384x_EVSTAT_TX ((u16)BIT1) -#define HFA384x_EVSTAT_RX ((u16)BIT0) +#define HFA384x_CMD_BUSY ((u16)BIT(15)) +#define HFA384x_CMD_AINFO ((u16)(BIT(14) | BIT(13) | BIT(12) | BIT(11) | BIT(10) | BIT(9) | BIT(8))) +#define HFA384x_CMD_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8))) +#define HFA384x_CMD_RECL ((u16)BIT(8)) +#define HFA384x_CMD_WRITE ((u16)BIT(8)) +#define HFA384x_CMD_PROGMODE ((u16)(BIT(9) | BIT(8))) +#define HFA384x_CMD_CMDCODE ((u16)(BIT(5) | BIT(4) | BIT(3) | BIT(2) | BIT(1) | BIT(0))) + +#define HFA384x_STATUS_RESULT ((u16)(BIT(14) | BIT(13) | BIT(12) | BIT(11) | BIT(10) | BIT(9) | BIT(8))) +#define HFA384x_STATUS_CMDCODE ((u16)(BIT(5) | BIT(4) | BIT(3) | BIT(2) | BIT(1) | BIT(0))) + +#define HFA384x_OFFSET_BUSY ((u16)BIT(15)) +#define HFA384x_OFFSET_ERR ((u16)BIT(14)) +#define HFA384x_OFFSET_DATAOFF ((u16)(BIT(11) | BIT(10) | BIT(9) | BIT(8) | BIT(7) | BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2) | BIT(1))) + +#define HFA384x_EVSTAT_TICK ((u16)BIT(15)) +#define HFA384x_EVSTAT_WTERR ((u16)BIT(14)) +#define HFA384x_EVSTAT_INFDROP ((u16)BIT(13)) +#define HFA384x_EVSTAT_INFO ((u16)BIT(7)) +#define HFA384x_EVSTAT_DTIM ((u16)BIT(5)) +#define HFA384x_EVSTAT_CMD ((u16)BIT(4)) +#define HFA384x_EVSTAT_ALLOC ((u16)BIT(3)) +#define HFA384x_EVSTAT_TXEXC ((u16)BIT(2)) +#define HFA384x_EVSTAT_TX ((u16)BIT(1)) +#define HFA384x_EVSTAT_RX ((u16)BIT(0) #define HFA384x_int_BAP_OP (HFA384x_EVSTAT_INFO|HFA384x_EVSTAT_RX|HFA384x_EVSTAT_TX|HFA384x_EVSTAT_TXEXC) #define HFA384x_int_NORMAL (HFA384x_EVSTAT_INFO|HFA384x_EVSTAT_RX|HFA384x_EVSTAT_TX|HFA384x_EVSTAT_TXEXC|HFA384x_EVSTAT_INFDROP|HFA384x_EVSTAT_ALLOC|HFA384x_EVSTAT_DTIM) -#define HFA384x_intEN_TICK ((u16)BIT15) -#define HFA384x_intEN_WTERR ((u16)BIT14) -#define HFA384x_intEN_INFDROP ((u16)BIT13) -#define HFA384x_intEN_INFO ((u16)BIT7) -#define HFA384x_intEN_DTIM ((u16)BIT5) -#define HFA384x_intEN_CMD ((u16)BIT4) -#define HFA384x_intEN_ALLOC ((u16)BIT3) -#define HFA384x_intEN_TXEXC ((u16)BIT2) -#define HFA384x_intEN_TX ((u16)BIT1) -#define HFA384x_intEN_RX ((u16)BIT0) - -#define HFA384x_EVACK_TICK ((u16)BIT15) -#define HFA384x_EVACK_WTERR ((u16)BIT14) -#define HFA384x_EVACK_INFDROP ((u16)BIT13) -#define HFA384x_EVACK_INFO ((u16)BIT7) -#define HFA384x_EVACK_DTIM ((u16)BIT5) -#define HFA384x_EVACK_CMD ((u16)BIT4) -#define HFA384x_EVACK_ALLOC ((u16)BIT3) -#define HFA384x_EVACK_TXEXC ((u16)BIT2) -#define HFA384x_EVACK_TX ((u16)BIT1) -#define HFA384x_EVACK_RX ((u16)BIT0) - -#define HFA384x_CONTROL_AUXEN ((u16)(BIT15 | BIT14)) +#define HFA384x_intEN_TICK ((u16)BIT(15)) +#define HFA384x_intEN_WTERR ((u16)BIT(14)) +#define HFA384x_intEN_INFDROP ((u16)BIT(13)) +#define HFA384x_intEN_INFO ((u16)BIT(7)) +#define HFA384x_intEN_DTIM ((u16)BIT(5)) +#define HFA384x_intEN_CMD ((u16)BIT(4)) +#define HFA384x_intEN_ALLOC ((u16)BIT(3)) +#define HFA384x_intEN_TXEXC ((u16)BIT(2)) +#define HFA384x_intEN_TX ((u16)BIT(1)) +#define HFA384x_intEN_RX ((u16)BIT(0) + +#define HFA384x_EVACK_TICK ((u16)BIT(15)) +#define HFA384x_EVACK_WTERR ((u16)BIT(14)) +#define HFA384x_EVACK_INFDROP ((u16)BIT(13)) +#define HFA384x_EVACK_INFO ((u16)BIT(7)) +#define HFA384x_EVACK_DTIM ((u16)BIT(5)) +#define HFA384x_EVACK_CMD ((u16)BIT(4)) +#define HFA384x_EVACK_ALLOC ((u16)BIT(3)) +#define HFA384x_EVACK_TXEXC ((u16)BIT(2)) +#define HFA384x_EVACK_TX ((u16)BIT(1)) +#define HFA384x_EVACK_RX ((u16)BIT(0) + +#define HFA384x_CONTROL_AUXEN ((u16)(BIT(15) | BIT(14))) /*--- Command Code Constants --------------------------*/ @@ -883,11 +883,11 @@ PD Record codes /*=============================================================*/ /*------ Types and their related constants --------------------*/ -#define HFA384x_HOSTAUTHASSOC_HOSTAUTH BIT0 -#define HFA384x_HOSTAUTHASSOC_HOSTASSOC BIT1 +#define HFA384x_HOSTAUTHASSOC_HOSTAUTH BIT(0) +#define HFA384x_HOSTAUTHASSOC_HOSTASSOC BIT(1) #define HFA384x_WHAHANDLING_DISABLED 0 -#define HFA384x_WHAHANDLING_PASSTHROUGH BIT1 +#define HFA384x_WHAHANDLING_PASSTHROUGH BIT(1) /*-------------------------------------------------------------*/ /* Commonly used basic types */ @@ -1518,11 +1518,11 @@ typedef struct hfa384x_LFOStatus u16 VRHFOResult; } __attribute__((packed)) hfa384x_LFOStatus_t; -#define HFA384x_TESTRESULT_ALLPASSED BIT0 -#define HFA384x_TESTRESULT_LFO_FAIL BIT1 -#define HFA384x_TESTRESULT_VR_HF0_FAIL BIT2 -#define HFA384x_HOST_FIRM_COORDINATE BIT7 -#define HFA384x_TESTRESULT_COORDINATE BIT15 +#define HFA384x_TESTRESULT_ALLPASSED BIT(0) +#define HFA384x_TESTRESULT_LFO_FAIL BIT(1) +#define HFA384x_TESTRESULT_VR_HF0_FAIL BIT(2) +#define HFA384x_HOST_FIRM_COORDINATE BIT(7) +#define HFA384x_TESTRESULT_COORDINATE BIT(15) /*-- Information Record: LEDControl --*/ typedef struct hfa384x_LEDControl @@ -1606,20 +1606,20 @@ typedef struct hfa384x_tx_frame Communication Frames: Field Masks for Transmit Frames --------------------------------------------------------------------*/ /*-- Status Field --*/ -#define HFA384x_TXSTATUS_ACKERR ((u16)BIT5) -#define HFA384x_TXSTATUS_FORMERR ((u16)BIT3) -#define HFA384x_TXSTATUS_DISCON ((u16)BIT2) -#define HFA384x_TXSTATUS_AGEDERR ((u16)BIT1) -#define HFA384x_TXSTATUS_RETRYERR ((u16)BIT0) +#define HFA384x_TXSTATUS_ACKERR ((u16)BIT(5)) +#define HFA384x_TXSTATUS_FORMERR ((u16)BIT(3)) +#define HFA384x_TXSTATUS_DISCON ((u16)BIT(2)) +#define HFA384x_TXSTATUS_AGEDERR ((u16)BIT(1)) +#define HFA384x_TXSTATUS_RETRYERR ((u16)BIT(0)) /*-- Transmit Control Field --*/ -#define HFA384x_TX_CFPOLL ((u16)BIT12) -#define HFA384x_TX_PRST ((u16)BIT11) -#define HFA384x_TX_MACPORT ((u16)(BIT10 | BIT9 | BIT8)) -#define HFA384x_TX_NOENCRYPT ((u16)BIT7) -#define HFA384x_TX_RETRYSTRAT ((u16)(BIT6 | BIT5)) -#define HFA384x_TX_STRUCTYPE ((u16)(BIT4 | BIT3)) -#define HFA384x_TX_TXEX ((u16)BIT2) -#define HFA384x_TX_TXOK ((u16)BIT1) +#define HFA384x_TX_CFPOLL ((u16)BIT(12)) +#define HFA384x_TX_PRST ((u16)BIT(11)) +#define HFA384x_TX_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8))) +#define HFA384x_TX_NOENCRYPT ((u16)BIT(7)) +#define HFA384x_TX_RETRYSTRAT ((u16)(BIT(6) | BIT(5))) +#define HFA384x_TX_STRUCTYPE ((u16)(BIT(4) | BIT(3))) +#define HFA384x_TX_TXEX ((u16)BIT(2)) +#define HFA384x_TX_TXOK ((u16)BIT(1)) /*-------------------------------------------------------------------- Communication Frames: Test/Get/Set Field Values for Transmit Frames --------------------------------------------------------------------*/ @@ -1695,10 +1695,10 @@ Communication Frames: Field Masks for Receive Frames #define HFA384x_RX_DATA_OFF ((u16)60) /*-- Status Fields --*/ -#define HFA384x_RXSTATUS_MSGTYPE ((u16)(BIT15 | BIT14 | BIT13)) -#define HFA384x_RXSTATUS_MACPORT ((u16)(BIT10 | BIT9 | BIT8)) -#define HFA384x_RXSTATUS_UNDECR ((u16)BIT1) -#define HFA384x_RXSTATUS_FCSERR ((u16)BIT0) +#define HFA384x_RXSTATUS_MSGTYPE ((u16)(BIT(15) | BIT(14) | BIT(13))) +#define HFA384x_RXSTATUS_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8))) +#define HFA384x_RXSTATUS_UNDECR ((u16)BIT(1)) +#define HFA384x_RXSTATUS_FCSERR ((u16)BIT(0)) /*-------------------------------------------------------------------- Communication Frames: Test/Get/Set Field Values for Receive Frames --------------------------------------------------------------------*/ @@ -1822,8 +1822,8 @@ typedef struct hfa384x_ChInfoResultSub u16 active; } __attribute__((packed)) hfa384x_ChInfoResultSub_t; -#define HFA384x_CHINFORESULT_BSSACTIVE BIT0 -#define HFA384x_CHINFORESULT_PCFACTIVE BIT1 +#define HFA384x_CHINFORESULT_BSSACTIVE BIT(0) +#define HFA384x_CHINFORESULT_PCFACTIVE BIT(1) typedef struct hfa384x_ChInfoResult { @@ -2444,9 +2444,9 @@ typedef struct hfa484x_metacmd #define MAX_GRP_ADDR 32 #define WLAN_COMMENT_MAX 80 /* Max. length of user comment string. */ -#define MM_SAT_PCF (BIT14) -#define MM_GCSD_PCF (BIT15) -#define MM_GCSD_PCF_EB (BIT14 | BIT15) +#define MM_SAT_PCF (BIT(14)) +#define MM_GCSD_PCF (BIT(15)) +#define MM_GCSD_PCF_EB (BIT(14) | BIT(15)) #define WLAN_STATE_STOPPED 0 /* Network is not active. */ #define WLAN_STATE_STARTED 1 /* Network has been started. */ diff --git a/drivers/staging/wlan-ng/p80211hdr.h b/drivers/staging/wlan-ng/p80211hdr.h index 8ddc825e0ae1..edcfbc6b493a 100644 --- a/drivers/staging/wlan-ng/p80211hdr.h +++ b/drivers/staging/wlan-ng/p80211hdr.h @@ -167,17 +167,17 @@ /* SET_FC_FSTYPE(WLAN_FSTYPE_RTS) ); */ /*------------------------------------------------------------*/ -#define WLAN_GET_FC_PVER(n) (((u16)(n)) & (BIT0 | BIT1)) -#define WLAN_GET_FC_FTYPE(n) ((((u16)(n)) & (BIT2 | BIT3)) >> 2) -#define WLAN_GET_FC_FSTYPE(n) ((((u16)(n)) & (BIT4|BIT5|BIT6|BIT7)) >> 4) -#define WLAN_GET_FC_TODS(n) ((((u16)(n)) & (BIT8)) >> 8) -#define WLAN_GET_FC_FROMDS(n) ((((u16)(n)) & (BIT9)) >> 9) -#define WLAN_GET_FC_MOREFRAG(n) ((((u16)(n)) & (BIT10)) >> 10) -#define WLAN_GET_FC_RETRY(n) ((((u16)(n)) & (BIT11)) >> 11) -#define WLAN_GET_FC_PWRMGT(n) ((((u16)(n)) & (BIT12)) >> 12) -#define WLAN_GET_FC_MOREDATA(n) ((((u16)(n)) & (BIT13)) >> 13) -#define WLAN_GET_FC_ISWEP(n) ((((u16)(n)) & (BIT14)) >> 14) -#define WLAN_GET_FC_ORDER(n) ((((u16)(n)) & (BIT15)) >> 15) +#define WLAN_GET_FC_PVER(n) (((u16)(n)) & (BIT(0) | BIT(1))) +#define WLAN_GET_FC_FTYPE(n) ((((u16)(n)) & (BIT(2) | BIT(3))) >> 2) +#define WLAN_GET_FC_FSTYPE(n) ((((u16)(n)) & (BIT(4)|BIT(5)|BIT(6)|BIT(7))) >> 4) +#define WLAN_GET_FC_TODS(n) ((((u16)(n)) & (BIT(8))) >> 8) +#define WLAN_GET_FC_FROMDS(n) ((((u16)(n)) & (BIT(9))) >> 9) +#define WLAN_GET_FC_MOREFRAG(n) ((((u16)(n)) & (BIT(10))) >> 10) +#define WLAN_GET_FC_RETRY(n) ((((u16)(n)) & (BIT(11))) >> 11) +#define WLAN_GET_FC_PWRMGT(n) ((((u16)(n)) & (BIT(12))) >> 12) +#define WLAN_GET_FC_MOREDATA(n) ((((u16)(n)) & (BIT(13))) >> 13) +#define WLAN_GET_FC_ISWEP(n) ((((u16)(n)) & (BIT(14))) >> 14) +#define WLAN_GET_FC_ORDER(n) ((((u16)(n)) & (BIT(15))) >> 15) #define WLAN_SET_FC_PVER(n) ((u16)(n)) #define WLAN_SET_FC_FTYPE(n) (((u16)(n)) << 2) @@ -202,8 +202,8 @@ /* Macros to get/set the bitfields of the Sequence Control */ /* Field. */ /*------------------------------------------------------------*/ -#define WLAN_GET_SEQ_FRGNUM(n) (((u16)(n)) & (BIT0|BIT1|BIT2|BIT3)) -#define WLAN_GET_SEQ_SEQNUM(n) ((((u16)(n)) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4) +#define WLAN_GET_SEQ_FRGNUM(n) (((u16)(n)) & (BIT(0)|BIT(1)|BIT(2)|BIT(3))) +#define WLAN_GET_SEQ_SEQNUM(n) ((((u16)(n)) & (~(BIT(0)|BIT(1)|BIT(2)|BIT(3)))) >> 4) /*--- Data ptr macro -----------------------------------------*/ /* Creates a u8* to the data portion of a frame */ @@ -212,7 +212,7 @@ #define WLAN_HDR_A3_DATAP(p) (((u8*)(p)) + WLAN_HDR_A3_LEN) #define WLAN_HDR_A4_DATAP(p) (((u8*)(p)) + WLAN_HDR_A4_LEN) -#define DOT11_RATE5_ISBASIC_GET(r) (((u8)(r)) & BIT7) +#define DOT11_RATE5_ISBASIC_GET(r) (((u8)(r)) & BIT(7)) /*================================================================*/ /* Types */ diff --git a/drivers/staging/wlan-ng/p80211ioctl.h b/drivers/staging/wlan-ng/p80211ioctl.h index d964d411cc7d..7b0f3e09c0ba 100644 --- a/drivers/staging/wlan-ng/p80211ioctl.h +++ b/drivers/staging/wlan-ng/p80211ioctl.h @@ -86,9 +86,9 @@ /*----------------------------------------------------------------*/ /* Netlink multicast bits for different types of messages */ -#define P80211_NL_MCAST_GRP_MLME BIT0 /* Local station messages */ -#define P80211_NL_MCAST_GRP_SNIFF BIT1 /* Sniffer messages */ -#define P80211_NL_MCAST_GRP_DIST BIT2 /* Distribution system messages */ +#define P80211_NL_MCAST_GRP_MLME BIT(0) /* Local station messages */ +#define P80211_NL_MCAST_GRP_SNIFF BIT(1) /* Sniffer messages */ +#define P80211_NL_MCAST_GRP_DIST BIT(2) /* Distribution system messages */ /*================================================================*/ /* Types */ diff --git a/drivers/staging/wlan-ng/p80211mgmt.h b/drivers/staging/wlan-ng/p80211mgmt.h index 15da83e54ff4..0450fd301c58 100644 --- a/drivers/staging/wlan-ng/p80211mgmt.h +++ b/drivers/staging/wlan-ng/p80211mgmt.h @@ -213,15 +213,15 @@ /* Macros */ /*-- Capability Field ---------------------------*/ -#define WLAN_GET_MGMT_CAP_INFO_ESS(n) ((n) & BIT0) -#define WLAN_GET_MGMT_CAP_INFO_IBSS(n) (((n) & BIT1) >> 1) -#define WLAN_GET_MGMT_CAP_INFO_CFPOLLABLE(n) (((n) & BIT2) >> 2) -#define WLAN_GET_MGMT_CAP_INFO_CFPOLLREQ(n) (((n) & BIT3) >> 3) -#define WLAN_GET_MGMT_CAP_INFO_PRIVACY(n) (((n) & BIT4) >> 4) +#define WLAN_GET_MGMT_CAP_INFO_ESS(n) ((n) & BIT(0)) +#define WLAN_GET_MGMT_CAP_INFO_IBSS(n) (((n) & BIT(1)) >> 1) +#define WLAN_GET_MGMT_CAP_INFO_CFPOLLABLE(n) (((n) & BIT(2)) >> 2) +#define WLAN_GET_MGMT_CAP_INFO_CFPOLLREQ(n) (((n) & BIT(3)) >> 3) +#define WLAN_GET_MGMT_CAP_INFO_PRIVACY(n) (((n) & BIT(4)) >> 4) /* p80211b additions */ -#define WLAN_GET_MGMT_CAP_INFO_SHORT(n) (((n) & BIT5) >> 5) -#define WLAN_GET_MGMT_CAP_INFO_PBCC(n) (((n) & BIT6) >> 6) -#define WLAN_GET_MGMT_CAP_INFO_AGILITY(n) (((n) & BIT7) >> 7) +#define WLAN_GET_MGMT_CAP_INFO_SHORT(n) (((n) & BIT(5)) >> 5) +#define WLAN_GET_MGMT_CAP_INFO_PBCC(n) (((n) & BIT(6)) >> 6) +#define WLAN_GET_MGMT_CAP_INFO_AGILITY(n) (((n) & BIT(7)) >> 7) #define WLAN_SET_MGMT_CAP_INFO_ESS(n) (n) #define WLAN_SET_MGMT_CAP_INFO_IBSS(n) ((n) << 1) diff --git a/drivers/staging/wlan-ng/p80211netdev.h b/drivers/staging/wlan-ng/p80211netdev.h index 456f1d351aa1..40785ae8d575 100644 --- a/drivers/staging/wlan-ng/p80211netdev.h +++ b/drivers/staging/wlan-ng/p80211netdev.h @@ -158,11 +158,11 @@ int p80211wext_event_associated(struct wlandevice *wlandev, int assoc); #define NUM_WEPKEYS 4 #define MAX_KEYLEN 32 -#define HOSTWEP_DEFAULTKEY_MASK (BIT1|BIT0) -#define HOSTWEP_DECRYPT BIT4 -#define HOSTWEP_ENCRYPT BIT5 -#define HOSTWEP_PRIVACYINVOKED BIT6 -#define HOSTWEP_EXCLUDEUNENCRYPTED BIT7 +#define HOSTWEP_DEFAULTKEY_MASK (BIT(1)|BIT(0)) +#define HOSTWEP_DECRYPT BIT(4) +#define HOSTWEP_ENCRYPT BIT(5) +#define HOSTWEP_PRIVACYINVOKED BIT(6) +#define HOSTWEP_EXCLUDEUNENCRYPTED BIT(7) extern int wlan_watchdog; extern int wlan_wext_write; diff --git a/drivers/staging/wlan-ng/p80211wext.c b/drivers/staging/wlan-ng/p80211wext.c index 9c4c934731f3..062826b58b77 100644 --- a/drivers/staging/wlan-ng/p80211wext.c +++ b/drivers/staging/wlan-ng/p80211wext.c @@ -52,6 +52,7 @@ #include #include #include +#include /*================================================================*/ /* Project Includes */ @@ -126,7 +127,7 @@ static const long p80211wext_channel_freq[] = { #define NUM_CHANNELS ARRAY_SIZE(p80211wext_channel_freq) /* steal a spare bit to store the shared/opensystems state. should default to open if not set */ -#define HOSTWEP_SHAREDKEY BIT3 +#define HOSTWEP_SHAREDKEY BIT(3) /** function declarations =============== */ diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c index b1055af8c249..6f0d39f2ea68 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.c +++ b/drivers/staging/wlan-ng/prism2mgmt.c @@ -76,6 +76,7 @@ #include #include #include +#include #include "wlan_compat.h" @@ -94,10 +95,10 @@ #include "prism2mgmt.h" /* Converts 802.11 format rate specifications to prism2 */ -#define p80211rate_to_p2bit(n) ((((n)&~BIT7) == 2) ? BIT0 : \ - (((n)&~BIT7) == 4) ? BIT1 : \ - (((n)&~BIT7) == 11) ? BIT2 : \ - (((n)&~BIT7) == 22) ? BIT3 : 0) +#define p80211rate_to_p2bit(n) ((((n)&~BIT(7)) == 2) ? BIT(0) : \ + (((n)&~BIT(7)) == 4) ? BIT(1) : \ + (((n)&~BIT(7)) == 11) ? BIT(2) : \ + (((n)&~BIT(7)) == 22) ? BIT(3) : 0) /*---------------------------------------------------------------- * prism2mgmt_scan @@ -196,7 +197,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp) for (i = 0; i < msg->channellist.data.len; i++) { u8 channel = msg->channellist.data.data[i]; if (channel > 14) continue; - /* channel 1 is BIT0 ... channel 14 is BIT13 */ + /* channel 1 is BIT 0 ... channel 14 is BIT 13 */ word |= (1 << (channel-1)); } scanreq.channelList = host2hfa384x_16(word); diff --git a/drivers/staging/wlan-ng/prism2mib.c b/drivers/staging/wlan-ng/prism2mib.c index 873b29f1944a..99c6792eb03b 100644 --- a/drivers/staging/wlan-ng/prism2mib.c +++ b/drivers/staging/wlan-ng/prism2mib.c @@ -67,6 +67,7 @@ #include #include #include +#include /*================================================================*/ /* Project Includes */ @@ -996,28 +997,28 @@ void prism2mgmt_get_oprateset(u16 *rate, p80211pstrd_t *pstr) datarate = pstr->data; /* 1 Mbps */ - if ( BIT0 & (*rate) ) { + if ( BIT(0) & (*rate) ) { len += (u8)1; *datarate = (u8)2; datarate++; } /* 2 Mbps */ - if ( BIT1 & (*rate) ) { + if ( BIT(1) & (*rate) ) { len += (u8)1; *datarate = (u8)4; datarate++; } /* 5.5 Mbps */ - if ( BIT2 & (*rate) ) { + if ( BIT(2) & (*rate) ) { len += (u8)1; *datarate = (u8)11; datarate++; } /* 11 Mbps */ - if ( BIT3 & (*rate) ) { + if ( BIT(3) & (*rate) ) { len += (u8)1; *datarate = (u8)22; datarate++; @@ -1055,16 +1056,16 @@ void prism2mgmt_set_oprateset(u16 *rate, p80211pstrd_t *pstr) for ( i=0; i < pstr->len; i++, datarate++ ) { switch (*datarate) { case 2: /* 1 Mbps */ - *rate |= BIT0; + *rate |= BIT(0); break; case 4: /* 2 Mbps */ - *rate |= BIT1; + *rate |= BIT(1); break; case 11: /* 5.5 Mbps */ - *rate |= BIT2; + *rate |= BIT(2); break; case 22: /* 11 Mbps */ - *rate |= BIT3; + *rate |= BIT(3); break; default: WLAN_LOG_DEBUG(1, "Unrecoginzed Rate of %d\n", diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index 45d4455f11d7..8b9a80f3e9e7 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -72,6 +72,7 @@ #include #include #include +#include #include "wlan_compat.h" @@ -713,8 +714,8 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) hw->ident_sta_fw.minor = hfa384x2host_16(hw->ident_sta_fw.minor); /* strip out the 'special' variant bits */ - hw->mm_mods = hw->ident_sta_fw.variant & (BIT14 | BIT15); - hw->ident_sta_fw.variant &= ~((u16)(BIT14 | BIT15)); + hw->mm_mods = hw->ident_sta_fw.variant & (BIT(14) | BIT(15)); + hw->ident_sta_fw.variant &= ~((u16)(BIT(14) | BIT(15))); if ( hw->ident_sta_fw.id == 0x1f ) { WLAN_LOG_INFO( diff --git a/drivers/staging/wlan-ng/wlan_compat.h b/drivers/staging/wlan-ng/wlan_compat.h index cd7bcae689de..d33548a0cb49 100644 --- a/drivers/staging/wlan-ng/wlan_compat.h +++ b/drivers/staging/wlan-ng/wlan_compat.h @@ -48,43 +48,6 @@ #ifndef _WLAN_COMPAT_H #define _WLAN_COMPAT_H -/*=============================================================*/ -/*------ Bit settings -----------------------------------------*/ -/*=============================================================*/ - -#define BIT0 0x00000001 -#define BIT1 0x00000002 -#define BIT2 0x00000004 -#define BIT3 0x00000008 -#define BIT4 0x00000010 -#define BIT5 0x00000020 -#define BIT6 0x00000040 -#define BIT7 0x00000080 -#define BIT8 0x00000100 -#define BIT9 0x00000200 -#define BIT10 0x00000400 -#define BIT11 0x00000800 -#define BIT12 0x00001000 -#define BIT13 0x00002000 -#define BIT14 0x00004000 -#define BIT15 0x00008000 -#define BIT16 0x00010000 -#define BIT17 0x00020000 -#define BIT18 0x00040000 -#define BIT19 0x00080000 -#define BIT20 0x00100000 -#define BIT21 0x00200000 -#define BIT22 0x00400000 -#define BIT23 0x00800000 -#define BIT24 0x01000000 -#define BIT25 0x02000000 -#define BIT26 0x04000000 -#define BIT27 0x08000000 -#define BIT28 0x10000000 -#define BIT29 0x20000000 -#define BIT30 0x40000000 -#define BIT31 0x80000000 - /*=============================================================*/ /*------ OS Portability Macros --------------------------------*/ /*=============================================================*/ @@ -165,4 +128,3 @@ extern int wlan_debug; #endif #endif /* _WLAN_COMPAT_H */ - -- cgit v1.2.3-59-g8ed1b From 2d200d9f63786f7dd18d47e28c7b3eb8d261aae4 Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Sun, 25 Jan 2009 21:54:56 +0100 Subject: Staging: wlan-ng: Move URB_ASYNC_UNLINK and USB_QUEUE_BULK out of wlan_compat.h Signed-off-by: Moritz Muehlenhoff Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/hfa384x_usb.c | 2 ++ drivers/staging/wlan-ng/wlan_compat.h | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/staging/wlan-ng/wlan_compat.h') diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index cea033411e47..57180ee2067a 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -162,6 +162,8 @@ enum cmd_mode typedef enum cmd_mode CMD_MODE; #define THROTTLE_JIFFIES (HZ/8) +#define URB_ASYNC_UNLINK 0 +#define USB_QUEUE_BULK 0 /*================================================================*/ /* Local Macros */ diff --git a/drivers/staging/wlan-ng/wlan_compat.h b/drivers/staging/wlan-ng/wlan_compat.h index d33548a0cb49..0b094e5eb64a 100644 --- a/drivers/staging/wlan-ng/wlan_compat.h +++ b/drivers/staging/wlan-ng/wlan_compat.h @@ -84,9 +84,6 @@ #undef netdevice_t typedef struct net_device netdevice_t; -#define URB_ASYNC_UNLINK 0 -#define USB_QUEUE_BULK 0 - /*=============================================================*/ /*--- General Macros ------------------------------------------*/ /*=============================================================*/ -- cgit v1.2.3-59-g8ed1b From 350f2f4bd6570f6f1996516ddd135ab2a95484de Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Sun, 25 Jan 2009 21:54:57 +0100 Subject: Staging: wlan-ng: Remove WLAN_LOG_INFO Replace WLAN_LOG_INFO with printk() and remove it. Signed-off-by: Moritz Muehlenhoff Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/hfa384x_usb.c | 10 ++++---- drivers/staging/wlan-ng/p80211wext.c | 2 +- drivers/staging/wlan-ng/prism2mgmt.c | 4 ++-- drivers/staging/wlan-ng/prism2sta.c | 44 +++++++++++++++++------------------ drivers/staging/wlan-ng/wlan_compat.h | 2 -- 5 files changed, 30 insertions(+), 32 deletions(-) (limited to 'drivers/staging/wlan-ng/wlan_compat.h') diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 57180ee2067a..495cd12f5e6c 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -2244,7 +2244,7 @@ hfa384x_drvr_flashdl_write( return -EINVAL; } - WLAN_LOG_INFO("Download %d bytes to flash @0x%06x\n", len, daddr); + printk(KERN_INFO "Download %d bytes to flash @0x%06x\n", len, daddr); /* Convert to flat address for arithmetic */ /* NOTE: dlbuffer RID stores the address in AUX format */ @@ -2282,7 +2282,7 @@ WLAN_LOG_WARNING("dlbuf@0x%06lx len=%d to=%d\n", dlbufaddr, hw->bufinfo.len, hw- burnlo = HFA384x_ADDR_CMD_MKOFF(burndaddr); burnhi = HFA384x_ADDR_CMD_MKPAGE(burndaddr); - WLAN_LOG_INFO("Writing %d bytes to flash @0x%06x\n", + printk(KERN_INFO "Writing %d bytes to flash @0x%06x\n", burnlen, burndaddr); /* Set the download mode */ @@ -2665,7 +2665,7 @@ hfa384x_drvr_ramdl_write(hfa384x_t *hw, u32 daddr, void* buf, u32 len) return -EINVAL; } - WLAN_LOG_INFO("Writing %d bytes to ram @0x%06x\n", len, daddr); + printk(KERN_INFO "Writing %d bytes to ram @0x%06x\n", len, daddr); /* How many dowmem calls? */ nwrites = len / HFA384x_USB_RWMEM_MAXLEN; @@ -2802,7 +2802,7 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len) } } if ( pdaok ) { - WLAN_LOG_INFO( + printk(KERN_INFO "PDA Read from 0x%08x in %s space.\n", pdaloc[i].cardaddr, pdaloc[i].auxctl == 0 ? "EXTDS" : @@ -4087,7 +4087,7 @@ static void hfa384x_usbout_callback(struct urb *urb) break; default: - WLAN_LOG_INFO("unknown urb->status=%d\n", urb->status); + printk(KERN_INFO "unknown urb->status=%d\n", urb->status); ++(wlandev->linux_stats.tx_errors); break; } /* switch */ diff --git a/drivers/staging/wlan-ng/p80211wext.c b/drivers/staging/wlan-ng/p80211wext.c index 062826b58b77..76b7707f670e 100644 --- a/drivers/staging/wlan-ng/p80211wext.c +++ b/drivers/staging/wlan-ng/p80211wext.c @@ -407,7 +407,7 @@ static int p80211wext_siwmode(netdevice_t *dev, break; default: /* Not set yet. */ - WLAN_LOG_INFO("Operation mode: %d not support\n", *mode); + printk(KERN_INFO "Operation mode: %d not support\n", *mode); return -EOPNOTSUPP; } diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c index 6f0d39f2ea68..785801e16fd5 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.c +++ b/drivers/staging/wlan-ng/prism2mgmt.c @@ -1179,7 +1179,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) } - WLAN_LOG_INFO("monitor mode disabled\n"); + printk(KERN_INFO "monitor mode disabled\n"); msg->resultcode.data = P80211ENUM_resultcode_success; result = 0; goto exit; @@ -1301,7 +1301,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) } if (wlandev->netdev->type == ARPHRD_ETHER) { - WLAN_LOG_INFO("monitor mode enabled\n"); + printk(KERN_INFO "monitor mode enabled\n"); } /* Set the driver state */ diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index 8b9a80f3e9e7..1e802fb85769 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -671,7 +671,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) hw->ident_nic.major = hfa384x2host_16(hw->ident_nic.major); hw->ident_nic.minor = hfa384x2host_16(hw->ident_nic.minor); - WLAN_LOG_INFO( "ident: nic h/w: id=0x%02x %d.%d.%d\n", + printk(KERN_INFO "ident: nic h/w: id=0x%02x %d.%d.%d\n", hw->ident_nic.id, hw->ident_nic.major, hw->ident_nic.minor, hw->ident_nic.variant); @@ -689,7 +689,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) hw->ident_pri_fw.major = hfa384x2host_16(hw->ident_pri_fw.major); hw->ident_pri_fw.minor = hfa384x2host_16(hw->ident_pri_fw.minor); - WLAN_LOG_INFO( "ident: pri f/w: id=0x%02x %d.%d.%d\n", + printk(KERN_INFO "ident: pri f/w: id=0x%02x %d.%d.%d\n", hw->ident_pri_fw.id, hw->ident_pri_fw.major, hw->ident_pri_fw.minor, hw->ident_pri_fw.variant); @@ -718,12 +718,12 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) hw->ident_sta_fw.variant &= ~((u16)(BIT(14) | BIT(15))); if ( hw->ident_sta_fw.id == 0x1f ) { - WLAN_LOG_INFO( + printk(KERN_INFO "ident: sta 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); } else { - WLAN_LOG_INFO( + printk(KERN_INFO "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); @@ -747,7 +747,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) hw->cap_sup_mfi.bottom = hfa384x2host_16(hw->cap_sup_mfi.bottom); hw->cap_sup_mfi.top = hfa384x2host_16(hw->cap_sup_mfi.top); - WLAN_LOG_INFO( + printk(KERN_INFO "MFI:SUP:role=0x%02x:id=0x%02x:var=0x%02x:b/t=%d/%d\n", hw->cap_sup_mfi.role, hw->cap_sup_mfi.id, hw->cap_sup_mfi.variant, hw->cap_sup_mfi.bottom, @@ -769,7 +769,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) hw->cap_sup_cfi.bottom = hfa384x2host_16(hw->cap_sup_cfi.bottom); hw->cap_sup_cfi.top = hfa384x2host_16(hw->cap_sup_cfi.top); - WLAN_LOG_INFO( + printk(KERN_INFO "CFI:SUP:role=0x%02x:id=0x%02x:var=0x%02x:b/t=%d/%d\n", hw->cap_sup_cfi.role, hw->cap_sup_cfi.id, hw->cap_sup_cfi.variant, hw->cap_sup_cfi.bottom, @@ -791,7 +791,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) hw->cap_sup_pri.bottom = hfa384x2host_16(hw->cap_sup_pri.bottom); hw->cap_sup_pri.top = hfa384x2host_16(hw->cap_sup_pri.top); - WLAN_LOG_INFO( + printk(KERN_INFO "PRI:SUP:role=0x%02x:id=0x%02x:var=0x%02x:b/t=%d/%d\n", hw->cap_sup_pri.role, hw->cap_sup_pri.id, hw->cap_sup_pri.variant, hw->cap_sup_pri.bottom, @@ -814,13 +814,13 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) hw->cap_sup_sta.top = hfa384x2host_16(hw->cap_sup_sta.top); if ( hw->cap_sup_sta.id == 0x04 ) { - WLAN_LOG_INFO( + printk(KERN_INFO "STA:SUP:role=0x%02x:id=0x%02x:var=0x%02x:b/t=%d/%d\n", hw->cap_sup_sta.role, hw->cap_sup_sta.id, hw->cap_sup_sta.variant, hw->cap_sup_sta.bottom, hw->cap_sup_sta.top); } else { - WLAN_LOG_INFO( + printk(KERN_INFO "AP:SUP:role=0x%02x:id=0x%02x:var=0x%02x:b/t=%d/%d\n", hw->cap_sup_sta.role, hw->cap_sup_sta.id, hw->cap_sup_sta.variant, hw->cap_sup_sta.bottom, @@ -843,7 +843,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) hw->cap_act_pri_cfi.bottom = hfa384x2host_16(hw->cap_act_pri_cfi.bottom); hw->cap_act_pri_cfi.top = hfa384x2host_16(hw->cap_act_pri_cfi.top); - WLAN_LOG_INFO( + printk(KERN_INFO "PRI-CFI:ACT:role=0x%02x:id=0x%02x:var=0x%02x:b/t=%d/%d\n", hw->cap_act_pri_cfi.role, hw->cap_act_pri_cfi.id, hw->cap_act_pri_cfi.variant, hw->cap_act_pri_cfi.bottom, @@ -865,7 +865,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) hw->cap_act_sta_cfi.bottom = hfa384x2host_16(hw->cap_act_sta_cfi.bottom); hw->cap_act_sta_cfi.top = hfa384x2host_16(hw->cap_act_sta_cfi.top); - WLAN_LOG_INFO( + printk(KERN_INFO "STA-CFI:ACT:role=0x%02x:id=0x%02x:var=0x%02x:b/t=%d/%d\n", hw->cap_act_sta_cfi.role, hw->cap_act_sta_cfi.id, hw->cap_act_sta_cfi.variant, hw->cap_act_sta_cfi.bottom, @@ -887,7 +887,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) hw->cap_act_sta_mfi.bottom = hfa384x2host_16(hw->cap_act_sta_mfi.bottom); hw->cap_act_sta_mfi.top = hfa384x2host_16(hw->cap_act_sta_mfi.top); - WLAN_LOG_INFO( + printk(KERN_INFO "STA-MFI:ACT:role=0x%02x:id=0x%02x:var=0x%02x:b/t=%d/%d\n", hw->cap_act_sta_mfi.role, hw->cap_act_sta_mfi.id, hw->cap_act_sta_mfi.variant, hw->cap_act_sta_mfi.bottom, @@ -899,7 +899,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) if ( !result ) { wlan_mkprintstr(snum, HFA384x_RID_NICSERIALNUMBER_LEN, pstr, sizeof(pstr)); - WLAN_LOG_INFO("Prism2 card SN: %s\n", pstr); + printk(KERN_INFO "Prism2 card SN: %s\n", pstr); } else { WLAN_LOG_ERROR("Failed to retrieve Prism2 Card SN\n"); goto failed; @@ -1263,7 +1263,7 @@ void prism2sta_processing_defer(struct work_struct *data) */ netif_carrier_off(wlandev->netdev); - WLAN_LOG_INFO("linkstatus=NOTCONNECTED (unhandled)\n"); + printk(KERN_INFO "linkstatus=NOTCONNECTED (unhandled)\n"); break; case HFA384x_LINK_CONNECTED: @@ -1288,7 +1288,7 @@ void prism2sta_processing_defer(struct work_struct *data) if ( wlandev->netdev->type == ARPHRD_ETHER ) { u16 portstatus; - WLAN_LOG_INFO("linkstatus=CONNECTED\n"); + printk(KERN_INFO "linkstatus=CONNECTED\n"); /* For non-usb devices, we can use the sync versions */ /* Collect the BSSID, and set state to allow tx */ @@ -1351,10 +1351,10 @@ void prism2sta_processing_defer(struct work_struct *data) hfa384x_drvr_setconfig( hw, HFA384x_RID_JOINREQUEST, &joinreq, HFA384x_RID_JOINREQUEST_LEN); - WLAN_LOG_INFO("linkstatus=DISCONNECTED (re-submitting join)\n"); + printk(KERN_INFO "linkstatus=DISCONNECTED (re-submitting join)\n"); } else { if (wlandev->netdev->type == ARPHRD_ETHER) - WLAN_LOG_INFO("linkstatus=DISCONNECTED (unhandled)\n"); + printk(KERN_INFO "linkstatus=DISCONNECTED (unhandled)\n"); } wlandev->macmode = WLAN_MACMODE_NONE; @@ -1377,7 +1377,7 @@ void prism2sta_processing_defer(struct work_struct *data) * Indicate Reassociation * Enable Transmits, Receives and pass up data frames */ - WLAN_LOG_INFO("linkstatus=AP_CHANGE\n"); + printk(KERN_INFO "linkstatus=AP_CHANGE\n"); result = hfa384x_drvr_getconfig(hw, HFA384x_RID_CURRENTBSSID, @@ -1419,7 +1419,7 @@ void prism2sta_processing_defer(struct work_struct *data) * Response: * Block Transmits, Ignore receives of data frames */ - WLAN_LOG_INFO("linkstatus=AP_OUTOFRANGE (unhandled)\n"); + printk(KERN_INFO "linkstatus=AP_OUTOFRANGE (unhandled)\n"); netif_carrier_off(wlandev->netdev); @@ -1432,7 +1432,7 @@ void prism2sta_processing_defer(struct work_struct *data) * Response: * Enable Transmits, Receives and pass up data frames */ - WLAN_LOG_INFO("linkstatus=AP_INRANGE\n"); + printk(KERN_INFO "linkstatus=AP_INRANGE\n"); hw->link_status = HFA384x_LINK_CONNECTED; netif_carrier_on(wlandev->netdev); @@ -1456,9 +1456,9 @@ void prism2sta_processing_defer(struct work_struct *data) hfa384x_drvr_setconfig( hw, HFA384x_RID_JOINREQUEST, &joinreq, HFA384x_RID_JOINREQUEST_LEN); - WLAN_LOG_INFO("linkstatus=ASSOCFAIL (re-submitting join)\n"); + printk(KERN_INFO "linkstatus=ASSOCFAIL (re-submitting join)\n"); } else { - WLAN_LOG_INFO("linkstatus=ASSOCFAIL (unhandled)\n"); + printk(KERN_INFO "linkstatus=ASSOCFAIL (unhandled)\n"); } netif_carrier_off(wlandev->netdev); diff --git a/drivers/staging/wlan-ng/wlan_compat.h b/drivers/staging/wlan-ng/wlan_compat.h index 0b094e5eb64a..a8abc42b95ef 100644 --- a/drivers/staging/wlan-ng/wlan_compat.h +++ b/drivers/staging/wlan-ng/wlan_compat.h @@ -64,8 +64,6 @@ #define WLAN_LOG_NOTICE(x,args...) printk(KERN_NOTICE "%s: " x , __func__ , ##args); -#define WLAN_LOG_INFO(args... ) printk(KERN_INFO args) - #if defined(WLAN_INCLUDE_DEBUG) #define WLAN_HEX_DUMP( l, x, p, n) if( WLAN_DBVAR >= (l) ){ \ int __i__; \ -- cgit v1.2.3-59-g8ed1b From 090504701605d627b4a8ddb0d584f00613ee41fe Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Sun, 25 Jan 2009 21:54:58 +0100 Subject: Staging: wlan-ng: Remove wlan_max()/wlan_min() Replace wlan_min() with the generic min_t(), remove unused wlan_max(). Signed-off-by: Moritz Muehlenhoff Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/p80211wext.c | 2 +- drivers/staging/wlan-ng/wlan_compat.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'drivers/staging/wlan-ng/wlan_compat.h') diff --git a/drivers/staging/wlan-ng/p80211wext.c b/drivers/staging/wlan-ng/p80211wext.c index 76b7707f670e..4834ad07c246 100644 --- a/drivers/staging/wlan-ng/p80211wext.c +++ b/drivers/staging/wlan-ng/p80211wext.c @@ -1328,7 +1328,7 @@ wext_translate_bss(struct iw_request_info *info, char *current_ev, char essid[IW_ESSID_MAX_SIZE + 1]; int size; - size = wlan_min(IW_ESSID_MAX_SIZE, bss->ssid.data.len); + size = min_t(unsigned short, IW_ESSID_MAX_SIZE, bss->ssid.data.len); memset(&essid, 0, sizeof (essid)); memcpy(&essid, bss->ssid.data.data, size); WLAN_LOG_DEBUG(1, " essid size = %d\n", size); diff --git a/drivers/staging/wlan-ng/wlan_compat.h b/drivers/staging/wlan-ng/wlan_compat.h index a8abc42b95ef..42d8d0c95b60 100644 --- a/drivers/staging/wlan-ng/wlan_compat.h +++ b/drivers/staging/wlan-ng/wlan_compat.h @@ -86,9 +86,6 @@ typedef struct net_device netdevice_t; /*--- General Macros ------------------------------------------*/ /*=============================================================*/ -#define wlan_max(a, b) (((a) > (b)) ? (a) : (b)) -#define wlan_min(a, b) (((a) < (b)) ? (a) : (b)) - #define wlan_isprint(c) (((c) > (0x19)) && ((c) < (0x7f))) #define wlan_hexchar(x) (((x) < 0x0a) ? ('0' + (x)) : ('a' + ((x) - 0x0a))) -- cgit v1.2.3-59-g8ed1b From 2acbf9de068cae281f3bc30c6d7e41133fc7e8f3 Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Sun, 25 Jan 2009 21:54:59 +0100 Subject: Staging: wlan-ng: Replace WLAN_LOG_NOTICE with printk() Signed-off-by: Moritz Muehlenhoff Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/p80211netdev.c | 2 +- drivers/staging/wlan-ng/wlan_compat.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/staging/wlan-ng/wlan_compat.h') diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c index 7be8efaf7c6f..85a686b2ecea 100644 --- a/drivers/staging/wlan-ng/p80211netdev.c +++ b/drivers/staging/wlan-ng/p80211netdev.c @@ -418,7 +418,7 @@ static int p80211knetdev_hard_start_xmit( struct sk_buff *skb, netdevice_t *netd */ if(skb->protocol != ETH_P_80211_RAW) { netif_start_queue(wlandev->netdev); - WLAN_LOG_NOTICE( + printk(KERN_NOTICE "Tx attempt prior to association, frame dropped.\n"); wlandev->linux_stats.tx_dropped++; result = 0; diff --git a/drivers/staging/wlan-ng/wlan_compat.h b/drivers/staging/wlan-ng/wlan_compat.h index 42d8d0c95b60..fd4728b35f9b 100644 --- a/drivers/staging/wlan-ng/wlan_compat.h +++ b/drivers/staging/wlan-ng/wlan_compat.h @@ -62,8 +62,6 @@ #define WLAN_LOG_WARNING(x,args...) printk(KERN_WARNING "%s: " x , __func__ , ##args); -#define WLAN_LOG_NOTICE(x,args...) printk(KERN_NOTICE "%s: " x , __func__ , ##args); - #if defined(WLAN_INCLUDE_DEBUG) #define WLAN_HEX_DUMP( l, x, p, n) if( WLAN_DBVAR >= (l) ){ \ int __i__; \ -- cgit v1.2.3-59-g8ed1b From edbd606c4671fcd439164c8d63e896044d706156 Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Sun, 25 Jan 2009 21:55:00 +0100 Subject: Staging: wlan-ng: Replace WLAN_LOG_ERROR() with printk() Signed-off-by: Moritz Muehlenhoff Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/hfa384x_usb.c | 48 ++++++++++++++-------------- drivers/staging/wlan-ng/p80211conv.c | 20 ++++++------ drivers/staging/wlan-ng/p80211netdev.c | 6 ++-- drivers/staging/wlan-ng/p80211req.c | 2 +- drivers/staging/wlan-ng/p80211wext.c | 2 +- drivers/staging/wlan-ng/prism2mgmt.c | 58 +++++++++++++++++----------------- drivers/staging/wlan-ng/prism2mib.c | 2 +- drivers/staging/wlan-ng/prism2sta.c | 46 +++++++++++++-------------- drivers/staging/wlan-ng/prism2usb.c | 8 ++--- drivers/staging/wlan-ng/wlan_compat.h | 2 -- 10 files changed, 96 insertions(+), 98 deletions(-) (limited to 'drivers/staging/wlan-ng/wlan_compat.h') diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 495cd12f5e6c..bdbb2125f216 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -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); diff --git a/drivers/staging/wlan-ng/p80211conv.c b/drivers/staging/wlan-ng/p80211conv.c index c3719249f013..a153c4e91d5f 100644 --- a/drivers/staging/wlan-ng/p80211conv.c +++ b/drivers/staging/wlan-ng/p80211conv.c @@ -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); diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c index 85a686b2ecea..9b99f0e3119b 100644 --- a/drivers/staging/wlan-ng/p80211netdev.c +++ b/drivers/staging/wlan-ng/p80211netdev.c @@ -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); diff --git a/drivers/staging/wlan-ng/p80211req.c b/drivers/staging/wlan-ng/p80211req.c index 77bb00227c3d..8f88825ccc2a 100644 --- a/drivers/staging/wlan-ng/p80211req.c +++ b/drivers/staging/wlan-ng/p80211req.c @@ -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; } diff --git a/drivers/staging/wlan-ng/p80211wext.c b/drivers/staging/wlan-ng/p80211wext.c index 4834ad07c246..4bd966e69488 100644 --- a/drivers/staging/wlan-ng/p80211wext.c +++ b/drivers/staging/wlan-ng/p80211wext.c @@ -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; } diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c index 785801e16fd5..9432a19bc1ae 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.c +++ b/drivers/staging/wlan-ng/prism2mgmt.c @@ -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 = diff --git a/drivers/staging/wlan-ng/prism2mib.c b/drivers/staging/wlan-ng/prism2mib.c index 99c6792eb03b..eb0ae51fd809 100644 --- a/drivers/staging/wlan-ng/prism2mib.c +++ b/drivers/staging/wlan-ng/prism2mib.c @@ -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); diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index 1e802fb85769..878b74fd9b57 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -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; } diff --git a/drivers/staging/wlan-ng/prism2usb.c b/drivers/staging/wlan-ng/prism2usb.c index d91946794180..ca9bf5f9b3e5 100644 --- a/drivers/staging/wlan-ng/prism2usb.c +++ b/drivers/staging/wlan-ng/prism2usb.c @@ -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; } diff --git a/drivers/staging/wlan-ng/wlan_compat.h b/drivers/staging/wlan-ng/wlan_compat.h index fd4728b35f9b..f42577a4ce0b 100644 --- a/drivers/staging/wlan-ng/wlan_compat.h +++ b/drivers/staging/wlan-ng/wlan_compat.h @@ -58,8 +58,6 @@ #include -#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) -- cgit v1.2.3-59-g8ed1b From 9b9556ecc4bd8279aec195de84fd7d45a9883547 Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Sun, 25 Jan 2009 21:55:01 +0100 Subject: Staging: wlan-ng: Replace WLAN_LOG_WARNING() with printk() Signed-off-by: Moritz Muehlenhoff Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/hfa384x_usb.c | 32 ++++++++++++++++---------------- drivers/staging/wlan-ng/p80211conv.c | 2 +- drivers/staging/wlan-ng/p80211netdev.c | 2 +- drivers/staging/wlan-ng/prism2mgmt.c | 2 +- drivers/staging/wlan-ng/prism2mib.c | 2 +- drivers/staging/wlan-ng/prism2sta.c | 18 +++++++++--------- drivers/staging/wlan-ng/wlan_compat.h | 2 -- 7 files changed, 29 insertions(+), 31 deletions(-) (limited to 'drivers/staging/wlan-ng/wlan_compat.h') diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index bdbb2125f216..6dfbac33aed5 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -427,7 +427,7 @@ submit_rx_urb(hfa384x_t *hw, gfp_t memflags) /* Check whether we need to reset the RX pipe */ if (result == -EPIPE) { - WLAN_LOG_WARNING("%s rx pipe stalled: requesting reset\n", + printk(KERN_WARNING "%s rx pipe stalled: requesting reset\n", hw->wlandev->netdev->name); if ( !test_and_set_bit(WORK_RX_HALT, &hw->usb_flags) ) schedule_work(&hw->usb_work); @@ -476,7 +476,7 @@ submit_tx_urb(hfa384x_t *hw, struct urb *tx_urb, gfp_t memflags) /* Test whether we need to reset the TX pipe */ if (result == -EPIPE) { - WLAN_LOG_WARNING("%s tx pipe stalled: requesting reset\n", + printk(KERN_WARNING "%s tx pipe stalled: requesting reset\n", netdev->name); set_bit(WORK_TX_HALT, &hw->usb_flags); schedule_work(&hw->usb_work); @@ -809,7 +809,7 @@ static int usbctlx_rrid_completor_fn(usbctlx_completor_t *head) /* Validate the length, note body len calculation in bytes */ if ( rridresult.riddata_len != complete->riddatalen ) { - WLAN_LOG_WARNING( + printk(KERN_WARNING "RID len mismatch, rid=0x%04x hlen=%d fwlen=%d\n", rridresult.rid, complete->riddatalen, @@ -1499,7 +1499,7 @@ static int hfa384x_usbctlx_complete_sync(hfa384x_t *hw, if (ctlx->state == CTLX_COMPLETE) { result = completor->complete(completor); } else { - WLAN_LOG_WARNING("CTLX[%d] error: state(%s)\n", + printk(KERN_WARNING "CTLX[%d] error: state(%s)\n", hfa384x2host_16(ctlx->outbuf.type), ctlxstr(ctlx->state)); result = -EIO; @@ -2255,7 +2255,7 @@ hfa384x_drvr_flashdl_write( hw->bufinfo.page, hw->bufinfo.offset, dlbufaddr); #if 0 -WLAN_LOG_WARNING("dlbuf@0x%06lx len=%d to=%d\n", dlbufaddr, hw->bufinfo.len, hw->dltimeout); +printk(KERN_WARNING "dlbuf@0x%06lx len=%d to=%d\n", dlbufaddr, hw->bufinfo.len, hw->dltimeout); #endif /* Calculations to determine how many fills of the dlbuffer to do * and how many USB wmemreq's to do for each fill. At this point @@ -2764,7 +2764,7 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len) len); /* units of bytes */ if (result) { - WLAN_LOG_WARNING( + printk(KERN_WARNING "Read from index %zd failed, continuing\n", i ); continue; @@ -2941,10 +2941,10 @@ int hfa384x_drvr_start(hfa384x_t *hw) WLAN_LOG_DEBUG(0, "but second attempt succeeded. All should be ok\n"); } } else if (result2 != 0) { - WLAN_LOG_WARNING( + printk(KERN_WARNING "First cmd_initialize() succeeded, but second attempt failed (result=%d)\n", result2); - WLAN_LOG_WARNING("Most likely the card will be functional\n"); + printk(KERN_WARNING "Most likely the card will be functional\n"); goto done; } @@ -3036,7 +3036,7 @@ int hfa384x_drvr_txframe(hfa384x_t *hw, struct sk_buff *skb, p80211_hdr_t *p8021 char *ptr; if (hw->tx_urb.status == -EINPROGRESS) { - WLAN_LOG_WARNING("TX URB already in use\n"); + printk(KERN_WARNING "TX URB already in use\n"); result = 3; goto exit; } @@ -3423,7 +3423,7 @@ hfa384x_usbctlxq_run(hfa384x_t *hw) * this CTLX back in the "pending" queue * and schedule a reset ... */ - WLAN_LOG_WARNING("%s tx pipe stalled: requesting reset\n", + printk(KERN_WARNING "%s tx pipe stalled: requesting reset\n", hw->wlandev->netdev->name); list_move(&head->list, &hw->ctlxq.pending); set_bit(WORK_TX_HALT, &hw->usb_flags); @@ -3432,7 +3432,7 @@ hfa384x_usbctlxq_run(hfa384x_t *hw) } if (result == -ESHUTDOWN) { - WLAN_LOG_WARNING("%s urb shutdown!\n", + printk(KERN_WARNING "%s urb shutdown!\n", hw->wlandev->netdev->name); break; } @@ -3508,7 +3508,7 @@ static void hfa384x_usbin_callback(struct urb *urb) break; case -EPIPE: - WLAN_LOG_WARNING("%s rx pipe stalled: requesting reset\n", + printk(KERN_WARNING "%s rx pipe stalled: requesting reset\n", wlandev->netdev->name); if ( !test_and_set_bit(WORK_RX_HALT, &hw->usb_flags) ) schedule_work(&hw->usb_work); @@ -3698,7 +3698,7 @@ retry: * Check that our message is what we're expecting ... */ if (ctlx->outbuf.type != intype) { - WLAN_LOG_WARNING("Expected IN[%d], received IN[%d] - ignored.\n", + printk(KERN_WARNING "Expected IN[%d], received IN[%d] - ignored.\n", hfa384x2host_16(ctlx->outbuf.type), hfa384x2host_16(intype)); goto unlock; @@ -3877,7 +3877,7 @@ static void hfa384x_usbin_rx(wlandevice_t *wlandev, struct sk_buff *skb) break; default: - WLAN_LOG_WARNING("Received frame on unsupported port=%d\n", + printk(KERN_WARNING "Received frame on unsupported port=%d\n", HFA384x_RXSTATUS_MACPORT_GET(usbin->rxfrm.desc.status) ); goto done; break; @@ -4057,7 +4057,7 @@ static void hfa384x_usbout_callback(struct urb *urb) case -EPIPE: { hfa384x_t *hw = wlandev->priv; - WLAN_LOG_WARNING("%s tx pipe stalled: requesting reset\n", + printk(KERN_WARNING "%s tx pipe stalled: requesting reset\n", wlandev->netdev->name); if ( !test_and_set_bit(WORK_TX_HALT, &hw->usb_flags) ) schedule_work(&hw->usb_work); @@ -4193,7 +4193,7 @@ retry: /* If the pipe has stalled then we need to reset it */ if ( (urb->status == -EPIPE) && !test_and_set_bit(WORK_TX_HALT, &hw->usb_flags) ) { - WLAN_LOG_WARNING("%s tx pipe stalled: requesting reset\n", + printk(KERN_WARNING "%s tx pipe stalled: requesting reset\n", hw->wlandev->netdev->name); schedule_work(&hw->usb_work); } diff --git a/drivers/staging/wlan-ng/p80211conv.c b/drivers/staging/wlan-ng/p80211conv.c index a153c4e91d5f..c1b1afacadb4 100644 --- a/drivers/staging/wlan-ng/p80211conv.c +++ b/drivers/staging/wlan-ng/p80211conv.c @@ -235,7 +235,7 @@ int skb_ether_to_p80211( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb skb->len, (wlandev->hostwep & HOSTWEP_DEFAULTKEY_MASK), p80211_wep->iv, p80211_wep->icv))) { - WLAN_LOG_WARNING("Host en-WEP failed, dropping frame (%d).\n", foo); + printk(KERN_WARNING "Host en-WEP failed, dropping frame (%d).\n", foo); return 2; } fc |= cpu_to_le16(WLAN_SET_FC_ISWEP(1)); diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c index 9b99f0e3119b..6b98361d5571 100644 --- a/drivers/staging/wlan-ng/p80211netdev.c +++ b/drivers/staging/wlan-ng/p80211netdev.c @@ -1155,7 +1155,7 @@ static void p80211knetdev_tx_timeout( netdevice_t *netdev) if (wlandev->tx_timeout) { wlandev->tx_timeout(wlandev); } else { - WLAN_LOG_WARNING("Implement tx_timeout for %s\n", + printk(KERN_WARNING "Implement tx_timeout for %s\n", wlandev->nsdname); netif_wake_queue(wlandev->netdev); } diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c index 9432a19bc1ae..3d9478c4a4b4 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.c +++ b/drivers/staging/wlan-ng/prism2mgmt.c @@ -183,7 +183,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp) } result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_CNFPASSIVESCANCTRL, word); if ( result ) { - WLAN_LOG_WARNING("Passive scan not supported with " + printk(KERN_WARNING "Passive scan not supported with " "current firmware. (<1.5.1)\n"); } } diff --git a/drivers/staging/wlan-ng/prism2mib.c b/drivers/staging/wlan-ng/prism2mib.c index eb0ae51fd809..08460af4037e 100644 --- a/drivers/staging/wlan-ng/prism2mib.c +++ b/drivers/staging/wlan-ng/prism2mib.c @@ -729,7 +729,7 @@ void *data) if (!isget) if ((*uint32) % 2) { - WLAN_LOG_WARNING("Attempt to set odd number " + printk(KERN_WARNING "Attempt to set odd number " "FragmentationThreshold\n"); msg->resultcode.data = P80211ENUM_resultcode_not_supported; return(0); diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index 878b74fd9b57..249d657ca1d3 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -446,7 +446,7 @@ static int prism2sta_mlmerequest(wlandevice_t *wlandev, p80211msg_t *msg) break; } default: - WLAN_LOG_WARNING("Unknown mgmt request message 0x%08x", msg->msgcode); + printk(KERN_WARNING "Unknown mgmt request message 0x%08x", msg->msgcode); break; } @@ -511,7 +511,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate) result = P80211ENUM_resultcode_success; break; case WLAN_MSD_RUNNING: - WLAN_LOG_WARNING( + printk(KERN_WARNING "Cannot enter fwload state from enable state," "you must disable first.\n"); result = P80211ENUM_resultcode_invalid_parameters; @@ -1467,7 +1467,7 @@ void prism2sta_processing_defer(struct work_struct *data) default: /* This is bad, IO port problems? */ - WLAN_LOG_WARNING( + printk(KERN_WARNING "unknown linkstatus=0x%02x\n", hw->link_status); goto failed; break; @@ -1557,14 +1557,14 @@ static void prism2sta_inf_assocstatus(wlandevice_t *wlandev, if (i >= hw->authlist.cnt) { if (rec.assocstatus != HFA384x_ASSOCSTATUS_AUTHFAIL) - WLAN_LOG_WARNING("assocstatus info frame received for non-authenticated station.\n"); + printk(KERN_WARNING "assocstatus info frame received for non-authenticated station.\n"); } else { hw->authlist.assoc[i] = (rec.assocstatus == HFA384x_ASSOCSTATUS_STAASSOC || rec.assocstatus == HFA384x_ASSOCSTATUS_REASSOC); if (rec.assocstatus == HFA384x_ASSOCSTATUS_AUTHFAIL) - WLAN_LOG_WARNING("authfail assocstatus info frame received for authenticated station.\n"); + printk(KERN_WARNING "authfail assocstatus info frame received for authenticated station.\n"); } return; @@ -1887,16 +1887,16 @@ void prism2sta_ev_info(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf) prism2sta_inf_psusercnt(wlandev, inf); break; case HFA384x_IT_KEYIDCHANGED: - WLAN_LOG_WARNING("Unhandled IT_KEYIDCHANGED\n"); + printk(KERN_WARNING "Unhandled IT_KEYIDCHANGED\n"); break; case HFA384x_IT_ASSOCREQ: - WLAN_LOG_WARNING("Unhandled IT_ASSOCREQ\n"); + printk(KERN_WARNING "Unhandled IT_ASSOCREQ\n"); break; case HFA384x_IT_MICFAILURE: - WLAN_LOG_WARNING("Unhandled IT_MICFAILURE\n"); + printk(KERN_WARNING "Unhandled IT_MICFAILURE\n"); break; default: - WLAN_LOG_WARNING( + printk(KERN_WARNING "Unknown info type=0x%02x\n", inf->infotype); break; } diff --git a/drivers/staging/wlan-ng/wlan_compat.h b/drivers/staging/wlan-ng/wlan_compat.h index f42577a4ce0b..f9e97e6c9972 100644 --- a/drivers/staging/wlan-ng/wlan_compat.h +++ b/drivers/staging/wlan-ng/wlan_compat.h @@ -58,8 +58,6 @@ #include -#define WLAN_LOG_WARNING(x,args...) printk(KERN_WARNING "%s: " x , __func__ , ##args); - #if defined(WLAN_INCLUDE_DEBUG) #define WLAN_HEX_DUMP( l, x, p, n) if( WLAN_DBVAR >= (l) ){ \ int __i__; \ -- cgit v1.2.3-59-g8ed1b From 0b98de32d76d0667007d86ccae1c458b52ca457f Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Sun, 25 Jan 2009 21:55:02 +0100 Subject: Staging: wlan-ng: Replace wlan_isprint() with generic isprint() Signed-off-by: Moritz Muehlenhoff Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/wlan_compat.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/staging/wlan-ng/wlan_compat.h') diff --git a/drivers/staging/wlan-ng/wlan_compat.h b/drivers/staging/wlan-ng/wlan_compat.h index f9e97e6c9972..60aaccb11e3a 100644 --- a/drivers/staging/wlan-ng/wlan_compat.h +++ b/drivers/staging/wlan-ng/wlan_compat.h @@ -57,6 +57,7 @@ #endif #include +#include #if defined(WLAN_INCLUDE_DEBUG) #define WLAN_HEX_DUMP( l, x, p, n) if( WLAN_DBVAR >= (l) ){ \ @@ -80,8 +81,6 @@ typedef struct net_device netdevice_t; /*--- General Macros ------------------------------------------*/ /*=============================================================*/ -#define wlan_isprint(c) (((c) > (0x19)) && ((c) < (0x7f))) - #define wlan_hexchar(x) (((x) < 0x0a) ? ('0' + (x)) : ('a' + ((x) - 0x0a))) /* Create a string of printable chars from something that might not be */ @@ -92,7 +91,7 @@ typedef struct net_device netdevice_t; int j = 0; \ memset(str, 0, (strlen)); \ for (i = 0; i < (buflen); i++) { \ - if ( wlan_isprint((buf)[i]) ) { \ + if ( isprint((buf)[i]) ) { \ (str)[j] = (buf)[i]; \ j++; \ } else { \ -- cgit v1.2.3-59-g8ed1b From ea045ba02086c008505ab1a6a7a60856072be65f Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Thu, 5 Feb 2009 23:55:54 +0100 Subject: Staging: wlan-ng: Remove WLAN_INCLUDE_DEBUG and some related, mostly unused Signed-off-by: Moritz Muehlenhoff Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/hfa384x_usb.c | 8 -------- drivers/staging/wlan-ng/p80211netdev.c | 6 ------ drivers/staging/wlan-ng/prism2mgmt.c | 2 -- drivers/staging/wlan-ng/prism2mgmt.h | 1 - drivers/staging/wlan-ng/prism2mib.c | 1 - drivers/staging/wlan-ng/prism2sta.c | 7 ------- drivers/staging/wlan-ng/wlan_compat.h | 28 +++++----------------------- 7 files changed, 5 insertions(+), 48 deletions(-) (limited to 'drivers/staging/wlan-ng/wlan_compat.h') diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 60820da4aebf..036518e3b9ca 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -112,7 +112,6 @@ /*================================================================*/ /* System Includes */ -#define WLAN_DBVAR prism2_debug #include @@ -170,13 +169,6 @@ typedef enum cmd_mode CMD_MODE; #define ROUNDUP64(a) (((a)+63)&~63) -/*================================================================*/ -/* Local Types */ - -/*================================================================*/ -/* Local Static Definitions */ -extern int prism2_debug; - /*================================================================*/ /* Local Function Declarations */ diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c index 6b98361d5571..4f314b94f694 100644 --- a/drivers/staging/wlan-ng/p80211netdev.c +++ b/drivers/staging/wlan-ng/p80211netdev.c @@ -135,12 +135,6 @@ int wlan_wext_write = 1; module_param(wlan_wext_write, int, 0644); MODULE_PARM_DESC(wlan_wext_write, "enable write wireless extensions"); -#ifdef WLAN_INCLUDE_DEBUG -int wlan_debug=0; -module_param(wlan_debug, int, 0644); -MODULE_PARM_DESC(wlan_debug, "p80211 debug level"); -#endif - /*================================================================*/ /* Function Definitions */ diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c index fe4e7ffddf24..12055226d2c4 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.c +++ b/drivers/staging/wlan-ng/prism2mgmt.c @@ -59,8 +59,6 @@ /*================================================================*/ /* System Includes */ -#define WLAN_DBVAR prism2_debug - #include #include diff --git a/drivers/staging/wlan-ng/prism2mgmt.h b/drivers/staging/wlan-ng/prism2mgmt.h index 5e326b318159..b38b16d2893b 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.h +++ b/drivers/staging/wlan-ng/prism2mgmt.h @@ -64,7 +64,6 @@ /*=============================================================*/ /*------ Static variable externs ------------------------------*/ -extern int prism2_debug; extern int prism2_reset_holdtime; extern int prism2_reset_settletime; /*=============================================================*/ diff --git a/drivers/staging/wlan-ng/prism2mib.c b/drivers/staging/wlan-ng/prism2mib.c index 08460af4037e..438c2c298912 100644 --- a/drivers/staging/wlan-ng/prism2mib.c +++ b/drivers/staging/wlan-ng/prism2mib.c @@ -52,7 +52,6 @@ /*================================================================*/ /* System Includes */ -#define WLAN_DBVAR prism2_debug #include diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index 5b3db5c28c1a..b1e4a99f1daa 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -52,7 +52,6 @@ /*================================================================*/ /* System Includes */ -#define WLAN_DBVAR prism2_debug #include #include @@ -115,12 +114,6 @@ int prism2_reset_settletime=100; /* Reset settle time in ms */ static int prism2_doreset=0; /* Do a reset at init? */ -#ifdef WLAN_INCLUDE_DEBUG -int prism2_debug=0; -module_param( prism2_debug, int, 0644); -MODULE_PARM_DESC(prism2_debug, "prism2 debugging"); -#endif - module_param( prism2_doreset, int, 0644); MODULE_PARM_DESC(prism2_doreset, "Issue a reset on initialization"); diff --git a/drivers/staging/wlan-ng/wlan_compat.h b/drivers/staging/wlan-ng/wlan_compat.h index 60aaccb11e3a..6ea47fc02cac 100644 --- a/drivers/staging/wlan-ng/wlan_compat.h +++ b/drivers/staging/wlan-ng/wlan_compat.h @@ -48,34 +48,20 @@ #ifndef _WLAN_COMPAT_H #define _WLAN_COMPAT_H +#undef netdevice_t +typedef struct net_device netdevice_t; + /*=============================================================*/ /*------ OS Portability Macros --------------------------------*/ /*=============================================================*/ -#ifndef WLAN_DBVAR -#define WLAN_DBVAR wlan_debug -#endif #include #include -#if defined(WLAN_INCLUDE_DEBUG) - #define WLAN_HEX_DUMP( l, x, p, n) if( WLAN_DBVAR >= (l) ){ \ - int __i__; \ - printk(KERN_DEBUG x ":"); \ - for( __i__=0; __i__ < (n); __i__++) \ - printk( " %02x", ((u8*)(p))[__i__]); \ - printk("\n"); } - - #define WLAN_LOG_DEBUG(l,x,args...) if ( WLAN_DBVAR >= (l)) printk(KERN_DEBUG "%s(%lu): " x , __func__, (preempt_count() & PREEMPT_MASK), ##args ); -#else - #define WLAN_HEX_DUMP( l, s, p, n) +#define WLAN_HEX_DUMP( l, s, p, n) - #define WLAN_LOG_DEBUG(l, s, args...) -#endif - -#undef netdevice_t -typedef struct net_device netdevice_t; +#define WLAN_LOG_DEBUG(l, s, args...) /*=============================================================*/ /*--- General Macros ------------------------------------------*/ @@ -108,8 +94,4 @@ typedef struct net_device netdevice_t; /*--- Variables -----------------------------------------------*/ /*=============================================================*/ -#ifdef WLAN_INCLUDE_DEBUG -extern int wlan_debug; -#endif - #endif /* _WLAN_COMPAT_H */ -- cgit v1.2.3-59-g8ed1b From 96c5abd7f84272447a74c2a854c89f9cbd4018b2 Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Thu, 5 Feb 2009 23:55:56 +0100 Subject: Staging: wlan-ng: Move netdevice_t typedef into p80211netdev.h Signed-off-by: Moritz Muehlenhoff Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/p80211netdev.h | 4 ++++ drivers/staging/wlan-ng/wlan_compat.h | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/staging/wlan-ng/wlan_compat.h') diff --git a/drivers/staging/wlan-ng/p80211netdev.h b/drivers/staging/wlan-ng/p80211netdev.h index ca65a4a9fb76..cbd02d2272e0 100644 --- a/drivers/staging/wlan-ng/p80211netdev.h +++ b/drivers/staging/wlan-ng/p80211netdev.h @@ -55,10 +55,14 @@ #include #include +#include /*================================================================*/ /* Constants */ +#undef netdevice_t +typedef struct net_device netdevice_t; + #define WLAN_RELEASE "0.3.0-staging" #define WLAN_DEVICE_CLOSED 0 diff --git a/drivers/staging/wlan-ng/wlan_compat.h b/drivers/staging/wlan-ng/wlan_compat.h index 6ea47fc02cac..5c91332d2f61 100644 --- a/drivers/staging/wlan-ng/wlan_compat.h +++ b/drivers/staging/wlan-ng/wlan_compat.h @@ -48,9 +48,6 @@ #ifndef _WLAN_COMPAT_H #define _WLAN_COMPAT_H -#undef netdevice_t -typedef struct net_device netdevice_t; - /*=============================================================*/ /*------ OS Portability Macros --------------------------------*/ /*=============================================================*/ -- cgit v1.2.3-59-g8ed1b From 16910554f3687c96d572664efc55057668a3f1cf Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Sun, 1 Feb 2009 13:39:16 +0100 Subject: Staging: wlan-ng: Move wlan_mkprintstr() and wlan_hexchar() macros into prism2sta.c Signed-off-by: Moritz Muehlenhoff Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/prism2sta.c | 27 ++++++++++++++++++++++----- drivers/staging/wlan-ng/wlan_compat.h | 27 --------------------------- 2 files changed, 22 insertions(+), 32 deletions(-) (limited to 'drivers/staging/wlan-ng/wlan_compat.h') diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index b1e4a99f1daa..eb29a0a19393 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -90,14 +90,31 @@ #include "hfa384x.h" #include "prism2mgmt.h" -/*================================================================*/ -/* Local Constants */ - /*================================================================*/ /* Local Macros */ -/*================================================================*/ -/* Local Types */ +#define wlan_hexchar(x) (((x) < 0x0a) ? ('0' + (x)) : ('a' + ((x) - 0x0a))) + +/* Create a string of printable chars from something that might not be */ +/* It's recommended that the str be 4*len + 1 bytes long */ +#define wlan_mkprintstr(buf, buflen, str, strlen) \ +{ \ + int i = 0; \ + int j = 0; \ + memset(str, 0, (strlen)); \ + for (i = 0; i < (buflen); i++) { \ + if ( isprint((buf)[i]) ) { \ + (str)[j] = (buf)[i]; \ + j++; \ + } else { \ + (str)[j] = '\\'; \ + (str)[j+1] = 'x'; \ + (str)[j+2] = wlan_hexchar(((buf)[i] & 0xf0) >> 4); \ + (str)[j+3] = wlan_hexchar(((buf)[i] & 0x0f)); \ + j += 4; \ + } \ + } \ +} /*================================================================*/ /* Local Static Definitions */ diff --git a/drivers/staging/wlan-ng/wlan_compat.h b/drivers/staging/wlan-ng/wlan_compat.h index 5c91332d2f61..a7673fc00189 100644 --- a/drivers/staging/wlan-ng/wlan_compat.h +++ b/drivers/staging/wlan-ng/wlan_compat.h @@ -60,33 +60,6 @@ #define WLAN_LOG_DEBUG(l, s, args...) -/*=============================================================*/ -/*--- General Macros ------------------------------------------*/ -/*=============================================================*/ - -#define wlan_hexchar(x) (((x) < 0x0a) ? ('0' + (x)) : ('a' + ((x) - 0x0a))) - -/* Create a string of printable chars from something that might not be */ -/* It's recommended that the str be 4*len + 1 bytes long */ -#define wlan_mkprintstr(buf, buflen, str, strlen) \ -{ \ - int i = 0; \ - int j = 0; \ - memset(str, 0, (strlen)); \ - for (i = 0; i < (buflen); i++) { \ - if ( isprint((buf)[i]) ) { \ - (str)[j] = (buf)[i]; \ - j++; \ - } else { \ - (str)[j] = '\\'; \ - (str)[j+1] = 'x'; \ - (str)[j+2] = wlan_hexchar(((buf)[i] & 0xf0) >> 4); \ - (str)[j+3] = wlan_hexchar(((buf)[i] & 0x0f)); \ - j += 4; \ - } \ - } \ -} - /*=============================================================*/ /*--- Variables -----------------------------------------------*/ /*=============================================================*/ -- cgit v1.2.3-59-g8ed1b From a7cf7bae3297f16bb4a2f00310377fec06d0ecd6 Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Sun, 8 Feb 2009 02:01:00 +0100 Subject: Staging: wlan-ng: Replace WLAN_LOG_DEBUG() with printk(KERN_DEBUG Signed-off-by: Moritz Muehlenhoff Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/hfa384x_usb.c | 92 +++++++++++++++++----------------- drivers/staging/wlan-ng/p80211conv.c | 24 ++++----- drivers/staging/wlan-ng/p80211netdev.c | 28 +++++------ drivers/staging/wlan-ng/p80211wext.c | 40 +++++++-------- drivers/staging/wlan-ng/prism2mgmt.c | 34 ++++++------- drivers/staging/wlan-ng/prism2mib.c | 4 +- drivers/staging/wlan-ng/prism2sta.c | 63 +++++++++++------------ drivers/staging/wlan-ng/wlan_compat.h | 16 ------ 8 files changed, 142 insertions(+), 159 deletions(-) (limited to 'drivers/staging/wlan-ng/wlan_compat.h') diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 036518e3b9ca..c37d002ee923 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -359,20 +359,20 @@ get_active_ctlx(hfa384x_t *hw) void dbprint_urb(struct urb* urb) { - WLAN_LOG_DEBUG(3,"urb->pipe=0x%08x\n", urb->pipe); - WLAN_LOG_DEBUG(3,"urb->status=0x%08x\n", urb->status); - WLAN_LOG_DEBUG(3,"urb->transfer_flags=0x%08x\n", urb->transfer_flags); - WLAN_LOG_DEBUG(3,"urb->transfer_buffer=0x%08x\n", (unsigned int)urb->transfer_buffer); - WLAN_LOG_DEBUG(3,"urb->transfer_buffer_length=0x%08x\n", urb->transfer_buffer_length); - WLAN_LOG_DEBUG(3,"urb->actual_length=0x%08x\n", urb->actual_length); - WLAN_LOG_DEBUG(3,"urb->bandwidth=0x%08x\n", urb->bandwidth); - WLAN_LOG_DEBUG(3,"urb->setup_packet(ctl)=0x%08x\n", (unsigned int)urb->setup_packet); - WLAN_LOG_DEBUG(3,"urb->start_frame(iso/irq)=0x%08x\n", urb->start_frame); - WLAN_LOG_DEBUG(3,"urb->interval(irq)=0x%08x\n", urb->interval); - WLAN_LOG_DEBUG(3,"urb->error_count(iso)=0x%08x\n", urb->error_count); - WLAN_LOG_DEBUG(3,"urb->timeout=0x%08x\n", urb->timeout); - WLAN_LOG_DEBUG(3,"urb->context=0x%08x\n", (unsigned int)urb->context); - WLAN_LOG_DEBUG(3,"urb->complete=0x%08x\n", (unsigned int)urb->complete); + pr_debug("urb->pipe=0x%08x\n", urb->pipe); + pr_debug("urb->status=0x%08x\n", urb->status); + pr_debug("urb->transfer_flags=0x%08x\n", urb->transfer_flags); + pr_debug("urb->transfer_buffer=0x%08x\n", (unsigned int)urb->transfer_buffer); + pr_debug("urb->transfer_buffer_length=0x%08x\n", urb->transfer_buffer_length); + pr_debug("urb->actual_length=0x%08x\n", urb->actual_length); + pr_debug("urb->bandwidth=0x%08x\n", urb->bandwidth); + pr_debug("urb->setup_packet(ctl)=0x%08x\n", (unsigned int)urb->setup_packet); + pr_debug("urb->start_frame(iso/irq)=0x%08x\n", urb->start_frame); + pr_debug("urb->interval(irq)=0x%08x\n", urb->interval); + pr_debug("urb->error_count(iso)=0x%08x\n", urb->error_count); + pr_debug("urb->timeout=0x%08x\n", urb->timeout); + pr_debug("urb->context=0x%08x\n", (unsigned int)urb->context); + pr_debug("urb->complete=0x%08x\n", (unsigned int)urb->complete); } #endif @@ -725,7 +725,7 @@ usbctlx_get_status(const hfa384x_usb_cmdresp_t *cmdresp, result->resp1 = hfa384x2host_16(cmdresp->resp1); result->resp2 = hfa384x2host_16(cmdresp->resp2); - WLAN_LOG_DEBUG(4, "cmdresult:status=0x%04x " + pr_debug("cmdresult:status=0x%04x " "resp0=0x%04x resp1=0x%04x resp2=0x%04x\n", result->status, result->resp0, @@ -860,7 +860,7 @@ static int usbctlx_rmem_completor_fn(usbctlx_completor_t *head) { usbctlx_rmem_completor_t *complete = (usbctlx_rmem_completor_t*)head; - WLAN_LOG_DEBUG(4,"rmemresp:len=%d\n", complete->rmemresp->frmlen); + pr_debug("rmemresp:len=%d\n", complete->rmemresp->frmlen); memcpy(complete->data, complete->rmemresp->data, complete->len); return 0; } @@ -1095,7 +1095,7 @@ hfa384x_cmd_initialize(hfa384x_t *hw) result = hfa384x_docmd_wait(hw, &cmd); - WLAN_LOG_DEBUG(3,"cmdresp.init: " + pr_debug("cmdresp.init: " "status=0x%04x, resp0=0x%04x, " "resp1=0x%04x, resp2=0x%04x\n", cmd.result.status, @@ -1277,7 +1277,7 @@ int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr, int result = 0; hfa384x_metacmd_t cmd; - WLAN_LOG_DEBUG(5, + printk(KERN_DEBUG "mode=%d, lowaddr=0x%04x, highaddr=0x%04x, codelen=%d\n", mode, lowaddr, highaddr, codelen); @@ -1564,7 +1564,7 @@ hfa384x_docmd( ctlx->outbufsize = sizeof(ctlx->outbuf.cmdreq); - WLAN_LOG_DEBUG(4, "cmdreq: cmd=0x%04x " + pr_debug("cmdreq: cmd=0x%04x " "parm0=0x%04x parm1=0x%04x parm2=0x%04x\n", cmd->cmd, cmd->parm0, @@ -1836,14 +1836,14 @@ hfa384x_dormem( ctlx->outbufsize = sizeof(ctlx->outbuf.rmemreq); - WLAN_LOG_DEBUG(4, + pr_debug( "type=0x%04x frmlen=%d offset=0x%04x page=0x%04x\n", ctlx->outbuf.rmemreq.type, ctlx->outbuf.rmemreq.frmlen, ctlx->outbuf.rmemreq.offset, ctlx->outbuf.rmemreq.page); - WLAN_LOG_DEBUG(4,"pktsize=%zd\n", + pr_debug("pktsize=%zd\n", ROUNDUP64(sizeof(ctlx->outbuf.rmemreq))); ctlx->reapable = mode; @@ -1918,7 +1918,7 @@ hfa384x_dowmem( int result; hfa384x_usbctlx_t *ctlx; - WLAN_LOG_DEBUG(5, "page=0x%04x offset=0x%04x len=%d\n", + pr_debug("page=0x%04x offset=0x%04x len=%d\n", page,offset,len); ctlx = usbctlx_alloc(); @@ -2109,7 +2109,7 @@ int hfa384x_drvr_flashdl_enable(hfa384x_t *hw) /* Check that a port isn't active */ for ( i = 0; i < HFA384x_PORTID_MAX; i++) { if ( hw->port_enabled[i] ) { - WLAN_LOG_DEBUG(1,"called when port enabled.\n"); + pr_debug("called when port enabled.\n"); return -EINVAL; } } @@ -2133,7 +2133,7 @@ int hfa384x_drvr_flashdl_enable(hfa384x_t *hw) } hw->dltimeout = hfa384x2host_16(hw->dltimeout); - WLAN_LOG_DEBUG(1,"flashdl_enable\n"); + pr_debug("flashdl_enable\n"); hw->dlstate = HFA384x_DLSTATE_FLASHENABLED; @@ -2167,7 +2167,7 @@ int hfa384x_drvr_flashdl_disable(hfa384x_t *hw) return -EINVAL; } - WLAN_LOG_DEBUG(1,"flashdl_enable\n"); + pr_debug("flashdl_enable\n"); /* There isn't much we can do at this point, so I don't */ /* bother w/ the return value */ @@ -2229,7 +2229,7 @@ hfa384x_drvr_flashdl_write( int i; int j; - WLAN_LOG_DEBUG(5,"daddr=0x%08x len=%d\n", daddr, len); + pr_debug("daddr=0x%08x len=%d\n", daddr, len); /* Check that we're in the flash download state */ if ( hw->dlstate != HFA384x_DLSTATE_FLASHENABLED ) { @@ -2242,7 +2242,7 @@ hfa384x_drvr_flashdl_write( /* NOTE: dlbuffer RID stores the address in AUX format */ dlbufaddr = HFA384x_ADDR_AUX_MKFLAT( hw->bufinfo.page, hw->bufinfo.offset); - WLAN_LOG_DEBUG(5, + pr_debug( "dlbuf.page=0x%04x dlbuf.offset=0x%04x dlbufaddr=0x%08x\n", hw->bufinfo.page, hw->bufinfo.offset, dlbufaddr); @@ -2496,7 +2496,7 @@ hfa384x_drvr_ramdl_disable(hfa384x_t *hw) return -EINVAL; } - WLAN_LOG_DEBUG(3,"ramdl_disable()\n"); + pr_debug("ramdl_disable()\n"); /* There isn't much we can do at this point, so I don't */ /* bother w/ the return value */ @@ -2555,7 +2555,7 @@ hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr) return -EINVAL; } - WLAN_LOG_DEBUG(3,"ramdl_enable, exeaddr=0x%08x\n", exeaddr); + pr_debug("ramdl_enable, exeaddr=0x%08x\n", exeaddr); /* Call the download(1,addr) function */ lowaddr = HFA384x_ADDR_CMD_MKOFF(exeaddr); @@ -2568,7 +2568,7 @@ hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr) /* Set the download state */ hw->dlstate = HFA384x_DLSTATE_RAMENABLED; } else { - WLAN_LOG_DEBUG(1, + pr_debug( "cmd_download(0x%04x, 0x%04x) failed, result=%d.\n", lowaddr, hiaddr, @@ -2773,7 +2773,7 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len) result = pdaok ? 0 : -ENODATA; if ( result ) { - WLAN_LOG_DEBUG(3,"Failure: pda is not okay\n"); + pr_debug("Failure: pda is not okay\n"); } return result; @@ -2893,9 +2893,9 @@ int hfa384x_drvr_start(hfa384x_t *hw) usb_kill_urb(&hw->rx_urb); goto done; } else { - WLAN_LOG_DEBUG(0, "First cmd_initialize() failed (result %d),\n", + pr_debug("First cmd_initialize() failed (result %d),\n", result1); - WLAN_LOG_DEBUG(0, "but second attempt succeeded. All should be ok\n"); + pr_debug("but second attempt succeeded. All should be ok\n"); } } else if (result2 != 0) { printk(KERN_WARNING @@ -3490,18 +3490,18 @@ static void hfa384x_usbin_callback(struct urb *urb) case -ENODEV: case -ESHUTDOWN: - WLAN_LOG_DEBUG(3,"status=%d, device removed.\n", urb->status); + pr_debug("status=%d, device removed.\n", urb->status); action = ABORT; break; case -ENOENT: case -ECONNRESET: - WLAN_LOG_DEBUG(3,"status=%d, urb explicitly unlinked.\n", urb->status); + pr_debug("status=%d, urb explicitly unlinked.\n", urb->status); action = ABORT; break; default: - WLAN_LOG_DEBUG(3,"urb status=%d, transfer flags=0x%x\n", + pr_debug("urb status=%d, transfer flags=0x%x\n", urb->status, urb->transfer_flags); ++(wlandev->linux_stats.rx_errors); action = RESUBMIT; @@ -3561,17 +3561,17 @@ static void hfa384x_usbin_callback(struct urb *urb) break; case HFA384x_USB_BUFAVAIL: - WLAN_LOG_DEBUG(3,"Received BUFAVAIL packet, frmlen=%d\n", + pr_debug("Received BUFAVAIL packet, frmlen=%d\n", usbin->bufavail.frmlen); break; case HFA384x_USB_ERROR: - WLAN_LOG_DEBUG(3,"Received USB_ERROR packet, errortype=%d\n", + pr_debug("Received USB_ERROR packet, errortype=%d\n", usbin->usberror.errortype); break; default: - WLAN_LOG_DEBUG(3,"Unrecognized USBIN packet, type=%x, status=%d\n", + pr_debug("Unrecognized USBIN packet, type=%x, status=%d\n", usbin->type, urb_status); break; } /* switch */ @@ -3670,7 +3670,7 @@ retry: * our request has been acknowledged. Odd, * but our OUT URB is still alive... */ - WLAN_LOG_DEBUG(0, "Causality violation: please reboot Universe, or email linux-wlan-devel@lists.linux-wlan.com\n"); + pr_debug("Causality violation: please reboot Universe, or email linux-wlan-devel@lists.linux-wlan.com\n"); ctlx->state = CTLX_RESP_COMPLETE; break; @@ -3828,7 +3828,7 @@ static void hfa384x_usbin_rx(wlandevice_t *wlandev, struct sk_buff *skb) hfa384x_int_rxmonitor( wlandev, &usbin->rxfrm); dev_kfree_skb(skb); } else { - WLAN_LOG_DEBUG(3,"Received monitor frame: FCSerr set\n"); + pr_debug("Received monitor frame: FCSerr set\n"); } break; @@ -3889,7 +3889,7 @@ static void hfa384x_int_rxmonitor( wlandevice_t *wlandev, hfa384x_usb_rxfrm_t *r if ( skblen > (sizeof(p80211_caphdr_t) + WLAN_HDR_A4_LEN + WLAN_DATA_MAXLEN + WLAN_CRC_LEN) ) { - WLAN_LOG_DEBUG(1, "overlen frm: len=%zd\n", + pr_debug("overlen frm: len=%zd\n", skblen - sizeof(p80211_caphdr_t)); } @@ -4076,7 +4076,7 @@ static void hfa384x_ctlxout_callback(struct urb *urb) hfa384x_usbctlx_t *ctlx; unsigned long flags; - WLAN_LOG_DEBUG(3,"urb->status=%d\n", urb->status); + pr_debug("urb->status=%d\n", urb->status); #ifdef DEBUG_USB dbprint_urb(urb); #endif @@ -4324,7 +4324,7 @@ hfa384x_usb_throttlefn(unsigned long data) * We need to check BOTH the RX and the TX throttle controls, * so we use the bitwise OR instead of the logical OR. */ - WLAN_LOG_DEBUG(3, "flags=0x%lx\n", hw->usb_flags); + pr_debug("flags=0x%lx\n", hw->usb_flags); if ( !hw->wlandev->hwremoved && ( (test_and_clear_bit(THROTTLE_RX, &hw->usb_flags) && @@ -4464,14 +4464,14 @@ hfa384x_isgood_pdrcode(u16 pdrcode) default: if ( pdrcode < 0x1000 ) { /* code is OK, but we don't know exactly what it is */ - WLAN_LOG_DEBUG(3, + pr_debug( "Encountered unknown PDR#=0x%04x, " "assuming it's ok.\n", pdrcode); return 1; } else { /* bad code */ - WLAN_LOG_DEBUG(3, + pr_debug( "Encountered unknown PDR#=0x%04x, " "(>=0x1000), assuming it's bad.\n", pdrcode); diff --git a/drivers/staging/wlan-ng/p80211conv.c b/drivers/staging/wlan-ng/p80211conv.c index b2d6ae53cab6..724f3de77e21 100644 --- a/drivers/staging/wlan-ng/p80211conv.c +++ b/drivers/staging/wlan-ng/p80211conv.c @@ -129,12 +129,12 @@ int skb_ether_to_p80211( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb memcpy(&e_hdr, skb->data, sizeof(e_hdr)); if (skb->len <= 0) { - WLAN_LOG_DEBUG(1, "zero-length skb!\n"); + pr_debug("zero-length skb!\n"); return 1; } if ( ethconv == WLAN_ETHCONV_ENCAP ) { /* simplest case */ - WLAN_LOG_DEBUG(3, "ENCAP len: %d\n", skb->len); + pr_debug("ENCAP len: %d\n", skb->len); /* here, we don't care what kind of ether frm. Just stick it */ /* in the 80211 payload */ /* which is to say, leave the skb alone. */ @@ -142,7 +142,7 @@ int skb_ether_to_p80211( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb /* step 1: classify ether frame, DIX or 802.3? */ proto = ntohs(e_hdr.type); if ( proto <= 1500 ) { - WLAN_LOG_DEBUG(3, "802.3 len: %d\n", skb->len); + pr_debug("802.3 len: %d\n", skb->len); /* codes <= 1500 reserved for 802.3 lengths */ /* it's 802.3, pass ether payload unchanged, */ @@ -152,7 +152,7 @@ int skb_ether_to_p80211( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb /* leave off any PAD octets. */ skb_trim(skb, proto); } else { - WLAN_LOG_DEBUG(3, "DIXII len: %d\n", skb->len); + pr_debug("DIXII len: %d\n", skb->len); /* it's DIXII, time for some conversion */ /* trim off ethernet header */ @@ -327,7 +327,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb skb->data + payload_offset, skb->data + payload_offset + payload_length - 4))) { /* de-wep failed, drop skb. */ - WLAN_LOG_DEBUG(1, "Host de-WEP failed, dropping frame (%d).\n", foo); + pr_debug("Host de-WEP failed, dropping frame (%d).\n", foo); wlandev->rx.decrypt_err++; return 2; } @@ -352,7 +352,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb ( e_llc->dsap != 0xaa || e_llc->ssap != 0xaa ) && ((memcmp(daddr, e_hdr->daddr, WLAN_ETHADDR_LEN) == 0) || (memcmp(saddr, e_hdr->saddr, WLAN_ETHADDR_LEN) == 0))) { - WLAN_LOG_DEBUG(3, "802.3 ENCAP len: %d\n", payload_length); + pr_debug("802.3 ENCAP len: %d\n", payload_length); /* 802.3 Encapsulated */ /* Test for an overlength frame */ if ( payload_length > (netdev->mtu + WLAN_ETHHDR_LEN)) { @@ -377,7 +377,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb (p80211_stt_findproto(le16_to_cpu(e_snap->type)))) || (memcmp( e_snap->oui, oui_rfc1042, WLAN_IEEE_OUI_LEN)!=0))) { - WLAN_LOG_DEBUG(3, "SNAP+RFC1042 len: %d\n", payload_length); + pr_debug("SNAP+RFC1042 len: %d\n", payload_length); /* it's a SNAP + RFC1042 frame && protocol is in STT */ /* build 802.3 + RFC1042 */ @@ -406,7 +406,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb (e_llc->dsap == 0xaa) && (e_llc->ssap == 0xaa) && (e_llc->ctl == 0x03) ) { - WLAN_LOG_DEBUG(3, "802.1h/RFC1042 len: %d\n", payload_length); + pr_debug("802.1h/RFC1042 len: %d\n", payload_length); /* it's an 802.1h frame || (an RFC1042 && protocol is not in STT) */ /* build a DIXII + RFC894 */ @@ -440,7 +440,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb /* chop off the 802.11 CRC */ skb_trim(skb, skb->len - WLAN_CRC_LEN); } else { - WLAN_LOG_DEBUG(3, "NON-ENCAP len: %d\n", payload_length); + pr_debug("NON-ENCAP len: %d\n", payload_length); /* any NON-ENCAP */ /* it's a generic 80211+LLC or IPX 'Raw 802.3' */ /* build an 802.3 frame */ @@ -546,17 +546,17 @@ p80211skb_rxmeta_detach(struct sk_buff *skb) /* Sanity checks */ if ( skb==NULL ) { /* bad skb */ - WLAN_LOG_DEBUG(1, "Called w/ null skb.\n"); + pr_debug("Called w/ null skb.\n"); goto exit; } frmmeta = P80211SKB_FRMMETA(skb); if ( frmmeta == NULL ) { /* no magic */ - WLAN_LOG_DEBUG(1, "Called w/ bad frmmeta magic.\n"); + pr_debug("Called w/ bad frmmeta magic.\n"); goto exit; } rxmeta = frmmeta->rx; if ( rxmeta == NULL ) { /* bad meta ptr */ - WLAN_LOG_DEBUG(1, "Called w/ bad rxmeta ptr.\n"); + pr_debug("Called w/ bad rxmeta ptr.\n"); goto exit; } diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c index 4f314b94f694..c3303a22deb7 100644 --- a/drivers/staging/wlan-ng/p80211netdev.c +++ b/drivers/staging/wlan-ng/p80211netdev.c @@ -344,7 +344,7 @@ static void p80211netdev_rx_bh(unsigned long arg) netif_rx_ni(skb); continue; } - WLAN_LOG_DEBUG(1, "p80211_to_ether failed.\n"); + pr_debug( "p80211_to_ether failed.\n"); } } dev_kfree_skb(skb); @@ -392,7 +392,7 @@ static int p80211knetdev_hard_start_xmit( struct sk_buff *skb, netdevice_t *netd memset(&p80211_wep, 0, sizeof(p80211_metawep_t)); if ( netif_queue_stopped(netdev) ) { - WLAN_LOG_DEBUG(1, "called when queue stopped.\n"); + pr_debug("called when queue stopped.\n"); result = 1; goto failed; } @@ -433,7 +433,7 @@ static int p80211knetdev_hard_start_xmit( struct sk_buff *skb, netdevice_t *netd } else { if ( skb_ether_to_p80211(wlandev, wlandev->ethconv, skb, &p80211_hdr, &p80211_wep) != 0 ) { /* convert failed */ - WLAN_LOG_DEBUG(1, "ether_to_80211(%d) failed.\n", + pr_debug("ether_to_80211(%d) failed.\n", wlandev->ethconv); result = 1; goto failed; @@ -459,17 +459,17 @@ static int p80211knetdev_hard_start_xmit( struct sk_buff *skb, netdevice_t *netd result = 0; } else if ( txresult == 1 ) { /* success, no more avail */ - WLAN_LOG_DEBUG(3, "txframe success, no more bufs\n"); + pr_debug("txframe success, no more bufs\n"); /* netdev->tbusy = 1; don't set here, irqhdlr */ /* may have already cleared it */ result = 0; } else if ( txresult == 2 ) { /* alloc failure, drop frame */ - WLAN_LOG_DEBUG(3, "txframe returned alloc_fail\n"); + pr_debug("txframe returned alloc_fail\n"); result = 1; } else { /* buffer full or queue busy, drop frame. */ - WLAN_LOG_DEBUG(3, "txframe returned full or busy\n"); + pr_debug("txframe returned full or busy\n"); result = 1; } @@ -593,7 +593,7 @@ static int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd) wlandevice_t *wlandev = dev->ml_priv; u8 *msgbuf; - WLAN_LOG_DEBUG(2, "rx'd ioctl, cmd=%d, len=%d\n", cmd, req->len); + pr_debug("rx'd ioctl, cmd=%d, len=%d\n", cmd, req->len); #ifdef SIOCETHTOOL if (cmd == SIOCETHTOOL) { @@ -992,7 +992,7 @@ static int p80211_rx_typedrop( wlandevice_t *wlandev, u16 fc) ftype = WLAN_GET_FC_FTYPE(fc); fstype = WLAN_GET_FC_FSTYPE(fc); #if 0 - WLAN_LOG_DEBUG(4, + pr_debug( "rx_typedrop : ftype=%d fstype=%d.\n", ftype, fstype); #endif switch ( ftype ) { @@ -1002,7 +1002,7 @@ static int p80211_rx_typedrop( wlandevice_t *wlandev, u16 fc) drop = 1; break; } - WLAN_LOG_DEBUG(3, "rx'd mgmt:\n"); + pr_debug("rx'd mgmt:\n"); wlandev->rx.mgmt++; switch( fstype ) { case WLAN_FSTYPE_ASSOCREQ: @@ -1064,7 +1064,7 @@ static int p80211_rx_typedrop( wlandevice_t *wlandev, u16 fc) drop = 1; break; } - WLAN_LOG_DEBUG(3, "rx'd ctl:\n"); + pr_debug("rx'd ctl:\n"); wlandev->rx.ctl++; switch( fstype ) { case WLAN_FSTYPE_PSPOLL: @@ -1116,19 +1116,19 @@ static int p80211_rx_typedrop( wlandevice_t *wlandev, u16 fc) wlandev->rx.data__cfack_cfpoll++; break; case WLAN_FSTYPE_NULL: - WLAN_LOG_DEBUG(3, "rx'd data:null\n"); + pr_debug("rx'd data:null\n"); wlandev->rx.null++; break; case WLAN_FSTYPE_CFACK: - WLAN_LOG_DEBUG(3, "rx'd data:cfack\n"); + pr_debug("rx'd data:cfack\n"); wlandev->rx.cfack++; break; case WLAN_FSTYPE_CFPOLL: - WLAN_LOG_DEBUG(3, "rx'd data:cfpoll\n"); + pr_debug("rx'd data:cfpoll\n"); wlandev->rx.cfpoll++; break; case WLAN_FSTYPE_CFACK_CFPOLL: - WLAN_LOG_DEBUG(3, "rx'd data:cfack_cfpoll\n"); + pr_debug("rx'd data:cfack_cfpoll\n"); wlandev->rx.cfack_cfpoll++; break; default: diff --git a/drivers/staging/wlan-ng/p80211wext.c b/drivers/staging/wlan-ng/p80211wext.c index 4bd966e69488..9a638e2f9a94 100644 --- a/drivers/staging/wlan-ng/p80211wext.c +++ b/drivers/staging/wlan-ng/p80211wext.c @@ -740,9 +740,9 @@ static int p80211wext_siwessid(netdevice_t *dev, memcpy(msg.ssid.data.data, essid, length); msg.ssid.data.len = length; - WLAN_LOG_DEBUG(1,"autojoin_ssid for %s \n",essid); + pr_debug("autojoin_ssid for %s \n",essid); result = p80211req_dorequest(wlandev, (u8*)&msg); - WLAN_LOG_DEBUG(1,"autojoin_ssid %d\n",result); + pr_debug("autojoin_ssid %d\n",result); if (result) { err = -EFAULT; @@ -1331,12 +1331,12 @@ wext_translate_bss(struct iw_request_info *info, char *current_ev, size = min_t(unsigned short, IW_ESSID_MAX_SIZE, bss->ssid.data.len); memset(&essid, 0, sizeof (essid)); memcpy(&essid, bss->ssid.data.data, size); - WLAN_LOG_DEBUG(1, " essid size = %d\n", size); + pr_debug(" essid size = %d\n", size); iwe.u.data.length = size; iwe.u.data.flags = 1; iwe.cmd = SIOCGIWESSID; current_ev = iwe_stream_add_point(info, current_ev, end_buf, &iwe, &essid[0]); - WLAN_LOG_DEBUG(1, " essid size OK.\n"); + pr_debug(" essid size OK.\n"); } switch (bss->bsstype.data) { @@ -1441,7 +1441,7 @@ static int p80211wext_set_encodeext(struct net_device *dev, struct iw_point *encoding = &wrqu->encoding; int idx = encoding->flags & IW_ENCODE_INDEX; - WLAN_LOG_DEBUG(1,"set_encode_ext flags[%d] alg[%d] keylen[%d]\n",ext->ext_flags,(int)ext->alg,(int)ext->key_len); + pr_debug("set_encode_ext flags[%d] alg[%d] keylen[%d]\n",ext->ext_flags,(int)ext->alg,(int)ext->key_len); if ( ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY ) { @@ -1453,7 +1453,7 @@ static int p80211wext_set_encodeext(struct net_device *dev, } else idx--; } - WLAN_LOG_DEBUG(1,"setting default key (%d)\n",idx); + pr_debug("setting default key (%d)\n",idx); result = p80211wext_dorequest(wlandev, DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID, idx); if ( result ) return -EFAULT; @@ -1462,7 +1462,7 @@ static int p80211wext_set_encodeext(struct net_device *dev, if ( ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY ) { if (!(ext->alg & IW_ENCODE_ALG_WEP)) { - WLAN_LOG_DEBUG(1,"asked to set a non wep key :("); + pr_debug("asked to set a non wep key :("); return -EINVAL; } if (idx) { @@ -1471,7 +1471,7 @@ static int p80211wext_set_encodeext(struct net_device *dev, else idx--; } - WLAN_LOG_DEBUG(1,"Set WEP key (%d)\n",idx); + pr_debug("Set WEP key (%d)\n",idx); wlandev->wep_keylens[idx] = ext->key_len; memcpy(wlandev->wep_keys[idx], ext->key, ext->key_len); @@ -1497,7 +1497,7 @@ static int p80211wext_set_encodeext(struct net_device *dev, } msg.msgcode = DIDmsg_dot11req_mibset; result = p80211req_dorequest(wlandev,(u8*)&msg); - WLAN_LOG_DEBUG(1,"result (%d)\n",result); + pr_debug("result (%d)\n",result); } return result; } @@ -1516,22 +1516,22 @@ static int p80211wext_get_encodeext(struct net_device *dev, int max_len; int idx; - WLAN_LOG_DEBUG(1,"get_encode_ext flags[%d] alg[%d] keylen[%d]\n",ext->ext_flags,(int)ext->alg,(int)ext->key_len); + pr_debug("get_encode_ext flags[%d] alg[%d] keylen[%d]\n",ext->ext_flags,(int)ext->alg,(int)ext->key_len); max_len = encoding->length - sizeof(*ext); if ( max_len <= 0) { - WLAN_LOG_DEBUG(1,"get_encodeext max_len [%d] invalid\n",max_len); + pr_debug("get_encodeext max_len [%d] invalid\n",max_len); result = -EINVAL; goto exit; } idx = encoding->flags & IW_ENCODE_INDEX; - WLAN_LOG_DEBUG(1,"get_encode_ext index [%d]\n",idx); + pr_debug("get_encode_ext index [%d]\n",idx); if (idx) { if (idx < 1 || idx > NUM_WEPKEYS ) { - WLAN_LOG_DEBUG(1,"get_encode_ext invalid key index [%d]\n",idx); + pr_debug("get_encode_ext invalid key index [%d]\n",idx); result = -EINVAL; goto exit; } @@ -1563,11 +1563,11 @@ static int p80211_wext_set_iwauth (struct net_device *dev, struct iw_param *param = &wrqu->param; int result =0; - WLAN_LOG_DEBUG(1,"set_iwauth flags[%d]\n",(int)param->flags & IW_AUTH_INDEX ); + pr_debug("set_iwauth flags[%d]\n",(int)param->flags & IW_AUTH_INDEX ); switch (param->flags & IW_AUTH_INDEX) { case IW_AUTH_DROP_UNENCRYPTED: - WLAN_LOG_DEBUG(1,"drop_unencrypted %d\n",param->value); + pr_debug("drop_unencrypted %d\n",param->value); if (param->value) result = p80211wext_dorequest(wlandev, DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted, P80211ENUM_truth_true); else @@ -1575,7 +1575,7 @@ static int p80211_wext_set_iwauth (struct net_device *dev, break; case IW_AUTH_PRIVACY_INVOKED: - WLAN_LOG_DEBUG(1,"privacy invoked %d\n",param->value); + pr_debug("privacy invoked %d\n",param->value); if ( param->value) result = p80211wext_dorequest(wlandev, DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked, P80211ENUM_truth_true); else @@ -1585,14 +1585,14 @@ static int p80211_wext_set_iwauth (struct net_device *dev, case IW_AUTH_80211_AUTH_ALG: if ( param->value & IW_AUTH_ALG_OPEN_SYSTEM ) { - WLAN_LOG_DEBUG(1,"set open_system\n"); + pr_debug("set open_system\n"); wlandev->hostwep &= ~HOSTWEP_SHAREDKEY; } else if ( param->value & IW_AUTH_ALG_SHARED_KEY) { - WLAN_LOG_DEBUG(1,"set shared key\n"); + pr_debug("set shared key\n"); wlandev->hostwep |= HOSTWEP_SHAREDKEY; } else { /* don't know what to do know :( */ - WLAN_LOG_DEBUG(1,"unknown AUTH_ALG (%d)\n",param->value); + pr_debug("unknown AUTH_ALG (%d)\n",param->value); result = -EINVAL; } break; @@ -1615,7 +1615,7 @@ static int p80211_wext_get_iwauth (struct net_device *dev, struct iw_param *param = &wrqu->param; int result =0; - WLAN_LOG_DEBUG(1,"get_iwauth flags[%d]\n",(int)param->flags & IW_AUTH_INDEX ); + pr_debug("get_iwauth flags[%d]\n",(int)param->flags & IW_AUTH_INDEX ); switch (param->flags & IW_AUTH_INDEX) { case IW_AUTH_DROP_UNENCRYPTED: diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c index 12055226d2c4..953142ae9296 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.c +++ b/drivers/staging/wlan-ng/prism2mgmt.c @@ -284,8 +284,6 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp) /* Issue the scan request */ hw->scanflag = 0; - WLAN_HEX_DUMP(5,"hscanreq", &scanreq, sizeof(scanreq)); - result = hfa384x_drvr_setconfig( hw, HFA384x_RID_HOSTSCAN, &scanreq, sizeof(hfa384x_HostScanRequest_data_t)); @@ -385,7 +383,7 @@ int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp) if (count > 32) count = 32; if (req->bssindex.data >= count) { - WLAN_LOG_DEBUG(0, "requested index (%d) out of range (%d)\n", + pr_debug("requested index (%d) out of range (%d)\n", req->bssindex.data, count); result = 2; req->resultcode.data = P80211ENUM_resultcode_invalid_parameters; @@ -667,7 +665,7 @@ int prism2mgmt_start(wlandevice_t *wlandev, void *msgp) goto done; failed: - WLAN_LOG_DEBUG(1, "Failed to set a config option, result=%d\n", result); + pr_debug("Failed to set a config option, result=%d\n", result); msg->resultcode.data = P80211ENUM_resultcode_invalid_parameters; done: @@ -1108,7 +1106,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) /* Disable monitor mode */ result = hfa384x_cmd_monitor(hw, HFA384x_MONITOR_DISABLE); if ( result ) { - WLAN_LOG_DEBUG(1, + pr_debug( "failed to disable monitor mode, result=%d\n", result); goto failed; @@ -1116,7 +1114,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) /* Disable port 0 */ result = hfa384x_drvr_disable(hw, 0); if ( result ) { - WLAN_LOG_DEBUG(1, + pr_debug( "failed to disable port 0 after sniffing, result=%d\n", result); goto failed; @@ -1129,7 +1127,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) HFA384x_RID_CNFWEPFLAGS, hw->presniff_wepflags); if ( result ) { - WLAN_LOG_DEBUG(1, + pr_debug( "failed to restore wepflags=0x%04x, result=%d\n", hw->presniff_wepflags, result); @@ -1142,7 +1140,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_CNFPORTTYPE, word); if ( result ) { - WLAN_LOG_DEBUG(1, + pr_debug( "failed to restore porttype, result=%d\n", result); goto failed; @@ -1151,7 +1149,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) /* Enable the port */ result = hfa384x_drvr_enable(hw, 0); if ( result ) { - WLAN_LOG_DEBUG(1, "failed to enable port to presniff setting, result=%d\n", result); + pr_debug("failed to enable port to presniff setting, result=%d\n", result); goto failed; } } else { @@ -1173,7 +1171,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) HFA384x_RID_CNFPORTTYPE, &(hw->presniff_port_type)); if ( result ) { - WLAN_LOG_DEBUG(1,"failed to read porttype, result=%d\n", result); + pr_debug("failed to read porttype, result=%d\n", result); goto failed; } /* Save the wepflags state */ @@ -1181,13 +1179,13 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) HFA384x_RID_CNFWEPFLAGS, &(hw->presniff_wepflags)); if ( result ) { - WLAN_LOG_DEBUG(1,"failed to read wepflags, result=%d\n", result); + pr_debug("failed to read wepflags, result=%d\n", result); goto failed; } hfa384x_drvr_stop(hw); result = hfa384x_drvr_start(hw); if ( result ) { - WLAN_LOG_DEBUG(1, + pr_debug( "failed to restart the card for sniffing, result=%d\n", result); goto failed; @@ -1196,7 +1194,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) /* Disable the port */ result = hfa384x_drvr_disable(hw, 0); if ( result ) { - WLAN_LOG_DEBUG(1, + pr_debug( "failed to enable port for sniffing, result=%d\n", result); goto failed; @@ -1213,7 +1211,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) hw->sniff_channel=word; if ( result ) { - WLAN_LOG_DEBUG(1, + pr_debug( "failed to set channel %d, result=%d\n", word, result); @@ -1227,7 +1225,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_CNFPORTTYPE, word); if ( result ) { - WLAN_LOG_DEBUG(1, + pr_debug( "failed to set porttype %d, result=%d\n", word, result); @@ -1241,7 +1239,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) } if ( result ) { - WLAN_LOG_DEBUG(1, + pr_debug( "failed to set wepflags=0x%04x, result=%d\n", word, result); @@ -1266,7 +1264,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) /* Enable the port */ result = hfa384x_drvr_enable(hw, 0); if ( result ) { - WLAN_LOG_DEBUG(1, + pr_debug( "failed to enable port for sniffing, result=%d\n", result); goto failed; @@ -1274,7 +1272,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) /* Enable monitor mode */ result = hfa384x_cmd_monitor(hw, HFA384x_MONITOR_ENABLE); if ( result ) { - WLAN_LOG_DEBUG(1, + pr_debug( "failed to enable monitor mode, result=%d\n", result); goto failed; diff --git a/drivers/staging/wlan-ng/prism2mib.c b/drivers/staging/wlan-ng/prism2mib.c index 438c2c298912..8d89268b78c9 100644 --- a/drivers/staging/wlan-ng/prism2mib.c +++ b/drivers/staging/wlan-ng/prism2mib.c @@ -366,7 +366,7 @@ int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp) if (msg->resultcode.data == P80211ENUM_resultcode_success) { if (result != 0) { - WLAN_LOG_DEBUG(1, "get/set failure, result=%d\n", + pr_debug("get/set failure, result=%d\n", result); msg->resultcode.data = P80211ENUM_resultcode_implementation_failure; @@ -1067,7 +1067,7 @@ void prism2mgmt_set_oprateset(u16 *rate, p80211pstrd_t *pstr) *rate |= BIT(3); break; default: - WLAN_LOG_DEBUG(1, "Unrecoginzed Rate of %d\n", + pr_debug("Unrecoginzed Rate of %d\n", *datarate); break; } diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index eb29a0a19393..95bca22cf11d 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -65,6 +65,7 @@ #include #include #include +#include #include #include @@ -342,46 +343,46 @@ static int prism2sta_mlmerequest(wlandevice_t *wlandev, p80211msg_t *msg) switch( msg->msgcode ) { case DIDmsg_dot11req_mibget : - WLAN_LOG_DEBUG(2,"Received mibget request\n"); + pr_debug("Received mibget request\n"); result = prism2mgmt_mibset_mibget(wlandev, msg); break; case DIDmsg_dot11req_mibset : - WLAN_LOG_DEBUG(2,"Received mibset request\n"); + pr_debug("Received mibset request\n"); result = prism2mgmt_mibset_mibget(wlandev, msg); break; case DIDmsg_dot11req_scan : - WLAN_LOG_DEBUG(2,"Received scan request\n"); + pr_debug("Received scan request\n"); result = prism2mgmt_scan(wlandev, msg); break; case DIDmsg_dot11req_scan_results : - WLAN_LOG_DEBUG(2,"Received scan_results request\n"); + pr_debug("Received scan_results request\n"); result = prism2mgmt_scan_results(wlandev, msg); break; case DIDmsg_dot11req_start : - WLAN_LOG_DEBUG(2,"Received mlme start request\n"); + pr_debug("Received mlme start request\n"); result = prism2mgmt_start(wlandev, msg); break; /* * Prism2 specific messages */ case DIDmsg_p2req_readpda : - WLAN_LOG_DEBUG(2,"Received mlme readpda request\n"); + pr_debug("Received mlme readpda request\n"); result = prism2mgmt_readpda(wlandev, msg); break; case DIDmsg_p2req_ramdl_state : - WLAN_LOG_DEBUG(2,"Received mlme ramdl_state request\n"); + pr_debug("Received mlme ramdl_state request\n"); result = prism2mgmt_ramdl_state(wlandev, msg); break; case DIDmsg_p2req_ramdl_write : - WLAN_LOG_DEBUG(2,"Received mlme ramdl_write request\n"); + pr_debug("Received mlme ramdl_write request\n"); result = prism2mgmt_ramdl_write(wlandev, msg); break; case DIDmsg_p2req_flashdl_state : - WLAN_LOG_DEBUG(2,"Received mlme flashdl_state request\n"); + pr_debug("Received mlme flashdl_state request\n"); result = prism2mgmt_flashdl_state(wlandev, msg); break; case DIDmsg_p2req_flashdl_write : - WLAN_LOG_DEBUG(2,"Received mlme flashdl_write request\n"); + pr_debug("Received mlme flashdl_write request\n"); result = prism2mgmt_flashdl_write(wlandev, msg); break; /* @@ -392,7 +393,7 @@ static int prism2sta_mlmerequest(wlandevice_t *wlandev, p80211msg_t *msg) case DIDmsg_lnxreq_ifstate : { p80211msg_lnxreq_ifstate_t *ifstatemsg; - WLAN_LOG_DEBUG(2,"Received mlme ifstate request\n"); + pr_debug("Received mlme ifstate request\n"); ifstatemsg = (p80211msg_lnxreq_ifstate_t*)msg; result = prism2sta_ifstate(wlandev, ifstatemsg->ifstate.data); ifstatemsg->resultcode.status = @@ -402,17 +403,17 @@ static int prism2sta_mlmerequest(wlandevice_t *wlandev, p80211msg_t *msg) } break; case DIDmsg_lnxreq_wlansniff : - WLAN_LOG_DEBUG(2,"Received mlme wlansniff request\n"); + pr_debug("Received mlme wlansniff request\n"); result = prism2mgmt_wlansniff(wlandev, msg); break; case DIDmsg_lnxreq_autojoin : - WLAN_LOG_DEBUG(2,"Received mlme autojoin request\n"); + pr_debug("Received mlme autojoin request\n"); result = prism2mgmt_autojoin(wlandev, msg); break; case DIDmsg_lnxreq_commsquality: { p80211msg_lnxreq_commsquality_t *qualmsg; - WLAN_LOG_DEBUG(2,"Received commsquality request\n"); + pr_debug("Received commsquality request\n"); qualmsg = (p80211msg_lnxreq_commsquality_t*) msg; @@ -464,7 +465,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate) result = P80211ENUM_resultcode_implementation_failure; - WLAN_LOG_DEBUG(2, "Current MSD state(%d), requesting(%d)\n", + pr_debug("Current MSD state(%d), requesting(%d)\n", wlandev->msdstate, ifstate); switch (ifstate) { @@ -1002,7 +1003,7 @@ static int prism2sta_setmulticast(wlandevice_t *wlandev, netdevice_t *dev) ----------------------------------------------------------------*/ static void prism2sta_inf_handover(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf) { - WLAN_LOG_DEBUG(2,"received infoframe:HANDOVER (unhandled)\n"); + pr_debug("received infoframe:HANDOVER (unhandled)\n"); return; } @@ -1089,15 +1090,15 @@ static void prism2sta_inf_scanresults(wlandevice_t *wlandev, nbss /= sizeof(hfa384x_ScanResultSub_t); /* Print em */ - WLAN_LOG_DEBUG(1,"rx scanresults, reason=%d, nbss=%d:\n", + pr_debug("rx scanresults, reason=%d, nbss=%d:\n", inf->info.scanresult.scanreason, nbss); for ( i = 0; i < nbss; i++) { - WLAN_LOG_DEBUG(1, "chid=%d anl=%d sl=%d bcnint=%d\n", + pr_debug("chid=%d anl=%d sl=%d bcnint=%d\n", sr->result[i].chid, sr->result[i].anl, sr->result[i].sl, sr->result[i].bcnint); - WLAN_LOG_DEBUG(1, " capinfo=0x%04x proberesp_rate=%d\n", + pr_debug(" capinfo=0x%04x proberesp_rate=%d\n", sr->result[i].capinfo, sr->result[i].proberesp_rate); } @@ -1138,7 +1139,7 @@ static void prism2sta_inf_hostscanresults(wlandevice_t *wlandev, int nbss; nbss = (inf->framelen - 3) / 32; - WLAN_LOG_DEBUG(1, "Received %d hostscan results\n", nbss); + pr_debug("Received %d hostscan results\n", nbss); if (nbss > 32) nbss = 32; @@ -1191,7 +1192,7 @@ static void prism2sta_inf_chinforesults(wlandevice_t *wlandev, chinforesult->anl = hfa384x2host_16(inf->info.chinforesult.result[n].anl); chinforesult->pnl = hfa384x2host_16(inf->info.chinforesult.result[n].pnl); chinforesult->active = hfa384x2host_16(inf->info.chinforesult.result[n].active); - WLAN_LOG_DEBUG(2, "chinfo: channel %d, %s level (avg/peak)=%d/%d dB, pcf %d\n", + pr_debug("chinfo: channel %d, %s level (avg/peak)=%d/%d dB, pcf %d\n", channel+1, chinforesult->active & HFA384x_CHINFORESULT_BSSACTIVE ? "signal" : "noise", @@ -1276,7 +1277,7 @@ void prism2sta_processing_defer(struct work_struct *data) HFA384x_RID_CURRENTBSSID, wlandev->bssid, WLAN_BSSID_LEN); if ( result ) { - WLAN_LOG_DEBUG(1, + pr_debug( "getconfig(0x%02x) failed, result = %d\n", HFA384x_RID_CURRENTBSSID, result); goto failed; @@ -1286,7 +1287,7 @@ void prism2sta_processing_defer(struct work_struct *data) HFA384x_RID_CURRENTSSID, &ssid, sizeof(ssid)); if ( result ) { - WLAN_LOG_DEBUG(1, + pr_debug( "getconfig(0x%02x) failed, result = %d\n", HFA384x_RID_CURRENTSSID, result); goto failed; @@ -1298,7 +1299,7 @@ void prism2sta_processing_defer(struct work_struct *data) result = hfa384x_drvr_getconfig16(hw, HFA384x_RID_PORTSTATUS, &portstatus); if ( result ) { - WLAN_LOG_DEBUG(1, + pr_debug( "getconfig(0x%02x) failed, result = %d\n", HFA384x_RID_PORTSTATUS, result); goto failed; @@ -1362,7 +1363,7 @@ void prism2sta_processing_defer(struct work_struct *data) HFA384x_RID_CURRENTBSSID, wlandev->bssid, WLAN_BSSID_LEN); if ( result ) { - WLAN_LOG_DEBUG(1, + pr_debug( "getconfig(0x%02x) failed, result = %d\n", HFA384x_RID_CURRENTBSSID, result); goto failed; @@ -1372,7 +1373,7 @@ void prism2sta_processing_defer(struct work_struct *data) HFA384x_RID_CURRENTSSID, &ssid, sizeof(ssid)); if ( result ) { - WLAN_LOG_DEBUG(1, + pr_debug( "getconfig(0x%02x) failed, result = %d\n", HFA384x_RID_CURRENTSSID, result); goto failed; @@ -1852,7 +1853,7 @@ void prism2sta_ev_info(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf) ----------------------------------------------------------------*/ void prism2sta_ev_txexc(wlandevice_t *wlandev, u16 status) { - WLAN_LOG_DEBUG(3, "TxExc status=0x%x.\n", status); + pr_debug("TxExc status=0x%x.\n", status); return; } @@ -1876,7 +1877,7 @@ void prism2sta_ev_txexc(wlandevice_t *wlandev, u16 status) ----------------------------------------------------------------*/ void prism2sta_ev_tx(wlandevice_t *wlandev, u16 status) { - WLAN_LOG_DEBUG(4, "Tx Complete, status=0x%04x\n", status); + pr_debug("Tx Complete, status=0x%04x\n", status); /* update linux network stats */ wlandev->linux_stats.tx_packets++; return; @@ -2018,7 +2019,7 @@ void prism2sta_commsqual_defer(struct work_struct *data) // ASL_currBSS; // level // qual.ANL_currFC; // noise - WLAN_LOG_DEBUG(3, "commsqual %d %d %d\n", + pr_debug("commsqual %d %d %d\n", hfa384x2host_16(hw->qual.CQ_currBSS), hfa384x2host_16(hw->qual.ASL_currBSS), hfa384x2host_16(hw->qual.ANL_currFC)); @@ -2029,7 +2030,7 @@ void prism2sta_commsqual_defer(struct work_struct *data) HFA384x_RID_CURRENTBSSID, wlandev->bssid, WLAN_BSSID_LEN); if ( result ) { - WLAN_LOG_DEBUG(1, + pr_debug( "getconfig(0x%02x) failed, result = %d\n", HFA384x_RID_CURRENTBSSID, result); goto done; @@ -2039,7 +2040,7 @@ void prism2sta_commsqual_defer(struct work_struct *data) HFA384x_RID_CURRENTSSID, &ssid, sizeof(ssid)); if ( result ) { - WLAN_LOG_DEBUG(1, + pr_debug( "getconfig(0x%02x) failed, result = %d\n", HFA384x_RID_CURRENTSSID, result); goto done; diff --git a/drivers/staging/wlan-ng/wlan_compat.h b/drivers/staging/wlan-ng/wlan_compat.h index a7673fc00189..9867bc496cd3 100644 --- a/drivers/staging/wlan-ng/wlan_compat.h +++ b/drivers/staging/wlan-ng/wlan_compat.h @@ -48,20 +48,4 @@ #ifndef _WLAN_COMPAT_H #define _WLAN_COMPAT_H -/*=============================================================*/ -/*------ OS Portability Macros --------------------------------*/ -/*=============================================================*/ - - -#include -#include - -#define WLAN_HEX_DUMP( l, s, p, n) - -#define WLAN_LOG_DEBUG(l, s, args...) - -/*=============================================================*/ -/*--- Variables -----------------------------------------------*/ -/*=============================================================*/ - #endif /* _WLAN_COMPAT_H */ -- cgit v1.2.3-59-g8ed1b From 465e7417b15348909606c3edce5f018818235a54 Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Mon, 9 Feb 2009 19:33:44 +0100 Subject: Staging: wlan-ng: Remove the now empty wlan_compat.h Signed-off-by: Moritz Muehlenhoff Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/hfa384x_usb.c | 2 -- drivers/staging/wlan-ng/p80211conv.c | 2 -- drivers/staging/wlan-ng/p80211hdr.h | 3 -- drivers/staging/wlan-ng/p80211meta.h | 3 -- drivers/staging/wlan-ng/p80211mgmt.h | 3 -- drivers/staging/wlan-ng/p80211msg.h | 3 -- drivers/staging/wlan-ng/p80211netdev.c | 1 - drivers/staging/wlan-ng/p80211req.c | 2 -- drivers/staging/wlan-ng/p80211types.h | 3 -- drivers/staging/wlan-ng/p80211wep.c | 2 -- drivers/staging/wlan-ng/p80211wext.c | 2 -- drivers/staging/wlan-ng/prism2mgmt.c | 2 -- drivers/staging/wlan-ng/prism2sta.c | 2 -- drivers/staging/wlan-ng/wlan_compat.h | 51 ---------------------------------- 14 files changed, 81 deletions(-) delete mode 100644 drivers/staging/wlan-ng/wlan_compat.h (limited to 'drivers/staging/wlan-ng/wlan_compat.h') diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index dd1e1d949969..b986a6f817a2 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -128,8 +128,6 @@ #include #include -#include "wlan_compat.h" - #define SUBMIT_URB(u,f) usb_submit_urb(u,f) /*================================================================*/ diff --git a/drivers/staging/wlan-ng/p80211conv.c b/drivers/staging/wlan-ng/p80211conv.c index 123cb9a2b31d..2abce0c34444 100644 --- a/drivers/staging/wlan-ng/p80211conv.c +++ b/drivers/staging/wlan-ng/p80211conv.c @@ -65,8 +65,6 @@ #include -#include "wlan_compat.h" - #include "p80211types.h" #include "p80211hdr.h" #include "p80211conv.h" diff --git a/drivers/staging/wlan-ng/p80211hdr.h b/drivers/staging/wlan-ng/p80211hdr.h index bf4737f66f10..ded477517690 100644 --- a/drivers/staging/wlan-ng/p80211hdr.h +++ b/drivers/staging/wlan-ng/p80211hdr.h @@ -68,9 +68,6 @@ /*================================================================*/ /* Project Includes */ -#ifndef _WLAN_COMPAT_H -#include "wlan_compat.h" -#endif /*================================================================*/ diff --git a/drivers/staging/wlan-ng/p80211meta.h b/drivers/staging/wlan-ng/p80211meta.h index 9cd36dcc2de4..2f3c9fc3358c 100644 --- a/drivers/staging/wlan-ng/p80211meta.h +++ b/drivers/staging/wlan-ng/p80211meta.h @@ -60,9 +60,6 @@ /*================================================================*/ /* Project Includes */ -#ifndef _WLAN_COMPAT_H -#include "wlan_compat.h" -#endif /*================================================================*/ /* Types */ diff --git a/drivers/staging/wlan-ng/p80211mgmt.h b/drivers/staging/wlan-ng/p80211mgmt.h index da2de78ac3c3..6235fe7f235c 100644 --- a/drivers/staging/wlan-ng/p80211mgmt.h +++ b/drivers/staging/wlan-ng/p80211mgmt.h @@ -103,9 +103,6 @@ /*================================================================*/ /* Project Includes */ -#ifndef _WLAN_COMPAT_H -#include "wlan_compat.h" -#endif #ifndef _P80211HDR_H #include "p80211hdr.h" diff --git a/drivers/staging/wlan-ng/p80211msg.h b/drivers/staging/wlan-ng/p80211msg.h index 42eb4c6f6cdd..f15a5d921f3c 100644 --- a/drivers/staging/wlan-ng/p80211msg.h +++ b/drivers/staging/wlan-ng/p80211msg.h @@ -51,9 +51,6 @@ /*================================================================*/ /* Project Includes */ -#ifndef _WLAN_COMPAT_H -#include "wlan_compat.h" -#endif #define WLAN_DEVNAMELEN_MAX 16 diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c index 0fc71710dd43..50fa8d6d6576 100644 --- a/drivers/staging/wlan-ng/p80211netdev.c +++ b/drivers/staging/wlan-ng/p80211netdev.c @@ -80,7 +80,6 @@ /*================================================================*/ /* Project Includes */ -#include "wlan_compat.h" #include "p80211types.h" #include "p80211hdr.h" #include "p80211conv.h" diff --git a/drivers/staging/wlan-ng/p80211req.c b/drivers/staging/wlan-ng/p80211req.c index fac235f6e519..15ecba6e4693 100644 --- a/drivers/staging/wlan-ng/p80211req.c +++ b/drivers/staging/wlan-ng/p80211req.c @@ -62,8 +62,6 @@ #include #include -#include "wlan_compat.h" - #include "p80211types.h" #include "p80211hdr.h" #include "p80211mgmt.h" diff --git a/drivers/staging/wlan-ng/p80211types.h b/drivers/staging/wlan-ng/p80211types.h index f35ff3041b9c..a22437ceddca 100644 --- a/drivers/staging/wlan-ng/p80211types.h +++ b/drivers/staging/wlan-ng/p80211types.h @@ -61,9 +61,6 @@ /* Project Includes */ /*================================================================*/ -#ifndef _WLAN_COMPAT_H -#include "wlan_compat.h" -#endif /*----------------------------------------------------------------*/ /* The following constants are indexes into the Mib Category List */ diff --git a/drivers/staging/wlan-ng/p80211wep.c b/drivers/staging/wlan-ng/p80211wep.c index 51f3af84f9cb..405ce89e4e6e 100644 --- a/drivers/staging/wlan-ng/p80211wep.c +++ b/drivers/staging/wlan-ng/p80211wep.c @@ -57,8 +57,6 @@ #include #include -#include "wlan_compat.h" - // #define WEP_DEBUG /*================================================================*/ diff --git a/drivers/staging/wlan-ng/p80211wext.c b/drivers/staging/wlan-ng/p80211wext.c index 2d35093ba63b..96078b0ea6aa 100644 --- a/drivers/staging/wlan-ng/p80211wext.c +++ b/drivers/staging/wlan-ng/p80211wext.c @@ -57,8 +57,6 @@ /*================================================================*/ /* Project Includes */ -#include "wlan_compat.h" - #include "p80211types.h" #include "p80211hdr.h" #include "p80211conv.h" diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c index 8a36c09694da..7dce05de1531 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.c +++ b/drivers/staging/wlan-ng/prism2mgmt.c @@ -73,8 +73,6 @@ #include #include -#include "wlan_compat.h" - /*================================================================*/ /* Project Includes */ diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index c3ab31ef703a..fcafed975aa2 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -71,8 +71,6 @@ #include #include -#include "wlan_compat.h" - /*================================================================*/ /* Project Includes */ diff --git a/drivers/staging/wlan-ng/wlan_compat.h b/drivers/staging/wlan-ng/wlan_compat.h deleted file mode 100644 index 9867bc496cd3..000000000000 --- a/drivers/staging/wlan-ng/wlan_compat.h +++ /dev/null @@ -1,51 +0,0 @@ -/* wlan_compat.h -* -* Types and macros to aid in portability -* -* Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved. -* -------------------------------------------------------------------- -* -* linux-wlan -* -* The contents of this file are subject to the Mozilla Public -* License Version 1.1 (the "License"); you may not use this file -* except in compliance with the License. You may obtain a copy of -* the License at http://www.mozilla.org/MPL/ -* -* Software distributed under the License is distributed on an "AS -* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -* implied. See the License for the specific language governing -* rights and limitations under the License. -* -* Alternatively, the contents of this file may be used under the -* terms of the GNU Public License version 2 (the "GPL"), in which -* case the provisions of the GPL are applicable instead of the -* above. If you wish to allow the use of your version of this file -* only under the terms of the GPL and not to allow others to use -* your version of this file under the MPL, indicate your decision -* by deleting the provisions above and replace them with the notice -* and other provisions required by the GPL. If you do not delete -* the provisions above, a recipient may use your version of this -* file under either the MPL or the GPL. -* -* -------------------------------------------------------------------- -* -* Inquiries regarding the linux-wlan Open Source project can be -* made directly to: -* -* AbsoluteValue Systems Inc. -* info@linux-wlan.com -* http://www.linux-wlan.com -* -* -------------------------------------------------------------------- -* -* Portions of the development of this software were funded by -* Intersil Corporation as part of PRISM(R) chipset product development. -* -* -------------------------------------------------------------------- -*/ - -#ifndef _WLAN_COMPAT_H -#define _WLAN_COMPAT_H - -#endif /* _WLAN_COMPAT_H */ -- cgit v1.2.3-59-g8ed1b