b43: AC-PHY: prepare place for developing new PHY support
PATCH 1/1 b43: AC-PHY: prepare place for developing new PHY support
There are new (not anymore?) Broadcom 802.11ac wireless cards based on chipsets like BCM4352 and BCM4360. They use a new PHY type (called simply AC) that will require new specific code.
---
Kalle: as this commit & Kconfig say, this is just a beginning of new PHY type support.
In the past we used development model this patch follows. Code for new PHY was added patch by patch.
Adding everything at once would require a huge patchset & development behing the doors. Also sending small patches allows better review of changes & should result in a better code quality.
Let me know if there are any problems.
--- drivers/net/wireless/b43/Kconfig | 9 ++++ drivers/net/wireless/b43/Makefile | 1 + drivers/net/wireless/b43/main.c | 10 ++++ drivers/net/wireless/b43/phy_ac.c | 92 +++++++++++++++++++++++++++++++++++ drivers/net/wireless/b43/phy_ac.h | 38 +++++++++++++++ drivers/net/wireless/b43/phy_common.c | 9 +++- drivers/net/wireless/b43/phy_common.h | 2 + 7 files changed, 160 insertions(+), 1 deletion(-) create mode 100644 drivers/net/wireless/b43/phy_ac.c create mode 100644 drivers/net/wireless/b43/phy_ac.h
drivers/net/wireless/b43/Kconfig +9 -0
@@ -166,6 +166,15 @@ config B43_PHY_LCN Say N, this is BROKEN and crashes driver. +config B43_PHY_AC + bool "Support for AC-PHY (802.11ac) devices (BROKEN)" + depends on B43 && B43_BCMA && BROKEN + ---help--- + This PHY type can be found in the following chipsets: + PCI: BCM4352, BCM4360 + + 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
@@ -13,6 +13,7 @@ b43-$(CONFIG_B43_PHY_HT) += phy_ht.o b43-$(CONFIG_B43_PHY_HT) += tables_phy_ht.o b43-$(CONFIG_B43_PHY_HT) += radio_2059.o b43-$(CONFIG_B43_PHY_LCN) += phy_lcn.o tables_phy_lcn.o +b43-$(CONFIG_B43_PHY_AC) += phy_ac.o b43-y += sysfs.o b43-y += xmit.o b43-y += dma.o
drivers/net/wireless/b43/main.c +10 -0
@@ -4523,6 +4523,12 @@ static int b43_phy_versioning(struct b43_wldev *dev) unsupported =1 ;break ;#endif +#ifdef CONFIG_B43_PHY_AC +case B43_PHYTYPE_AC : +if (phy_rev >1 ) + unsupported =1 ; +break ; +#endif default : unsupported =1 ; }
@@ -4619,6 +4625,10 @@ static int b43_phy_versioning(struct b43_wldev *dev)if (radio_id !=0x2064 ) unsupported =1 ;break ; +case B43_PHYTYPE_AC : +if (radio_id !=0x2069 ) + unsupported =1 ; +break ;default :B43_WARN_ON (1 ); }
drivers/net/wireless/b43/phy_ac.c new file +92 -0
92 lines not on this page · raw message
drivers/net/wireless/b43/phy_ac.h new file +38 -0
@@ -0,0 +1,38 @@ +#ifndef B43_PHY_AC_H_ +#define B43_PHY_AC_H_ + +#include "phy_common.h" + +#define B43_PHY_AC_BBCFG 0x001 +#define B43_PHY_AC_BBCFG_RSTCCA 0x4000/* Reset CCA */ +#define B43_PHY_AC_BANDCTL 0x003/* Band control */ +#define B43_PHY_AC_BANDCTL_5GHZ 0x0001 +#define B43_PHY_AC_TABLE_ID 0x00d +#define B43_PHY_AC_TABLE_OFFSET 0x00e +#define B43_PHY_AC_TABLE_DATA1 0x00f +#define B43_PHY_AC_TABLE_DATA2 0x010 +#define B43_PHY_AC_TABLE_DATA3 0x011 +#define B43_PHY_AC_CLASSCTL 0x140/* Classifier control */ +#define B43_PHY_AC_CLASSCTL_CCKEN 0x0001/* CCK enable */ +#define B43_PHY_AC_CLASSCTL_OFDMEN 0x0002/* OFDM enable */ +#define B43_PHY_AC_CLASSCTL_WAITEDEN 0x0004/* Waited enable */ +#define B43_PHY_AC_BW1A 0x371 +#define B43_PHY_AC_BW2 0x372 +#define B43_PHY_AC_BW3 0x373 +#define B43_PHY_AC_BW4 0x374 +#define B43_PHY_AC_BW5 0x375 +#define B43_PHY_AC_BW6 0x376 +#define B43_PHY_AC_RFCTL_CMD 0x408 +#define B43_PHY_AC_C1_CLIP 0x6d4 +#define B43_PHY_AC_C1_CLIP_DIS 0x4000 +#define B43_PHY_AC_C2_CLIP 0x8d4 +#define B43_PHY_AC_C2_CLIP_DIS 0x4000 +#define B43_PHY_AC_C3_CLIP 0xad4 +#define B43_PHY_AC_C3_CLIP_DIS 0x4000 + +struct b43_phy_ac { +}; + +extern const struct b43_phy_operations b43_phyops_ac; + +#endif /* B43_PHY_AC_H_ */
drivers/net/wireless/b43/phy_common.c +8 -1
@@ -33,6 +33,7 @@#include "phy_lp.h" #include "phy_ht.h" #include "phy_lcn.h" +#include "phy_ac.h" #include "b43.h" #include "main.h"
@@ -70,6 +71,11 @@ int b43_phy_allocate(struct b43_wldev *dev) phy->ops = &b43_phyops_lcn;#endif break ; +case B43_PHYTYPE_AC : +#ifdef CONFIG_B43_PHY_AC + phy->ops = &b43_phyops_ac; +#endif +break ; }if (B43_WARN_ON (!phy->ops))return -ENODEV ;
@@ -572,7 +578,8 @@ void b43_phy_force_clock(struct b43_wldev *dev, bool force)u32 tmp;WARN_ON (dev->phy.type !=B43_PHYTYPE_N && - dev->phy.type !=B43_PHYTYPE_HT ); + dev->phy.type !=B43_PHYTYPE_HT && + dev->phy.type !=B43_PHYTYPE_AC );switch (dev->dev->bus_type) {#ifdef CONFIG_B43_BCMA
drivers/net/wireless/b43/phy_common.h +2 -0
@@ -222,6 +222,8 @@ struct b43_phy {struct b43_phy_ht *ht;/* LCN-PHY specific information */ struct b43_phy_lcn *lcn; +/* AC-PHY specific information */ +struct b43_phy_ac *ac; };/* Band support flags. */
Signature · 1 line
1.8.4.5
PATCH 1/1 b43: AC-PHY: prepare place for developing new PHY support
Quoted 7 lines · Rafa? Mi?ecki
There are new (not anymore?) Broadcom 802.11ac wireless cards based on chipsets like BCM4352 and BCM4360. They use a new PHY type (called simply AC) that will require new specific code.
Signed-off-by Rafa? Mi?ecki <[email protected]>---
Quoted 7 lines
Kalle: as this commit &
Kconfigsay, this is just a beginning of new PHY type support. In the past we used development model this patch follows. Code for new PHY was added patch by patch. Adding everything at once would require a huge patchset & development behing the doors. Also sending small patches allows better review of changes & should result in a better code quality. Let me know if there are any problems.
Sounds good to me. Just keep dependency to BROKEN until it's usable and make sure that the code compiles after every patch.
Signature · 1 line
Kalle Valo
PATCH 1/1 b43: AC-PHY: prepare place for developing new PHY support
Quoted 17 lines · Kalle Valo
Quoted 7 lines · Rafa? Mi?ecki
There are new (not anymore?) Broadcom 802.11ac wireless cards based on chipsets like BCM4352 and BCM4360. They use a new PHY type (called simply AC) that will require new specific code.
Signed-off-by Rafa? Mi?ecki <[email protected]>---
Quoted 7 lines
Kalle: as this commit &
Kconfigsay, this is just a beginning of new PHY type support. In the past we used development model this patch follows. Code for new PHY was added patch by patch. Adding everything at once would require a huge patchset & development behing the doors. Also sending small patches allows better review of changes & should result in a better code quality. Let me know if there are any problems.
Quoted 2 lines
Sounds good to me. Just keep dependency to BROKEN until it's usable and make sure that the code compiles after every patch.
Alright! :)
Signature · 1 line
Rafa?