Signed-off-by: Rafał Miłecki <zajec5@xxxxxxxxx> --- drivers/net/wireless/b43/phy_common.c | 11 +++++++++++ drivers/net/wireless/b43/phy_common.h | 2 ++ 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/b43/phy_common.c b/drivers/net/wireless/b43/phy_common.c index 8f7d7ef..0b0f9df 100644 --- a/drivers/net/wireless/b43/phy_common.c +++ b/drivers/net/wireless/b43/phy_common.c @@ -466,3 +466,14 @@ struct b43_c32 b43_cordic(int theta) return ret; } + +/* http://bcm-v4.sipsolutions.net/802.11/PHY/BmacWriteShm */ +void b43_bmac_write_shm(struct b43_wldev *dev, u32 offset, u16 value) +{ + b43_write32(dev, B43_MMIO_SHM_CONTROL, 0x00010000 | (offset >> 2)); + b43_read32(dev, B43_MMIO_SHM_CONTROL); + if (offset & 2) + b43_write16(dev, 0x165, value); + else + b43_write16(dev, B43_MMIO_SHM_DATA, value); +} diff --git a/drivers/net/wireless/b43/phy_common.h b/drivers/net/wireless/b43/phy_common.h index bd480b4..484d4d7 100644 --- a/drivers/net/wireless/b43/phy_common.h +++ b/drivers/net/wireless/b43/phy_common.h @@ -429,4 +429,6 @@ void b43_phyop_switch_analog_generic(struct b43_wldev *dev, bool on); struct b43_c32 b43_cordic(int theta); +void b43_bmac_write_shm(struct b43_wldev *dev, u32 offset, u16 value); + #endif /* LINUX_B43_PHY_COMMON_H_ */ -- 1.6.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html