summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/b43/bus.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2011-05-18 02:06:43 +0200
committerJohn W. Linville <linville@tuxdriver.com>2011-06-01 15:10:58 -0400
commit24ca39d67968c42d377abc122f6dca635ebcdb79 (patch)
treeeed68c18adb198c5030e35e24aef5b9c4e623748 /drivers/net/wireless/b43/bus.c
parent79d2232fed23e8e0d1b11abe2f9b78fb09084506 (diff)
downloadlwn-24ca39d67968c42d377abc122f6dca635ebcdb79.tar.gz
lwn-24ca39d67968c42d377abc122f6dca635ebcdb79.zip
b43: bus: abstract bus and core operations
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/bus.c')
-rw-r--r--drivers/net/wireless/b43/bus.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/bus.c b/drivers/net/wireless/b43/bus.c
index f897b7054a0a..6c63aecd6ab4 100644
--- a/drivers/net/wireless/b43/bus.c
+++ b/drivers/net/wireless/b43/bus.c
@@ -25,6 +25,31 @@
/* SSB */
+
+static inline int b43_bus_ssb_bus_may_powerdown(struct b43_bus_dev *dev)
+{
+ return ssb_bus_may_powerdown(dev->sdev->bus);
+}
+static inline int b43_bus_ssb_bus_powerup(struct b43_bus_dev *dev,
+ bool dynamic_pctl)
+{
+ return ssb_bus_powerup(dev->sdev->bus, dynamic_pctl);
+}
+static inline int b43_bus_ssb_device_is_enabled(struct b43_bus_dev *dev)
+{
+ return ssb_device_is_enabled(dev->sdev);
+}
+static inline void b43_bus_ssb_device_enable(struct b43_bus_dev *dev,
+ u32 core_specific_flags)
+{
+ ssb_device_enable(dev->sdev, core_specific_flags);
+}
+static inline void b43_bus_ssb_device_disable(struct b43_bus_dev *dev,
+ u32 core_specific_flags)
+{
+ ssb_device_disable(dev->sdev, core_specific_flags);
+}
+
static inline u16 b43_bus_ssb_read16(struct b43_bus_dev *dev, u16 offset)
{
return ssb_read16(dev->sdev, offset);
@@ -63,6 +88,12 @@ struct b43_bus_dev *b43_bus_dev_ssb_init(struct ssb_device *sdev)
dev->bus_type = B43_BUS_SSB;
dev->sdev = sdev;
+ dev->bus_may_powerdown = b43_bus_ssb_bus_may_powerdown;
+ dev->bus_powerup = b43_bus_ssb_bus_powerup;
+ dev->device_is_enabled = b43_bus_ssb_device_is_enabled;
+ dev->device_enable = b43_bus_ssb_device_enable;
+ dev->device_disable = b43_bus_ssb_device_disable;
+
dev->read16 = b43_bus_ssb_read16;
dev->read32 = b43_bus_ssb_read32;
dev->write16 = b43_bus_ssb_write16;