b43: add config for (en|dis)abling G-PHY support
authorRafał Miłecki <zajec5@gmail.com>
Fri, 20 Jun 2014 15:22:01 +0000 (17:22 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 20 Jun 2014 18:13:46 +0000 (14:13 -0400)
This allows new devices users to save some space.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/b43/Kconfig
drivers/net/wireless/b43/Makefile
drivers/net/wireless/b43/main.c
drivers/net/wireless/b43/phy_common.c

index e3f67b8d3f8003d546867b51648d25fda81d0f15..037a4e304d14c2a898bdc5bb2792cbb839e39b01 100644 (file)
@@ -122,6 +122,15 @@ config B43_PIO
        select SSB_BLOCKIO
        default y
 
+config B43_PHY_G
+       bool "Support for G-PHY (802.11g) devices"
+       depends on B43 && B43_SSB
+       default y
+       ---help---
+         This PHY type can be found in the following chipsets:
+         PCI: BCM4306, BCM4311, BCM4318
+         SoC: BCM4712, BCM5352E
+
 config B43_PHY_N
        bool "Support for 802.11n (N-PHY) devices"
        depends on B43
index 098fe9ee7096958a73093c2cbe18d7b37216e556..6e00b8804ada1f2a1274a5af33aef5540aa85ecc 100644 (file)
@@ -1,13 +1,11 @@
 b43-y                          += main.o
 b43-y                          += bus.o
-b43-y                          += tables.o
+b43-$(CONFIG_B43_PHY_G)                += phy_a.o phy_g.o tables.o lo.o wa.o
 b43-$(CONFIG_B43_PHY_N)                += tables_nphy.o
 b43-$(CONFIG_B43_PHY_N)                += radio_2055.o
 b43-$(CONFIG_B43_PHY_N)                += radio_2056.o
 b43-$(CONFIG_B43_PHY_N)                += radio_2057.o
 b43-y                          += phy_common.o
-b43-y                          += phy_g.o
-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
@@ -17,8 +15,6 @@ b43-$(CONFIG_B43_PHY_HT)      += radio_2059.o
 b43-$(CONFIG_B43_PHY_LCN)      += phy_lcn.o tables_phy_lcn.o
 b43-y                          += sysfs.o
 b43-y                          += xmit.o
-b43-y                          += lo.o
-b43-y                          += wa.o
 b43-y                          += dma.o
 b43-y                          += pio.o
 b43-y                          += rfkill.o
index 4164afa843e907475efcf6ee69480cb231b59ef8..9cf07bb7adf80f446aa62721ad34ae9f1cd83ff6 100644 (file)
@@ -4306,10 +4306,12 @@ static int b43_phy_versioning(struct b43_wldev *dev)
        phy_type = (tmp & B43_PHYVER_TYPE) >> B43_PHYVER_TYPE_SHIFT;
        phy_rev = (tmp & B43_PHYVER_VERSION);
        switch (phy_type) {
+#ifdef CONFIG_B43_PHY_G
        case B43_PHYTYPE_G:
                if (phy_rev > 9)
                        unsupported = 1;
                break;
+#endif
 #ifdef CONFIG_B43_PHY_N
        case B43_PHYTYPE_N:
                if (phy_rev > 9)
index ce486eeaf8e1480cd2b2c1b9b53ebfc3590ed1bc..3cbef21b4726dc106c5746f79689a10d0db6c4e0 100644 (file)
@@ -46,7 +46,9 @@ int b43_phy_allocate(struct b43_wldev *dev)
 
        switch (phy->type) {
        case B43_PHYTYPE_G:
+#ifdef CONFIG_B43_PHY_G
                phy->ops = &b43_phyops_g;
+#endif
                break;
        case B43_PHYTYPE_N:
 #ifdef CONFIG_B43_PHY_N