diff mbox series

Backports b43 fix No 2GHz EPA gain table available for this device on phy rev 17 (bcm43217)

Message ID PR2PR09MB31808894FCD0106C17A95EF0CB8E9@PR2PR09MB3180.eurprd09.prod.outlook.com
State Changes Requested
Headers show
Series Backports b43 fix No 2GHz EPA gain table available for this device on phy rev 17 (bcm43217) | expand

Commit Message

Anthony Blakemore July 20, 2022, 1:34 p.m. UTC
Gain table is missing for rev 17 phy causing error:
b43-phy0 ERROR: No 2GHz EPA gain table available for this device

Table taken from wl driver with version string 6.37.14.4803.cpe4.14L04.0

This chip (bcm43217) only seems to be used in routers so I don't see much point sending the patch to linux-wireless

Signed-off-by: Anthony Blakemore <stokie-ant@hotmail.co.uk>

Comments

Rafał Miłecki July 20, 2022, 2:49 p.m. UTC | #1
On 20.07.2022 15:34, Anthony Blakemore wrote:
> Gain table is missing for rev 17 phy causing error:
> b43-phy0 ERROR: No 2GHz EPA gain table available for this device
> 
> Table taken from wl driver with version string 6.37.14.4803.cpe4.14L04.0
> 
> This chip (bcm43217) only seems to be used in routers so I don't see much point sending the patch to linux-wireless

How is it a backport then?

Upstream Linux kernel is perfectly fine with routers support so please send it to linux-wireless.
Anthony Blakemore July 20, 2022, 3:34 p.m. UTC | #2
>How is it a backport then?
Not a backport but a patch for linux-backports.

>Upstream Linux kernel is perfectly fine with routers support so please send it to linux-wireless.
Noted.
diff mbox series

Patch

diff --git a/package/kernel/mac80211/patches/brcm/1001-add-tx-gain-epa-phy-rev17-table.patch b/package/kernel/mac80211/patches/brcm/1001-add-tx-gain-epa-phy-rev17-table.patch
new file mode 100644
index 0000000000..d37de93c50
--- /dev/null
+++ b/package/kernel/mac80211/patches/brcm/1001-add-tx-gain-epa-phy-rev17-table.patch
@@ -0,0 +1,53 @@ 
+--- a/drivers/net/wireless/broadcom/b43/tables_nphy.c
++++ b/drivers/net/wireless/broadcom/b43/tables_nphy.c
+@@ -2360,6 +2360,41 @@ static const u32 b43_ntab_tx_gain_rev0_1
+
+ /* EPA 2 GHz */
+
++static const u32 b43_ntab_tx_gain_epa_rev17_2g[] = {
++      0x10520033, 0x10520031, 0x1052002f, 0x104a0031,
++      0x104a002e, 0x104a002b, 0x104a0029, 0x1042002c,
++      0x1042002a, 0x10420027, 0x10420025, 0x10420023,
++      0x10420021, 0x1042001f, 0x10320029, 0x10320026,
++      0x10320024, 0x10320022, 0x10320020, 0x102a0025,
++      0x102a0023, 0x102a0021, 0x102a001f, 0x10220025,
++      0x10220023, 0x10220021, 0x1022001f, 0x1022011f,
++      0x1022021f, 0x1022031f, 0x101a0022, 0x101a0020,
++      0x101a0120, 0x101a0220, 0x101a0320, 0x101a0420,
++      0x101a0520, 0x101a0620, 0x101a0720, 0x1012001f,
++      0x1012001e, 0x1012001c, 0x1012001a, 0x10120019,
++      0x10120119, 0x10120219, 0x10120319, 0x10120419,
++      0x10120519, 0x10120619, 0x100a0024, 0x100a0022,
++      0x100a0020, 0x100a001f, 0x100a001d, 0x100a001b,
++      0x100a001a, 0x100a011a, 0x100a021a, 0x100a031a,
++      0x100a041a, 0x100a051a, 0x100a061a, 0x100a071a,
++      0x100a071a, 0x100a071a, 0x100a071a, 0x100a071a,
++      0x100a071a, 0x100a071a, 0x100a071a, 0x100a071a,
++      0x100a071a, 0x100a071a, 0x100a071a, 0x100a071a,
++      0x100a071a, 0x100a071a, 0x100a071a, 0x100a071a,
++      0x100a071a, 0x100a071a, 0x100a071a, 0x100a071a,
++      0x100a071a, 0x100a071a, 0x100a071a, 0x100a071a,
++      0x100a071a, 0x100a071a, 0x100a071a, 0x100a071a,
++      0x100a071a, 0x100a071a, 0x100a071a, 0x100a071a,
++      0x100a071a, 0x100a071a, 0x100a071a, 0x100a071a,
++      0x100a071a, 0x100a071a, 0x100a071a, 0x100a071a,
++      0x100a071a, 0x100a071a, 0x100a071a, 0x100a071a,
++      0x100a071a, 0x100a071a, 0x100a071a, 0x100a071a,
++      0x100a071a, 0x100a071a, 0x100a071a, 0x100a071a,
++      0x100a071a, 0x100a071a, 0x100a071a, 0x100a071a,
++      0x100a071a, 0x100a071a, 0x100a071a, 0x100a071a,
++      0x100a071a, 0x100a071a, 0x100a071a, 0x100a071a
++};
++
+ static const u32 b43_ntab_tx_gain_epa_rev3_2g[] = {
+       0x1f410044, 0x1f410042, 0x1f410040, 0x1f41003e,
+       0x1f41003c, 0x1f41003b, 0x1f410039, 0x1f410037,
+@@ -3713,6 +3748,8 @@ const u32 *b43_nphy_get_tx_gain_table(st
+               }
+       } else {
+               switch (phy->rev) {
++              case 17:
++                      return b43_ntab_tx_gain_epa_rev17_2g;
+               case 6:
+               case 5:
+                       if (sprom->fem.ghz2.extpa_gain == 3)