orinoco_usb: implement fw download

This involves some refactorring of the common fw download code to
substitute ezusb versions of various functions.

Note that WPA-enabled firmwares (9.xx series) will not work fully with
orinoco_usb yet.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
David Kilroy
2010-05-01 14:05:43 +01:00
committed by John W. Linville
parent fc97431a50
commit 07cefe7ac9
6 changed files with 348 additions and 237 deletions

View File

@@ -393,6 +393,12 @@ struct hermes_ops {
u16 id, u16 offset);
int (*bap_pwrite)(struct hermes *hw, int bap, const void *buf,
int len, u16 id, u16 offset);
int (*read_pda)(struct hermes *hw, __le16 *pda,
u32 pda_addr, u16 pda_len);
int (*program_init)(struct hermes *hw, u32 entry_point);
int (*program_end)(struct hermes *hw);
int (*program)(struct hermes *hw, const char *buf,
u32 addr, u32 len);
void (*lock_irqsave)(spinlock_t *lock, unsigned long *flags);
void (*unlock_irqrestore)(spinlock_t *lock, unsigned long *flags);
void (*lock_irq)(spinlock_t *lock);
@@ -406,6 +412,7 @@ typedef struct hermes {
#define HERMES_16BIT_REGSPACING 0
#define HERMES_32BIT_REGSPACING 1
u16 inten; /* Which interrupts should be enabled? */
bool eeprom_pda;
const struct hermes_ops *ops;
void *priv;
} hermes_t;