b43: don't duplicate common PHY read/write ops
Most of the PHYs use the same way of accessing registers, so move that code to the shared place. An exception is G-PHY which sometimes access A-PHY regs and requires special handling. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
6247d2aa51
commit
d342b95dd7
@@ -6497,20 +6497,6 @@ static inline void check_phyreg(struct b43_wldev *dev, u16 offset)
|
||||
#endif /* B43_DEBUG */
|
||||
}
|
||||
|
||||
static u16 b43_nphy_op_read(struct b43_wldev *dev, u16 reg)
|
||||
{
|
||||
check_phyreg(dev, reg);
|
||||
b43_write16(dev, B43_MMIO_PHY_CONTROL, reg);
|
||||
return b43_read16(dev, B43_MMIO_PHY_DATA);
|
||||
}
|
||||
|
||||
static void b43_nphy_op_write(struct b43_wldev *dev, u16 reg, u16 value)
|
||||
{
|
||||
check_phyreg(dev, reg);
|
||||
b43_write16(dev, B43_MMIO_PHY_CONTROL, reg);
|
||||
b43_write16(dev, B43_MMIO_PHY_DATA, value);
|
||||
}
|
||||
|
||||
static void b43_nphy_op_maskset(struct b43_wldev *dev, u16 reg, u16 mask,
|
||||
u16 set)
|
||||
{
|
||||
@@ -6653,8 +6639,6 @@ const struct b43_phy_operations b43_phyops_n = {
|
||||
.free = b43_nphy_op_free,
|
||||
.prepare_structs = b43_nphy_op_prepare_structs,
|
||||
.init = b43_nphy_op_init,
|
||||
.phy_read = b43_nphy_op_read,
|
||||
.phy_write = b43_nphy_op_write,
|
||||
.phy_maskset = b43_nphy_op_maskset,
|
||||
.radio_read = b43_nphy_op_radio_read,
|
||||
.radio_write = b43_nphy_op_radio_write,
|
||||
|
Reference in New Issue
Block a user