diff options
Diffstat (limited to 'drivers/net/wireless/orinoco/hermes.c')
-rw-r--r-- | drivers/net/wireless/orinoco/hermes.c | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/drivers/net/wireless/orinoco/hermes.c b/drivers/net/wireless/orinoco/hermes.c index 6c6a23e..75c15bc 100644 --- a/drivers/net/wireless/orinoco/hermes.c +++ b/drivers/net/wireless/orinoco/hermes.c @@ -103,7 +103,7 @@ static const struct hermes_ops hermes_ops_local; Callable from any context. */ -static int hermes_issue_cmd(hermes_t *hw, u16 cmd, u16 param0, +static int hermes_issue_cmd(struct hermes *hw, u16 cmd, u16 param0, u16 param1, u16 param2) { int k = CMD_BUSY_TIMEOUT; @@ -132,7 +132,7 @@ static int hermes_issue_cmd(hermes_t *hw, u16 cmd, u16 param0, */ /* For doing cmds that wipe the magic constant in SWSUPPORT0 */ -static int hermes_doicmd_wait(hermes_t *hw, u16 cmd, +static int hermes_doicmd_wait(struct hermes *hw, u16 cmd, u16 parm0, u16 parm1, u16 parm2, struct hermes_response *resp) { @@ -185,7 +185,8 @@ out: return err; } -void hermes_struct_init(hermes_t *hw, void __iomem *address, int reg_spacing) +void hermes_struct_init(struct hermes *hw, void __iomem *address, + int reg_spacing) { hw->iobase = address; hw->reg_spacing = reg_spacing; @@ -195,7 +196,7 @@ void hermes_struct_init(hermes_t *hw, void __iomem *address, int reg_spacing) } EXPORT_SYMBOL(hermes_struct_init); -static int hermes_init(hermes_t *hw) +static int hermes_init(struct hermes *hw) { u16 reg; int err = 0; @@ -249,7 +250,7 @@ static int hermes_init(hermes_t *hw) * > 0 on error returned by the firmware * * Callable from any context, but locking is your problem. */ -static int hermes_docmd_wait(hermes_t *hw, u16 cmd, u16 parm0, +static int hermes_docmd_wait(struct hermes *hw, u16 cmd, u16 parm0, struct hermes_response *resp) { int err; @@ -313,7 +314,7 @@ static int hermes_docmd_wait(hermes_t *hw, u16 cmd, u16 parm0, return err; } -static int hermes_allocate(hermes_t *hw, u16 size, u16 *fid) +static int hermes_allocate(struct hermes *hw, u16 size, u16 *fid) { int err = 0; int k; @@ -363,7 +364,7 @@ static int hermes_allocate(hermes_t *hw, u16 size, u16 *fid) * from firmware * * Callable from any context */ -static int hermes_bap_seek(hermes_t *hw, int bap, u16 id, u16 offset) +static int hermes_bap_seek(struct hermes *hw, int bap, u16 id, u16 offset) { int sreg = bap ? HERMES_SELECT1 : HERMES_SELECT0; int oreg = bap ? HERMES_OFFSET1 : HERMES_OFFSET0; @@ -422,7 +423,7 @@ static int hermes_bap_seek(hermes_t *hw, int bap, u16 id, u16 offset) * 0 on success * > 0 on error from firmware */ -static int hermes_bap_pread(hermes_t *hw, int bap, void *buf, int len, +static int hermes_bap_pread(struct hermes *hw, int bap, void *buf, int len, u16 id, u16 offset) { int dreg = bap ? HERMES_DATA1 : HERMES_DATA0; @@ -436,7 +437,7 @@ static int hermes_bap_pread(hermes_t *hw, int bap, void *buf, int len, goto out; /* Actually do the transfer */ - hermes_read_words(hw, dreg, buf, len/2); + hermes_read_words(hw, dreg, buf, len / 2); out: return err; @@ -450,8 +451,8 @@ static int hermes_bap_pread(hermes_t *hw, int bap, void *buf, int len, * 0 on success * > 0 on error from firmware */ -static int hermes_bap_pwrite(hermes_t *hw, int bap, const void *buf, int len, - u16 id, u16 offset) +static int hermes_bap_pwrite(struct hermes *hw, int bap, const void *buf, + int len, u16 id, u16 offset) { int dreg = bap ? HERMES_DATA1 : HERMES_DATA0; int err = 0; @@ -478,8 +479,8 @@ static int hermes_bap_pwrite(hermes_t *hw, int bap, const void *buf, int len, * practice. * * Callable from user or bh context. */ -static int hermes_read_ltv(hermes_t *hw, int bap, u16 rid, unsigned bufsize, - u16 *length, void *buf) +static int hermes_read_ltv(struct hermes *hw, int bap, u16 rid, + unsigned bufsize, u16 *length, void *buf) { int err = 0; int dreg = bap ? HERMES_DATA1 : HERMES_DATA0; @@ -523,7 +524,7 @@ static int hermes_read_ltv(hermes_t *hw, int bap, u16 rid, unsigned bufsize, return 0; } -static int hermes_write_ltv(hermes_t *hw, int bap, u16 rid, +static int hermes_write_ltv(struct hermes *hw, int bap, u16 rid, u16 length, const void *value) { int dreg = bap ? HERMES_DATA1 : HERMES_DATA0; @@ -553,14 +554,14 @@ static int hermes_write_ltv(hermes_t *hw, int bap, u16 rid, /*** Hermes AUX control ***/ static inline void -hermes_aux_setaddr(hermes_t *hw, u32 addr) +hermes_aux_setaddr(struct hermes *hw, u32 addr) { hermes_write_reg(hw, HERMES_AUXPAGE, (u16) (addr >> 7)); hermes_write_reg(hw, HERMES_AUXOFFSET, (u16) (addr & 0x7F)); } static inline int -hermes_aux_control(hermes_t *hw, int enabled) +hermes_aux_control(struct hermes *hw, int enabled) { int desired_state = enabled ? HERMES_AUX_ENABLED : HERMES_AUX_DISABLED; int action = enabled ? HERMES_AUX_ENABLE : HERMES_AUX_DISABLE; @@ -594,7 +595,7 @@ hermes_aux_control(hermes_t *hw, int enabled) * wl_lkm Agere fw does * Don't know about intersil */ -static int hermesi_program_init(hermes_t *hw, u32 offset) +static int hermesi_program_init(struct hermes *hw, u32 offset) { int err; @@ -643,7 +644,7 @@ static int hermesi_program_init(hermes_t *hw, u32 offset) * wl_lkm Agere fw does * Don't know about intersil */ -static int hermesi_program_end(hermes_t *hw) +static int hermesi_program_end(struct hermes *hw) { struct hermes_response resp; int rc = 0; @@ -684,7 +685,8 @@ static int hermes_program_bytes(struct hermes *hw, const char *data, } /* Read PDA from the adapter */ -static int hermes_read_pda(hermes_t *hw, __le16 *pda, u32 pda_addr, u16 pda_len) +static int hermes_read_pda(struct hermes *hw, __le16 *pda, u32 pda_addr, + u16 pda_len) { int ret; u16 pda_size; |