Skip to contentSkip to conversation

b43: define new PHYs and radio regs for cores >= 24

PATCH New Rafał Miłecki 1 participant 2 messages Jun 13, 2011 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 b43: define new PHYs and radio regs for cores >= 24

---
 drivers/net/wireless/b43/b43.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
drivers/net/wireless/b43/b43.h +6 -0
index 8d4bb28..f3efa42 100644
@@ -92,6 +92,8 @@
 #define B43_MMIO_PIO11_BASE4		0x300
 #define B43_MMIO_PIO11_BASE5		0x340
 
+#define B43_MMIO_RADIO24_CONTROL	0x3D8	/* core rev >= 24 only */
+#define B43_MMIO_RADIO24_DATA		0x3DA	/* core rev >= 24 only */
 #define B43_MMIO_PHY_VER		0x3E0
 #define B43_MMIO_PHY_RADIO		0x3E2
 #define B43_MMIO_PHY0			0x3E6
@@ -363,6 +365,10 @@ enum {
 #define B43_PHYTYPE_G			0x02
 #define B43_PHYTYPE_N			0x04
 #define B43_PHYTYPE_LP			0x05
+#define B43_PHYTYPE_SSLPN		0x06
+#define B43_PHYTYPE_HT			0x07
+#define B43_PHYTYPE_LCN			0x08
+#define B43_PHYTYPE_LCNXN		0x09
 
 /* PHYRegisters */
 #define B43_PHY_ILT_A_CTRL		0x0072
Signature · 1 line
1.7.3.4
#1 lore raw

PATCH 2/2 b43: HT-PHY: add place for writing HT PHY support

This is totally broken plus we do not have specs for HT PHY yet. Just introduce place for writing driver if we discover anything.

---
 drivers/net/wireless/b43/Kconfig      |    8 ++
 drivers/net/wireless/b43/Makefile     |    1 +
 drivers/net/wireless/b43/main.c       |   10 +++
 drivers/net/wireless/b43/phy_common.c |    6 ++
 drivers/net/wireless/b43/phy_common.h |    3 +
 drivers/net/wireless/b43/phy_ht.c     |  119 +++++++++++++++++++++++++++++++++
 drivers/net/wireless/b43/phy_ht.h     |   19 +++++
 7 files changed, 166 insertions(+), 0 deletions(-)
 create mode 100644 drivers/net/wireless/b43/phy_ht.c
 create mode 100644 drivers/net/wireless/b43/phy_ht.h
drivers/net/wireless/b43/Kconfig +8 -0
index fe26bf4..e02db1b 100644
@@ -112,6 +112,14 @@ config B43_PHY_LP
 	  and embedded devices. It supports 802.11a/g
 	  (802.11a support is optional, and currently disabled).
 
+config B43_PHY_HT
+	bool "Support for HT-PHY devices (BROKEN)"
+	depends on B43 && BROKEN
+	---help---
+	  Support for the HT-PHY.
+
+	  Say N, this is BROKEN and crashes driver.
+
 # This config option automatically enables b43 LEDS support,
 # if it's possible.
 config B43_LEDS
drivers/net/wireless/b43/Makefile +1 -0
index 95f7c00..58d614a 100644
@@ -10,6 +10,7 @@ b43-y				+= phy_a.o
 b43-$(CONFIG_B43_PHY_N)		+= phy_n.o
 b43-$(CONFIG_B43_PHY_LP)	+= phy_lp.o
 b43-$(CONFIG_B43_PHY_LP)	+= tables_lpphy.o
+b43-$(CONFIG_B43_PHY_HT)	+= phy_ht.o
 b43-y				+= sysfs.o
 b43-y				+= xmit.o
 b43-y				+= lo.o
drivers/net/wireless/b43/main.c +10 -0
index 2260b36..ea9e737 100644
@@ -4102,6 +4102,12 @@ static int b43_phy_versioning(struct b43_wldev *dev)
 			unsupported = 1;
 		break;
 #endif
+#ifdef CONFIG_B43_PHY_HT
+	case B43_PHYTYPE_HT:
+		if (phy_rev > 1)
+			unsupported = 1;
+		break;
+#endif
 	default:
 		unsupported = 1;
 	};
@@ -4158,6 +4164,10 @@ static int b43_phy_versioning(struct b43_wldev *dev)
 		if (radio_ver != 0x2062 && radio_ver != 0x2063)
 			unsupported = 1;
 		break;
+	case B43_PHYTYPE_HT:
+		if (radio_ver != 0x2059)
+			unsupported = 1;
+		break;
 	default:
 		B43_WARN_ON(1);
 	}
drivers/net/wireless/b43/phy_common.c +6 -0
index 425af28..9705950 100644
@@ -31,6 +31,7 @@
 #include "phy_a.h"
 #include "phy_n.h"
 #include "phy_lp.h"
+#include "phy_ht.h"
 #include "b43.h"
 #include "main.h"
 
@@ -59,6 +60,11 @@ int b43_phy_allocate(struct b43_wldev *dev)
 		phy->ops = &b43_phyops_lp;
 #endif
 		break;
+	case B43_PHYTYPE_HT:
+#ifdef CONFIG_B43_PHY_HT
+		phy->ops = &b43_phyops_ht;
+#endif
+		break;
 	}
 	if (B43_WARN_ON(!phy->ops))
 		return -ENODEV;
drivers/net/wireless/b43/phy_common.h +3 -0
index 2401bee..47dcb80 100644
@@ -194,6 +194,7 @@ struct b43_phy_a;
 struct b43_phy_g;
 struct b43_phy_n;
 struct b43_phy_lp;
+struct b43_phy_ht;
 
 struct b43_phy {
 	/* Hardware operation callbacks. */
@@ -216,6 +217,8 @@ struct b43_phy {
 		struct b43_phy_n *n;
 		/* LP-PHY specific information */
 		struct b43_phy_lp *lp;
+		/* HT-PHY specific information */
+		struct b43_phy_ht *ht;
 	};
 
 	/* Band support flags. */
drivers/net/wireless/b43/phy_ht.c new file +119 -0

119 lines not on this page · raw message

drivers/net/wireless/b43/phy_ht.h new file +19 -0
new file mode 100644
index 0000000..aabad6f
@@ -0,0 +1,19 @@
+#ifndef B43_PHY_HT_H_
+#define B43_PHY_HT_H_
+
+#include "phy_common.h"
+
+
+#define B43_PHY_HT_TABLE_ADDR			0x072 /* Table address */
+#define B43_PHY_HT_TABLE_DATALO			0x073 /* Table data low */
+#define B43_PHY_HT_TABLE_DATAHI			0x074 /* Table data high */
+
+
+struct b43_phy_ht {
+};
+
+
+struct b43_phy_operations;
+extern const struct b43_phy_operations b43_phyops_ht;
+
+#endif /* B43_PHY_HT_H_ */
Signature · 1 line
1.7.3.4