Skip to contentSkip to conversation

b43: N-PHY: add TX Gain tables

PATCH In review Rafał Miłecki 1 participant 1 message Jan 6, 2010 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 4/5 b43: N-PHY: add TX Gain tables

b43: N-PHY: add TX Gain tables

From 98cb0f7b40df6605690f9e09f5102380844880ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
Date: Wed, 6 Jan 2010 16:23:15 +0100
Subject: [PATCH 4/5] b43: N-PHY: add TX Gain tables
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 drivers/net/wireless/b43/phy_n.c       |   12 +-
 drivers/net/wireless/b43/tables_nphy.c |  175 ++++++++++++++++++++++++++++++++
 drivers/net/wireless/b43/tables_nphy.h |    6 +
 3 files changed, 187 insertions(+), 6 deletions(-)
drivers/net/wireless/b43/phy_n.c +6 -6
index 5341ba5..2b99d86 100644
@@ -384,7 +384,7 @@ static struct nphy_txgains b43_nphy_get_tx_gains(struct b43_wldev *dev)
 
 	u16 curr_gain[2];
 	struct nphy_txgains target;
-	u32 *table = NULL;
+	const u32 *table = NULL;
 
 	if (nphy->txpwrctrl == 0) {
 		int i;
@@ -423,13 +423,13 @@ static struct nphy_txgains b43_nphy_get_tx_gains(struct b43_wldev *dev)
 				} else {
 					if (band == IEEE80211_BAND_5GHZ) {
 						if (dev->phy.rev == 3)
-							table = NULL; //FIXME: N PHY TX Power Control - TX Gain Table Rev >= 3 (5 GHz)
+							table = b43_ntab_tx_gain_rev3_5ghz;
 						else if (dev->phy.rev == 4)
-							table = NULL; //FIXME: N PHY TX Power Control - TX Gain Table Rev 4 (5 GHz)
+							table = b43_ntab_tx_gain_rev4_5ghz;
 						else
-							table = NULL; //FIXME: N PHY TX Power Control - TX Gain Table Rev 5 (5 GHz)
+							table = b43_ntab_tx_gain_rev5plus_5ghz;
 					} else {
-						table = NULL; //FIXME: N PHY TX Power Control - TX Gain Table Rev >= 3 (2.4 GHz)
+						table = b43_ntab_tx_gain_rev3plus_2ghz;
 					}
 				}
 
@@ -438,7 +438,7 @@ static struct nphy_txgains b43_nphy_get_tx_gains(struct b43_wldev *dev)
 				target.pga[i] = (table[index[i]] >> 24) & 0xF;
 				target.txgm[i] = (table[index[i]] >> 28) & 0xF;
 			} else {
-				table = NULL; //FIXME: N PHY TX Power Control - TX Gain Table Rev <= 2
+				table = b43_ntab_tx_gain_rev0_1_2;
 
 				target.ipa[i] = (table[index[i]] >> 16) & 0x3;
 				target.pad[i] = (table[index[i]] >> 18) & 0x3;
drivers/net/wireless/b43/tables_nphy.c +175 -0

181 lines not on this page · raw message

drivers/net/wireless/b43/tables_nphy.h +6 -0
index 1f0a602..423c884 100644
@@ -131,4 +131,10 @@ void b43_ntab_write(struct b43_wldev *dev, u32 offset, u32 value);
 void b43_nphy_rev0_1_2_tables_init(struct b43_wldev *dev);
 void b43_nphy_rev3plus_tables_init(struct b43_wldev *dev);
 
+extern const u32 b43_ntab_tx_gain_rev0_1_2[];
+extern const u32 b43_ntab_tx_gain_rev3plus_2ghz[];
+extern const u32 b43_ntab_tx_gain_rev3_5ghz[];
+extern const u32 b43_ntab_tx_gain_rev4_5ghz[];
+extern const u32 b43_ntab_tx_gain_rev5plus_5ghz[];
+
 #endif /* B43_TABLES_NPHY_H_ */
Signature · 1 line
1.6.4.2

From 98cb0f7b40df6605690f9e09f5102380844880ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
Date: Wed, 6 Jan 2010 16:23:15 +0100
Subject: [PATCH 4/5] b43: N-PHY: add TX Gain tables
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 drivers/net/wireless/b43/phy_n.c       |   12 +-
 drivers/net/wireless/b43/tables_nphy.c |  175 ++++++++++++++++++++++++++++++++
 drivers/net/wireless/b43/tables_nphy.h |    6 +
 3 files changed, 187 insertions(+), 6 deletions(-)
drivers/net/wireless/b43/phy_n.c +6 -6
index 5341ba5..2b99d86 100644
@@ -384,7 +384,7 @@ static struct nphy_txgains b43_nphy_get_tx_gains(struct b43_wldev *dev)
 
 	u16 curr_gain[2];
 	struct nphy_txgains target;
-	u32 *table = NULL;
+	const u32 *table = NULL;
 
 	if (nphy->txpwrctrl == 0) {
 		int i;
@@ -423,13 +423,13 @@ static struct nphy_txgains b43_nphy_get_tx_gains(struct b43_wldev *dev)
 				} else {
 					if (band == IEEE80211_BAND_5GHZ) {
 						if (dev->phy.rev == 3)
-							table = NULL; //FIXME: N PHY TX Power Control - TX Gain Table Rev >= 3 (5 GHz) 
+							table = b43_ntab_tx_gain_rev3_5ghz;
 						else if (dev->phy.rev == 4)
-							table = NULL; //FIXME: N PHY TX Power Control - TX Gain Table Rev 4 (5 GHz) 
+							table = b43_ntab_tx_gain_rev4_5ghz;
 						else
-							table = NULL; //FIXME: N PHY TX Power Control - TX Gain Table Rev 5 (5 GHz) 
+							table = b43_ntab_tx_gain_rev5plus_5ghz;
 					} else {
-						table = NULL; //FIXME: N PHY TX Power Control - TX Gain Table Rev >= 3 (2.4 GHz)
+						table = b43_ntab_tx_gain_rev3plus_2ghz;
 					}
 				}
 
@@ -438,7 +438,7 @@ static struct nphy_txgains b43_nphy_get_tx_gains(struct b43_wldev *dev)
 				target.pga[i] = (table[index[i]] >> 24) & 0xF;
 				target.txgm[i] = (table[index[i]] >> 28) & 0xF;
 			} else {
-				table = NULL; //FIXME: N PHY TX Power Control - TX Gain Table Rev <= 2 
+				table = b43_ntab_tx_gain_rev0_1_2;
 
 				target.ipa[i] = (table[index[i]] >> 16) & 0x3;
 				target.pad[i] = (table[index[i]] >> 18) & 0x3;
drivers/net/wireless/b43/tables_nphy.c +175 -0

181 lines not on this page · raw message

drivers/net/wireless/b43/tables_nphy.h +6 -0
index 1f0a602..423c884 100644
@@ -131,4 +131,10 @@ void b43_ntab_write(struct b43_wldev *dev, u32 offset, u32 value);
 void b43_nphy_rev0_1_2_tables_init(struct b43_wldev *dev);
 void b43_nphy_rev3plus_tables_init(struct b43_wldev *dev);
 
+extern const u32 b43_ntab_tx_gain_rev0_1_2[];
+extern const u32 b43_ntab_tx_gain_rev3plus_2ghz[];
+extern const u32 b43_ntab_tx_gain_rev3_5ghz[];
+extern const u32 b43_ntab_tx_gain_rev4_5ghz[];
+extern const u32 b43_ntab_tx_gain_rev5plus_5ghz[];
+
 #endif /* B43_TABLES_NPHY_H_ */
Signature · 1 line
1.6.4.2