Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 64513ef4 authored by Hauke Mehrtens's avatar Hauke Mehrtens Committed by John W. Linville
Browse files

b43: remove warning for LP-PHY with sprom < 8



The BCM5354 SoC has a build in ieee80211 core rev 13 with a LP-PHY on
it. This devices has a sprom version 3 stored in the nvram. This patch
removes the warning and uses the opo values from the sprom as mentioned
in the specs.

Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 7e4235ac
Loading
Loading
Loading
Loading
+3 −9
Original line number Original line Diff line number Diff line
@@ -104,14 +104,8 @@ static void lpphy_read_band_sprom(struct b43_wldev *dev)
		maxpwr = sprom->maxpwr_bg;
		maxpwr = sprom->maxpwr_bg;
		lpphy->max_tx_pwr_med_band = maxpwr;
		lpphy->max_tx_pwr_med_band = maxpwr;
		cckpo = sprom->cck2gpo;
		cckpo = sprom->cck2gpo;
		/*
		 * We don't read SPROM's opo as specs say. On rev8 SPROMs
		 * opo == ofdm2gpo and we don't know any SSB with LP-PHY
		 * and SPROM rev below 8.
		 */
		B43_WARN_ON(sprom->revision < 8);
		ofdmpo = sprom->ofdm2gpo;
		if (cckpo) {
		if (cckpo) {
			ofdmpo = sprom->ofdm2gpo;
			for (i = 0; i < 4; i++) {
			for (i = 0; i < 4; i++) {
				lpphy->tx_max_rate[i] =
				lpphy->tx_max_rate[i] =
					maxpwr - (ofdmpo & 0xF) * 2;
					maxpwr - (ofdmpo & 0xF) * 2;
@@ -124,11 +118,11 @@ static void lpphy_read_band_sprom(struct b43_wldev *dev)
				ofdmpo >>= 4;
				ofdmpo >>= 4;
			}
			}
		} else {
		} else {
			ofdmpo &= 0xFF;
			u8 opo = sprom->opo;
			for (i = 0; i < 4; i++)
			for (i = 0; i < 4; i++)
				lpphy->tx_max_rate[i] = maxpwr;
				lpphy->tx_max_rate[i] = maxpwr;
			for (i = 4; i < 15; i++)
			for (i = 4; i < 15; i++)
				lpphy->tx_max_rate[i] = maxpwr - ofdmpo;
				lpphy->tx_max_rate[i] = maxpwr - opo;
		}
		}
	} else { /* 5GHz */
	} else { /* 5GHz */
		lpphy->tx_isolation_low_band = sprom->tri5gl;
		lpphy->tx_isolation_low_band = sprom->tri5gl;