3 Broadcom B43 wireless driver
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; see the file COPYING. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
19 Boston, MA 02110-1301, USA.
28 static inline u16 b43_bus_ssb_read16(struct b43_bus_dev *dev, u16 offset)
30 return ssb_read16(dev->sdev, offset);
32 static inline u32 b43_bus_ssb_read32(struct b43_bus_dev *dev, u16 offset)
34 return ssb_read32(dev->sdev, offset);
37 void b43_bus_ssb_write16(struct b43_bus_dev *dev, u16 offset, u16 value)
39 ssb_write16(dev->sdev, offset, value);
42 void b43_bus_ssb_write32(struct b43_bus_dev *dev, u16 offset, u32 value)
44 ssb_write32(dev->sdev, offset, value);
47 void b43_bus_ssb_block_read(struct b43_bus_dev *dev, void *buffer,
48 size_t count, u16 offset, u8 reg_width)
50 ssb_block_read(dev->sdev, buffer, count, offset, reg_width);
53 void b43_bus_ssb_block_write(struct b43_bus_dev *dev, const void *buffer,
54 size_t count, u16 offset, u8 reg_width)
56 ssb_block_write(dev->sdev, buffer, count, offset, reg_width);
59 struct b43_bus_dev *b43_bus_dev_ssb_init(struct ssb_device *sdev)
61 struct b43_bus_dev *dev = kzalloc(sizeof(*dev), GFP_KERNEL);
63 dev->bus_type = B43_BUS_SSB;
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;