public inbox for b43-dev@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] b43: remove warning for LP-PHY with sprom < 8
@ 2013-03-21 19:28 Hauke Mehrtens
  2013-03-23 17:47 ` Christian Klein
  0 siblings, 1 reply; 6+ messages in thread
From: Hauke Mehrtens @ 2013-03-21 19:28 UTC (permalink / raw)
  To: linville; +Cc: zajec5, linux-wireless, b43-dev, Hauke Mehrtens

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: Hauke Mehrtens <hauke@hauke-m.de>
---
 drivers/net/wireless/b43/phy_lp.c |   12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
index 3ae2856..5ed352d 100644
--- a/drivers/net/wireless/b43/phy_lp.c
+++ b/drivers/net/wireless/b43/phy_lp.c
@@ -104,14 +104,8 @@ static void lpphy_read_band_sprom(struct b43_wldev *dev)
 		maxpwr = sprom->maxpwr_bg;
 		lpphy->max_tx_pwr_med_band = maxpwr;
 		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) {
+			ofdmpo = sprom->ofdm2gpo;
 			for (i = 0; i < 4; i++) {
 				lpphy->tx_max_rate[i] =
 					maxpwr - (ofdmpo & 0xF) * 2;
@@ -124,11 +118,11 @@ static void lpphy_read_band_sprom(struct b43_wldev *dev)
 				ofdmpo >>= 4;
 			}
 		} else {
-			ofdmpo &= 0xFF;
+			u8 opo = sprom->opo;
 			for (i = 0; i < 4; i++)
 				lpphy->tx_max_rate[i] = maxpwr;
 			for (i = 4; i < 15; i++)
-				lpphy->tx_max_rate[i] = maxpwr - ofdmpo;
+				lpphy->tx_max_rate[i] = maxpwr - opo;
 		}
 	} else { /* 5GHz */
 		lpphy->tx_isolation_low_band = sprom->tri5gl;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-03-27 20:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-21 19:28 [PATCH] b43: remove warning for LP-PHY with sprom < 8 Hauke Mehrtens
2013-03-23 17:47 ` Christian Klein
2013-03-27 18:37   ` Hauke Mehrtens
2013-03-27 18:50     ` Larry Finger
2013-03-27 20:07       ` Christian Klein
2013-03-27 20:35         ` Larry Finger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox