b43: Fix some MAC locking
This fixes some locking w.r.t. the lower MAC (firmware). It also removes a lot of ancient IRQ-locking that's not needed anymore. We simply suspend the MAC. That's easier and causes less trouble. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
0e7690f1e9
commit
d10d0e5707
@@ -178,13 +178,27 @@ void b43_phy_unlock(struct b43_wldev *dev)
|
||||
b43_power_saving_ctl_bits(dev, 0);
|
||||
}
|
||||
|
||||
static inline void assert_mac_suspended(struct b43_wldev *dev)
|
||||
{
|
||||
if (!B43_DEBUG)
|
||||
return;
|
||||
if ((b43_status(dev) >= B43_STAT_INITIALIZED) &&
|
||||
(dev->mac_suspended <= 0)) {
|
||||
b43dbg(dev->wl, "PHY/RADIO register access with "
|
||||
"enabled MAC.\n");
|
||||
dump_stack();
|
||||
}
|
||||
}
|
||||
|
||||
u16 b43_radio_read(struct b43_wldev *dev, u16 reg)
|
||||
{
|
||||
assert_mac_suspended(dev);
|
||||
return dev->phy.ops->radio_read(dev, reg);
|
||||
}
|
||||
|
||||
void b43_radio_write(struct b43_wldev *dev, u16 reg, u16 value)
|
||||
{
|
||||
assert_mac_suspended(dev);
|
||||
dev->phy.ops->radio_write(dev, reg, value);
|
||||
}
|
||||
|
||||
@@ -208,11 +222,13 @@ void b43_radio_maskset(struct b43_wldev *dev, u16 offset, u16 mask, u16 set)
|
||||
|
||||
u16 b43_phy_read(struct b43_wldev *dev, u16 reg)
|
||||
{
|
||||
assert_mac_suspended(dev);
|
||||
return dev->phy.ops->phy_read(dev, reg);
|
||||
}
|
||||
|
||||
void b43_phy_write(struct b43_wldev *dev, u16 reg, u16 value)
|
||||
{
|
||||
assert_mac_suspended(dev);
|
||||
dev->phy.ops->phy_write(dev, reg, value);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user