-
Notifications
You must be signed in to change notification settings - Fork 384
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 <mironov.ivan@gmail.com> Cc: stable@vger.kernel.org Fixes: de3e772 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Closes: openwrt/openwrt#17489 Link: openwrt#954
Maybe, the funny part is I get 255 in all radios. Just after restarting the 6GHz radio I got the readings correct.
|
|
@leow149 Yeah, I think I have the issue you mentioned. I got just 255 dBm for 6GHz interface using |
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 <mironov.ivan@gmail.com>
Cc: stable@vger.kernel.org
Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Closes: openwrt/openwrt#17489
Link: openwrt#954
|
I think its time to merge this patch with master @nbd168 |
|
My two cents: it would be better to merge the other patch in |
|
It doesn't help anyone if this issue is pushed back and forth between the two repos, openwrt/openwrt and openwrt/mt76. |
|
Sorry, I didn't see I also think we should approve, just not here. |
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 <mironov.ivan@gmail.com>
Cc: stable@vger.kernel.org
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 <mironov.ivan@gmail.com>
Cc: stable@vger.kernel.org
Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Closes: openwrt/openwrt#17489
Link: openwrt#954
|
Could someone please create a patch in OpenWrt? Repo? I would do it, but I'm not familiar with it. Thank you |
|
@Critter74 it is already there for a while: openwrt/openwrt#19503. |
|
Thank you! |
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 <mironov.ivan@gmail.com>
Cc: stable@vger.kernel.org
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 <mironov.ivan@gmail.com>
Cc: stable@vger.kernel.org
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 <mironov.ivan@gmail.com>
Cc: stable@vger.kernel.org
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 <mironov.ivan@gmail.com>
Cc: stable@vger.kernel.org
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 <mironov.ivan@gmail.com>
Cc: stable@vger.kernel.org
Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Closes: openwrt/openwrt#17489
Link: openwrt#954
|
I'm using this patch and it seems after commit |
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 <mironov.ivan@gmail.com>
Cc: stable@vger.kernel.org
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 <mironov.ivan@gmail.com>
Cc: stable@vger.kernel.org
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 <mironov.ivan@gmail.com>
Cc: stable@vger.kernel.org
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 <mironov.ivan@gmail.com>
Cc: stable@vger.kernel.org
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 <mironov.ivan@gmail.com>
Cc: stable@vger.kernel.org
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 <mironov.ivan@gmail.com>
Cc: stable@vger.kernel.org
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 <mironov.ivan@gmail.com> Cc: stable@vger.kernel.org Fixes: 98686cd ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Closes: openwrt/openwrt#17489 Link: openwrt/mt76#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 <mironov.ivan@gmail.com> Cc: stable@vger.kernel.org Fixes: 98686cd ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Closes: openwrt/openwrt#17489 Link: openwrt/mt76#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 <mironov.ivan@gmail.com> Cc: stable@vger.kernel.org Fixes: 98686cd ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Closes: openwrt/openwrt#17489 Link: openwrt/mt76#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 <mironov.ivan@gmail.com> Cc: stable@vger.kernel.org Fixes: 98686cd ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Closes: openwrt/openwrt#17489 Link: openwrt/mt76#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 <mironov.ivan@gmail.com>
Cc: stable@vger.kernel.org
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 <mironov.ivan@gmail.com> Cc: stable@vger.kernel.org Fixes: 98686cd ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Closes: openwrt/openwrt#17489 Link: openwrt/mt76#954


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_loadthat 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.