Skip to contentSkip to conversation

wifi: ath11k: fix txpower in ap mode for 6 Ghz

PATCH Superseded Sebastian Gottschall 3 participants 8 messages May 12 – May 13 Qualcomm Atheros ATH11K wireless driver

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wifi: ath11k: fix txpower in ap mode for 6 Ghz

there is an issue which has been discovered a while ago while testing which killed txpower to 0dbm once scanning is triggered in AP mode on QCN9074 based chipsets if 6 Ghz is in use. ath11k_wmi_send_vdev_set_tpc_power must be set in AP mode in the same way is it is for STA as it is implemented in ath12k and in the qsdk version for ath11k.
this patch must be considered to be backported (i discovered that issue already 2 years ago)

---
 drivers/net/wireless/ath/ath11k/mac.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath11k/mac.c +5 -4
index a48b6bf1f29a..dc192152b2e8 100644
@@ -3497,13 +3497,14 @@ static int ath11k_mac_config_obss_pd(struct ath11k *ar,
 	return 0;
 }
 
-static bool ath11k_mac_supports_station_tpc(struct ath11k *ar,
+static bool ath11k_mac_supports_tpc(struct ath11k *ar,
 					    struct ath11k_vif *arvif,
 					    const struct cfg80211_chan_def *chandef)
 {
 	return ath11k_wmi_supports_6ghz_cc_ext(ar) &&
 		test_bit(WMI_TLV_SERVICE_EXT_TPC_REG_SUPPORT, ar->ab->wmi_ab.svc_map) &&
-		arvif->vdev_type == WMI_VDEV_TYPE_STA &&
+		(arvif->vdev_type == WMI_VDEV_TYPE_STA ||
+		arvif->vdev_type == WMI_VDEV_TYPE_AP) &&
 		arvif->vdev_subtype == WMI_VDEV_SUBTYPE_NONE &&
 		chandef->chan &&
 		chandef->chan->band == NL80211_BAND_6GHZ;
@@ -7647,8 +7648,8 @@ ath11k_mac_vdev_start_restart(struct ath11k_vif *arvif,
 	/* TODO: For now we only set TPC power here. However when
 	 * channel changes, say CSA, it should be updated again.
 	 */
-	if (ath11k_mac_supports_station_tpc(ar, arvif, chandef)) {
-		ath11k_mac_fill_reg_tpc_info(ar, arvif->vif, &arvif->chanctx);
+	if (ath11k_mac_supports_tpc(ar, arvif, chandef)) {
+		ath11k_mac_fill_reg_tpc_info(ar, arvif->vif, ctx);
 		ath11k_wmi_send_vdev_set_tpc_power(ar, arvif->vdev_id,
 						   &arvif->reg_tpc_info);
 	}
Signature · 1 line
2.51.0
#1 lore raw
Quoted 36 lines · Sebastian Gottschall

there is an issue which has been discovered a while ago while testing which killed txpower to 0dbm once scanning is triggered in AP mode on QCN9074 based chipsets if 6 Ghz is in use. ath11k_wmi_send_vdev_set_tpc_power must be set in AP mode in the same way is it is for STA as it is implemented in ath12k and in the qsdk version for ath11k.
this patch must be considered to be backported (i discovered that issue already 2 years ago)

---
 drivers/net/wireless/ath/ath11k/mac.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath11k/mac.c +3 -2
index a48b6bf1f29a..dc192152b2e8 100644
@@ -3497,13 +3497,14 @@ static int ath11k_mac_config_obss_pd(struct ath11k *ar,
 	return 0;
 }
 
-static bool ath11k_mac_supports_station_tpc(struct ath11k *ar,
+static bool ath11k_mac_supports_tpc(struct ath11k *ar,
 					    struct ath11k_vif *arvif,
 					    const struct cfg80211_chan_def *chandef)
 {
 	return ath11k_wmi_supports_6ghz_cc_ext(ar) &&
 		test_bit(WMI_TLV_SERVICE_EXT_TPC_REG_SUPPORT, ar->ab->wmi_ab.svc_map) &&
-		arvif->vdev_type == WMI_VDEV_TYPE_STA &&
+		(arvif->vdev_type == WMI_VDEV_TYPE_STA ||
+		arvif->vdev_type == WMI_VDEV_TYPE_AP) &&
 		arvif->vdev_subtype == WMI_VDEV_SUBTYPE_NONE &&
 		chandef->chan &&
 		chandef->chan->band == NL80211_BAND_6GHZ;

drivers/net/wireless/ath/ath11k/mac.c ath11k_mac_vdev_start_restart(struct ath11k_vif *arvif, · line 7652

Quoted 7 lines
drivers/net/wireless/ath/ath11k/mac.c +2 -2
@@ -7647,8 +7648,8 @@ ath11k_mac_vdev_start_restart(struct ath11k_vif *arvif,
 	/* TODO: For now we only set TPC power here. However when
 	 * channel changes, say CSA, it should be updated again.
 	 */
-	if (ath11k_mac_supports_station_tpc(ar, arvif, chandef)) {
-		ath11k_mac_fill_reg_tpc_info(ar, arvif->vif, &arvif->chanctx);
+	if (ath11k_mac_supports_tpc(ar, arvif, chandef)) {
+		ath11k_mac_fill_reg_tpc_info(ar, arvif->vif, ctx);

is this intentional change? I doubt it even doesn't compile.

drivers/net/wireless/ath/ath11k/mac.c ath11k_mac_vdev_start_restart(struct ath11k_vif *arvif, · line 7655

Quoted 3 lines
drivers/net/wireless/ath/ath11k/mac.c +0 -0
 		ath11k_wmi_send_vdev_set_tpc_power(ar, arvif->vdev_id,
 						   &arvif->reg_tpc_info);
 	}

the ath12k patch has additional changes to hardcode power_type to LPI for an AP vdev, should it be done for ath11k as well?

commit a44958c83e52238996a48e7d604167c9b9d0a529

Author: Hariharan Basuthkar <[email protected]>
Date:   Fri Jun 6 16:53:16 2025 +0530

wifi: ath12k: Send WMI_VDEV_SET_TPC_POWER_CMD for AP vdev

[...]

For a AP vdev, hardcode ap_power_type as IEEE80211_REG_LPI_AP, which is filled in the WMI_VDEV_SET_TPC_POWER_CMDID sent to the target. Currently, LPI is the only supported AP power mode. Since there is no method currently to set the AP power mode from user-space, the power mode is hard-coded to LPI.

#2 lore raw

Am 13.05.2026 um 03:56 schrieb Baochen Qiang:

Quoted 38 lines · Sebastian Gottschall
Quoted 36 lines

there is an issue which has been discovered a while ago while testing which killed txpower to 0dbm once scanning is triggered in AP mode on QCN9074 based chipsets if 6 Ghz is in use. ath11k_wmi_send_vdev_set_tpc_power must be set in AP mode in the same way is it is for STA as it is implemented in ath12k and in the qsdk version for ath11k.
this patch must be considered to be backported (i discovered that issue already 2 years ago)

---
  drivers/net/wireless/ath/ath11k/mac.c | 9 +++++----
  1 file changed, 5 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath11k/mac.c +3 -2
index a48b6bf1f29a..dc192152b2e8 100644
@@ -3497,13 +3497,14 @@ static int ath11k_mac_config_obss_pd(struct ath11k *ar,
  	return 0;
  }
 
-static bool ath11k_mac_supports_station_tpc(struct ath11k *ar,
+static bool ath11k_mac_supports_tpc(struct ath11k *ar,
  					    struct ath11k_vif *arvif,
  					    const struct cfg80211_chan_def *chandef)
  {
  	return ath11k_wmi_supports_6ghz_cc_ext(ar) &&
  		test_bit(WMI_TLV_SERVICE_EXT_TPC_REG_SUPPORT, ar->ab->wmi_ab.svc_map) &&
-		arvif->vdev_type == WMI_VDEV_TYPE_STA &&
+		(arvif->vdev_type == WMI_VDEV_TYPE_STA ||
+		arvif->vdev_type == WMI_VDEV_TYPE_AP) &&
  		arvif->vdev_subtype == WMI_VDEV_SUBTYPE_NONE &&
  		chandef->chan &&
  		chandef->chan->band == NL80211_BAND_6GHZ;
@@ -7647,8 +7648,8 @@ ath11k_mac_vdev_start_restart(struct ath11k_vif *arvif,
Quoted 8 lines

drivers/net/wireless/ath/ath11k/mac.c ath11k_mac_vdev_start_restart(struct ath11k_vif *arvif, · line 7652

Quoted 7 lines
drivers/net/wireless/ath/ath11k/mac.c +2 -2
  	/* TODO: For now we only set TPC power here. However when
  	 * channel changes, say CSA, it should be updated again.
  	 */
-	if (ath11k_mac_supports_station_tpc(ar, arvif, chandef)) {
-		ath11k_mac_fill_reg_tpc_info(ar, arvif->vif, &arvif->chanctx);
+	if (ath11k_mac_supports_tpc(ar, arvif, chandef)) {
+		ath11k_mac_fill_reg_tpc_info(ar, arvif->vif, ctx);

is this intentional change? I doubt it even doesn't compile.

i renamed the function from ath11k_mac_supports_station_tpc to ath11k_mac_supports_tpc since the function now checks for ap and station mode or what are you talking about?

Quoted 6 lines

drivers/net/wireless/ath/ath11k/mac.c ath11k_mac_vdev_start_restart(struct ath11k_vif *arvif, · line 7655

Quoted 4 lines
drivers/net/wireless/ath/ath11k/mac.c +0 -0
  		ath11k_wmi_send_vdev_set_tpc_power(ar, arvif->vdev_id,
  						   &arvif->reg_tpc_info);
  	}

the ath12k patch has additional changes to hardcode power_type to LPI for an AP vdev, should it be done for ath11k as well?

hard to tell. i just can tell you that this issue on 6 ghz channels happens if tpc power isnt used. but i tested this solution you can simply check it. got to a 6 ghz channel.

to

iw dev wlanX scan
iw dev wlanX info
and you will see that txpower is 0 and the ap is also now very weak.
btw. this issue is fixed and covered in the qca qsdk for ath11k. i dont know what it was limited to sta only which porting this patch to upstream ath11k.

Sebastian

Quoted 16 lines

commit a44958c83e52238996a48e7d604167c9b9d0a529

Author: Hariharan Basuthkar <[email protected]>
Date:   Fri Jun 6 16:53:16 2025 +0530

wifi: ath12k: Send WMI_VDEV_SET_TPC_POWER_CMD for AP vdev

[...]

For a AP vdev, hardcode ap_power_type as IEEE80211_REG_LPI_AP, which is filled in the WMI_VDEV_SET_TPC_POWER_CMDID sent to the target. Currently, LPI is the only supported AP power mode. Since there is no method currently to set the AP power mode from user-space, the power mode is hard-coded to LPI.

#3 lore raw
In reply to Baochen Qiang

Am 13.05.2026 um 03:56 schrieb Baochen Qiang:

Quoted 38 lines · Sebastian Gottschall
Quoted 36 lines

there is an issue which has been discovered a while ago while testing which killed txpower to 0dbm once scanning is triggered in AP mode on QCN9074 based chipsets if 6 Ghz is in use. ath11k_wmi_send_vdev_set_tpc_power must be set in AP mode in the same way is it is for STA as it is implemented in ath12k and in the qsdk version for ath11k.
this patch must be considered to be backported (i discovered that issue already 2 years ago)

---
  drivers/net/wireless/ath/ath11k/mac.c | 9 +++++----
  1 file changed, 5 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath11k/mac.c +3 -2
index a48b6bf1f29a..dc192152b2e8 100644
@@ -3497,13 +3497,14 @@ static int ath11k_mac_config_obss_pd(struct ath11k *ar,
  	return 0;
  }
 
-static bool ath11k_mac_supports_station_tpc(struct ath11k *ar,
+static bool ath11k_mac_supports_tpc(struct ath11k *ar,
  					    struct ath11k_vif *arvif,
  					    const struct cfg80211_chan_def *chandef)
  {
  	return ath11k_wmi_supports_6ghz_cc_ext(ar) &&
  		test_bit(WMI_TLV_SERVICE_EXT_TPC_REG_SUPPORT, ar->ab->wmi_ab.svc_map) &&
-		arvif->vdev_type == WMI_VDEV_TYPE_STA &&
+		(arvif->vdev_type == WMI_VDEV_TYPE_STA ||
+		arvif->vdev_type == WMI_VDEV_TYPE_AP) &&
  		arvif->vdev_subtype == WMI_VDEV_SUBTYPE_NONE &&
  		chandef->chan &&
  		chandef->chan->band == NL80211_BAND_6GHZ;
@@ -7647,8 +7648,8 @@ ath11k_mac_vdev_start_restart(struct ath11k_vif *arvif,
Quoted 8 lines

drivers/net/wireless/ath/ath11k/mac.c ath11k_mac_vdev_start_restart(struct ath11k_vif *arvif, · line 7652

Quoted 7 lines
drivers/net/wireless/ath/ath11k/mac.c +2 -2
  	/* TODO: For now we only set TPC power here. However when
  	 * channel changes, say CSA, it should be updated again.
  	 */
-	if (ath11k_mac_supports_station_tpc(ar, arvif, chandef)) {
-		ath11k_mac_fill_reg_tpc_info(ar, arvif->vif, &arvif->chanctx);
+	if (ath11k_mac_supports_tpc(ar, arvif, chandef)) {
+		ath11k_mac_fill_reg_tpc_info(ar, arvif->vif, ctx);

is this intentional change? I doubt it even doesn't compile.

in addition. i compile tested it. and if you talk about the change from arvid->chanctx to ctx. this valid arvif->chanctx is not always set. the only trustworthy source is ctx and represents the current channel context. there was never a reason to use arvif->chanctx

Sebastian

Quoted 22 lines

drivers/net/wireless/ath/ath11k/mac.c ath11k_mac_vdev_start_restart(struct ath11k_vif *arvif, · line 7655

Quoted 4 lines
drivers/net/wireless/ath/ath11k/mac.c +0 -0
  		ath11k_wmi_send_vdev_set_tpc_power(ar, arvif->vdev_id,
  						   &arvif->reg_tpc_info);
  	}

the ath12k patch has additional changes to hardcode power_type to LPI for an AP vdev, should it be done for ath11k as well?

commit a44958c83e52238996a48e7d604167c9b9d0a529

Author: Hariharan Basuthkar <[email protected]>
Date:   Fri Jun 6 16:53:16 2025 +0530

wifi: ath12k: Send WMI_VDEV_SET_TPC_POWER_CMD for AP vdev

[...]

For a AP vdev, hardcode ap_power_type as IEEE80211_REG_LPI_AP, which is filled in the WMI_VDEV_SET_TPC_POWER_CMDID sent to the target. Currently, LPI is the only supported AP power mode. Since there is no method currently to set the AP power mode from user-space, the power mode is hard-coded to LPI.

#4 lore raw
Quoted 47 lines · Sebastian Gottschall

Am 13.05.2026 um 03:56 schrieb Baochen Qiang:

Quoted 37 lines · Sebastian Gottschall
Quoted 35 lines

there is an issue which has been discovered a while ago while testing which killed txpower to 0dbm once scanning is triggered in AP mode on QCN9074 based chipsets if 6 Ghz is in use. ath11k_wmi_send_vdev_set_tpc_power must be set in AP mode in the same way is it is for STA as it is implemented in ath12k and in the qsdk version for ath11k.
this patch must be considered to be backported (i discovered that issue already 2 years ago)

---
  drivers/net/wireless/ath/ath11k/mac.c | 9 +++++----

  1 file changed, 5 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath11k/mac.c +1 -0
index a48b6bf1f29a..dc192152b2e8 100644
@@ -3497,13 +3497,14 @@ static int ath11k_mac_config_obss_pd(struct ath11k *ar,
       return 0;
   }
   -static bool ath11k_mac_supports_station_tpc(struct ath11k *ar,
+static bool ath11k_mac_supports_tpc(struct ath11k *ar,
                           struct ath11k_vif *arvif,
                           const struct cfg80211_chan_def *chandef)
   {

      return ath11k_wmi_supports_6ghz_cc_ext(ar) && test_bit(WMI_TLV_SERVICE_EXT_TPC_REG_SUPPORT, ar->ab->wmi_ab.svc_map) && -        arvif->vdev_type == WMI_VDEV_TYPE_STA &&
+        (arvif->vdev_type == WMI_VDEV_TYPE_STA ||
+        arvif->vdev_type == WMI_VDEV_TYPE_AP) &&
          arvif->vdev_subtype == WMI_VDEV_SUBTYPE_NONE && chandef->chan &&
          chandef->chan->band == NL80211_BAND_6GHZ;

drivers/net/wireless/ath/ath11k/mac.c +0 -0
@@ -7647,8 +7648,8 @@ ath11k_mac_vdev_start_restart(struct ath11k_vif *arvif,
Quoted 8 lines

drivers/net/wireless/ath/ath11k/mac.c ath11k_mac_vdev_start_restart(struct ath11k_vif *arvif, · line 7652

Quoted 7 lines
drivers/net/wireless/ath/ath11k/mac.c +2 -2
       /* TODO: For now we only set TPC power here. However when
        * channel changes, say CSA, it should be updated again.
        */
-    if (ath11k_mac_supports_station_tpc(ar, arvif, chandef)) {
-        ath11k_mac_fill_reg_tpc_info(ar, arvif->vif, &arvif->chanctx);
+    if (ath11k_mac_supports_tpc(ar, arvif, chandef)) {
+        ath11k_mac_fill_reg_tpc_info(ar, arvif->vif, ctx);

is this intentional change? I doubt it even doesn't compile.

Quoted 5 lines

in addition. i compile tested it. and if you talk about the change from arvid->chanctx to ctx. this valid
arvif->chanctx is not always set. the only trustworthy source is ctx and represents the current channel context.
there was never a reason to use arvif->chanctx

my bad, I was referring to a wrong codebase.

Yes, you are correct. Even the upstream ath12k uses ctx instead of arvif->chanctx.

Quoted 25 lines

Sebastian

Quoted 22 lines

drivers/net/wireless/ath/ath11k/mac.c ath11k_mac_vdev_start_restart(struct ath11k_vif *arvif, · line 7655

Quoted 4 lines
drivers/net/wireless/ath/ath11k/mac.c +0 -0
           ath11k_wmi_send_vdev_set_tpc_power(ar, arvif->vdev_id,
                              &arvif->reg_tpc_info);
       }

the ath12k patch has additional changes to hardcode power_type to LPI for an AP vdev, should it be done for ath11k as well?

commit a44958c83e52238996a48e7d604167c9b9d0a529
Author: Hariharan Basuthkar <[email protected]> Date:   Fri Jun 6 16:53:16 2025 +0530

     wifi: ath12k: Send WMI_VDEV_SET_TPC_POWER_CMD for AP vdev

     [...]

     For a AP vdev, hardcode ap_power_type as IEEE80211_REG_LPI_AP, which is filled in the WMI_VDEV_SET_TPC_POWER_CMDID sent to the target. Currently, LPI is the only supported AP power mode. Since there is no method currently to set the AP power mode from user-space, the power mode is hard-coded to LPI.

#5 lore raw

Am 13.05.2026 um 12:12 schrieb Baochen Qiang:

Quoted 47 lines · Sebastian Gottschall
Quoted 45 lines

Am 13.05.2026 um 03:56 schrieb Baochen Qiang:

Quoted 44 lines · Sebastian Gottschall
Quoted 35 lines

there is an issue which has been discovered a while ago while testing which killed txpower to 0dbm once scanning is triggered in AP mode on QCN9074 based chipsets if 6 Ghz is in use. ath11k_wmi_send_vdev_set_tpc_power must be set in AP mode in the same way is it is for STA as it is implemented in ath12k and in the qsdk version for ath11k.
this patch must be considered to be backported (i discovered that issue already 2 years ago)

---
   drivers/net/wireless/ath/ath11k/mac.c | 9 +++++----
   1 file changed, 5 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath11k/mac.c +3 -1
index a48b6bf1f29a..dc192152b2e8 100644
@@ -3497,13 +3497,14 @@ static int ath11k_mac_config_obss_pd(struct ath11k *ar,
       return 0;
   }
   -static bool ath11k_mac_supports_station_tpc(struct ath11k *ar,
+static bool ath11k_mac_supports_tpc(struct ath11k *ar,
                           struct ath11k_vif *arvif,
                           const struct cfg80211_chan_def *chandef)
   {
       return ath11k_wmi_supports_6ghz_cc_ext(ar) &&
           test_bit(WMI_TLV_SERVICE_EXT_TPC_REG_SUPPORT, ar->ab->wmi_ab.svc_map) &&
-        arvif->vdev_type == WMI_VDEV_TYPE_STA &&
+        (arvif->vdev_type == WMI_VDEV_TYPE_STA ||
+        arvif->vdev_type == WMI_VDEV_TYPE_AP) &&
           arvif->vdev_subtype == WMI_VDEV_SUBTYPE_NONE &&
           chandef->chan &&
           chandef->chan->band == NL80211_BAND_6GHZ;

drivers/net/wireless/ath/ath11k/mac.c ath11k_mac_vdev_start_restart(struct ath11k_vif *arvif, · line 7652

Quoted 7 lines
drivers/net/wireless/ath/ath11k/mac.c +2 -2
@@ -7647,8 +7648,8 @@ ath11k_mac_vdev_start_restart(struct ath11k_vif *arvif,
       /* TODO: For now we only set TPC power here. However when
        * channel changes, say CSA, it should be updated again.
        */
-    if (ath11k_mac_supports_station_tpc(ar, arvif, chandef)) {
-        ath11k_mac_fill_reg_tpc_info(ar, arvif->vif, &arvif->chanctx);
+    if (ath11k_mac_supports_tpc(ar, arvif, chandef)) {
+        ath11k_mac_fill_reg_tpc_info(ar, arvif->vif, ctx);

is this intentional change? I doubt it even doesn't compile.

Quoted 8 lines
Quoted 5 lines

in addition. i compile tested it. and if you talk about the change from arvid->chanctx to ctx. this valid
arvif->chanctx is not always set. the only trustworthy source is ctx and represents the current channel context.
there was never a reason to use arvif->chanctx

my bad, I was referring to a wrong codebase.

Yes, you are correct. Even the upstream ath12k uses ctx instead of arvif->chanctx.

yes. i found that out while reviewing. just had scratching why arvif->chanctx was used initially. for me it looks this patch was ported from qsdk patches but modified to support station only. reason unknown. regarding your power type comment (LPI) i have to review the current ath11k upstream codebase first since i developed this patch initially for kernel 6.12.

Quoted 25 lines
Quoted 24 lines

Sebastian

Quoted 21 lines

drivers/net/wireless/ath/ath11k/mac.c ath11k_mac_vdev_start_restart(struct ath11k_vif *arvif, · line 7655

Quoted 3 lines
drivers/net/wireless/ath/ath11k/mac.c +0 -0
           ath11k_wmi_send_vdev_set_tpc_power(ar, arvif->vdev_id,
                              &arvif->reg_tpc_info);
       }

the ath12k patch has additional changes to hardcode power_type to LPI for an AP vdev, should it be done for ath11k as well?

commit a44958c83e52238996a48e7d604167c9b9d0a529
Author: Hariharan Basuthkar <[email protected]> Date:   Fri Jun 6 16:53:16 2025 +0530

     wifi: ath12k: Send WMI_VDEV_SET_TPC_POWER_CMD for AP vdev

     [...]

     For a AP vdev, hardcode ap_power_type as IEEE80211_REG_LPI_AP, which is filled in the WMI_VDEV_SET_TPC_POWER_CMDID sent to the target. Currently, LPI is the only supported AP power mode. Since there is no method currently to set the AP power mode from user-space, the power mode is hard-coded to LPI.

#6 lore raw
In reply to Sebastian Gottschall
Quoted 3 lines · Sebastian Gottschall

there is an issue which has been discovered a while ago while testing which killed txpower to 0dbm once scanning is triggered in AP mode on QCN9074 based chipsets if 6 Ghz is in use.

s/Ghz/GHz/ to align with SI (also in subject)

Quoted 5 lines

ath11k_wmi_send_vdev_set_tpc_power must be set in AP mode in the same way is it is for STA as it is implemented in ath12k and in the qsdk version for ath11k.
this patch must be considered to be backported (i discovered that issue already 2 years ago)

There needs to be a Fixes tag for any patch to be considered for backporting by the stable team

Quoted 11 lines
---
 drivers/net/wireless/ath/ath11k/mac.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath11k/mac.c +0 -0
index a48b6bf1f29a..dc192152b2e8 100644

drivers/net/wireless/ath/ath11k/mac.c static int ath11k_mac_config_obss_pd(struct ath11k *ar, · line 3502

Quoted 7 lines
drivers/net/wireless/ath/ath11k/mac.c +1 -1
@@ -3497,13 +3497,14 @@ static int ath11k_mac_config_obss_pd(struct ath11k *ar,
 	return 0;
 }
 
-static bool ath11k_mac_supports_station_tpc(struct ath11k *ar,
+static bool ath11k_mac_supports_tpc(struct ath11k *ar,
 					    struct ath11k_vif *arvif,
 					    const struct cfg80211_chan_def *chandef)

CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis

Quoted 20 lines
drivers/net/wireless/ath/ath11k/mac.c +4 -3
 {
 	return ath11k_wmi_supports_6ghz_cc_ext(ar) &&
 		test_bit(WMI_TLV_SERVICE_EXT_TPC_REG_SUPPORT, ar->ab->wmi_ab.svc_map) &&
-		arvif->vdev_type == WMI_VDEV_TYPE_STA &&
+		(arvif->vdev_type == WMI_VDEV_TYPE_STA ||
+		arvif->vdev_type == WMI_VDEV_TYPE_AP) &&
 		arvif->vdev_subtype == WMI_VDEV_SUBTYPE_NONE &&
 		chandef->chan &&
 		chandef->chan->band == NL80211_BAND_6GHZ;
@@ -7647,8 +7648,8 @@ ath11k_mac_vdev_start_restart(struct ath11k_vif *arvif,
 	/* TODO: For now we only set TPC power here. However when
 	 * channel changes, say CSA, it should be updated again.
 	 */
-	if (ath11k_mac_supports_station_tpc(ar, arvif, chandef)) {
-		ath11k_mac_fill_reg_tpc_info(ar, arvif->vif, &arvif->chanctx);
+	if (ath11k_mac_supports_tpc(ar, arvif, chandef)) {
+		ath11k_mac_fill_reg_tpc_info(ar, arvif->vif, ctx);
 		ath11k_wmi_send_vdev_set_tpc_power(ar, arvif->vdev_id,
 						   &arvif->reg_tpc_info);
 	}
#7 lore raw

Am 13.05.2026 um 18:06 schrieb Jeff Johnson:

Quoted 12 lines · Sebastian Gottschall
Quoted 3 lines

there is an issue which has been discovered a while ago while testing which killed txpower to 0dbm once scanning is triggered in AP mode on QCN9074 based chipsets if 6 Ghz is in use.

s/Ghz/GHz/ to align with SI (also in subject)

Quoted 5 lines

ath11k_wmi_send_vdev_set_tpc_power must be set in AP mode in the same way is it is for STA as it is implemented in ath12k and in the qsdk version for ath11k.
this patch must be considered to be backported (i discovered that issue already 2 years ago)

There needs to be a Fixes tag for any patch to be considered for backporting by the stable team

i will follow up with a v2 version which also considers the LPI power setting mentioned by Baochen Qiang but need to test this first

Quoted 40 lines
Quoted 10 lines
---
  drivers/net/wireless/ath/ath11k/mac.c | 9 +++++----
  1 file changed, 5 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath11k/mac.c +0 -0
index a48b6bf1f29a..dc192152b2e8 100644

drivers/net/wireless/ath/ath11k/mac.c static int ath11k_mac_config_obss_pd(struct ath11k *ar, · line 3502

Quoted 7 lines
drivers/net/wireless/ath/ath11k/mac.c +1 -1
@@ -3497,13 +3497,14 @@ static int ath11k_mac_config_obss_pd(struct ath11k *ar,
  	return 0;
  }
 
-static bool ath11k_mac_supports_station_tpc(struct ath11k *ar,
+static bool ath11k_mac_supports_tpc(struct ath11k *ar,
  					    struct ath11k_vif *arvif,
  					    const struct cfg80211_chan_def *chandef)

CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis

Quoted 20 lines
drivers/net/wireless/ath/ath11k/mac.c +4 -3
  {
  	return ath11k_wmi_supports_6ghz_cc_ext(ar) &&
  		test_bit(WMI_TLV_SERVICE_EXT_TPC_REG_SUPPORT, ar->ab->wmi_ab.svc_map) &&
-		arvif->vdev_type == WMI_VDEV_TYPE_STA &&
+		(arvif->vdev_type == WMI_VDEV_TYPE_STA ||
+		arvif->vdev_type == WMI_VDEV_TYPE_AP) &&
  		arvif->vdev_subtype == WMI_VDEV_SUBTYPE_NONE &&
  		chandef->chan &&
  		chandef->chan->band == NL80211_BAND_6GHZ;
@@ -7647,8 +7648,8 @@ ath11k_mac_vdev_start_restart(struct ath11k_vif *arvif,
  	/* TODO: For now we only set TPC power here. However when
  	 * channel changes, say CSA, it should be updated again.
  	 */
-	if (ath11k_mac_supports_station_tpc(ar, arvif, chandef)) {
-		ath11k_mac_fill_reg_tpc_info(ar, arvif->vif, &arvif->chanctx);
+	if (ath11k_mac_supports_tpc(ar, arvif, chandef)) {
+		ath11k_mac_fill_reg_tpc_info(ar, arvif->vif, ctx);
  		ath11k_wmi_send_vdev_set_tpc_power(ar, arvif->vdev_id,
  						   &arvif->reg_tpc_info);
  	}