-
Notifications
You must be signed in to change notification settings - Fork 359
Add tx_power check during eeprom loading #954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Let's add tx_power patch [1] to the builds. [1] openwrt/mt76#954
@nbd168 ? |
Would this trick also work on MT7921? |
Such kind of patch should be sent to linux kernel mail list rather than here. |
Besides, when sending patches, please rebase your patch on this repo: https://github.com/nbd168/wireless |
Also I'm not sure if your patch is doing things right... I asked someone who is more knowledged about this, he said that the actual supported TX power caculation is not only depending on MT_EE_TX0_POWER_*G but also some other parameters... |
As far as I know, Sinovoip has delibrately limited TX power for 2.4/5ghz to 20dBm to follow Chinese legal constrictions in BE14 eeprom. And the constrictions are working correctly in BPI's mtwifi-based closed-source firmware. |
see patchwork for wifi: mt76: fix returned txpower for mt7921 and mt7925 It is a series of patches that came in today. |
haha, I know, I’m the Author of that patch series 🙂 |
@razvanphp Bro your patch really needs line wrapping XD |
@Headcrabed I've sent v2 which fixes the line wrapping and also added cleanup for MT7996 as you suggested. Thanks! |
You will hate me for this but I just noticed: You forgot to add the following below your Signed-off : That keys those that do the backports to apply it to all currently maintained kernels and we could certainly use this being applied to 6.12 for mt7925 and 6.12 and 6.6 for mt7921. |
I think the CC could be added in reply? |
I've never had a problem doing it the way I am. I think there is some code that does something to make sure it gets to where it is going. |
That may be true, but as someone with one of the affected BE14's I'll tell you that without this patch it is unusable, and with this patch loading the default fw it works fine. I think the point is not that this is replacing the TX power calculation, but rather that it detecting a known-broken firmware state and reloading with a known-good file. Which is nice when otherwise you have several hundred dollars of junk ;p |
This patch isn't about going above 20dBm, its about being able to go above 6dBm. After the investigation we realized that the location in the eeprom that the driver is looking at is empty for many of us, while the eeprom image has the proper values there, so we concluded the eeprom is somehow wrong. |
@Jiyuu But this patch seems currently would completely neglect all calibration data inside the eeprom now. It would be better if only power data is neglected but other things from the eeprom are preserved. |
Isnt this patch basically just changing the startup sequence? If this understanding is wrong then I would probably agree that this patch is less appropriate for upsteaming, but then where/who should we reach out to figure this issue out, because i think this solution was basically crowdsourced by a bunch of affected people that were trying to get their hardware to work.. |
I agree with this: openwrt/openwrt#17489 (comment) |
Let's add tx_power patch [1] to the builds. [1] openwrt/mt76#954
nice |
@razvanphp Did you send your patch email to all output addresses from ./scripts/get_maintainers.pl? Seems you are not doing it correctly? |
Why hasn't this PR been merged yet? |
It is waiting to be reviewed to go in kernel 6.15: https://patchwork.kernel.org/project/linux-wireless/list/?series=932665 |
@morrownr The patch you mentioned above is not related to this MR. Also it seems not working correctly. #783 (comment) |
No, I just sent it to the list in this list: https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/MAINTAINERS#n14821 I think I can forward it to everybody, including the backport one. |
@razvanphp better send it to everyone with a resend tag, like this: https://lore.kernel.org/all/TYCPR01MB84373677E45A7BFA5A28232C98792@TYCPR01MB8437.jpnprd01.prod.outlook.com/ |
There was some commits a few hours ago, is this patch still needed ? |
Some Banana Pi BPI-R4-NIC-BE14 WiFi modules are sold with zeros instead of usable tx_power values in EEPROM for 2.4 GHz and 5 GHz bands. This patch replaces tx_power zeros with default values from firmware files while keeping the rest of the EEPROM data intact (including valid 6 GHz tx_power table). Signed-off-by: Ivan Mironov <[email protected]> Cc: [email protected] Fixes: de3e772 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Closes: openwrt/openwrt#17489 Link: openwrt#954
Some Banana Pi BPI-R4-NIC-BE14 WiFi modules are sold with zeros instead of usable tx_power values in EEPROM for 2.4 GHz and 5 GHz bands. This patch replaces tx_power zeros with default values from firmware files while keeping the rest of the EEPROM data intact (including valid 6 GHz tx_power table). Signed-off-by: Ivan Mironov <[email protected]> Cc: [email protected] Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Closes: openwrt/openwrt#17489 Link: openwrt#954
This (or alternative) patch is still needed for BPI-R4 / BPI-R4-NIC-BE14. |
Some Banana Pi BPI-R4-NIC-BE14 WiFi modules are sold with zeros instead of usable tx_power values in EEPROM for 2.4 GHz and 5 GHz bands. This patch replaces tx_power zeros with default values from firmware files while keeping the rest of the EEPROM data intact (including valid 6 GHz tx_power table). Signed-off-by: Ivan Mironov <[email protected]> Cc: [email protected] Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Closes: openwrt/openwrt#17489 Link: openwrt#954
You need to compile it manually and the easiest way is to add the patch to |
Some Banana Pi BPI-R4-NIC-BE14 WiFi modules are sold with zeros instead of usable tx_power values in EEPROM for 2.4 GHz and 5 GHz bands. This patch replaces tx_power zeros with default values from firmware files while keeping the rest of the EEPROM data intact (including valid 6 GHz tx_power table). Signed-off-by: Ivan Mironov <[email protected]> Cc: [email protected] Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Closes: openwrt/openwrt#17489 Link: openwrt#954 (cherry picked from commit aaf90b2)
Some Banana Pi BPI-R4-NIC-BE14 WiFi modules are sold with zeros instead of usable tx_power values in EEPROM for 2.4 GHz and 5 GHz bands. This patch replaces tx_power zeros with default values from firmware files while keeping the rest of the EEPROM data intact (including valid 6 GHz tx_power table). Signed-off-by: Ivan Mironov <[email protected]> Cc: [email protected] Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Closes: openwrt/openwrt#17489 Link: openwrt#954
This is the only patch that fixes the issue on three of my bpi-r4's, whereas #968 does not fix the issue completely. See openwrt/openwrt#17489 (comment) for more details. |
Some Banana Pi BPI-R4-NIC-BE14 WiFi modules are sold with zeros instead of usable tx_power values in EEPROM for 2.4 GHz and 5 GHz bands. This patch replaces tx_power zeros with default values from firmware files while keeping the rest of the EEPROM data intact (including valid 6 GHz tx_power table). Signed-off-by: Ivan Mironov <[email protected]> Cc: [email protected] Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Closes: openwrt/openwrt#17489 Link: openwrt#954 (cherry picked from commit aaf90b2)
Some Banana Pi BPI-R4-NIC-BE14 WiFi modules are sold with zeros instead of usable tx_power values in EEPROM for 2.4 GHz and 5 GHz bands. This patch replaces tx_power zeros with default values from firmware files while keeping the rest of the EEPROM data intact (including valid 6 GHz tx_power table). Signed-off-by: Ivan Mironov <[email protected]> Cc: [email protected] Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Closes: openwrt/openwrt#17489 Link: openwrt#954 (cherry picked from commit aaf90b2)
Some Banana Pi BPI-R4-NIC-BE14 WiFi modules are sold with zeros instead of usable tx_power values in EEPROM for 2.4 GHz and 5 GHz bands. This patch replaces tx_power zeros with default values from firmware files while keeping the rest of the EEPROM data intact (including valid 6 GHz tx_power table). Signed-off-by: Ivan Mironov <[email protected]> Cc: [email protected] Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Closes: openwrt/openwrt#17489 Link: openwrt#954 (cherry picked from commit aaf90b2)
Some Banana Pi BPI-R4-NIC-BE14 WiFi modules are sold with zeros instead of usable tx_power values in EEPROM for 2.4 GHz and 5 GHz bands. This patch replaces tx_power zeros with default values from firmware files while keeping the rest of the EEPROM data intact (including valid 6 GHz tx_power table). Signed-off-by: Ivan Mironov <[email protected]> Cc: [email protected] Fixes: 98686cd ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Closes: openwrt/openwrt#17489 Link: openwrt/mt76#954 (cherry picked from commit aaf90b24fde77a38ee9f0a60d7097ded6a94ad1f)
What are the next steps to merge or deny this patch? It would have saved me half a day learning how to build OpenWrt yesterday if this were merged 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes the 6dBm txpower limitation on my BPI-R4 when applied as tagatac/openwrt@19c6417 on top of the v24.10.1
tag, built on Debian with the default config for BPI-R4, and flashed to an SD card, or applied as a sysupgrade to an existing 24.10.1 installation on eMMC
maybe the maintainers are still in hibernation ;) |
Some Banana Pi BPI-R4-NIC-BE14 WiFi modules are sold with zeros instead of usable tx_power values in EEPROM for 2.4 GHz and 5 GHz bands. This patch replaces tx_power zeros with default values from firmware files while keeping the rest of the EEPROM data intact (including valid 6 GHz tx_power table). Signed-off-by: Ivan Mironov <[email protected]> Cc: [email protected] Fixes: 98686cd ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Closes: openwrt/openwrt#17489 Link: openwrt/mt76#954 (cherry picked from commit aaf90b24fde77a38ee9f0a60d7097ded6a94ad1f)
Some Banana Pi BPI-R4-NIC-BE14 WiFi modules are sold with zeros instead of usable tx_power values in EEPROM for 2.4 GHz and 5 GHz bands. This patch replaces tx_power zeros with default values from firmware files while keeping the rest of the EEPROM data intact (including valid 6 GHz tx_power table). Signed-off-by: Ivan Mironov <[email protected]> Cc: [email protected] Fixes: 98686cd ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Closes: openwrt/openwrt#17489 Link: openwrt/mt76#954 (cherry picked from commit aaf90b24fde77a38ee9f0a60d7097ded6a94ad1f)
Some Banana Pi BPI-R4-NIC-BE14 WiFi modules are sold with zeros instead of usable tx_power values in EEPROM for 2.4 GHz and 5 GHz bands. This patch replaces tx_power zeros with default values from firmware files while keeping the rest of the EEPROM data intact (including valid 6 GHz tx_power table). Signed-off-by: Ivan Mironov <[email protected]> Cc: [email protected] Fixes: 98686cd ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Closes: openwrt/openwrt#17489 Link: openwrt/mt76#954 (cherry picked from commit aaf90b24fde77a38ee9f0a60d7097ded6a94ad1f)
Some Banana Pi BPI-R4-NIC-BE14 WiFi modules are sold with zeros instead of usable tx_power values in EEPROM for 2.4 GHz and 5 GHz bands. This patch replaces tx_power zeros with default values from firmware files while keeping the rest of the EEPROM data intact (including valid 6 GHz tx_power table). Signed-off-by: Ivan Mironov <[email protected]> Cc: [email protected] Fixes: 98686cd ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Closes: openwrt/openwrt#17489 Link: openwrt/mt76#954 (cherry picked from commit aaf90b24fde77a38ee9f0a60d7097ded6a94ad1f)
Some Banana Pi BPI-R4-NIC-BE14 WiFi modules are sold with zeros instead of usable tx_power values in EEPROM for 2.4 GHz and 5 GHz bands. This patch replaces tx_power zeros with default values from firmware files while keeping the rest of the EEPROM data intact (including valid 6 GHz tx_power table). Signed-off-by: Ivan Mironov <[email protected]> Cc: [email protected] Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Closes: openwrt/openwrt#17489 Link: openwrt#954
Some Banana Pi BPI-R4-NIC-BE14 WiFi modules are sold with zeros instead of usable tx_power values in EEPROM for 2.4 GHz and 5 GHz bands. This patch replaces tx_power zeros with default values from firmware files while keeping the rest of the EEPROM data intact (including valid 6 GHz tx_power table). Signed-off-by: Ivan Mironov <[email protected]> Cc: [email protected] Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Closes: openwrt/openwrt#17489 Link: openwrt#954 (cherry picked from commit aaf90b2)
Some Banana Pi BPI-R4-NIC-BE14 WiFi modules are sold with zeros instead of usable tx_power values in EEPROM for 2.4 GHz and 5 GHz bands. This patch replaces tx_power zeros with default values from firmware files while keeping the rest of the EEPROM data intact (including valid 6 GHz tx_power table). Signed-off-by: Ivan Mironov <[email protected]> Cc: [email protected] Fixes: 98686cd ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Closes: openwrt/openwrt#17489 Link: openwrt/mt76#954 (cherry picked from commit aaf90b24fde77a38ee9f0a60d7097ded6a94ad1f)
Hello.
As pointed out in openwrt/openwrt/issues/17489 - some BPI-R4-BE14 cards come with a stock firmware with no tx_power values for 2.4G and 5G bands. Which basically prevents using the 2/5G band as it defaults to 6dBm.
This PR adds a basic check in
mt7996_eeprom_load
that reads the power value from the first channel group for each band. If any of them is zero, it falls back to loading the default firmware from the disk.It was confirmed working on both affected and unaffected devices in the main issue.