Skip to contentSkip to conversation

b43: N-PHY: replace N-specific radio_chanspec with common code

PATCH RESEND New Rafał Miłecki 1 participant 4 messages Oct 14, 2010 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/4 b43: N-PHY: replace N-specific radio_chanspec with common code

---
John: this patch was included in 3-patches-set that was not commited yet. Third patch from that set was canceled, but this one is OK.

---
 drivers/net/wireless/b43/phy_common.h |    1 +
 drivers/net/wireless/b43/phy_n.c      |   55 ++++++++++++++-------------------
 drivers/net/wireless/b43/phy_n.h      |    7 +---
 3 files changed, 26 insertions(+), 37 deletions(-)
drivers/net/wireless/b43/phy_common.h +1 -0
index 6dcd033..0e61942 100644
@@ -253,6 +253,7 @@ struct b43_phy {
 
 	/* Current channel */
 	unsigned int channel;
+	u16 channel_freq;
 	enum nl80211_channel_type channel_type;
 
 	/* PHY TX errors counter. */
drivers/net/wireless/b43/phy_n.c +23 -32

132 lines not on this page · raw message

drivers/net/wireless/b43/phy_n.h +2 -5
index e7acae2..f915c83 100644
@@ -927,10 +927,8 @@
 struct b43_wldev;
 
 struct b43_chanspec {
-	u8 channel;
-	u8 sideband;
-	u8 b_width;
-	u8 b_freq;
+	u16 center_freq;
+	enum nl80211_channel_type channel_type;
 };
 
 struct b43_phy_n_iq_comp {
@@ -984,7 +982,6 @@ struct b43_phy_n {
 	u16 papd_epsilon_offset[2];
 	s32 preamble_override;
 	u32 bb_mult_save;
-	struct b43_chanspec radio_chanspec;
 
 	bool gain_boost;
 	bool elna_gain_config;
Signature · 1 line
1.7.1
#1 lore raw

PATCH RESEND 2/4 b43: N-PHY: fix typo: read table when caching IQ LO calibration (do not write)

---
John: this patch was included in 3-patches-set that was not commited yet. Third patch from that set was canceled, but this one is OK.

---
 drivers/net/wireless/b43/phy_n.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/wireless/b43/phy_n.c +1 -1
index 13d7e3b..715277e 100644
@@ -2538,7 +2538,7 @@ static void b43_nphy_save_cal(struct b43_wldev *dev)
 	}
 	iqcal_chanspec->center_freq = dev->phy.channel_freq;
 	iqcal_chanspec->channel_type = dev->phy.channel_type;
-	b43_ntab_write_bulk(dev, B43_NTAB16(15, 80), 8, table);
+	b43_ntab_read_bulk(dev, B43_NTAB16(15, 80), 8, table);
 
 	if (nphy->hang_avoid)
 		b43_nphy_stay_in_carrier_search(dev, 0);
Signature · 1 line
1.7.1
#2 lore raw

PATCH 3/4 b43: N-PHY: put radio-specific code in separated file

In reply to Rafał Miłecki
---
 drivers/net/wireless/b43/Makefile      |    1 +
 drivers/net/wireless/b43/phy_n.c       |    1 +
 drivers/net/wireless/b43/phy_n.h       |  210 -----
 drivers/net/wireless/b43/radio_2055.c  | 1332 ++++++++++++++++++++++++++++++++
 drivers/net/wireless/b43/radio_2055.h  |  254 ++++++
 drivers/net/wireless/b43/tables_nphy.c | 1309 -------------------------------
 drivers/net/wireless/b43/tables_nphy.h |   44 --
 7 files changed, 1588 insertions(+), 1563 deletions(-)
 create mode 100644 drivers/net/wireless/b43/radio_2055.c
 create mode 100644 drivers/net/wireless/b43/radio_2055.h
drivers/net/wireless/b43/Makefile +1 -0
index 5e83b6f..0398c7c 100644
@@ -1,6 +1,7 @@
 b43-y				+= main.o
 b43-y				+= tables.o
 b43-$(CONFIG_B43_NPHY)		+= tables_nphy.o
+b43-$(CONFIG_B43_NPHY)		+= radio_2055.o
 b43-y				+= phy_common.o
 b43-y				+= phy_g.o
 b43-y				+= phy_a.o
drivers/net/wireless/b43/phy_n.c +1 -0
index 715277e..45fa2bb 100644
@@ -29,6 +29,7 @@
 #include "b43.h"
 #include "phy_n.h"
 #include "tables_nphy.h"
+#include "radio_2055.h"
 #include "main.h"
 
 struct nphy_txgains {
drivers/net/wireless/b43/phy_n.h +0 -210

216 lines not on this page · raw message

drivers/net/wireless/b43/radio_2055.c new file +1332 -0

1,332 lines not on this page · raw message

drivers/net/wireless/b43/radio_2055.h new file +254 -0

254 lines not on this page · raw message

drivers/net/wireless/b43/tables_nphy.c +0 -1309

1,184 lines not on this page · raw message

drivers/net/wireless/b43/tables_nphy.h +0 -44

44 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.7.1

Part of the diff is not shown here. View the raw message.

#3 lore raw

PATCH 4/4 b43: N-PHY: put 2056-radio's specific code in separated file

In reply to Rafał Miłecki
---
 drivers/net/wireless/b43/Makefile      |    1 +
 drivers/net/wireless/b43/phy_n.c       |    1 +
 drivers/net/wireless/b43/radio_2056.c  |   45 ++++++++++++++++++++++++++++++++
 drivers/net/wireless/b43/radio_2056.h  |   42 +++++++++++++++++++++++++++++
 drivers/net/wireless/b43/tables_nphy.c |   18 ------------
 drivers/net/wireless/b43/tables_nphy.h |   11 --------
 6 files changed, 89 insertions(+), 29 deletions(-)
 create mode 100644 drivers/net/wireless/b43/radio_2056.c
 create mode 100644 drivers/net/wireless/b43/radio_2056.h
drivers/net/wireless/b43/Makefile +1 -0
index 0398c7c..69d4af0 100644
@@ -2,6 +2,7 @@ b43-y				+= main.o
 b43-y				+= tables.o
 b43-$(CONFIG_B43_NPHY)		+= tables_nphy.o
 b43-$(CONFIG_B43_NPHY)		+= radio_2055.o
+b43-$(CONFIG_B43_NPHY)		+= radio_2056.o
 b43-y				+= phy_common.o
 b43-y				+= phy_g.o
 b43-y				+= phy_a.o
drivers/net/wireless/b43/phy_n.c +1 -0
index 45fa2bb..dfec549 100644
@@ -30,6 +30,7 @@
 #include "phy_n.h"
 #include "tables_nphy.h"
 #include "radio_2055.h"
+#include "radio_2056.h"
 #include "main.h"
 
 struct nphy_txgains {
drivers/net/wireless/b43/radio_2056.c new file +45 -0

45 lines not on this page · raw message

drivers/net/wireless/b43/radio_2056.h new file +42 -0

42 lines not on this page · raw message

drivers/net/wireless/b43/tables_nphy.c +0 -18
index cff7bd3..d7f5622 100644
@@ -27,24 +27,6 @@
 #include "phy_common.h"
 #include "phy_n.h"
 
-static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_rev3[] = {
-};
-
-const struct b43_nphy_channeltab_entry_rev3 *
-b43_nphy_get_chantabent_rev3(struct b43_wldev *dev, u16 freq)
-{
-	const struct b43_nphy_channeltab_entry_rev3 *e;
-	unsigned int i;
-
-	for (i = 0; i < ARRAY_SIZE(b43_nphy_channeltab_rev3); i++) {
-		e = &(b43_nphy_channeltab_rev3[i]);
-		if (e->freq == freq)
-			return e;
-	}
-
-	return NULL;
-}
-
 static const u8 b43_ntab_adjustpower0[] = {
 	0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
 	0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03,
drivers/net/wireless/b43/tables_nphy.h +0 -11
index cb06d39..4ec593b 100644
@@ -12,17 +12,6 @@ struct b43_phy_n_sfo_cfg {
 	u16 phy_bw6;
 };
 
-struct b43_nphy_channeltab_entry_rev3 {
-	/* The channel number */
-	u8 channel;
-	/* The channel frequency in MHz */
-	u16 freq;
-	/* Radio register values on channelswitch */
-	/* TODO */
-	/* PHY register values on channelswitch */
-	struct b43_phy_n_sfo_cfg phy_regs;
-};
-
 struct b43_wldev;
 
 struct nphy_txiqcal_ladder {
Signature · 1 line
1.7.1