staging: wlan-ng: scripts/checkpatch.pl error fixes.

scripts/checkpatch.pl error fixes. This is a TODO item.
This patch fixes most of the errors reported by checkpatch.pl in
wlan-ng directory of staging tree.

Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Mithlesh Thukral 2009-06-10 19:36:11 +05:30 коммит произвёл Greg Kroah-Hartman
Родитель 0984e56a65
Коммит 297f06cea6
11 изменённых файлов: 364 добавлений и 360 удалений

Просмотреть файл

@ -160,13 +160,13 @@ static void dbprint_urb(struct urb *urb);
#endif #endif
static void static void
hfa384x_int_rxmonitor(wlandevice_t * wlandev, hfa384x_usb_rxfrm_t * rxfrm); hfa384x_int_rxmonitor(wlandevice_t *wlandev, hfa384x_usb_rxfrm_t *rxfrm);
static void hfa384x_usb_defer(struct work_struct *data); static void hfa384x_usb_defer(struct work_struct *data);
static int submit_rx_urb(hfa384x_t * hw, gfp_t flags); static int submit_rx_urb(hfa384x_t *hw, gfp_t flags);
static int submit_tx_urb(hfa384x_t * hw, struct urb *tx_urb, gfp_t flags); static int submit_tx_urb(hfa384x_t *hw, struct urb *tx_urb, gfp_t flags);
/*---------------------------------------------------*/ /*---------------------------------------------------*/
/* Callbacks */ /* Callbacks */
@ -175,22 +175,22 @@ static void hfa384x_ctlxout_callback(struct urb *urb);
static void hfa384x_usbin_callback(struct urb *urb); static void hfa384x_usbin_callback(struct urb *urb);
static void static void
hfa384x_usbin_txcompl(wlandevice_t * wlandev, hfa384x_usbin_t * usbin); hfa384x_usbin_txcompl(wlandevice_t *wlandev, hfa384x_usbin_t * usbin);
static void hfa384x_usbin_rx(wlandevice_t * wlandev, struct sk_buff *skb); static void hfa384x_usbin_rx(wlandevice_t *wlandev, struct sk_buff *skb);
static void hfa384x_usbin_info(wlandevice_t * wlandev, hfa384x_usbin_t * usbin); static void hfa384x_usbin_info(wlandevice_t *wlandev, hfa384x_usbin_t * usbin);
static void static void
hfa384x_usbout_tx(wlandevice_t * wlandev, hfa384x_usbout_t * usbout); hfa384x_usbout_tx(wlandevice_t *wlandev, hfa384x_usbout_t *usbout);
static void hfa384x_usbin_ctlx(hfa384x_t * hw, hfa384x_usbin_t * usbin, static void hfa384x_usbin_ctlx(hfa384x_t *hw, hfa384x_usbin_t *usbin,
int urb_status); int urb_status);
/*---------------------------------------------------*/ /*---------------------------------------------------*/
/* Functions to support the prism2 usb command queue */ /* Functions to support the prism2 usb command queue */
static void hfa384x_usbctlxq_run(hfa384x_t * hw); static void hfa384x_usbctlxq_run(hfa384x_t *hw);
static void hfa384x_usbctlx_reqtimerfn(unsigned long data); static void hfa384x_usbctlx_reqtimerfn(unsigned long data);
@ -202,9 +202,9 @@ static void hfa384x_usbctlx_completion_task(unsigned long data);
static void hfa384x_usbctlx_reaper_task(unsigned long data); static void hfa384x_usbctlx_reaper_task(unsigned long data);
static int hfa384x_usbctlx_submit(hfa384x_t * hw, hfa384x_usbctlx_t * ctlx); static int hfa384x_usbctlx_submit(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx);
static void unlocked_usbctlx_complete(hfa384x_t * hw, hfa384x_usbctlx_t * ctlx); static void unlocked_usbctlx_complete(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx);
struct usbctlx_completor { struct usbctlx_completor {
int (*complete) (struct usbctlx_completor *); int (*complete) (struct usbctlx_completor *);
@ -212,35 +212,35 @@ struct usbctlx_completor {
typedef struct usbctlx_completor usbctlx_completor_t; typedef struct usbctlx_completor usbctlx_completor_t;
static int static int
hfa384x_usbctlx_complete_sync(hfa384x_t * hw, hfa384x_usbctlx_complete_sync(hfa384x_t *hw,
hfa384x_usbctlx_t * ctlx, hfa384x_usbctlx_t *ctlx,
usbctlx_completor_t * completor); usbctlx_completor_t *completor);
static int static int
unlocked_usbctlx_cancel_async(hfa384x_t * hw, hfa384x_usbctlx_t * ctlx); unlocked_usbctlx_cancel_async(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx);
static void hfa384x_cb_status(hfa384x_t * hw, const hfa384x_usbctlx_t * ctlx); static void hfa384x_cb_status(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx);
static void hfa384x_cb_rrid(hfa384x_t * hw, const hfa384x_usbctlx_t * ctlx); static void hfa384x_cb_rrid(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx);
static int static int
usbctlx_get_status(const hfa384x_usb_cmdresp_t * cmdresp, usbctlx_get_status(const hfa384x_usb_cmdresp_t *cmdresp,
hfa384x_cmdresult_t * result); hfa384x_cmdresult_t *result);
static void static void
usbctlx_get_rridresult(const hfa384x_usb_rridresp_t * rridresp, usbctlx_get_rridresult(const hfa384x_usb_rridresp_t *rridresp,
hfa384x_rridresult_t * result); hfa384x_rridresult_t *result);
/*---------------------------------------------------*/ /*---------------------------------------------------*/
/* Low level req/resp CTLX formatters and submitters */ /* Low level req/resp CTLX formatters and submitters */
static int static int
hfa384x_docmd(hfa384x_t * hw, hfa384x_docmd(hfa384x_t *hw,
CMD_MODE mode, CMD_MODE mode,
hfa384x_metacmd_t * cmd, hfa384x_metacmd_t *cmd,
ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data); ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data);
static int static int
hfa384x_dorrid(hfa384x_t * hw, hfa384x_dorrid(hfa384x_t *hw,
CMD_MODE mode, CMD_MODE mode,
u16 rid, u16 rid,
void *riddata, void *riddata,
@ -248,7 +248,7 @@ hfa384x_dorrid(hfa384x_t * hw,
ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data); ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data);
static int static int
hfa384x_dowrid(hfa384x_t * hw, hfa384x_dowrid(hfa384x_t *hw,
CMD_MODE mode, CMD_MODE mode,
u16 rid, u16 rid,
void *riddata, void *riddata,
@ -256,7 +256,7 @@ hfa384x_dowrid(hfa384x_t * hw,
ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data); ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data);
static int static int
hfa384x_dormem(hfa384x_t * hw, hfa384x_dormem(hfa384x_t *hw,
CMD_MODE mode, CMD_MODE mode,
u16 page, u16 page,
u16 offset, u16 offset,
@ -265,7 +265,7 @@ hfa384x_dormem(hfa384x_t * hw,
ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data); ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data);
static int static int
hfa384x_dowmem(hfa384x_t * hw, hfa384x_dowmem(hfa384x_t *hw,
CMD_MODE mode, CMD_MODE mode,
u16 page, u16 page,
u16 offset, u16 offset,
@ -334,7 +334,7 @@ void dbprint_urb(struct urb *urb)
* Call context: * Call context:
* Any * Any
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int submit_rx_urb(hfa384x_t * hw, gfp_t memflags) static int submit_rx_urb(hfa384x_t *hw, gfp_t memflags)
{ {
struct sk_buff *skb; struct sk_buff *skb;
int result; int result;
@ -395,7 +395,7 @@ done:
* Call context: * Call context:
* Any * Any
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int submit_tx_urb(hfa384x_t * hw, struct urb *tx_urb, gfp_t memflags) static int submit_tx_urb(hfa384x_t *hw, struct urb *tx_urb, gfp_t memflags)
{ {
struct net_device *netdev = hw->wlandev->netdev; struct net_device *netdev = hw->wlandev->netdev;
int result; int result;
@ -532,7 +532,7 @@ static void hfa384x_usb_defer(struct work_struct *data)
* Call context: * Call context:
* process * process
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
void hfa384x_create(hfa384x_t * hw, struct usb_device *usb) void hfa384x_create(hfa384x_t *hw, struct usb_device *usb)
{ {
memset(hw, 0, sizeof(hfa384x_t)); memset(hw, 0, sizeof(hfa384x_t));
hw->usb = usb; hw->usb = usb;
@ -608,7 +608,7 @@ void hfa384x_create(hfa384x_t * hw, struct usb_device *usb)
* Call context: * Call context:
* process * process
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
void hfa384x_destroy(hfa384x_t * hw) void hfa384x_destroy(hfa384x_t *hw)
{ {
struct sk_buff *skb; struct sk_buff *skb;
@ -640,8 +640,8 @@ static hfa384x_usbctlx_t *usbctlx_alloc(void)
} }
static int static int
usbctlx_get_status(const hfa384x_usb_cmdresp_t * cmdresp, usbctlx_get_status(const hfa384x_usb_cmdresp_t *cmdresp,
hfa384x_cmdresult_t * result) hfa384x_cmdresult_t *result)
{ {
result->status = le16_to_cpu(cmdresp->status); result->status = le16_to_cpu(cmdresp->status);
result->resp0 = le16_to_cpu(cmdresp->resp0); result->resp0 = le16_to_cpu(cmdresp->resp0);
@ -656,8 +656,8 @@ usbctlx_get_status(const hfa384x_usb_cmdresp_t * cmdresp,
} }
static void static void
usbctlx_get_rridresult(const hfa384x_usb_rridresp_t * rridresp, usbctlx_get_rridresult(const hfa384x_usb_rridresp_t *rridresp,
hfa384x_rridresult_t * result) hfa384x_rridresult_t *result)
{ {
result->rid = le16_to_cpu(rridresp->rid); result->rid = le16_to_cpu(rridresp->rid);
result->riddata = rridresp->data; result->riddata = rridresp->data;
@ -712,7 +712,7 @@ struct usbctlx_rrid_completor {
}; };
typedef struct usbctlx_rrid_completor usbctlx_rrid_completor_t; typedef struct usbctlx_rrid_completor usbctlx_rrid_completor_t;
static int usbctlx_rrid_completor_fn(usbctlx_completor_t * head) static int usbctlx_rrid_completor_fn(usbctlx_completor_t *head)
{ {
usbctlx_rrid_completor_t *complete = (usbctlx_rrid_completor_t *) head; usbctlx_rrid_completor_t *complete = (usbctlx_rrid_completor_t *) head;
hfa384x_rridresult_t rridresult; hfa384x_rridresult_t rridresult;
@ -733,7 +733,7 @@ static int usbctlx_rrid_completor_fn(usbctlx_completor_t * head)
} }
static inline usbctlx_completor_t *init_rrid_completor(usbctlx_rrid_completor_t static inline usbctlx_completor_t *init_rrid_completor(usbctlx_rrid_completor_t
* completor, *completor,
const const
hfa384x_usb_rridresp_t * hfa384x_usb_rridresp_t *
rridresp, void *riddata, rridresp, void *riddata,
@ -773,7 +773,7 @@ struct usbctlx_rmem_completor {
}; };
typedef struct usbctlx_rmem_completor usbctlx_rmem_completor_t; typedef struct usbctlx_rmem_completor usbctlx_rmem_completor_t;
static int usbctlx_rmem_completor_fn(usbctlx_completor_t * head) static int usbctlx_rmem_completor_fn(usbctlx_completor_t *head)
{ {
usbctlx_rmem_completor_t *complete = (usbctlx_rmem_completor_t *) head; usbctlx_rmem_completor_t *complete = (usbctlx_rmem_completor_t *) head;
@ -783,9 +783,9 @@ static int usbctlx_rmem_completor_fn(usbctlx_completor_t * head)
} }
static inline usbctlx_completor_t *init_rmem_completor(usbctlx_rmem_completor_t static inline usbctlx_completor_t *init_rmem_completor(usbctlx_rmem_completor_t
* completor, *completor,
hfa384x_usb_rmemresp_t hfa384x_usb_rmemresp_t
* rmemresp, void *data, *rmemresp, void *data,
unsigned int len) unsigned int len)
{ {
completor->head.complete = usbctlx_rmem_completor_fn; completor->head.complete = usbctlx_rmem_completor_fn;
@ -816,7 +816,7 @@ static inline usbctlx_completor_t *init_rmem_completor(usbctlx_rmem_completor_t
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static void hfa384x_cb_status(hfa384x_t * hw, const hfa384x_usbctlx_t * ctlx) static void hfa384x_cb_status(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx)
{ {
if (ctlx->usercb != NULL) { if (ctlx->usercb != NULL) {
hfa384x_cmdresult_t cmdresult; hfa384x_cmdresult_t cmdresult;
@ -853,7 +853,7 @@ static void hfa384x_cb_status(hfa384x_t * hw, const hfa384x_usbctlx_t * ctlx)
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static void hfa384x_cb_rrid(hfa384x_t * hw, const hfa384x_usbctlx_t * ctlx) static void hfa384x_cb_rrid(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx)
{ {
if (ctlx->usercb != NULL) { if (ctlx->usercb != NULL) {
hfa384x_rridresult_t rridresult; hfa384x_rridresult_t rridresult;
@ -870,21 +870,21 @@ static void hfa384x_cb_rrid(hfa384x_t * hw, const hfa384x_usbctlx_t * ctlx)
} }
} }
static inline int hfa384x_docmd_wait(hfa384x_t * hw, hfa384x_metacmd_t * cmd) static inline int hfa384x_docmd_wait(hfa384x_t *hw, hfa384x_metacmd_t *cmd)
{ {
return hfa384x_docmd(hw, DOWAIT, cmd, NULL, NULL, NULL); return hfa384x_docmd(hw, DOWAIT, cmd, NULL, NULL, NULL);
} }
static inline int static inline int
hfa384x_docmd_async(hfa384x_t * hw, hfa384x_docmd_async(hfa384x_t *hw,
hfa384x_metacmd_t * cmd, hfa384x_metacmd_t *cmd,
ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data) ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data)
{ {
return hfa384x_docmd(hw, DOASYNC, cmd, cmdcb, usercb, usercb_data); return hfa384x_docmd(hw, DOASYNC, cmd, cmdcb, usercb, usercb_data);
} }
static inline int static inline int
hfa384x_dorrid_wait(hfa384x_t * hw, u16 rid, void *riddata, hfa384x_dorrid_wait(hfa384x_t *hw, u16 rid, void *riddata,
unsigned int riddatalen) unsigned int riddatalen)
{ {
return hfa384x_dorrid(hw, DOWAIT, return hfa384x_dorrid(hw, DOWAIT,
@ -892,7 +892,7 @@ hfa384x_dorrid_wait(hfa384x_t * hw, u16 rid, void *riddata,
} }
static inline int static inline int
hfa384x_dorrid_async(hfa384x_t * hw, hfa384x_dorrid_async(hfa384x_t *hw,
u16 rid, void *riddata, unsigned int riddatalen, u16 rid, void *riddata, unsigned int riddatalen,
ctlx_cmdcb_t cmdcb, ctlx_cmdcb_t cmdcb,
ctlx_usercb_t usercb, void *usercb_data) ctlx_usercb_t usercb, void *usercb_data)
@ -903,7 +903,7 @@ hfa384x_dorrid_async(hfa384x_t * hw,
} }
static inline int static inline int
hfa384x_dowrid_wait(hfa384x_t * hw, u16 rid, void *riddata, hfa384x_dowrid_wait(hfa384x_t *hw, u16 rid, void *riddata,
unsigned int riddatalen) unsigned int riddatalen)
{ {
return hfa384x_dowrid(hw, DOWAIT, return hfa384x_dowrid(hw, DOWAIT,
@ -911,7 +911,7 @@ hfa384x_dowrid_wait(hfa384x_t * hw, u16 rid, void *riddata,
} }
static inline int static inline int
hfa384x_dowrid_async(hfa384x_t * hw, hfa384x_dowrid_async(hfa384x_t *hw,
u16 rid, void *riddata, unsigned int riddatalen, u16 rid, void *riddata, unsigned int riddatalen,
ctlx_cmdcb_t cmdcb, ctlx_cmdcb_t cmdcb,
ctlx_usercb_t usercb, void *usercb_data) ctlx_usercb_t usercb, void *usercb_data)
@ -922,7 +922,7 @@ hfa384x_dowrid_async(hfa384x_t * hw,
} }
static inline int static inline int
hfa384x_dormem_wait(hfa384x_t * hw, hfa384x_dormem_wait(hfa384x_t *hw,
u16 page, u16 offset, void *data, unsigned int len) u16 page, u16 offset, void *data, unsigned int len)
{ {
return hfa384x_dormem(hw, DOWAIT, return hfa384x_dormem(hw, DOWAIT,
@ -930,7 +930,7 @@ hfa384x_dormem_wait(hfa384x_t * hw,
} }
static inline int static inline int
hfa384x_dormem_async(hfa384x_t * hw, hfa384x_dormem_async(hfa384x_t *hw,
u16 page, u16 offset, void *data, unsigned int len, u16 page, u16 offset, void *data, unsigned int len,
ctlx_cmdcb_t cmdcb, ctlx_cmdcb_t cmdcb,
ctlx_usercb_t usercb, void *usercb_data) ctlx_usercb_t usercb, void *usercb_data)
@ -941,7 +941,7 @@ hfa384x_dormem_async(hfa384x_t * hw,
} }
static inline int static inline int
hfa384x_dowmem_wait(hfa384x_t * hw, hfa384x_dowmem_wait(hfa384x_t *hw,
u16 page, u16 offset, void *data, unsigned int len) u16 page, u16 offset, void *data, unsigned int len)
{ {
return hfa384x_dowmem(hw, DOWAIT, return hfa384x_dowmem(hw, DOWAIT,
@ -949,7 +949,7 @@ hfa384x_dowmem_wait(hfa384x_t * hw,
} }
static inline int static inline int
hfa384x_dowmem_async(hfa384x_t * hw, hfa384x_dowmem_async(hfa384x_t *hw,
u16 page, u16 page,
u16 offset, u16 offset,
void *data, void *data,
@ -981,7 +981,7 @@ hfa384x_dowmem_async(hfa384x_t * hw,
* Call context: * Call context:
* process * process
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int hfa384x_cmd_initialize(hfa384x_t * hw) int hfa384x_cmd_initialize(hfa384x_t *hw)
{ {
int result = 0; int result = 0;
int i; int i;
@ -1029,7 +1029,7 @@ int hfa384x_cmd_initialize(hfa384x_t * hw)
* Call context: * Call context:
* process * process
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int hfa384x_cmd_disable(hfa384x_t * hw, u16 macport) int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport)
{ {
int result = 0; int result = 0;
hfa384x_metacmd_t cmd; hfa384x_metacmd_t cmd;
@ -1065,7 +1065,7 @@ int hfa384x_cmd_disable(hfa384x_t * hw, u16 macport)
* Call context: * Call context:
* process * process
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int hfa384x_cmd_enable(hfa384x_t * hw, u16 macport) int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport)
{ {
int result = 0; int result = 0;
hfa384x_metacmd_t cmd; hfa384x_metacmd_t cmd;
@ -1110,7 +1110,7 @@ int hfa384x_cmd_enable(hfa384x_t * hw, u16 macport)
* Call context: * Call context:
* process * process
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int hfa384x_cmd_monitor(hfa384x_t * hw, u16 enable) int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable)
{ {
int result = 0; int result = 0;
hfa384x_metacmd_t cmd; hfa384x_metacmd_t cmd;
@ -1164,7 +1164,7 @@ int hfa384x_cmd_monitor(hfa384x_t * hw, u16 enable)
* Call context: * Call context:
* process * process
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int hfa384x_cmd_download(hfa384x_t * hw, u16 mode, u16 lowaddr, int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr,
u16 highaddr, u16 codelen) u16 highaddr, u16 codelen)
{ {
int result = 0; int result = 0;
@ -1208,7 +1208,7 @@ int hfa384x_cmd_download(hfa384x_t * hw, u16 mode, u16 lowaddr,
* Call context: * Call context:
* process * process
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int hfa384x_corereset(hfa384x_t * hw, int holdtime, int settletime, int genesis) int hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime, int genesis)
{ {
int result = 0; int result = 0;
@ -1245,9 +1245,9 @@ int hfa384x_corereset(hfa384x_t * hw, int holdtime, int settletime, int genesis)
* Call context: * Call context:
* process * process
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int hfa384x_usbctlx_complete_sync(hfa384x_t * hw, static int hfa384x_usbctlx_complete_sync(hfa384x_t *hw,
hfa384x_usbctlx_t * ctlx, hfa384x_usbctlx_t *ctlx,
usbctlx_completor_t * completor) usbctlx_completor_t *completor)
{ {
unsigned long flags; unsigned long flags;
int result; int result;
@ -1361,9 +1361,9 @@ cleanup:
* process * process
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int static int
hfa384x_docmd(hfa384x_t * hw, hfa384x_docmd(hfa384x_t *hw,
CMD_MODE mode, CMD_MODE mode,
hfa384x_metacmd_t * cmd, hfa384x_metacmd_t *cmd,
ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data) ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data)
{ {
int result; int result;
@ -1450,7 +1450,7 @@ done:
* process (DOWAIT or DOASYNC) * process (DOWAIT or DOASYNC)
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int static int
hfa384x_dorrid(hfa384x_t * hw, hfa384x_dorrid(hfa384x_t *hw,
CMD_MODE mode, CMD_MODE mode,
u16 rid, u16 rid,
void *riddata, void *riddata,
@ -1531,7 +1531,7 @@ done:
* process (DOWAIT or DOASYNC) * process (DOWAIT or DOASYNC)
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int static int
hfa384x_dowrid(hfa384x_t * hw, hfa384x_dowrid(hfa384x_t *hw,
CMD_MODE mode, CMD_MODE mode,
u16 rid, u16 rid,
void *riddata, void *riddata,
@ -1618,7 +1618,7 @@ done:
* process (DOWAIT or DOASYNC) * process (DOWAIT or DOASYNC)
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int static int
hfa384x_dormem(hfa384x_t * hw, hfa384x_dormem(hfa384x_t *hw,
CMD_MODE mode, CMD_MODE mode,
u16 page, u16 page,
u16 offset, u16 offset,
@ -1709,7 +1709,7 @@ done:
* process (DOWAIT or DOASYNC) * process (DOWAIT or DOASYNC)
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int static int
hfa384x_dowmem(hfa384x_t * hw, hfa384x_dowmem(hfa384x_t *hw,
CMD_MODE mode, CMD_MODE mode,
u16 page, u16 page,
u16 offset, u16 offset,
@ -1783,7 +1783,7 @@ done:
* Call context: * Call context:
* process * process
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int hfa384x_drvr_commtallies(hfa384x_t * hw) int hfa384x_drvr_commtallies(hfa384x_t *hw)
{ {
hfa384x_metacmd_t cmd; hfa384x_metacmd_t cmd;
@ -1819,7 +1819,7 @@ int hfa384x_drvr_commtallies(hfa384x_t * hw)
* Call context: * Call context:
* process * process
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int hfa384x_drvr_disable(hfa384x_t * hw, u16 macport) int hfa384x_drvr_disable(hfa384x_t *hw, u16 macport)
{ {
int result = 0; int result = 0;
@ -1857,7 +1857,7 @@ int hfa384x_drvr_disable(hfa384x_t * hw, u16 macport)
* Call context: * Call context:
* process * process
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int hfa384x_drvr_enable(hfa384x_t * hw, u16 macport) int hfa384x_drvr_enable(hfa384x_t *hw, u16 macport)
{ {
int result = 0; int result = 0;
@ -1894,7 +1894,7 @@ int hfa384x_drvr_enable(hfa384x_t * hw, u16 macport)
* Call context: * Call context:
* process * process
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int hfa384x_drvr_flashdl_enable(hfa384x_t * hw) int hfa384x_drvr_flashdl_enable(hfa384x_t *hw)
{ {
int result = 0; int result = 0;
int i; int i;
@ -1952,7 +1952,7 @@ int hfa384x_drvr_flashdl_enable(hfa384x_t * hw)
* Call context: * Call context:
* process * process
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int hfa384x_drvr_flashdl_disable(hfa384x_t * hw) int hfa384x_drvr_flashdl_disable(hfa384x_t *hw)
{ {
/* Check that we're already in the download state */ /* Check that we're already in the download state */
if (hw->dlstate != HFA384x_DLSTATE_FLASHENABLED) if (hw->dlstate != HFA384x_DLSTATE_FLASHENABLED)
@ -1997,7 +1997,7 @@ int hfa384x_drvr_flashdl_disable(hfa384x_t * hw)
* Call context: * Call context:
* process * process
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int hfa384x_drvr_flashdl_write(hfa384x_t * hw, u32 daddr, void *buf, u32 len) int hfa384x_drvr_flashdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len)
{ {
int result = 0; int result = 0;
u32 dlbufaddr; u32 dlbufaddr;
@ -2143,7 +2143,7 @@ exit_proc:
* Call context: * Call context:
* process * process
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int hfa384x_drvr_getconfig(hfa384x_t * hw, u16 rid, void *buf, u16 len) int hfa384x_drvr_getconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len)
{ {
int result; int result;
@ -2180,7 +2180,7 @@ int hfa384x_drvr_getconfig(hfa384x_t * hw, u16 rid, void *buf, u16 len)
* Any * Any
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int int
hfa384x_drvr_getconfig_async(hfa384x_t * hw, hfa384x_drvr_getconfig_async(hfa384x_t *hw,
u16 rid, ctlx_usercb_t usercb, void *usercb_data) u16 rid, ctlx_usercb_t usercb, void *usercb_data)
{ {
return hfa384x_dorrid_async(hw, rid, NULL, 0, return hfa384x_dorrid_async(hw, rid, NULL, 0,
@ -2211,7 +2211,7 @@ hfa384x_drvr_getconfig_async(hfa384x_t * hw,
* process * process
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int int
hfa384x_drvr_setconfig_async(hfa384x_t * hw, hfa384x_drvr_setconfig_async(hfa384x_t *hw,
u16 rid, u16 rid,
void *buf, void *buf,
u16 len, ctlx_usercb_t usercb, void *usercb_data) u16 len, ctlx_usercb_t usercb, void *usercb_data)
@ -2238,7 +2238,7 @@ hfa384x_drvr_setconfig_async(hfa384x_t * hw,
* Call context: * Call context:
* process * process
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int hfa384x_drvr_ramdl_disable(hfa384x_t * hw) int hfa384x_drvr_ramdl_disable(hfa384x_t *hw)
{ {
/* Check that we're already in the download state */ /* Check that we're already in the download state */
if (hw->dlstate != HFA384x_DLSTATE_RAMENABLED) if (hw->dlstate != HFA384x_DLSTATE_RAMENABLED)
@ -2278,7 +2278,7 @@ int hfa384x_drvr_ramdl_disable(hfa384x_t * hw)
* Call context: * Call context:
* process * process
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int hfa384x_drvr_ramdl_enable(hfa384x_t * hw, u32 exeaddr) int hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr)
{ {
int result = 0; int result = 0;
u16 lowaddr; u16 lowaddr;
@ -2346,7 +2346,7 @@ int hfa384x_drvr_ramdl_enable(hfa384x_t * hw, u32 exeaddr)
* Call context: * Call context:
* process * process
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int hfa384x_drvr_ramdl_write(hfa384x_t * hw, u32 daddr, void *buf, u32 len) int hfa384x_drvr_ramdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len)
{ {
int result = 0; int result = 0;
int nwrites; int nwrites;
@ -2425,7 +2425,7 @@ int hfa384x_drvr_ramdl_write(hfa384x_t * hw, u32 daddr, void *buf, u32 len)
* Call context: * Call context:
* process or non-card interrupt. * process or non-card interrupt.
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int hfa384x_drvr_readpda(hfa384x_t * hw, void *buf, unsigned int len) int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len)
{ {
int result = 0; int result = 0;
u16 *pda = buf; u16 *pda = buf;
@ -2531,7 +2531,7 @@ int hfa384x_drvr_readpda(hfa384x_t * hw, void *buf, unsigned int len)
* Call context: * Call context:
* process * process
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int hfa384x_drvr_setconfig(hfa384x_t * hw, u16 rid, void *buf, u16 len) int hfa384x_drvr_setconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len)
{ {
return hfa384x_dowrid_wait(hw, rid, buf, len); return hfa384x_dowrid_wait(hw, rid, buf, len);
} }
@ -2556,7 +2556,7 @@ int hfa384x_drvr_setconfig(hfa384x_t * hw, u16 rid, void *buf, u16 len)
* process * process
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int hfa384x_drvr_start(hfa384x_t * hw) int hfa384x_drvr_start(hfa384x_t *hw)
{ {
int result, result1, result2; int result, result1, result2;
u16 status; u16 status;
@ -2657,7 +2657,7 @@ done:
* Call context: * Call context:
* process * process
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int hfa384x_drvr_stop(hfa384x_t * hw) int hfa384x_drvr_stop(hfa384x_t *hw)
{ {
int result = 0; int result = 0;
int i; int i;
@ -2708,9 +2708,9 @@ int hfa384x_drvr_stop(hfa384x_t * hw)
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int hfa384x_drvr_txframe(hfa384x_t * hw, struct sk_buff *skb, int hfa384x_drvr_txframe(hfa384x_t *hw, struct sk_buff *skb,
p80211_hdr_t * p80211_hdr, p80211_hdr_t *p80211_hdr,
p80211_metawep_t * p80211_wep) p80211_metawep_t *p80211_wep)
{ {
int usbpktlen = sizeof(hfa384x_tx_frame_t); int usbpktlen = sizeof(hfa384x_tx_frame_t);
int result; int result;
@ -2801,7 +2801,7 @@ exit:
return result; return result;
} }
void hfa384x_tx_timeout(wlandevice_t * wlandev) void hfa384x_tx_timeout(wlandevice_t *wlandev)
{ {
hfa384x_t *hw = wlandev->priv; hfa384x_t *hw = wlandev->priv;
unsigned long flags; unsigned long flags;
@ -2950,8 +2950,8 @@ static void hfa384x_usbctlx_completion_task(unsigned long data)
* Call context: * Call context:
* Either process or interrupt, but presumably interrupt * Either process or interrupt, but presumably interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int unlocked_usbctlx_cancel_async(hfa384x_t * hw, static int unlocked_usbctlx_cancel_async(hfa384x_t *hw,
hfa384x_usbctlx_t * ctlx) hfa384x_usbctlx_t *ctlx)
{ {
int ret; int ret;
@ -3000,7 +3000,7 @@ static int unlocked_usbctlx_cancel_async(hfa384x_t * hw,
* Call context: * Call context:
* Either, assume interrupt * Either, assume interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static void unlocked_usbctlx_complete(hfa384x_t * hw, hfa384x_usbctlx_t * ctlx) static void unlocked_usbctlx_complete(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx)
{ {
/* Timers have been stopped, and ctlx should be in /* Timers have been stopped, and ctlx should be in
* a terminal state. Retire it from the "active" * a terminal state. Retire it from the "active"
@ -3038,7 +3038,7 @@ static void unlocked_usbctlx_complete(hfa384x_t * hw, hfa384x_usbctlx_t * ctlx)
* Call context: * Call context:
* any * any
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static void hfa384x_usbctlxq_run(hfa384x_t * hw) static void hfa384x_usbctlxq_run(hfa384x_t *hw)
{ {
unsigned long flags; unsigned long flags;
@ -3318,7 +3318,7 @@ exit:
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static void hfa384x_usbin_ctlx(hfa384x_t * hw, hfa384x_usbin_t * usbin, static void hfa384x_usbin_ctlx(hfa384x_t *hw, hfa384x_usbin_t *usbin,
int urb_status) int urb_status)
{ {
hfa384x_usbctlx_t *ctlx; hfa384x_usbctlx_t *ctlx;
@ -3439,8 +3439,8 @@ unlock:
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static void hfa384x_usbin_txcompl(wlandevice_t * wlandev, static void hfa384x_usbin_txcompl(wlandevice_t *wlandev,
hfa384x_usbin_t * usbin) hfa384x_usbin_t *usbin)
{ {
u16 status; u16 status;
@ -3470,7 +3470,7 @@ static void hfa384x_usbin_txcompl(wlandevice_t * wlandev,
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static void hfa384x_usbin_rx(wlandevice_t * wlandev, struct sk_buff *skb) static void hfa384x_usbin_rx(wlandevice_t *wlandev, struct sk_buff *skb)
{ {
hfa384x_usbin_t *usbin = (hfa384x_usbin_t *) skb->data; hfa384x_usbin_t *usbin = (hfa384x_usbin_t *) skb->data;
hfa384x_t *hw = wlandev->priv; hfa384x_t *hw = wlandev->priv;
@ -3573,8 +3573,8 @@ done:
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static void hfa384x_int_rxmonitor(wlandevice_t * wlandev, static void hfa384x_int_rxmonitor(wlandevice_t *wlandev,
hfa384x_usb_rxfrm_t * rxfrm) hfa384x_usb_rxfrm_t *rxfrm)
{ {
hfa384x_rx_frame_t *rxdesc = &(rxfrm->desc); hfa384x_rx_frame_t *rxdesc = &(rxfrm->desc);
unsigned int hdrlen = 0; unsigned int hdrlen = 0;
@ -3677,7 +3677,7 @@ static void hfa384x_int_rxmonitor(wlandevice_t * wlandev,
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static void hfa384x_usbin_info(wlandevice_t * wlandev, hfa384x_usbin_t * usbin) static void hfa384x_usbin_info(wlandevice_t *wlandev, hfa384x_usbin_t *usbin)
{ {
usbin->infofrm.info.framelen = usbin->infofrm.info.framelen =
le16_to_cpu(usbin->infofrm.info.framelen); le16_to_cpu(usbin->infofrm.info.framelen);
@ -4055,7 +4055,7 @@ static void hfa384x_usb_throttlefn(unsigned long data)
* Call context: * Call context:
* process or interrupt * process or interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int hfa384x_usbctlx_submit(hfa384x_t * hw, hfa384x_usbctlx_t * ctlx) static int hfa384x_usbctlx_submit(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx)
{ {
unsigned long flags; unsigned long flags;
int ret; int ret;
@ -4096,7 +4096,7 @@ static int hfa384x_usbctlx_submit(hfa384x_t * hw, hfa384x_usbctlx_t * ctlx)
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static void hfa384x_usbout_tx(wlandevice_t * wlandev, hfa384x_usbout_t * usbout) static void hfa384x_usbout_tx(wlandevice_t *wlandev, hfa384x_usbout_t *usbout)
{ {
prism2sta_ev_alloc(wlandev); prism2sta_ev_alloc(wlandev);
} }

Просмотреть файл

@ -102,9 +102,9 @@ static u8 oui_8021h[] = { 0x00, 0x00, 0xf8 };
* Call context: * Call context:
* May be called in interrupt or non-interrupt context * May be called in interrupt or non-interrupt context
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int skb_ether_to_p80211(wlandevice_t * wlandev, u32 ethconv, int skb_ether_to_p80211(wlandevice_t *wlandev, u32 ethconv,
struct sk_buff *skb, p80211_hdr_t * p80211_hdr, struct sk_buff *skb, p80211_hdr_t *p80211_hdr,
p80211_metawep_t * p80211_wep) p80211_metawep_t *p80211_wep)
{ {
u16 fc; u16 fc;
@ -230,8 +230,8 @@ int skb_ether_to_p80211(wlandevice_t * wlandev, u32 ethconv,
} }
/* jkriegl: from orinoco, modified */ /* jkriegl: from orinoco, modified */
static void orinoco_spy_gather(wlandevice_t * wlandev, char *mac, static void orinoco_spy_gather(wlandevice_t *wlandev, char *mac,
p80211_rxmeta_t * rxmeta) p80211_rxmeta_t *rxmeta)
{ {
int i; int i;
@ -272,7 +272,7 @@ static void orinoco_spy_gather(wlandevice_t * wlandev, char *mac,
* Call context: * Call context:
* May be called in interrupt or non-interrupt context * May be called in interrupt or non-interrupt context
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int skb_p80211_to_ether(wlandevice_t * wlandev, u32 ethconv, int skb_p80211_to_ether(wlandevice_t *wlandev, u32 ethconv,
struct sk_buff *skb) struct sk_buff *skb)
{ {
netdevice_t *netdev = wlandev->netdev; netdevice_t *netdev = wlandev->netdev;

Просмотреть файл

@ -94,18 +94,18 @@
static void p80211netdev_rx_bh(unsigned long arg); static void p80211netdev_rx_bh(unsigned long arg);
/* netdevice method functions */ /* netdevice method functions */
static int p80211knetdev_init(netdevice_t * netdev); static int p80211knetdev_init(netdevice_t *netdev);
static struct net_device_stats *p80211knetdev_get_stats(netdevice_t * netdev); static struct net_device_stats *p80211knetdev_get_stats(netdevice_t *netdev);
static int p80211knetdev_open(netdevice_t * netdev); static int p80211knetdev_open(netdevice_t *netdev);
static int p80211knetdev_stop(netdevice_t * netdev); static int p80211knetdev_stop(netdevice_t *netdev);
static int p80211knetdev_hard_start_xmit(struct sk_buff *skb, static int p80211knetdev_hard_start_xmit(struct sk_buff *skb,
netdevice_t * netdev); netdevice_t *netdev);
static void p80211knetdev_set_multicast_list(netdevice_t * dev); static void p80211knetdev_set_multicast_list(netdevice_t *dev);
static int p80211knetdev_do_ioctl(netdevice_t * dev, struct ifreq *ifr, static int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr,
int cmd); int cmd);
static int p80211knetdev_set_mac_address(netdevice_t * dev, void *addr); static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr);
static void p80211knetdev_tx_timeout(netdevice_t * netdev); static void p80211knetdev_tx_timeout(netdevice_t *netdev);
static int p80211_rx_typedrop(wlandevice_t * wlandev, u16 fc); static int p80211_rx_typedrop(wlandevice_t *wlandev, u16 fc);
int wlan_watchdog = 5000; int wlan_watchdog = 5000;
module_param(wlan_watchdog, int, 0644); module_param(wlan_watchdog, int, 0644);
@ -127,7 +127,7 @@ MODULE_PARM_DESC(wlan_wext_write, "enable write wireless extensions");
* Returns: * Returns:
* nothing * nothing
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int p80211knetdev_init(netdevice_t * netdev) static int p80211knetdev_init(netdevice_t *netdev)
{ {
/* Called in response to register_netdev */ /* Called in response to register_netdev */
/* This is usually the probe function, but the probe has */ /* This is usually the probe function, but the probe has */
@ -174,7 +174,7 @@ static struct net_device_stats *p80211knetdev_get_stats(netdevice_t * netdev)
* Returns: * Returns:
* zero on success, non-zero otherwise * zero on success, non-zero otherwise
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int p80211knetdev_open(netdevice_t * netdev) static int p80211knetdev_open(netdevice_t *netdev)
{ {
int result = 0; /* success */ int result = 0; /* success */
wlandevice_t *wlandev = netdev->ml_priv; wlandevice_t *wlandev = netdev->ml_priv;
@ -209,7 +209,7 @@ static int p80211knetdev_open(netdevice_t * netdev)
* Returns: * Returns:
* zero on success, non-zero otherwise * zero on success, non-zero otherwise
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int p80211knetdev_stop(netdevice_t * netdev) static int p80211knetdev_stop(netdevice_t *netdev)
{ {
int result = 0; int result = 0;
wlandevice_t *wlandev = netdev->ml_priv; wlandevice_t *wlandev = netdev->ml_priv;
@ -236,7 +236,7 @@ static int p80211knetdev_stop(netdevice_t * netdev)
* Side effects: * Side effects:
* *
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
void p80211netdev_rx(wlandevice_t * wlandev, struct sk_buff *skb) void p80211netdev_rx(wlandevice_t *wlandev, struct sk_buff *skb)
{ {
/* Enqueue for post-irq processing */ /* Enqueue for post-irq processing */
skb_queue_tail(&wlandev->nsd_rxq, skb); skb_queue_tail(&wlandev->nsd_rxq, skb);
@ -345,7 +345,7 @@ static void p80211netdev_rx_bh(unsigned long arg)
* zero on success, non-zero on failure. * zero on success, non-zero on failure.
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int p80211knetdev_hard_start_xmit(struct sk_buff *skb, static int p80211knetdev_hard_start_xmit(struct sk_buff *skb,
netdevice_t * netdev) netdevice_t *netdev)
{ {
int result = 0; int result = 0;
int txresult = -1; int txresult = -1;
@ -472,7 +472,7 @@ failed:
* Returns: * Returns:
* nothing * nothing
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static void p80211knetdev_set_multicast_list(netdevice_t * dev) static void p80211knetdev_set_multicast_list(netdevice_t *dev)
{ {
wlandevice_t *wlandev = dev->ml_priv; wlandevice_t *wlandev = dev->ml_priv;
@ -485,7 +485,7 @@ static void p80211knetdev_set_multicast_list(netdevice_t * dev)
#ifdef SIOCETHTOOL #ifdef SIOCETHTOOL
static int p80211netdev_ethtool(wlandevice_t * wlandev, void __user * useraddr) static int p80211netdev_ethtool(wlandevice_t *wlandev, void __user *useraddr)
{ {
u32 ethcmd; u32 ethcmd;
struct ethtool_drvinfo info; struct ethtool_drvinfo info;
@ -557,7 +557,7 @@ static int p80211netdev_ethtool(wlandevice_t * wlandev, void __user * useraddr)
* Process thread (ioctl caller). TODO: SMP support may require * Process thread (ioctl caller). TODO: SMP support may require
* locks. * locks.
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int p80211knetdev_do_ioctl(netdevice_t * dev, struct ifreq *ifr, int cmd) static int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd)
{ {
int result = 0; int result = 0;
p80211ioctl_req_t *req = (p80211ioctl_req_t *) ifr; p80211ioctl_req_t *req = (p80211ioctl_req_t *) ifr;
@ -634,7 +634,7 @@ bail:
* *
* by: Collin R. Mulliner <collin@mulliner.org> * by: Collin R. Mulliner <collin@mulliner.org>
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int p80211knetdev_set_mac_address(netdevice_t * dev, void *addr) static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
{ {
struct sockaddr *new_addr = addr; struct sockaddr *new_addr = addr;
p80211msg_dot11req_mibset_t dot11req; p80211msg_dot11req_mibset_t dot11req;
@ -694,7 +694,7 @@ static int p80211knetdev_set_mac_address(netdevice_t * dev, void *addr)
return result; return result;
} }
static int wlan_change_mtu(netdevice_t * dev, int new_mtu) static int wlan_change_mtu(netdevice_t *dev, int new_mtu)
{ {
/* 2312 is max 802.11 payload, 20 is overhead, (ether + llc +snap) /* 2312 is max 802.11 payload, 20 is overhead, (ether + llc +snap)
and another 8 for wep. */ and another 8 for wep. */
@ -742,7 +742,7 @@ static const struct net_device_ops p80211_netdev_ops = {
* compiled drivers, this function will be called in the * compiled drivers, this function will be called in the
* context of the kernel startup code. * context of the kernel startup code.
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int wlan_setup(wlandevice_t * wlandev) int wlan_setup(wlandevice_t *wlandev)
{ {
int result = 0; int result = 0;
netdevice_t *dev; netdevice_t *dev;
@ -800,7 +800,7 @@ int wlan_setup(wlandevice_t * wlandev)
* compiled drivers, this function will be called in the * compiled drivers, this function will be called in the
* context of the kernel startup code. * context of the kernel startup code.
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int wlan_unsetup(wlandevice_t * wlandev) int wlan_unsetup(wlandevice_t *wlandev)
{ {
int result = 0; int result = 0;
@ -836,7 +836,7 @@ int wlan_unsetup(wlandevice_t * wlandev)
* Call Context: * Call Context:
* Can be either interrupt or not. * Can be either interrupt or not.
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int register_wlandev(wlandevice_t * wlandev) int register_wlandev(wlandevice_t *wlandev)
{ {
int i = 0; int i = 0;
@ -864,7 +864,7 @@ int register_wlandev(wlandevice_t * wlandev)
* Call Context: * Call Context:
* Can be either interrupt or not. * Can be either interrupt or not.
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int unregister_wlandev(wlandevice_t * wlandev) int unregister_wlandev(wlandevice_t *wlandev)
{ {
struct sk_buff *skb; struct sk_buff *skb;
@ -907,7 +907,7 @@ int unregister_wlandev(wlandevice_t * wlandev)
* Call context: * Call context:
* Usually interrupt. * Usually interrupt.
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
void p80211netdev_hwremoved(wlandevice_t * wlandev) void p80211netdev_hwremoved(wlandevice_t *wlandev)
{ {
wlandev->hwremoved = 1; wlandev->hwremoved = 1;
if (wlandev->state == WLAN_DEVICE_OPEN) if (wlandev->state == WLAN_DEVICE_OPEN)
@ -937,7 +937,7 @@ void p80211netdev_hwremoved(wlandevice_t * wlandev)
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int p80211_rx_typedrop(wlandevice_t * wlandev, u16 fc) static int p80211_rx_typedrop(wlandevice_t *wlandev, u16 fc)
{ {
u16 ftype; u16 ftype;
u16 fstype; u16 fstype;
@ -1095,7 +1095,7 @@ static int p80211_rx_typedrop(wlandevice_t * wlandev, u16 fc)
return drop; return drop;
} }
static void p80211knetdev_tx_timeout(netdevice_t * netdev) static void p80211knetdev_tx_timeout(netdevice_t *netdev)
{ {
wlandevice_t *wlandev = netdev->ml_priv; wlandevice_t *wlandev = netdev->ml_priv;

Просмотреть файл

@ -73,9 +73,9 @@
#include "p80211metastruct.h" #include "p80211metastruct.h"
#include "p80211req.h" #include "p80211req.h"
static void p80211req_handlemsg(wlandevice_t * wlandev, p80211msg_t * msg); static void p80211req_handlemsg(wlandevice_t *wlandev, p80211msg_t *msg);
static int p80211req_mibset_mibget(wlandevice_t * wlandev, static int p80211req_mibset_mibget(wlandevice_t *wlandev,
p80211msg_dot11req_mibget_t * mib_msg, p80211msg_dot11req_mibget_t *mib_msg,
int isget); int isget);
/*---------------------------------------------------------------- /*----------------------------------------------------------------
@ -150,7 +150,7 @@ int p80211req_dorequest(wlandevice_t * wlandev, u8 * msgbuf)
* Call context: * Call context:
* Process thread * Process thread
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static void p80211req_handlemsg(wlandevice_t * wlandev, p80211msg_t * msg) static void p80211req_handlemsg(wlandevice_t *wlandev, p80211msg_t *msg)
{ {
switch (msg->msgcode) { switch (msg->msgcode) {
@ -180,8 +180,8 @@ static void p80211req_handlemsg(wlandevice_t * wlandev, p80211msg_t * msg)
return; return;
} }
static int p80211req_mibset_mibget(wlandevice_t * wlandev, static int p80211req_mibset_mibget(wlandevice_t *wlandev,
p80211msg_dot11req_mibget_t * mib_msg, p80211msg_dot11req_mibget_t *mib_msg,
int isget) int isget)
{ {
p80211itemd_t *mibitem = (p80211itemd_t *) mib_msg->mibattribute.data; p80211itemd_t *mibitem = (p80211itemd_t *) mib_msg->mibattribute.data;

Просмотреть файл

@ -54,7 +54,7 @@
#include <linux/random.h> #include <linux/random.h>
#include <linux/kernel.h> #include <linux/kernel.h>
// #define WEP_DEBUG /* #define WEP_DEBUG */
/*================================================================*/ /*================================================================*/
/* Project Includes */ /* Project Includes */
@ -136,7 +136,7 @@ static const u32 wep_crc32_table[256] = {
/* keylen in bytes! */ /* keylen in bytes! */
int wep_change_key(wlandevice_t * wlandev, int keynum, u8 * key, int keylen) int wep_change_key(wlandevice_t *wlandev, int keynum, u8 *key, int keylen)
{ {
if (keylen < 0) if (keylen < 0)
return -1; return -1;
@ -166,8 +166,8 @@ int wep_change_key(wlandevice_t * wlandev, int keynum, u8 * key, int keylen)
4-byte IV at start of buffer, 4-byte ICV at end of buffer. 4-byte IV at start of buffer, 4-byte ICV at end of buffer.
if successful, buf start is payload begin, length -= 8; if successful, buf start is payload begin, length -= 8;
*/ */
int wep_decrypt(wlandevice_t * wlandev, u8 * buf, u32 len, int key_override, int wep_decrypt(wlandevice_t *wlandev, u8 *buf, u32 len, int key_override,
u8 * iv, u8 * icv) u8 *iv, u8 *icv)
{ {
u32 i, j, k, crc, keylen; u32 i, j, k, crc, keylen;
u8 s[256], key[64], c_crc[4]; u8 s[256], key[64], c_crc[4];
@ -245,8 +245,8 @@ int wep_decrypt(wlandevice_t * wlandev, u8 * buf, u32 len, int key_override,
} }
/* encrypts in-place. */ /* encrypts in-place. */
int wep_encrypt(wlandevice_t * wlandev, u8 * buf, u8 * dst, u32 len, int keynum, int wep_encrypt(wlandevice_t *wlandev, u8 *buf, u8 *dst, u32 len, int keynum,
u8 * iv, u8 * icv) u8 *iv, u8 *icv)
{ {
u32 i, j, k, crc, keylen; u32 i, j, k, crc, keylen;
u8 s[256], key[64]; u8 s[256], key[64];

Просмотреть файл

@ -66,10 +66,10 @@
#include "p80211ioctl.h" #include "p80211ioctl.h"
#include "p80211req.h" #include "p80211req.h"
static int p80211wext_giwrate(netdevice_t * dev, static int p80211wext_giwrate(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *rrq, char *extra); struct iw_param *rrq, char *extra);
static int p80211wext_giwessid(netdevice_t * dev, static int p80211wext_giwessid(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *data, char *essid); struct iw_point *data, char *essid);
@ -130,7 +130,7 @@ static int qual_as_percent(int snr)
return 100; return 100;
} }
static int p80211wext_dorequest(wlandevice_t * wlandev, u32 did, u32 data) static int p80211wext_dorequest(wlandevice_t *wlandev, u32 did, u32 data)
{ {
p80211msg_dot11req_mibset_t msg; p80211msg_dot11req_mibset_t msg;
p80211item_uint32_t mibitem; p80211item_uint32_t mibitem;
@ -145,7 +145,7 @@ static int p80211wext_dorequest(wlandevice_t * wlandev, u32 did, u32 data)
return result; return result;
} }
static int p80211wext_autojoin(wlandevice_t * wlandev) static int p80211wext_autojoin(wlandevice_t *wlandev)
{ {
p80211msg_lnxreq_autojoin_t msg; p80211msg_lnxreq_autojoin_t msg;
struct iw_point data; struct iw_point data;
@ -191,7 +191,7 @@ exit:
} }
/* called by /proc/net/wireless */ /* called by /proc/net/wireless */
struct iw_statistics *p80211wext_get_wireless_stats(netdevice_t * dev) struct iw_statistics *p80211wext_get_wireless_stats(netdevice_t *dev)
{ {
p80211msg_lnxreq_commsquality_t quality; p80211msg_lnxreq_commsquality_t quality;
wlandevice_t *wlandev = dev->ml_priv; wlandevice_t *wlandev = dev->ml_priv;
@ -232,7 +232,7 @@ struct iw_statistics *p80211wext_get_wireless_stats(netdevice_t * dev)
return wstats; return wstats;
} }
static int p80211wext_giwname(netdevice_t * dev, static int p80211wext_giwname(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
char *name, char *extra) char *name, char *extra)
{ {
@ -261,7 +261,7 @@ exit:
return err; return err;
} }
static int p80211wext_giwfreq(netdevice_t * dev, static int p80211wext_giwfreq(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_freq *freq, char *extra) struct iw_freq *freq, char *extra)
{ {
@ -296,7 +296,7 @@ exit:
return err; return err;
} }
static int p80211wext_siwfreq(netdevice_t * dev, static int p80211wext_siwfreq(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_freq *freq, char *extra) struct iw_freq *freq, char *extra)
{ {
@ -332,9 +332,9 @@ exit:
return err; return err;
} }
static int p80211wext_giwmode(netdevice_t * dev, static int p80211wext_giwmode(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
__u32 * mode, char *extra) __u32 *mode, char *extra)
{ {
wlandevice_t *wlandev = dev->ml_priv; wlandevice_t *wlandev = dev->ml_priv;
@ -356,9 +356,9 @@ static int p80211wext_giwmode(netdevice_t * dev,
return 0; return 0;
} }
static int p80211wext_siwmode(netdevice_t * dev, static int p80211wext_siwmode(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
__u32 * mode, char *extra) __u32 *mode, char *extra)
{ {
wlandevice_t *wlandev = dev->ml_priv; wlandevice_t *wlandev = dev->ml_priv;
p80211item_uint32_t mibitem; p80211item_uint32_t mibitem;
@ -411,7 +411,7 @@ exit:
return err; return err;
} }
static int p80211wext_giwrange(netdevice_t * dev, static int p80211wext_giwrange(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *data, char *extra) struct iw_point *data, char *extra)
{ {
@ -480,7 +480,7 @@ static int p80211wext_giwrange(netdevice_t * dev,
return 0; return 0;
} }
static int p80211wext_giwap(netdevice_t * dev, static int p80211wext_giwap(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct sockaddr *ap_addr, char *extra) struct sockaddr *ap_addr, char *extra)
{ {
@ -493,7 +493,7 @@ static int p80211wext_giwap(netdevice_t * dev,
return 0; return 0;
} }
static int p80211wext_giwencode(netdevice_t * dev, static int p80211wext_giwencode(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *erq, char *key) struct iw_point *erq, char *key)
{ {
@ -534,7 +534,7 @@ exit:
return err; return err;
} }
static int p80211wext_siwencode(netdevice_t * dev, static int p80211wext_siwencode(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *erq, char *key) struct iw_point *erq, char *key)
{ {
@ -681,7 +681,7 @@ exit:
return err; return err;
} }
static int p80211wext_giwessid(netdevice_t * dev, static int p80211wext_giwessid(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *data, char *essid) struct iw_point *data, char *essid)
{ {
@ -704,7 +704,7 @@ static int p80211wext_giwessid(netdevice_t * dev,
return 0; return 0;
} }
static int p80211wext_siwessid(netdevice_t * dev, static int p80211wext_siwessid(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *data, char *essid) struct iw_point *data, char *essid)
{ {
@ -752,7 +752,7 @@ exit:
return err; return err;
} }
static int p80211wext_siwcommit(netdevice_t * dev, static int p80211wext_siwcommit(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *data, char *essid) struct iw_point *data, char *essid)
{ {
@ -771,7 +771,7 @@ exit:
return err; return err;
} }
static int p80211wext_giwrate(netdevice_t * dev, static int p80211wext_giwrate(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *rrq, char *extra) struct iw_param *rrq, char *extra)
{ {
@ -822,7 +822,7 @@ exit:
return err; return err;
} }
static int p80211wext_giwrts(netdevice_t * dev, static int p80211wext_giwrts(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *rts, char *extra) struct iw_param *rts, char *extra)
{ {
@ -852,7 +852,7 @@ exit:
return err; return err;
} }
static int p80211wext_siwrts(netdevice_t * dev, static int p80211wext_siwrts(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *rts, char *extra) struct iw_param *rts, char *extra)
{ {
@ -886,7 +886,7 @@ exit:
return err; return err;
} }
static int p80211wext_giwfrag(netdevice_t * dev, static int p80211wext_giwfrag(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *frag, char *extra) struct iw_param *frag, char *extra)
{ {
@ -917,7 +917,7 @@ exit:
return err; return err;
} }
static int p80211wext_siwfrag(netdevice_t * dev, static int p80211wext_siwfrag(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *frag, char *extra) struct iw_param *frag, char *extra)
{ {
@ -961,7 +961,7 @@ exit:
#define IW_RETRY_SHORT IW_RETRY_MIN #define IW_RETRY_SHORT IW_RETRY_MIN
#endif #endif
static int p80211wext_giwretry(netdevice_t * dev, static int p80211wext_giwretry(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *rrq, char *extra) struct iw_param *rrq, char *extra)
{ {
@ -1038,7 +1038,7 @@ exit:
} }
static int p80211wext_siwretry(netdevice_t * dev, static int p80211wext_siwretry(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *rrq, char *extra) struct iw_param *rrq, char *extra)
{ {
@ -1109,7 +1109,7 @@ exit:
} }
static int p80211wext_siwtxpow(netdevice_t * dev, static int p80211wext_siwtxpow(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *rrq, char *extra) struct iw_param *rrq, char *extra)
{ {
@ -1143,7 +1143,7 @@ exit:
return err; return err;
} }
static int p80211wext_giwtxpow(netdevice_t * dev, static int p80211wext_giwtxpow(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *rrq, char *extra) struct iw_param *rrq, char *extra)
{ {
@ -1178,7 +1178,7 @@ exit:
return err; return err;
} }
static int p80211wext_siwspy(netdevice_t * dev, static int p80211wext_siwspy(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *srq, char *extra) struct iw_point *srq, char *extra)
{ {
@ -1213,7 +1213,7 @@ static int p80211wext_siwspy(netdevice_t * dev,
} }
/* jkriegl: from orinoco, modified */ /* jkriegl: from orinoco, modified */
static int p80211wext_giwspy(netdevice_t * dev, static int p80211wext_giwspy(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *srq, char *extra) struct iw_point *srq, char *extra)
{ {
@ -1273,7 +1273,7 @@ static int prism2_result2err(int prism2_result)
return err; return err;
} }
static int p80211wext_siwscan(netdevice_t * dev, static int p80211wext_siwscan(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *srq, char *extra) struct iw_point *srq, char *extra)
{ {
@ -1320,7 +1320,7 @@ exit:
*/ */
static char *wext_translate_bss(struct iw_request_info *info, char *current_ev, static char *wext_translate_bss(struct iw_request_info *info, char *current_ev,
char *end_buf, char *end_buf,
p80211msg_dot11req_scan_results_t * bss) p80211msg_dot11req_scan_results_t *bss)
{ {
struct iw_event iwe; /* Temporary buffer */ struct iw_event iwe; /* Temporary buffer */
@ -1404,7 +1404,7 @@ static char *wext_translate_bss(struct iw_request_info *info, char *current_ev,
return current_ev; return current_ev;
} }
static int p80211wext_giwscan(netdevice_t * dev, static int p80211wext_giwscan(netdevice_t *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *srq, char *extra) struct iw_point *srq, char *extra)
{ {

Просмотреть файл

@ -177,19 +177,19 @@ typedef struct imgchunk {
/* s-record image processing */ /* s-record image processing */
/* Data records */ /* Data records */
unsigned int ns3data = 0; unsigned int ns3data;
s3datarec_t s3data[S3DATA_MAX]; s3datarec_t s3data[S3DATA_MAX];
/* Plug records */ /* Plug records */
unsigned int ns3plug = 0; unsigned int ns3plug;
s3plugrec_t s3plug[S3PLUG_MAX]; s3plugrec_t s3plug[S3PLUG_MAX];
/* CRC records */ /* CRC records */
unsigned int ns3crc = 0; unsigned int ns3crc;
s3crcrec_t s3crc[S3CRC_MAX]; s3crcrec_t s3crc[S3CRC_MAX];
/* Info records */ /* Info records */
unsigned int ns3info = 0; unsigned int ns3info;
s3inforec_t s3info[S3INFO_MAX]; s3inforec_t s3info[S3INFO_MAX];
/* S7 record (there _better_ be only one) */ /* S7 record (there _better_ be only one) */
@ -216,17 +216,17 @@ hfa384x_caplevel_t priid;
int prism2_fwapply(char *rfptr, int rfsize, wlandevice_t * wlandev); int prism2_fwapply(char *rfptr, int rfsize, wlandevice_t * wlandev);
int read_srecfile(char *rfptr, int rfsize); int read_srecfile(char *rfptr, int rfsize);
int mkimage(imgchunk_t * clist, unsigned int *ccnt); int mkimage(imgchunk_t *clist, unsigned int *ccnt);
int read_cardpda(pda_t * pda, wlandevice_t * wlandev); int read_cardpda(pda_t *pda, wlandevice_t *wlandev);
int mkpdrlist(pda_t * pda); int mkpdrlist(pda_t *pda);
int s3datarec_compare(const void *p1, const void *p2); int s3datarec_compare(const void *p1, const void *p2);
int plugimage(imgchunk_t * fchunk, unsigned int nfchunks, int plugimage(imgchunk_t *fchunk, unsigned int nfchunks,
s3plugrec_t * s3plug, unsigned int ns3plug, pda_t * pda); s3plugrec_t *s3plug, unsigned int ns3plug, pda_t * pda);
int crcimage(imgchunk_t * fchunk, unsigned int nfchunks, int crcimage(imgchunk_t *fchunk, unsigned int nfchunks,
s3crcrec_t * s3crc, unsigned int ns3crc); s3crcrec_t *s3crc, unsigned int ns3crc);
int writeimage(wlandevice_t * wlandev, imgchunk_t * fchunk, int writeimage(wlandevice_t *wlandev, imgchunk_t *fchunk,
unsigned int nfchunks); unsigned int nfchunks);
void free_chunks(imgchunk_t * fchunk, unsigned int *nfchunks); void free_chunks(imgchunk_t *fchunk, unsigned int *nfchunks);
void free_srecs(void); void free_srecs(void);
int validate_identity(void); int validate_identity(void);
@ -247,7 +247,7 @@ int validate_identity(void);
* 0 - success * 0 - success
* ~0 - failure * ~0 - failure
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int prism2_fwtry(struct usb_device *udev, wlandevice_t * wlandev) int prism2_fwtry(struct usb_device *udev, wlandevice_t *wlandev)
{ {
const struct firmware *fw_entry = NULL; const struct firmware *fw_entry = NULL;
@ -283,7 +283,7 @@ int prism2_fwtry(struct usb_device *udev, wlandevice_t * wlandev)
* 0 - success * 0 - success
* ~0 - failure * ~0 - failure
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int prism2_fwapply(char *rfptr, int rfsize, wlandevice_t * wlandev) int prism2_fwapply(char *rfptr, int rfsize, wlandevice_t *wlandev)
{ {
signed int result = 0; signed int result = 0;
p80211msg_dot11req_mibget_t getmsg; p80211msg_dot11req_mibget_t getmsg;
@ -425,7 +425,7 @@ int prism2_fwapply(char *rfptr, int rfsize, wlandevice_t * wlandev)
* 0 success * 0 success
* ~0 failure * ~0 failure
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int crcimage(imgchunk_t * fchunk, unsigned int nfchunks, s3crcrec_t * s3crc, int crcimage(imgchunk_t *fchunk, unsigned int nfchunks, s3crcrec_t *s3crc,
unsigned int ns3crc) unsigned int ns3crc)
{ {
int result = 0; int result = 0;
@ -490,7 +490,7 @@ int crcimage(imgchunk_t * fchunk, unsigned int nfchunks, s3crcrec_t * s3crc,
* Returns: * Returns:
* nothing * nothing
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
void free_chunks(imgchunk_t * fchunk, unsigned int *nfchunks) void free_chunks(imgchunk_t *fchunk, unsigned int *nfchunks)
{ {
int i; int i;
for (i = 0; i < *nfchunks; i++) { for (i = 0; i < *nfchunks; i++) {
@ -545,7 +545,7 @@ void free_srecs(void)
* 0 - success * 0 - success
* ~0 - failure (probably an errno) * ~0 - failure (probably an errno)
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int mkimage(imgchunk_t * clist, unsigned int *ccnt) int mkimage(imgchunk_t *clist, unsigned int *ccnt)
{ {
int result = 0; int result = 0;
int i; int i;
@ -644,7 +644,7 @@ int mkimage(imgchunk_t * clist, unsigned int *ccnt)
* 0 - success * 0 - success
* ~0 - failure (probably an errno) * ~0 - failure (probably an errno)
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int mkpdrlist(pda_t * pda) int mkpdrlist(pda_t *pda)
{ {
int result = 0; int result = 0;
u16 *pda16 = (u16 *) pda->buf; u16 *pda16 = (u16 *) pda->buf;
@ -717,8 +717,8 @@ int mkpdrlist(pda_t * pda)
* 0 success * 0 success
* ~0 failure * ~0 failure
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int plugimage(imgchunk_t * fchunk, unsigned int nfchunks, int plugimage(imgchunk_t *fchunk, unsigned int nfchunks,
s3plugrec_t * s3plug, unsigned int ns3plug, pda_t * pda) s3plugrec_t *s3plug, unsigned int ns3plug, pda_t * pda)
{ {
int result = 0; int result = 0;
int i; /* plug index */ int i; /* plug index */
@ -825,7 +825,7 @@ int plugimage(imgchunk_t * fchunk, unsigned int nfchunks,
* 0 - success * 0 - success
* ~0 - failure (probably an errno) * ~0 - failure (probably an errno)
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int read_cardpda(pda_t * pda, wlandevice_t * wlandev) int read_cardpda(pda_t *pda, wlandevice_t *wlandev)
{ {
int result = 0; int result = 0;
p80211msg_p2req_readpda_t msg; p80211msg_p2req_readpda_t msg;
@ -1175,7 +1175,7 @@ int s3datarec_compare(const void *p1, const void *p2)
* 0 success * 0 success
* ~0 failure * ~0 failure
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int writeimage(wlandevice_t * wlandev, imgchunk_t * fchunk, int writeimage(wlandevice_t *wlandev, imgchunk_t *fchunk,
unsigned int nfchunks) unsigned int nfchunks)
{ {
int result = 0; int result = 0;

Просмотреть файл

@ -117,7 +117,7 @@
* process thread (usually) * process thread (usually)
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int prism2mgmt_scan(wlandevice_t * wlandev, void *msgp) int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp)
{ {
int result = 0; int result = 0;
hfa384x_t *hw = wlandev->priv; hfa384x_t *hw = wlandev->priv;
@ -362,7 +362,7 @@ exit:
* process thread (usually) * process thread (usually)
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int prism2mgmt_scan_results(wlandevice_t * wlandev, void *msgp) int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp)
{ {
int result = 0; int result = 0;
p80211msg_dot11req_scan_results_t *req; p80211msg_dot11req_scan_results_t *req;
@ -511,7 +511,7 @@ exit:
* process thread (usually) * process thread (usually)
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int prism2mgmt_start(wlandevice_t * wlandev, void *msgp) int prism2mgmt_start(wlandevice_t *wlandev, void *msgp)
{ {
int result = 0; int result = 0;
hfa384x_t *hw = wlandev->priv; hfa384x_t *hw = wlandev->priv;
@ -688,7 +688,7 @@ done:
* Call context: * Call context:
* process thread (usually) * process thread (usually)
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int prism2mgmt_readpda(wlandevice_t * wlandev, void *msgp) int prism2mgmt_readpda(wlandevice_t *wlandev, void *msgp)
{ {
hfa384x_t *hw = wlandev->priv; hfa384x_t *hw = wlandev->priv;
p80211msg_p2req_readpda_t *msg = msgp; p80211msg_p2req_readpda_t *msg = msgp;
@ -754,7 +754,7 @@ int prism2mgmt_readpda(wlandevice_t * wlandev, void *msgp)
* Call context: * Call context:
* process thread (usually) * process thread (usually)
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int prism2mgmt_ramdl_state(wlandevice_t * wlandev, void *msgp) int prism2mgmt_ramdl_state(wlandevice_t *wlandev, void *msgp)
{ {
hfa384x_t *hw = wlandev->priv; hfa384x_t *hw = wlandev->priv;
p80211msg_p2req_ramdl_state_t *msg = msgp; p80211msg_p2req_ramdl_state_t *msg = msgp;
@ -810,7 +810,7 @@ int prism2mgmt_ramdl_state(wlandevice_t * wlandev, void *msgp)
* Call context: * Call context:
* process thread (usually) * process thread (usually)
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int prism2mgmt_ramdl_write(wlandevice_t * wlandev, void *msgp) int prism2mgmt_ramdl_write(wlandevice_t *wlandev, void *msgp)
{ {
hfa384x_t *hw = wlandev->priv; hfa384x_t *hw = wlandev->priv;
p80211msg_p2req_ramdl_write_t *msg = msgp; p80211msg_p2req_ramdl_write_t *msg = msgp;
@ -872,7 +872,7 @@ int prism2mgmt_ramdl_write(wlandevice_t * wlandev, void *msgp)
* Call context: * Call context:
* process thread (usually) * process thread (usually)
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int prism2mgmt_flashdl_state(wlandevice_t * wlandev, void *msgp) int prism2mgmt_flashdl_state(wlandevice_t *wlandev, void *msgp)
{ {
int result = 0; int result = 0;
hfa384x_t *hw = wlandev->priv; hfa384x_t *hw = wlandev->priv;
@ -943,7 +943,7 @@ int prism2mgmt_flashdl_state(wlandevice_t * wlandev, void *msgp)
* Call context: * Call context:
* process thread (usually) * process thread (usually)
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int prism2mgmt_flashdl_write(wlandevice_t * wlandev, void *msgp) int prism2mgmt_flashdl_write(wlandevice_t *wlandev, void *msgp)
{ {
hfa384x_t *hw = wlandev->priv; hfa384x_t *hw = wlandev->priv;
p80211msg_p2req_flashdl_write_t *msg = msgp; p80211msg_p2req_flashdl_write_t *msg = msgp;
@ -1004,7 +1004,7 @@ int prism2mgmt_flashdl_write(wlandevice_t * wlandev, void *msgp)
* process thread (usually) * process thread (usually)
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int prism2mgmt_autojoin(wlandevice_t * wlandev, void *msgp) int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp)
{ {
hfa384x_t *hw = wlandev->priv; hfa384x_t *hw = wlandev->priv;
int result = 0; int result = 0;
@ -1075,7 +1075,7 @@ int prism2mgmt_autojoin(wlandevice_t * wlandev, void *msgp)
* process thread (usually) * process thread (usually)
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int prism2mgmt_wlansniff(wlandevice_t * wlandev, void *msgp) int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
{ {
int result = 0; int result = 0;
p80211msg_lnxreq_wlansniff_t *msg = msgp; p80211msg_lnxreq_wlansniff_t *msg = msgp;

Просмотреть файл

@ -86,65 +86,65 @@ typedef struct mibrec {
u16 parm1; u16 parm1;
u16 parm2; u16 parm2;
u16 parm3; u16 parm3;
int (*func) (struct mibrec * mib, int (*func) (struct mibrec *mib,
int isget, int isget,
wlandevice_t * wlandev, wlandevice_t *wlandev,
hfa384x_t * hw, hfa384x_t *hw,
p80211msg_dot11req_mibset_t * msg, void *data); p80211msg_dot11req_mibset_t *msg, void *data);
} mibrec_t; } mibrec_t;
static int prism2mib_bytearea2pstr(mibrec_t * mib, static int prism2mib_bytearea2pstr(mibrec_t *mib,
int isget, int isget,
wlandevice_t * wlandev, wlandevice_t *wlandev,
hfa384x_t * hw, hfa384x_t *hw,
p80211msg_dot11req_mibset_t * msg, p80211msg_dot11req_mibset_t *msg,
void *data); void *data);
static int prism2mib_uint32(mibrec_t * mib, static int prism2mib_uint32(mibrec_t *mib,
int isget, int isget,
wlandevice_t * wlandev, wlandevice_t *wlandev,
hfa384x_t * hw, hfa384x_t *hw,
p80211msg_dot11req_mibset_t * msg, void *data); p80211msg_dot11req_mibset_t *msg, void *data);
static int prism2mib_flag(mibrec_t * mib, static int prism2mib_flag(mibrec_t *mib,
int isget, int isget,
wlandevice_t * wlandev, wlandevice_t *wlandev,
hfa384x_t * hw, hfa384x_t *hw,
p80211msg_dot11req_mibset_t * msg, void *data); p80211msg_dot11req_mibset_t *msg, void *data);
static int prism2mib_wepdefaultkey(mibrec_t * mib, static int prism2mib_wepdefaultkey(mibrec_t *mib,
int isget, int isget,
wlandevice_t * wlandev, wlandevice_t * wlandev,
hfa384x_t * hw, hfa384x_t *hw,
p80211msg_dot11req_mibset_t * msg, p80211msg_dot11req_mibset_t *msg,
void *data); void *data);
static int prism2mib_privacyinvoked(mibrec_t * mib, static int prism2mib_privacyinvoked(mibrec_t *mib,
int isget, int isget,
wlandevice_t * wlandev, wlandevice_t *wlandev,
hfa384x_t * hw, hfa384x_t *hw,
p80211msg_dot11req_mibset_t * msg, p80211msg_dot11req_mibset_t *msg,
void *data); void *data);
static int prism2mib_excludeunencrypted(mibrec_t * mib, static int prism2mib_excludeunencrypted(mibrec_t *mib,
int isget, int isget,
wlandevice_t * wlandev, wlandevice_t *wlandev,
hfa384x_t * hw, hfa384x_t *hw,
p80211msg_dot11req_mibset_t * msg, p80211msg_dot11req_mibset_t *msg,
void *data); void *data);
static int prism2mib_fragmentationthreshold(mibrec_t * mib, static int prism2mib_fragmentationthreshold(mibrec_t *mib,
int isget, int isget,
wlandevice_t * wlandev, wlandevice_t *wlandev,
hfa384x_t * hw, hfa384x_t *hw,
p80211msg_dot11req_mibset_t * msg, p80211msg_dot11req_mibset_t *msg,
void *data); void *data);
static int prism2mib_priv(mibrec_t * mib, static int prism2mib_priv(mibrec_t *mib,
int isget, int isget,
wlandevice_t * wlandev, wlandevice_t *wlandev,
hfa384x_t * hw, hfa384x_t *hw,
p80211msg_dot11req_mibset_t * msg, void *data); p80211msg_dot11req_mibset_t *msg, void *data);
static mibrec_t mibtab[] = { static mibrec_t mibtab[] = {
@ -258,7 +258,7 @@ static mibrec_t mibtab[] = {
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int prism2mgmt_mibset_mibget(wlandevice_t * wlandev, void *msgp) int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp)
{ {
hfa384x_t *hw = wlandev->priv; hfa384x_t *hw = wlandev->priv;
int result, isget; int result, isget;
@ -372,11 +372,11 @@ done:
* *
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int prism2mib_bytearea2pstr(mibrec_t * mib, static int prism2mib_bytearea2pstr(mibrec_t *mib,
int isget, int isget,
wlandevice_t * wlandev, wlandevice_t *wlandev,
hfa384x_t * hw, hfa384x_t *hw,
p80211msg_dot11req_mibset_t * msg, p80211msg_dot11req_mibset_t *msg,
void *data) void *data)
{ {
int result; int result;
@ -422,11 +422,11 @@ static int prism2mib_bytearea2pstr(mibrec_t * mib,
* *
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int prism2mib_uint32(mibrec_t * mib, static int prism2mib_uint32(mibrec_t *mib,
int isget, int isget,
wlandevice_t * wlandev, wlandevice_t *wlandev,
hfa384x_t * hw, hfa384x_t *hw,
p80211msg_dot11req_mibset_t * msg, void *data) p80211msg_dot11req_mibset_t *msg, void *data)
{ {
int result; int result;
u32 *uint32 = (u32 *) data; u32 *uint32 = (u32 *) data;
@ -469,11 +469,11 @@ static int prism2mib_uint32(mibrec_t * mib,
* *
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int prism2mib_flag(mibrec_t * mib, static int prism2mib_flag(mibrec_t *mib,
int isget, int isget,
wlandevice_t * wlandev, wlandevice_t *wlandev,
hfa384x_t * hw, hfa384x_t *hw,
p80211msg_dot11req_mibset_t * msg, void *data) p80211msg_dot11req_mibset_t *msg, void *data)
{ {
int result; int result;
u32 *uint32 = (u32 *) data; u32 *uint32 = (u32 *) data;
@ -526,11 +526,11 @@ static int prism2mib_flag(mibrec_t * mib,
* *
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int prism2mib_wepdefaultkey(mibrec_t * mib, static int prism2mib_wepdefaultkey(mibrec_t *mib,
int isget, int isget,
wlandevice_t * wlandev, wlandevice_t *wlandev,
hfa384x_t * hw, hfa384x_t *hw,
p80211msg_dot11req_mibset_t * msg, p80211msg_dot11req_mibset_t *msg,
void *data) void *data)
{ {
int result; int result;
@ -576,11 +576,11 @@ static int prism2mib_wepdefaultkey(mibrec_t * mib,
* *
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int prism2mib_privacyinvoked(mibrec_t * mib, static int prism2mib_privacyinvoked(mibrec_t *mib,
int isget, int isget,
wlandevice_t * wlandev, wlandevice_t *wlandev,
hfa384x_t * hw, hfa384x_t *hw,
p80211msg_dot11req_mibset_t * msg, p80211msg_dot11req_mibset_t *msg,
void *data) void *data)
{ {
int result; int result;
@ -622,11 +622,11 @@ static int prism2mib_privacyinvoked(mibrec_t * mib,
* *
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int prism2mib_excludeunencrypted(mibrec_t * mib, static int prism2mib_excludeunencrypted(mibrec_t *mib,
int isget, int isget,
wlandevice_t * wlandev, wlandevice_t *wlandev,
hfa384x_t * hw, hfa384x_t *hw,
p80211msg_dot11req_mibset_t * msg, p80211msg_dot11req_mibset_t *msg,
void *data) void *data)
{ {
int result; int result;
@ -661,11 +661,11 @@ static int prism2mib_excludeunencrypted(mibrec_t * mib,
* *
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int prism2mib_fragmentationthreshold(mibrec_t * mib, static int prism2mib_fragmentationthreshold(mibrec_t *mib,
int isget, int isget,
wlandevice_t * wlandev, wlandevice_t *wlandev,
hfa384x_t * hw, hfa384x_t *hw,
p80211msg_dot11req_mibset_t * msg, p80211msg_dot11req_mibset_t *msg,
void *data) void *data)
{ {
int result; int result;
@ -710,11 +710,11 @@ static int prism2mib_fragmentationthreshold(mibrec_t * mib,
* *
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int prism2mib_priv(mibrec_t * mib, static int prism2mib_priv(mibrec_t *mib,
int isget, int isget,
wlandevice_t * wlandev, wlandevice_t *wlandev,
hfa384x_t * hw, hfa384x_t *hw,
p80211msg_dot11req_mibset_t * msg, void *data) p80211msg_dot11req_mibset_t *msg, void *data)
{ {
p80211pstrd_t *pstr = (p80211pstrd_t *) data; p80211pstrd_t *pstr = (p80211pstrd_t *) data;
@ -764,7 +764,7 @@ static int prism2mib_priv(mibrec_t * mib,
* *
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t * bytestr, p80211pstrd_t * pstr) void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr)
{ {
bytestr->len = cpu_to_le16((u16) (pstr->len)); bytestr->len = cpu_to_le16((u16) (pstr->len));
memcpy(bytestr->data, pstr->data, pstr->len); memcpy(bytestr->data, pstr->data, pstr->len);
@ -785,7 +785,7 @@ void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t * bytestr, p80211pstrd_t * pstr)
* *
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
void prism2mgmt_pstr2bytearea(u8 * bytearea, p80211pstrd_t * pstr) void prism2mgmt_pstr2bytearea(u8 *bytearea, p80211pstrd_t *pstr)
{ {
memcpy(bytearea, pstr->data, pstr->len); memcpy(bytearea, pstr->data, pstr->len);
} }
@ -805,7 +805,7 @@ void prism2mgmt_pstr2bytearea(u8 * bytearea, p80211pstrd_t * pstr)
* *
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t * bytestr, p80211pstrd_t * pstr) void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr)
{ {
pstr->len = (u8) (le16_to_cpu((u16) (bytestr->len))); pstr->len = (u8) (le16_to_cpu((u16) (bytestr->len)));
memcpy(pstr->data, bytestr->data, pstr->len); memcpy(pstr->data, bytestr->data, pstr->len);
@ -826,7 +826,7 @@ void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t * bytestr, p80211pstrd_t * pstr)
* *
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
void prism2mgmt_bytearea2pstr(u8 * bytearea, p80211pstrd_t * pstr, int len) void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len)
{ {
pstr->len = (u8) len; pstr->len = (u8) len;
memcpy(pstr->data, bytearea, len); memcpy(pstr->data, bytearea, len);

Просмотреть файл

@ -115,7 +115,7 @@ static wlandevice_t *create_wlan(void);
int prism2_reset_holdtime = 30; /* Reset hold time in ms */ int prism2_reset_holdtime = 30; /* Reset hold time in ms */
int prism2_reset_settletime = 100; /* Reset settle time in ms */ int prism2_reset_settletime = 100; /* Reset settle time in ms */
static int prism2_doreset = 0; /* Do a reset at init? */ static int prism2_doreset; /* Do a reset at init? */
module_param(prism2_doreset, int, 0644); module_param(prism2_doreset, int, 0644);
MODULE_PARM_DESC(prism2_doreset, "Issue a reset on initialization"); MODULE_PARM_DESC(prism2_doreset, "Issue a reset on initialization");
@ -127,37 +127,37 @@ MODULE_PARM_DESC(prism2_reset_settletime, "reset settle time in ms");
MODULE_LICENSE("Dual MPL/GPL"); MODULE_LICENSE("Dual MPL/GPL");
static int prism2sta_open(wlandevice_t * wlandev); static int prism2sta_open(wlandevice_t *wlandev);
static int prism2sta_close(wlandevice_t * wlandev); static int prism2sta_close(wlandevice_t *wlandev);
static void prism2sta_reset(wlandevice_t * wlandev); static void prism2sta_reset(wlandevice_t *wlandev);
static int prism2sta_txframe(wlandevice_t * wlandev, struct sk_buff *skb, static int prism2sta_txframe(wlandevice_t *wlandev, struct sk_buff *skb,
p80211_hdr_t * p80211_hdr, p80211_hdr_t *p80211_hdr,
p80211_metawep_t * p80211_wep); p80211_metawep_t *p80211_wep);
static int prism2sta_mlmerequest(wlandevice_t * wlandev, p80211msg_t * msg); static int prism2sta_mlmerequest(wlandevice_t *wlandev, p80211msg_t *msg);
static int prism2sta_getcardinfo(wlandevice_t * wlandev); static int prism2sta_getcardinfo(wlandevice_t *wlandev);
static int prism2sta_globalsetup(wlandevice_t * wlandev); static int prism2sta_globalsetup(wlandevice_t *wlandev);
static int prism2sta_setmulticast(wlandevice_t * wlandev, netdevice_t * dev); static int prism2sta_setmulticast(wlandevice_t *wlandev, netdevice_t *dev);
static void prism2sta_inf_handover(wlandevice_t * wlandev, static void prism2sta_inf_handover(wlandevice_t *wlandev,
hfa384x_InfFrame_t * inf); hfa384x_InfFrame_t *inf);
static void prism2sta_inf_tallies(wlandevice_t * wlandev, static void prism2sta_inf_tallies(wlandevice_t *wlandev,
hfa384x_InfFrame_t * inf); hfa384x_InfFrame_t *inf);
static void prism2sta_inf_hostscanresults(wlandevice_t * wlandev, static void prism2sta_inf_hostscanresults(wlandevice_t *wlandev,
hfa384x_InfFrame_t * inf); hfa384x_InfFrame_t *inf);
static void prism2sta_inf_scanresults(wlandevice_t * wlandev, static void prism2sta_inf_scanresults(wlandevice_t *wlandev,
hfa384x_InfFrame_t * inf); hfa384x_InfFrame_t *inf);
static void prism2sta_inf_chinforesults(wlandevice_t * wlandev, static void prism2sta_inf_chinforesults(wlandevice_t *wlandev,
hfa384x_InfFrame_t * inf); hfa384x_InfFrame_t *inf);
static void prism2sta_inf_linkstatus(wlandevice_t * wlandev, static void prism2sta_inf_linkstatus(wlandevice_t *wlandev,
hfa384x_InfFrame_t * inf); hfa384x_InfFrame_t *inf);
static void prism2sta_inf_assocstatus(wlandevice_t * wlandev, static void prism2sta_inf_assocstatus(wlandevice_t *wlandev,
hfa384x_InfFrame_t * inf); hfa384x_InfFrame_t *inf);
static void prism2sta_inf_authreq(wlandevice_t * wlandev, static void prism2sta_inf_authreq(wlandevice_t *wlandev,
hfa384x_InfFrame_t * inf); hfa384x_InfFrame_t *inf);
static void prism2sta_inf_authreq_defer(wlandevice_t * wlandev, static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev,
hfa384x_InfFrame_t * inf); hfa384x_InfFrame_t *inf);
static void prism2sta_inf_psusercnt(wlandevice_t * wlandev, static void prism2sta_inf_psusercnt(wlandevice_t *wlandev,
hfa384x_InfFrame_t * inf); hfa384x_InfFrame_t *inf);
/*---------------------------------------------------------------- /*----------------------------------------------------------------
* prism2sta_open * prism2sta_open
@ -180,7 +180,7 @@ static void prism2sta_inf_psusercnt(wlandevice_t * wlandev,
* Call context: * Call context:
* process thread * process thread
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int prism2sta_open(wlandevice_t * wlandev) static int prism2sta_open(wlandevice_t *wlandev)
{ {
/* We don't currently have to do anything else. /* We don't currently have to do anything else.
* The setup of the MAC should be subsequently completed via * The setup of the MAC should be subsequently completed via
@ -214,7 +214,7 @@ static int prism2sta_open(wlandevice_t * wlandev)
* Call context: * Call context:
* process thread * process thread
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int prism2sta_close(wlandevice_t * wlandev) static int prism2sta_close(wlandevice_t *wlandev)
{ {
/* We don't currently have to do anything else. /* We don't currently have to do anything else.
* Higher layers know we're not ready from dev->start==0 and * Higher layers know we're not ready from dev->start==0 and
@ -242,7 +242,7 @@ static int prism2sta_close(wlandevice_t * wlandev)
* Call context: * Call context:
* process thread * process thread
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static void prism2sta_reset(wlandevice_t * wlandev) static void prism2sta_reset(wlandevice_t *wlandev)
{ {
return; return;
} }
@ -268,9 +268,9 @@ static void prism2sta_reset(wlandevice_t * wlandev)
* Call context: * Call context:
* process thread * process thread
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int prism2sta_txframe(wlandevice_t * wlandev, struct sk_buff *skb, static int prism2sta_txframe(wlandevice_t *wlandev, struct sk_buff *skb,
p80211_hdr_t * p80211_hdr, p80211_hdr_t *p80211_hdr,
p80211_metawep_t * p80211_wep) p80211_metawep_t *p80211_wep)
{ {
hfa384x_t *hw = (hfa384x_t *) wlandev->priv; hfa384x_t *hw = (hfa384x_t *) wlandev->priv;
int result; int result;
@ -310,7 +310,7 @@ static int prism2sta_txframe(wlandevice_t * wlandev, struct sk_buff *skb,
* Call context: * Call context:
* process thread * process thread
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int prism2sta_mlmerequest(wlandevice_t * wlandev, p80211msg_t * msg) static int prism2sta_mlmerequest(wlandevice_t *wlandev, p80211msg_t *msg)
{ {
hfa384x_t *hw = (hfa384x_t *) wlandev->priv; hfa384x_t *hw = (hfa384x_t *) wlandev->priv;
@ -437,7 +437,7 @@ static int prism2sta_mlmerequest(wlandevice_t * wlandev, p80211msg_t * msg)
* process thread (usually) * process thread (usually)
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
u32 prism2sta_ifstate(wlandevice_t * wlandev, u32 ifstate) u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
{ {
hfa384x_t *hw = (hfa384x_t *) wlandev->priv; hfa384x_t *hw = (hfa384x_t *) wlandev->priv;
u32 result; u32 result;
@ -455,7 +455,8 @@ u32 prism2sta_ifstate(wlandevice_t * wlandev, u32 ifstate)
* Initialize the device+driver sufficiently * Initialize the device+driver sufficiently
* for firmware loading. * for firmware loading.
*/ */
if ((result = hfa384x_drvr_start(hw))) { result = hfa384x_drvr_start(hw);
if (result) {
printk(KERN_ERR printk(KERN_ERR
"hfa384x_drvr_start() failed," "hfa384x_drvr_start() failed,"
"result=%d\n", (int)result); "result=%d\n", (int)result);
@ -499,7 +500,8 @@ u32 prism2sta_ifstate(wlandevice_t * wlandev, u32 ifstate)
* can't make any assumptions about the state * can't make any assumptions about the state
* of the hardware or a previous firmware load. * of the hardware or a previous firmware load.
*/ */
if ((result = hfa384x_drvr_start(hw))) { result = hfa384x_drvr_start(hw);
if (result) {
printk(KERN_ERR printk(KERN_ERR
"hfa384x_drvr_start() failed," "hfa384x_drvr_start() failed,"
"result=%d\n", (int)result); "result=%d\n", (int)result);
@ -509,7 +511,8 @@ u32 prism2sta_ifstate(wlandevice_t * wlandev, u32 ifstate)
break; break;
} }
if ((result = prism2sta_getcardinfo(wlandev))) { result = prism2sta_getcardinfo(wlandev);
if (result) {
printk(KERN_ERR printk(KERN_ERR
"prism2sta_getcardinfo() failed," "prism2sta_getcardinfo() failed,"
"result=%d\n", (int)result); "result=%d\n", (int)result);
@ -519,7 +522,8 @@ u32 prism2sta_ifstate(wlandevice_t * wlandev, u32 ifstate)
wlandev->msdstate = WLAN_MSD_HWPRESENT; wlandev->msdstate = WLAN_MSD_HWPRESENT;
break; break;
} }
if ((result = prism2sta_globalsetup(wlandev))) { result = prism2sta_globalsetup(wlandev);
if (result) {
printk(KERN_ERR printk(KERN_ERR
"prism2sta_globalsetup() failed," "prism2sta_globalsetup() failed,"
"result=%d\n", (int)result); "result=%d\n", (int)result);
@ -607,7 +611,7 @@ u32 prism2sta_ifstate(wlandevice_t * wlandev, u32 ifstate)
* Call context: * Call context:
* Either. * Either.
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int prism2sta_getcardinfo(wlandevice_t * wlandev) static int prism2sta_getcardinfo(wlandevice_t *wlandev)
{ {
int result = 0; int result = 0;
hfa384x_t *hw = (hfa384x_t *) wlandev->priv; hfa384x_t *hw = (hfa384x_t *) wlandev->priv;
@ -931,7 +935,7 @@ done:
* Call context: * Call context:
* process thread * process thread
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int prism2sta_globalsetup(wlandevice_t * wlandev) static int prism2sta_globalsetup(wlandevice_t *wlandev)
{ {
hfa384x_t *hw = (hfa384x_t *) wlandev->priv; hfa384x_t *hw = (hfa384x_t *) wlandev->priv;
@ -940,7 +944,7 @@ static int prism2sta_globalsetup(wlandevice_t * wlandev)
WLAN_DATA_MAXLEN); WLAN_DATA_MAXLEN);
} }
static int prism2sta_setmulticast(wlandevice_t * wlandev, netdevice_t * dev) static int prism2sta_setmulticast(wlandevice_t *wlandev, netdevice_t *dev)
{ {
int result = 0; int result = 0;
hfa384x_t *hw = (hfa384x_t *) wlandev->priv; hfa384x_t *hw = (hfa384x_t *) wlandev->priv;
@ -981,8 +985,8 @@ exit:
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static void prism2sta_inf_handover(wlandevice_t * wlandev, static void prism2sta_inf_handover(wlandevice_t *wlandev,
hfa384x_InfFrame_t * inf) hfa384x_InfFrame_t *inf)
{ {
pr_debug("received infoframe:HANDOVER (unhandled)\n"); pr_debug("received infoframe:HANDOVER (unhandled)\n");
return; return;
@ -1005,8 +1009,8 @@ static void prism2sta_inf_handover(wlandevice_t * wlandev,
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static void prism2sta_inf_tallies(wlandevice_t * wlandev, static void prism2sta_inf_tallies(wlandevice_t *wlandev,
hfa384x_InfFrame_t * inf) hfa384x_InfFrame_t *inf)
{ {
hfa384x_t *hw = (hfa384x_t *) wlandev->priv; hfa384x_t *hw = (hfa384x_t *) wlandev->priv;
u16 *src16; u16 *src16;
@ -1053,8 +1057,8 @@ static void prism2sta_inf_tallies(wlandevice_t * wlandev,
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static void prism2sta_inf_scanresults(wlandevice_t * wlandev, static void prism2sta_inf_scanresults(wlandevice_t *wlandev,
hfa384x_InfFrame_t * inf) hfa384x_InfFrame_t *inf)
{ {
hfa384x_t *hw = (hfa384x_t *) wlandev->priv; hfa384x_t *hw = (hfa384x_t *) wlandev->priv;
@ -1111,8 +1115,8 @@ static void prism2sta_inf_scanresults(wlandevice_t * wlandev,
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static void prism2sta_inf_hostscanresults(wlandevice_t * wlandev, static void prism2sta_inf_hostscanresults(wlandevice_t *wlandev,
hfa384x_InfFrame_t * inf) hfa384x_InfFrame_t *inf)
{ {
hfa384x_t *hw = (hfa384x_t *) wlandev->priv; hfa384x_t *hw = (hfa384x_t *) wlandev->priv;
int nbss; int nbss;
@ -1153,8 +1157,8 @@ static void prism2sta_inf_hostscanresults(wlandevice_t * wlandev,
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static void prism2sta_inf_chinforesults(wlandevice_t * wlandev, static void prism2sta_inf_chinforesults(wlandevice_t *wlandev,
hfa384x_InfFrame_t * inf) hfa384x_InfFrame_t *inf)
{ {
hfa384x_t *hw = (hfa384x_t *) wlandev->priv; hfa384x_t *hw = (hfa384x_t *) wlandev->priv;
unsigned int i, n; unsigned int i, n;
@ -1468,8 +1472,8 @@ failed:
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static void prism2sta_inf_linkstatus(wlandevice_t * wlandev, static void prism2sta_inf_linkstatus(wlandevice_t *wlandev,
hfa384x_InfFrame_t * inf) hfa384x_InfFrame_t *inf)
{ {
hfa384x_t *hw = (hfa384x_t *) wlandev->priv; hfa384x_t *hw = (hfa384x_t *) wlandev->priv;
@ -1498,8 +1502,8 @@ static void prism2sta_inf_linkstatus(wlandevice_t * wlandev,
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static void prism2sta_inf_assocstatus(wlandevice_t * wlandev, static void prism2sta_inf_assocstatus(wlandevice_t *wlandev,
hfa384x_InfFrame_t * inf) hfa384x_InfFrame_t *inf)
{ {
hfa384x_t *hw = (hfa384x_t *) wlandev->priv; hfa384x_t *hw = (hfa384x_t *) wlandev->priv;
hfa384x_AssocStatus_t rec; hfa384x_AssocStatus_t rec;
@ -1560,8 +1564,8 @@ static void prism2sta_inf_assocstatus(wlandevice_t * wlandev,
* interrupt * interrupt
* *
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static void prism2sta_inf_authreq(wlandevice_t * wlandev, static void prism2sta_inf_authreq(wlandevice_t *wlandev,
hfa384x_InfFrame_t * inf) hfa384x_InfFrame_t *inf)
{ {
hfa384x_t *hw = (hfa384x_t *) wlandev->priv; hfa384x_t *hw = (hfa384x_t *) wlandev->priv;
struct sk_buff *skb; struct sk_buff *skb;
@ -1575,8 +1579,8 @@ static void prism2sta_inf_authreq(wlandevice_t * wlandev,
} }
} }
static void prism2sta_inf_authreq_defer(wlandevice_t * wlandev, static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev,
hfa384x_InfFrame_t * inf) hfa384x_InfFrame_t *inf)
{ {
hfa384x_t *hw = (hfa384x_t *) wlandev->priv; hfa384x_t *hw = (hfa384x_t *) wlandev->priv;
hfa384x_authenticateStation_data_t rec; hfa384x_authenticateStation_data_t rec;
@ -1749,8 +1753,8 @@ static void prism2sta_inf_authreq_defer(wlandevice_t * wlandev,
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static void prism2sta_inf_psusercnt(wlandevice_t * wlandev, static void prism2sta_inf_psusercnt(wlandevice_t *wlandev,
hfa384x_InfFrame_t * inf) hfa384x_InfFrame_t *inf)
{ {
hfa384x_t *hw = (hfa384x_t *) wlandev->priv; hfa384x_t *hw = (hfa384x_t *) wlandev->priv;
@ -1776,7 +1780,7 @@ static void prism2sta_inf_psusercnt(wlandevice_t * wlandev,
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
void prism2sta_ev_info(wlandevice_t * wlandev, hfa384x_InfFrame_t * inf) void prism2sta_ev_info(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf)
{ {
inf->infotype = le16_to_cpu(inf->infotype); inf->infotype = le16_to_cpu(inf->infotype);
/* Dispatch */ /* Dispatch */
@ -1844,7 +1848,7 @@ void prism2sta_ev_info(wlandevice_t * wlandev, hfa384x_InfFrame_t * inf)
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
void prism2sta_ev_txexc(wlandevice_t * wlandev, u16 status) void prism2sta_ev_txexc(wlandevice_t *wlandev, u16 status)
{ {
pr_debug("TxExc status=0x%x.\n", status); pr_debug("TxExc status=0x%x.\n", status);
@ -1867,7 +1871,7 @@ void prism2sta_ev_txexc(wlandevice_t * wlandev, u16 status)
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
void prism2sta_ev_tx(wlandevice_t * wlandev, u16 status) void prism2sta_ev_tx(wlandevice_t *wlandev, u16 status)
{ {
pr_debug("Tx Complete, status=0x%04x\n", status); pr_debug("Tx Complete, status=0x%04x\n", status);
/* update linux network stats */ /* update linux network stats */
@ -1891,7 +1895,7 @@ void prism2sta_ev_tx(wlandevice_t * wlandev, u16 status)
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
void prism2sta_ev_rx(wlandevice_t * wlandev, struct sk_buff *skb) void prism2sta_ev_rx(wlandevice_t *wlandev, struct sk_buff *skb)
{ {
p80211netdev_rx(wlandev, skb); p80211netdev_rx(wlandev, skb);
return; return;
@ -1913,7 +1917,7 @@ void prism2sta_ev_rx(wlandevice_t * wlandev, struct sk_buff *skb)
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
void prism2sta_ev_alloc(wlandevice_t * wlandev) void prism2sta_ev_alloc(wlandevice_t *wlandev)
{ {
netif_wake_queue(wlandev->netdev); netif_wake_queue(wlandev->netdev);
return; return;

Просмотреть файл

@ -4,9 +4,9 @@
#include "prism2sta.c" #include "prism2sta.c"
#include "prism2fw.c" #include "prism2fw.c"
#define PRISM_USB_DEVICE(vid, pid, name) \ #define PRISM_USB_DEVICE(vid, pid, name) \
USB_DEVICE(vid, pid), \ USB_DEVICE(vid, pid), \
.driver_info = (unsigned long) name .driver_info = (unsigned long) name
static struct usb_device_id usb_prism_tbl[] = { static struct usb_device_id usb_prism_tbl[] = {
{PRISM_USB_DEVICE(0x04bb, 0x0922, "IOData AirPort WN-B11/USBS")}, {PRISM_USB_DEVICE(0x04bb, 0x0922, "IOData AirPort WN-B11/USBS")},
@ -111,8 +111,8 @@ static int prism2sta_probe_usb(struct usb_interface *interface,
int result = 0; int result = 0;
dev = interface_to_usbdev(interface); dev = interface_to_usbdev(interface);
wlandev = create_wlan();
if ((wlandev = create_wlan()) == NULL) { if (wlandev == NULL) {
printk(KERN_ERR "%s: Memory allocation failure.\n", dev_info); printk(KERN_ERR "%s: Memory allocation failure.\n", dev_info);
result = -EIO; result = -EIO;
goto failed; goto failed;