* [PATCH 1/2] b43: remove leftover code from old devices support
@ 2014-06-20 15:22 ` Rafał Miłecki
0 siblings, 0 replies; 10+ messages in thread
From: Rafał Miłecki @ 2014-06-20 15:22 UTC (permalink / raw)
To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki
Old devices (A-PHY or B-PHY) are supposed to be supported by b43legacy.
We keep phy_a.c as it's needed for G-PHY which shares some design.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
drivers/net/wireless/b43/main.c | 9 ---------
drivers/net/wireless/b43/phy_a.h | 4 ----
drivers/net/wireless/b43/phy_common.c | 3 ---
3 files changed, 16 deletions(-)
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 4b662d0..4164afa 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4306,15 +4306,6 @@ 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) {
- case B43_PHYTYPE_A:
- if (phy_rev >= 4)
- unsupported = 1;
- break;
- case B43_PHYTYPE_B:
- if (phy_rev != 2 && phy_rev != 4 && phy_rev != 6
- && phy_rev != 7)
- unsupported = 1;
- break;
case B43_PHYTYPE_G:
if (phy_rev > 9)
unsupported = 1;
diff --git a/drivers/net/wireless/b43/phy_a.h b/drivers/net/wireless/b43/phy_a.h
index 5cfaab7..f7d0d92 100644
--- a/drivers/net/wireless/b43/phy_a.h
+++ b/drivers/net/wireless/b43/phy_a.h
@@ -123,8 +123,4 @@ struct b43_phy_a {
*/
void b43_phy_inita(struct b43_wldev *dev);
-
-struct b43_phy_operations;
-extern const struct b43_phy_operations b43_phyops_a;
-
#endif /* LINUX_B43_PHY_A_H_ */
diff --git a/drivers/net/wireless/b43/phy_common.c b/drivers/net/wireless/b43/phy_common.c
index 2d05b59..ce486ee 100644
--- a/drivers/net/wireless/b43/phy_common.c
+++ b/drivers/net/wireless/b43/phy_common.c
@@ -45,9 +45,6 @@ int b43_phy_allocate(struct b43_wldev *dev)
phy->ops = NULL;
switch (phy->type) {
- case B43_PHYTYPE_A:
- phy->ops = &b43_phyops_a;
- break;
case B43_PHYTYPE_G:
phy->ops = &b43_phyops_g;
break;
--
1.8.4.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 1/2] b43: remove leftover code from old devices support
@ 2014-06-20 15:22 ` Rafał Miłecki
0 siblings, 0 replies; 10+ messages in thread
From: Rafał Miłecki @ 2014-06-20 15:22 UTC (permalink / raw)
To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki
Old devices (A-PHY or B-PHY) are supposed to be supported by b43legacy.
We keep phy_a.c as it's needed for G-PHY which shares some design.
Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
---
drivers/net/wireless/b43/main.c | 9 ---------
drivers/net/wireless/b43/phy_a.h | 4 ----
drivers/net/wireless/b43/phy_common.c | 3 ---
3 files changed, 16 deletions(-)
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 4b662d0..4164afa 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4306,15 +4306,6 @@ 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) {
- case B43_PHYTYPE_A:
- if (phy_rev >= 4)
- unsupported = 1;
- break;
- case B43_PHYTYPE_B:
- if (phy_rev != 2 && phy_rev != 4 && phy_rev != 6
- && phy_rev != 7)
- unsupported = 1;
- break;
case B43_PHYTYPE_G:
if (phy_rev > 9)
unsupported = 1;
diff --git a/drivers/net/wireless/b43/phy_a.h b/drivers/net/wireless/b43/phy_a.h
index 5cfaab7..f7d0d92 100644
--- a/drivers/net/wireless/b43/phy_a.h
+++ b/drivers/net/wireless/b43/phy_a.h
@@ -123,8 +123,4 @@ struct b43_phy_a {
*/
void b43_phy_inita(struct b43_wldev *dev);
-
-struct b43_phy_operations;
-extern const struct b43_phy_operations b43_phyops_a;
-
#endif /* LINUX_B43_PHY_A_H_ */
diff --git a/drivers/net/wireless/b43/phy_common.c b/drivers/net/wireless/b43/phy_common.c
index 2d05b59..ce486ee 100644
--- a/drivers/net/wireless/b43/phy_common.c
+++ b/drivers/net/wireless/b43/phy_common.c
@@ -45,9 +45,6 @@ int b43_phy_allocate(struct b43_wldev *dev)
phy->ops = NULL;
switch (phy->type) {
- case B43_PHYTYPE_A:
- phy->ops = &b43_phyops_a;
- break;
case B43_PHYTYPE_G:
phy->ops = &b43_phyops_g;
break;
--
1.8.4.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/2] b43: add config for (en|dis)abling G-PHY support
2014-06-20 15:22 ` Rafał Miłecki
@ 2014-06-20 15:22 ` Rafał Miłecki
-1 siblings, 0 replies; 10+ messages in thread
From: Rafał Miłecki @ 2014-06-20 15:22 UTC (permalink / raw)
To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki
This allows new devices users to save some space.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
drivers/net/wireless/b43/Kconfig | 9 +++++++++
drivers/net/wireless/b43/Makefile | 6 +-----
drivers/net/wireless/b43/main.c | 2 ++
drivers/net/wireless/b43/phy_common.c | 2 ++
4 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/b43/Kconfig b/drivers/net/wireless/b43/Kconfig
index e3f67b8..037a4e3 100644
--- a/drivers/net/wireless/b43/Kconfig
+++ b/drivers/net/wireless/b43/Kconfig
@@ -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
diff --git a/drivers/net/wireless/b43/Makefile b/drivers/net/wireless/b43/Makefile
index 098fe9e..6e00b88 100644
--- a/drivers/net/wireless/b43/Makefile
+++ b/drivers/net/wireless/b43/Makefile
@@ -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
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 4164afa..9cf07bb 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -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)
diff --git a/drivers/net/wireless/b43/phy_common.c b/drivers/net/wireless/b43/phy_common.c
index ce486ee..3cbef21 100644
--- a/drivers/net/wireless/b43/phy_common.c
+++ b/drivers/net/wireless/b43/phy_common.c
@@ -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
--
1.8.4.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/2] b43: add config for (en|dis)abling G-PHY support
@ 2014-06-20 15:22 ` Rafał Miłecki
0 siblings, 0 replies; 10+ messages in thread
From: Rafał Miłecki @ 2014-06-20 15:22 UTC (permalink / raw)
To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki
This allows new devices users to save some space.
Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
---
drivers/net/wireless/b43/Kconfig | 9 +++++++++
drivers/net/wireless/b43/Makefile | 6 +-----
drivers/net/wireless/b43/main.c | 2 ++
drivers/net/wireless/b43/phy_common.c | 2 ++
4 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/b43/Kconfig b/drivers/net/wireless/b43/Kconfig
index e3f67b8..037a4e3 100644
--- a/drivers/net/wireless/b43/Kconfig
+++ b/drivers/net/wireless/b43/Kconfig
@@ -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
diff --git a/drivers/net/wireless/b43/Makefile b/drivers/net/wireless/b43/Makefile
index 098fe9e..6e00b88 100644
--- a/drivers/net/wireless/b43/Makefile
+++ b/drivers/net/wireless/b43/Makefile
@@ -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
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 4164afa..9cf07bb 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -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)
diff --git a/drivers/net/wireless/b43/phy_common.c b/drivers/net/wireless/b43/phy_common.c
index ce486ee..3cbef21 100644
--- a/drivers/net/wireless/b43/phy_common.c
+++ b/drivers/net/wireless/b43/phy_common.c
@@ -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
--
1.8.4.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] b43: remove leftover code from old devices support
2014-06-20 15:22 ` Rafał Miłecki
@ 2014-06-22 12:14 ` Felix Fietkau
-1 siblings, 0 replies; 10+ messages in thread
From: Felix Fietkau @ 2014-06-22 12:14 UTC (permalink / raw)
To: Rafał Miłecki, linux-wireless, John W. Linville; +Cc: b43-dev
On 2014-06-20 17:22, Rafał Miłecki wrote:
> Old devices (A-PHY or B-PHY) are supposed to be supported by b43legacy.
> We keep phy_a.c as it's needed for G-PHY which shares some design.
>
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Wouldn't it make sense to move the relevant pieces of phy_a.c to phy_g.c
and then remove phy_a.c entirely?
There are pieces in phy_a.c which can be removed entirely, e.g.
b43_phyops_a and things only used by this struct.
- Felix
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] b43: remove leftover code from old devices support
@ 2014-06-22 12:14 ` Felix Fietkau
0 siblings, 0 replies; 10+ messages in thread
From: Felix Fietkau @ 2014-06-22 12:14 UTC (permalink / raw)
To: Rafał Miłecki, linux-wireless, John W. Linville; +Cc: b43-dev
On 2014-06-20 17:22, Rafa? Mi?ecki wrote:
> Old devices (A-PHY or B-PHY) are supposed to be supported by b43legacy.
> We keep phy_a.c as it's needed for G-PHY which shares some design.
>
> Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
Wouldn't it make sense to move the relevant pieces of phy_a.c to phy_g.c
and then remove phy_a.c entirely?
There are pieces in phy_a.c which can be removed entirely, e.g.
b43_phyops_a and things only used by this struct.
- Felix
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] b43: remove leftover code from old devices support
2014-06-22 12:14 ` Felix Fietkau
@ 2014-06-22 14:07 ` Rafał Miłecki
-1 siblings, 0 replies; 10+ messages in thread
From: Rafał Miłecki @ 2014-06-22 14:07 UTC (permalink / raw)
To: Felix Fietkau; +Cc: linux-wireless, John W. Linville, b43-dev
On 22 June 2014 14:14, Felix Fietkau <nbd@openwrt.org> wrote:
> On 2014-06-20 17:22, Rafał Miłecki wrote:
>> Old devices (A-PHY or B-PHY) are supposed to be supported by b43legacy.
>> We keep phy_a.c as it's needed for G-PHY which shares some design.
>>
>> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> Wouldn't it make sense to move the relevant pieces of phy_a.c to phy_g.c
> and then remove phy_a.c entirely?
>
> There are pieces in phy_a.c which can be removed entirely, e.g.
> b43_phyops_a and things only used by this struct.
Absolutely, however it needs some effort and time. I'm currently quite
busy with other things in b43.
One could remove b43_phyops_a, then remove newly-unused functions.
Then see what code is not used by G-PHY. However you should keep in
mind, that 5 GHz support for G-PHY may need some functions that are
not called at this moment. So I'd suggest looking at 5 GHz support in
G-PHY first to avoid removing sth that may be needed in the future.
--
Rafał
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] b43: remove leftover code from old devices support
@ 2014-06-22 14:07 ` Rafał Miłecki
0 siblings, 0 replies; 10+ messages in thread
From: Rafał Miłecki @ 2014-06-22 14:07 UTC (permalink / raw)
To: Felix Fietkau; +Cc: linux-wireless, John W. Linville, b43-dev
On 22 June 2014 14:14, Felix Fietkau <nbd@openwrt.org> wrote:
> On 2014-06-20 17:22, Rafa? Mi?ecki wrote:
>> Old devices (A-PHY or B-PHY) are supposed to be supported by b43legacy.
>> We keep phy_a.c as it's needed for G-PHY which shares some design.
>>
>> Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
> Wouldn't it make sense to move the relevant pieces of phy_a.c to phy_g.c
> and then remove phy_a.c entirely?
>
> There are pieces in phy_a.c which can be removed entirely, e.g.
> b43_phyops_a and things only used by this struct.
Absolutely, however it needs some effort and time. I'm currently quite
busy with other things in b43.
One could remove b43_phyops_a, then remove newly-unused functions.
Then see what code is not used by G-PHY. However you should keep in
mind, that 5 GHz support for G-PHY may need some functions that are
not called at this moment. So I'd suggest looking at 5 GHz support in
G-PHY first to avoid removing sth that may be needed in the future.
--
Rafa?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] b43: remove leftover code from old devices support
2014-06-22 14:07 ` Rafał Miłecki
@ 2014-06-22 14:10 ` Felix Fietkau
-1 siblings, 0 replies; 10+ messages in thread
From: Felix Fietkau @ 2014-06-22 14:10 UTC (permalink / raw)
To: Rafał Miłecki; +Cc: linux-wireless, John W. Linville, b43-dev
On 2014-06-22 16:07, Rafał Miłecki wrote:
> On 22 June 2014 14:14, Felix Fietkau <nbd@openwrt.org> wrote:
>> On 2014-06-20 17:22, Rafał Miłecki wrote:
>>> Old devices (A-PHY or B-PHY) are supposed to be supported by b43legacy.
>>> We keep phy_a.c as it's needed for G-PHY which shares some design.
>>>
>>> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
>> Wouldn't it make sense to move the relevant pieces of phy_a.c to phy_g.c
>> and then remove phy_a.c entirely?
>>
>> There are pieces in phy_a.c which can be removed entirely, e.g.
>> b43_phyops_a and things only used by this struct.
>
> Absolutely, however it needs some effort and time. I'm currently quite
> busy with other things in b43.
>
> One could remove b43_phyops_a, then remove newly-unused functions.
> Then see what code is not used by G-PHY. However you should keep in
> mind, that 5 GHz support for G-PHY may need some functions that are
> not called at this moment. So I'd suggest looking at 5 GHz support in
> G-PHY first to avoid removing sth that may be needed in the future.
Makes sense.
- Felix
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] b43: remove leftover code from old devices support
@ 2014-06-22 14:10 ` Felix Fietkau
0 siblings, 0 replies; 10+ messages in thread
From: Felix Fietkau @ 2014-06-22 14:10 UTC (permalink / raw)
To: Rafał Miłecki; +Cc: linux-wireless, John W. Linville, b43-dev
On 2014-06-22 16:07, Rafa? Mi?ecki wrote:
> On 22 June 2014 14:14, Felix Fietkau <nbd@openwrt.org> wrote:
>> On 2014-06-20 17:22, Rafa? Mi?ecki wrote:
>>> Old devices (A-PHY or B-PHY) are supposed to be supported by b43legacy.
>>> We keep phy_a.c as it's needed for G-PHY which shares some design.
>>>
>>> Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
>> Wouldn't it make sense to move the relevant pieces of phy_a.c to phy_g.c
>> and then remove phy_a.c entirely?
>>
>> There are pieces in phy_a.c which can be removed entirely, e.g.
>> b43_phyops_a and things only used by this struct.
>
> Absolutely, however it needs some effort and time. I'm currently quite
> busy with other things in b43.
>
> One could remove b43_phyops_a, then remove newly-unused functions.
> Then see what code is not used by G-PHY. However you should keep in
> mind, that 5 GHz support for G-PHY may need some functions that are
> not called at this moment. So I'd suggest looking at 5 GHz support in
> G-PHY first to avoid removing sth that may be needed in the future.
Makes sense.
- Felix
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2014-06-22 14:10 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-20 15:22 [PATCH 1/2] b43: remove leftover code from old devices support Rafał Miłecki
2014-06-20 15:22 ` Rafał Miłecki
2014-06-20 15:22 ` [PATCH 2/2] b43: add config for (en|dis)abling G-PHY support Rafał Miłecki
2014-06-20 15:22 ` Rafał Miłecki
2014-06-22 12:14 ` [PATCH 1/2] b43: remove leftover code from old devices support Felix Fietkau
2014-06-22 12:14 ` Felix Fietkau
2014-06-22 14:07 ` Rafał Miłecki
2014-06-22 14:07 ` Rafał Miłecki
2014-06-22 14:10 ` Felix Fietkau
2014-06-22 14:10 ` Felix Fietkau
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.