Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

b43: N-PHY: fix "Data bus error" while working in 5 GHz

When switching from one 5 GHz channel to another 5 GHz channel we need
to make sure BPHY is still in a reset. However to access BPHY register
we have to switch to 2 GHz mode for a moment. Otherwise this may result
in "Data bus error" (noticed by Hauke with BCM43224 connected to the
SoC).

Reported-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Rafał Miłecki and committed by
John W. Linville
11d14c79 b9d31704

+3
+3
drivers/net/wireless/b43/phy_n.c
··· 6217 6217 u16 tmp16; 6218 6218 6219 6219 if (new_channel->band == IEEE80211_BAND_5GHZ) { 6220 + /* Switch to 2 GHz for a moment to access B43_PHY_B_BBCFG */ 6221 + b43_phy_mask(dev, B43_NPHY_BANDCTL, ~B43_NPHY_BANDCTL_5GHZ); 6222 + 6220 6223 tmp16 = b43_read16(dev, B43_MMIO_PSM_PHY_HDR); 6221 6224 b43_write16(dev, B43_MMIO_PSM_PHY_HDR, tmp16 | 4); 6222 6225 /* Put BPHY in the reset */