diff options
author | David Kilroy <kilroyd@googlemail.com> | 2010-05-01 15:05:40 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-05-03 20:53:07 +0200 |
commit | bcad6e80f3fb0d6724c3814cf32258bbcf1d67db (patch) | |
tree | 13fc2edae79405b7ae393099486153eefa3091d1 /drivers/net/wireless/orinoco/hermes.h | |
parent | orinoco: allow driver to specify netdev_ops (diff) | |
download | linux-bcad6e80f3fb0d6724c3814cf32258bbcf1d67db.tar.xz linux-bcad6e80f3fb0d6724c3814cf32258bbcf1d67db.zip |
orinoco: encapsulate driver locking
Local bus and USB drivers will need to do locking differently.
The original orinoco_usb patches had a boolean variable controlling
whether spin_lock_bh was used, or irq based locking. This version
provides wrappers for the lock functions and the drivers specify the
functions pointers needed.
This will introduce a performance penalty, but I'm not expecting it to
be noticable.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/orinoco/hermes.h')
-rw-r--r-- | drivers/net/wireless/orinoco/hermes.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/orinoco/hermes.h b/drivers/net/wireless/orinoco/hermes.h index 18b268c54dfe..9e21ecdb4e70 100644 --- a/drivers/net/wireless/orinoco/hermes.h +++ b/drivers/net/wireless/orinoco/hermes.h @@ -393,6 +393,10 @@ struct hermes_ops { u16 id, u16 offset); int (*bap_pwrite)(struct hermes *hw, int bap, const void *buf, int len, u16 id, u16 offset); + void (*lock_irqsave)(spinlock_t *lock, unsigned long *flags); + void (*unlock_irqrestore)(spinlock_t *lock, unsigned long *flags); + void (*lock_irq)(spinlock_t *lock); + void (*unlock_irq)(spinlock_t *lock); }; /* Basic control structure */ |