aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/b43/bus.c')
-rw-r--r--drivers/net/wireless/b43/bus.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/bus.c b/drivers/net/wireless/b43/bus.c
index f8ccd2cea3f9..fe5fa267bc5b 100644
--- a/drivers/net/wireless/b43/bus.c
+++ b/drivers/net/wireless/b43/bus.c
@@ -25,6 +25,37 @@
25 25
26 26
27/* SSB */ 27/* SSB */
28static inline u16 b43_bus_ssb_read16(struct b43_bus_dev *dev, u16 offset)
29{
30 return ssb_read16(dev->sdev, offset);
31}
32static inline u32 b43_bus_ssb_read32(struct b43_bus_dev *dev, u16 offset)
33{
34 return ssb_read32(dev->sdev, offset);
35}
36static inline
37void b43_bus_ssb_write16(struct b43_bus_dev *dev, u16 offset, u16 value)
38{
39 ssb_write16(dev->sdev, offset, value);
40}
41static inline
42void b43_bus_ssb_write32(struct b43_bus_dev *dev, u16 offset, u32 value)
43{
44 ssb_write32(dev->sdev, offset, value);
45}
46static inline
47void b43_bus_ssb_block_read(struct b43_bus_dev *dev, void *buffer,
48 size_t count, u16 offset, u8 reg_width)
49{
50 ssb_block_read(dev->sdev, buffer, count, offset, reg_width);
51}
52static inline
53void b43_bus_ssb_block_write(struct b43_bus_dev *dev, const void *buffer,
54 size_t count, u16 offset, u8 reg_width)
55{
56 ssb_block_write(dev->sdev, buffer, count, offset, reg_width);
57}
58
28struct b43_bus_dev *b43_bus_dev_ssb_init(struct ssb_device *sdev) 59struct b43_bus_dev *b43_bus_dev_ssb_init(struct ssb_device *sdev)
29{ 60{
30 struct b43_bus_dev *dev = kzalloc(sizeof(*dev), GFP_KERNEL); 61 struct b43_bus_dev *dev = kzalloc(sizeof(*dev), GFP_KERNEL);
@@ -32,5 +63,12 @@ struct b43_bus_dev *b43_bus_dev_ssb_init(struct ssb_device *sdev)
32 dev->bus_type = B43_BUS_SSB; 63 dev->bus_type = B43_BUS_SSB;
33 dev->sdev = sdev; 64 dev->sdev = sdev;
34 65
66 dev->read16 = b43_bus_ssb_read16;
67 dev->read32 = b43_bus_ssb_read32;
68 dev->write16 = b43_bus_ssb_write16;
69 dev->write32 = b43_bus_ssb_write32;
70 dev->block_read = b43_bus_ssb_block_read;
71 dev->block_write = b43_bus_ssb_block_write;
72
35 return dev; 73 return dev;
36} 74}