mbox series

[SRU,J,0/8] Mediatek WLAN RZ616(MT7922) SAR table control

Message ID 20221121055335.3714-1-aaron.ma@canonical.com
Headers show
Series Mediatek WLAN RZ616(MT7922) SAR table control | expand

Message

Aaron Ma Nov. 21, 2022, 5:53 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1997200

[Impact]
In order to make sure the amount of RF energy being absorbed by our
bodies is safe according to the FCC’s guidelines, products must undergo
and pass SAR testing.

[Fix]
Add ACPI SAR table control to pass the testing.

[Test]
the unit is 0.5dBm in following:

Without the SAR table control:
$ sudo cat /sys/kernel/debug/ieee80211/phy0/mt76/txpower_sku | grep -i
user
CCK (user) : N.A N.A N.A N.A
OFDM (user) : 40 40 40 40 40 40 40 40
HT20 (user) : 40 40 40 40 40 40 40 40
HT40 (user) : 40 40 40 40 40 40 40 40 40
VHT20 (user) : 40 40 40 40 40 40 40 40 40 40 0 0
VHT40 (user) : 40 40 40 40 40 40 40 40 40 40 0 0
VHT80 (user) : 40 40 40 40 40 40 40 40 40 40 0 0
VHT160 (user) : 40 40 40 40 40 40 40 40 40 40 0 0
HE26 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
HE52 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
HE106 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
HE242 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
HE484 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
HE996 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
HE996x2 (user) : 40 40 40 40 40 40 40 40 40 40 40 40

After enabled SAR table control:
$ sudo cat /sys/kernel/debug/ieee80211/phy0/mt76/txpower_sku | grep -i
user
CCK (user) : N.A N.A N.A N.A
OFDM (user) : 26 26 26 26 26 26 26 26
HT20 (user) : 26 26 26 26 26 26 26 26
HT40 (user) : 26 26 26 26 26 26 26 26 26
VHT20 (user) : 26 26 26 26 26 26 26 26 26 26 0 0
VHT40 (user) : 26 26 26 26 26 26 26 26 26 26 0 0
VHT80 (user) : 26 26 26 26 26 26 26 26 26 26 0 0
VHT160 (user) : 26 26 26 26 26 26 26 26 26 26 0 0
HE26 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
HE52 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
HE106 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
HE242 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
HE484 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
HE996 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
HE996x2 (user) : 26 26 26 26 26 26 26 26 26 26 26 26

Also done stress test with iperf, all works fine.

[Where problems could occur]
It may break mt7922 driver.

These commits are already in oem-6.0 and unstable.

Dan Carpenter (1):
  wifi: mt76: mt7921: fix use after free in mt7921_acpi_read()

Deren Wu (3):
  mt76: add 6 GHz band support in mt76_sar_freq_ranges
  mt76: mt7921: introduce ACPI SAR support
  mt76: mt7921: introduce ACPI SAR config in tx power

Lorenzo Bianconi (2):
  mt76: move sar utilities to mt76-core module
  mt76: mt7921: honor mt76_connac_mcu_set_rate_txpower return value in
    mt7921_config

YN Chen (2):
  mt76: mt7921: add .set_sar_specs support
  mt76: connac: add support for limiting to maximum regulatory Tx power

 drivers/net/wireless/mediatek/mt76/mac80211.c |  74 +++++
 drivers/net/wireless/mediatek/mt76/mt76.h     |  13 +
 .../wireless/mediatek/mt76/mt76_connac_mcu.c  |  44 ++-
 .../wireless/mediatek/mt76/mt7921/Makefile    |   1 +
 .../wireless/mediatek/mt76/mt7921/acpi_sar.c  | 282 ++++++++++++++++++
 .../wireless/mediatek/mt76/mt7921/acpi_sar.h  |  93 ++++++
 .../net/wireless/mediatek/mt76/mt7921/init.c  |  23 +-
 .../net/wireless/mediatek/mt76/mt7921/main.c  |  47 ++-
 .../wireless/mediatek/mt76/mt7921/mt7921.h    |  22 ++
 9 files changed, 589 insertions(+), 10 deletions(-)
 create mode 100644 drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.c
 create mode 100644 drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.h

Comments

Tim Gardner Nov. 22, 2022, 7:19 p.m. UTC | #1
On 11/20/22 10:53 PM, Aaron Ma wrote:
> BugLink: https://bugs.launchpad.net/bugs/1997200
> 
> [Impact]
> In order to make sure the amount of RF energy being absorbed by our
> bodies is safe according to the FCC’s guidelines, products must undergo
> and pass SAR testing.
> 
> [Fix]
> Add ACPI SAR table control to pass the testing.
> 
> [Test]
> the unit is 0.5dBm in following:
> 
> Without the SAR table control:
> $ sudo cat /sys/kernel/debug/ieee80211/phy0/mt76/txpower_sku | grep -i
> user
> CCK (user) : N.A N.A N.A N.A
> OFDM (user) : 40 40 40 40 40 40 40 40
> HT20 (user) : 40 40 40 40 40 40 40 40
> HT40 (user) : 40 40 40 40 40 40 40 40 40
> VHT20 (user) : 40 40 40 40 40 40 40 40 40 40 0 0
> VHT40 (user) : 40 40 40 40 40 40 40 40 40 40 0 0
> VHT80 (user) : 40 40 40 40 40 40 40 40 40 40 0 0
> VHT160 (user) : 40 40 40 40 40 40 40 40 40 40 0 0
> HE26 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
> HE52 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
> HE106 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
> HE242 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
> HE484 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
> HE996 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
> HE996x2 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
> 
> After enabled SAR table control:
> $ sudo cat /sys/kernel/debug/ieee80211/phy0/mt76/txpower_sku | grep -i
> user
> CCK (user) : N.A N.A N.A N.A
> OFDM (user) : 26 26 26 26 26 26 26 26
> HT20 (user) : 26 26 26 26 26 26 26 26
> HT40 (user) : 26 26 26 26 26 26 26 26 26
> VHT20 (user) : 26 26 26 26 26 26 26 26 26 26 0 0
> VHT40 (user) : 26 26 26 26 26 26 26 26 26 26 0 0
> VHT80 (user) : 26 26 26 26 26 26 26 26 26 26 0 0
> VHT160 (user) : 26 26 26 26 26 26 26 26 26 26 0 0
> HE26 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
> HE52 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
> HE106 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
> HE242 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
> HE484 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
> HE996 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
> HE996x2 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
> 
> Also done stress test with iperf, all works fine.
> 
> [Where problems could occur]
> It may break mt7922 driver.
> 
> These commits are already in oem-6.0 and unstable.
> 
> Dan Carpenter (1):
>    wifi: mt76: mt7921: fix use after free in mt7921_acpi_read()
> 
> Deren Wu (3):
>    mt76: add 6 GHz band support in mt76_sar_freq_ranges
>    mt76: mt7921: introduce ACPI SAR support
>    mt76: mt7921: introduce ACPI SAR config in tx power
> 
> Lorenzo Bianconi (2):
>    mt76: move sar utilities to mt76-core module
>    mt76: mt7921: honor mt76_connac_mcu_set_rate_txpower return value in
>      mt7921_config
> 
> YN Chen (2):
>    mt76: mt7921: add .set_sar_specs support
>    mt76: connac: add support for limiting to maximum regulatory Tx power
> 
>   drivers/net/wireless/mediatek/mt76/mac80211.c |  74 +++++
>   drivers/net/wireless/mediatek/mt76/mt76.h     |  13 +
>   .../wireless/mediatek/mt76/mt76_connac_mcu.c  |  44 ++-
>   .../wireless/mediatek/mt76/mt7921/Makefile    |   1 +
>   .../wireless/mediatek/mt76/mt7921/acpi_sar.c  | 282 ++++++++++++++++++
>   .../wireless/mediatek/mt76/mt7921/acpi_sar.h  |  93 ++++++
>   .../net/wireless/mediatek/mt76/mt7921/init.c  |  23 +-
>   .../net/wireless/mediatek/mt76/mt7921/main.c  |  47 ++-
>   .../wireless/mediatek/mt76/mt7921/mt7921.h    |  22 ++
>   9 files changed, 589 insertions(+), 10 deletions(-)
>   create mode 100644 drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.c
>   create mode 100644 drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.h
> 
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Khalid Elmously Nov. 23, 2022, 1:49 a.m. UTC | #2
Acked-by: Khalid Elmously <khalid.elmously@canonical.com>


On 2022-11-21 13:53:27 , Aaron Ma wrote:
> BugLink: https://bugs.launchpad.net/bugs/1997200
> 
> [Impact]
> In order to make sure the amount of RF energy being absorbed by our
> bodies is safe according to the FCC’s guidelines, products must undergo
> and pass SAR testing.
> 
> [Fix]
> Add ACPI SAR table control to pass the testing.
> 
> [Test]
> the unit is 0.5dBm in following:
> 
> Without the SAR table control:
> $ sudo cat /sys/kernel/debug/ieee80211/phy0/mt76/txpower_sku | grep -i
> user
> CCK (user) : N.A N.A N.A N.A
> OFDM (user) : 40 40 40 40 40 40 40 40
> HT20 (user) : 40 40 40 40 40 40 40 40
> HT40 (user) : 40 40 40 40 40 40 40 40 40
> VHT20 (user) : 40 40 40 40 40 40 40 40 40 40 0 0
> VHT40 (user) : 40 40 40 40 40 40 40 40 40 40 0 0
> VHT80 (user) : 40 40 40 40 40 40 40 40 40 40 0 0
> VHT160 (user) : 40 40 40 40 40 40 40 40 40 40 0 0
> HE26 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
> HE52 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
> HE106 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
> HE242 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
> HE484 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
> HE996 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
> HE996x2 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
> 
> After enabled SAR table control:
> $ sudo cat /sys/kernel/debug/ieee80211/phy0/mt76/txpower_sku | grep -i
> user
> CCK (user) : N.A N.A N.A N.A
> OFDM (user) : 26 26 26 26 26 26 26 26
> HT20 (user) : 26 26 26 26 26 26 26 26
> HT40 (user) : 26 26 26 26 26 26 26 26 26
> VHT20 (user) : 26 26 26 26 26 26 26 26 26 26 0 0
> VHT40 (user) : 26 26 26 26 26 26 26 26 26 26 0 0
> VHT80 (user) : 26 26 26 26 26 26 26 26 26 26 0 0
> VHT160 (user) : 26 26 26 26 26 26 26 26 26 26 0 0
> HE26 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
> HE52 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
> HE106 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
> HE242 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
> HE484 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
> HE996 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
> HE996x2 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
> 
> Also done stress test with iperf, all works fine.
> 
> [Where problems could occur]
> It may break mt7922 driver.
> 
> These commits are already in oem-6.0 and unstable.
> 
> Dan Carpenter (1):
>   wifi: mt76: mt7921: fix use after free in mt7921_acpi_read()
> 
> Deren Wu (3):
>   mt76: add 6 GHz band support in mt76_sar_freq_ranges
>   mt76: mt7921: introduce ACPI SAR support
>   mt76: mt7921: introduce ACPI SAR config in tx power
> 
> Lorenzo Bianconi (2):
>   mt76: move sar utilities to mt76-core module
>   mt76: mt7921: honor mt76_connac_mcu_set_rate_txpower return value in
>     mt7921_config
> 
> YN Chen (2):
>   mt76: mt7921: add .set_sar_specs support
>   mt76: connac: add support for limiting to maximum regulatory Tx power
> 
>  drivers/net/wireless/mediatek/mt76/mac80211.c |  74 +++++
>  drivers/net/wireless/mediatek/mt76/mt76.h     |  13 +
>  .../wireless/mediatek/mt76/mt76_connac_mcu.c  |  44 ++-
>  .../wireless/mediatek/mt76/mt7921/Makefile    |   1 +
>  .../wireless/mediatek/mt76/mt7921/acpi_sar.c  | 282 ++++++++++++++++++
>  .../wireless/mediatek/mt76/mt7921/acpi_sar.h  |  93 ++++++
>  .../net/wireless/mediatek/mt76/mt7921/init.c  |  23 +-
>  .../net/wireless/mediatek/mt76/mt7921/main.c  |  47 ++-
>  .../wireless/mediatek/mt76/mt7921/mt7921.h    |  22 ++
>  9 files changed, 589 insertions(+), 10 deletions(-)
>  create mode 100644 drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.c
>  create mode 100644 drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.h
> 
> -- 
> 2.34.1
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Stefan Bader Nov. 30, 2022, 12:49 p.m. UTC | #3
On 21.11.22 06:53, Aaron Ma wrote:
> BugLink: https://bugs.launchpad.net/bugs/1997200
> 
> [Impact]
> In order to make sure the amount of RF energy being absorbed by our
> bodies is safe according to the FCC’s guidelines, products must undergo
> and pass SAR testing.
> 
> [Fix]
> Add ACPI SAR table control to pass the testing.
> 
> [Test]
> the unit is 0.5dBm in following:
> 
> Without the SAR table control:
> $ sudo cat /sys/kernel/debug/ieee80211/phy0/mt76/txpower_sku | grep -i
> user
> CCK (user) : N.A N.A N.A N.A
> OFDM (user) : 40 40 40 40 40 40 40 40
> HT20 (user) : 40 40 40 40 40 40 40 40
> HT40 (user) : 40 40 40 40 40 40 40 40 40
> VHT20 (user) : 40 40 40 40 40 40 40 40 40 40 0 0
> VHT40 (user) : 40 40 40 40 40 40 40 40 40 40 0 0
> VHT80 (user) : 40 40 40 40 40 40 40 40 40 40 0 0
> VHT160 (user) : 40 40 40 40 40 40 40 40 40 40 0 0
> HE26 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
> HE52 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
> HE106 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
> HE242 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
> HE484 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
> HE996 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
> HE996x2 (user) : 40 40 40 40 40 40 40 40 40 40 40 40
> 
> After enabled SAR table control:
> $ sudo cat /sys/kernel/debug/ieee80211/phy0/mt76/txpower_sku | grep -i
> user
> CCK (user) : N.A N.A N.A N.A
> OFDM (user) : 26 26 26 26 26 26 26 26
> HT20 (user) : 26 26 26 26 26 26 26 26
> HT40 (user) : 26 26 26 26 26 26 26 26 26
> VHT20 (user) : 26 26 26 26 26 26 26 26 26 26 0 0
> VHT40 (user) : 26 26 26 26 26 26 26 26 26 26 0 0
> VHT80 (user) : 26 26 26 26 26 26 26 26 26 26 0 0
> VHT160 (user) : 26 26 26 26 26 26 26 26 26 26 0 0
> HE26 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
> HE52 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
> HE106 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
> HE242 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
> HE484 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
> HE996 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
> HE996x2 (user) : 26 26 26 26 26 26 26 26 26 26 26 26
> 
> Also done stress test with iperf, all works fine.
> 
> [Where problems could occur]
> It may break mt7922 driver.
> 
> These commits are already in oem-6.0 and unstable.
> 
> Dan Carpenter (1):
>    wifi: mt76: mt7921: fix use after free in mt7921_acpi_read()
> 
> Deren Wu (3):
>    mt76: add 6 GHz band support in mt76_sar_freq_ranges
>    mt76: mt7921: introduce ACPI SAR support
>    mt76: mt7921: introduce ACPI SAR config in tx power
> 
> Lorenzo Bianconi (2):
>    mt76: move sar utilities to mt76-core module
>    mt76: mt7921: honor mt76_connac_mcu_set_rate_txpower return value in
>      mt7921_config
> 
> YN Chen (2):
>    mt76: mt7921: add .set_sar_specs support
>    mt76: connac: add support for limiting to maximum regulatory Tx power
> 
>   drivers/net/wireless/mediatek/mt76/mac80211.c |  74 +++++
>   drivers/net/wireless/mediatek/mt76/mt76.h     |  13 +
>   .../wireless/mediatek/mt76/mt76_connac_mcu.c  |  44 ++-
>   .../wireless/mediatek/mt76/mt7921/Makefile    |   1 +
>   .../wireless/mediatek/mt76/mt7921/acpi_sar.c  | 282 ++++++++++++++++++
>   .../wireless/mediatek/mt76/mt7921/acpi_sar.h  |  93 ++++++
>   .../net/wireless/mediatek/mt76/mt7921/init.c  |  23 +-
>   .../net/wireless/mediatek/mt76/mt7921/main.c  |  47 ++-
>   .../wireless/mediatek/mt76/mt7921/mt7921.h    |  22 ++
>   9 files changed, 589 insertions(+), 10 deletions(-)
>   create mode 100644 drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.c
>   create mode 100644 drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.h
> 

Applied to jammy:linux/master-next. Thanks.

-Stefan