public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 6.4 03/10] Revert "wifi: ath11k: Enable threaded NAPI"
       [not found] <20230822113101.3549915-1-sashal@kernel.org>
@ 2023-08-22 11:30 ` Sasha Levin
  2023-08-22 16:02   ` Johan Hovold
  2023-08-22 11:30 ` [PATCH AUTOSEL 6.4 04/10] Revert "wifi: ath6k: silence false positive -Wno-dangling-pointer warning on GCC 12" Sasha Levin
  2023-08-22 11:30 ` [PATCH AUTOSEL 6.4 08/10] wifi: brcmfmac: Fix field-spanning write in brcmf_scan_params_v2_to_v1() Sasha Levin
  2 siblings, 1 reply; 5+ messages in thread
From: Sasha Levin @ 2023-08-22 11:30 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Kalle Valo, Kalle Valo, Sasha Levin, quic_jjohnson, ath11k,
	linux-wireless

From: Kalle Valo <quic_kvalo@quicinc.com>

[ Upstream commit d265ebe41c911314bd273c218a37088835959fa1 ]

This reverts commit 13aa2fb692d3717767303817f35b3e650109add3.

This commit broke QCN9074 initialisation:

[  358.960477] ath11k_pci 0000:04:00.0: ce desc not available for wmi command 36866
[  358.960481] ath11k_pci 0000:04:00.0: failed to send WMI_STA_POWERSAVE_PARAM_CMDID
[  358.960484] ath11k_pci 0000:04:00.0: could not set uapsd params -105

As there's no fix available let's just revert it to get QCN9074 working again.

Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217536
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230720151444.2016637-1-kvalo@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/ath/ath11k/ahb.c  | 1 -
 drivers/net/wireless/ath/ath11k/pcic.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
index 396548e57022f..88aeb36ab2e79 100644
--- a/drivers/net/wireless/ath/ath11k/ahb.c
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
@@ -376,7 +376,6 @@ static void ath11k_ahb_ext_irq_enable(struct ath11k_base *ab)
 		struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
 
 		if (!irq_grp->napi_enabled) {
-			dev_set_threaded(&irq_grp->napi_ndev, true);
 			napi_enable(&irq_grp->napi);
 			irq_grp->napi_enabled = true;
 		}
diff --git a/drivers/net/wireless/ath/ath11k/pcic.c b/drivers/net/wireless/ath/ath11k/pcic.c
index 30d66147223f4..a8bcffcf2e813 100644
--- a/drivers/net/wireless/ath/ath11k/pcic.c
+++ b/drivers/net/wireless/ath/ath11k/pcic.c
@@ -466,7 +466,6 @@ void ath11k_pcic_ext_irq_enable(struct ath11k_base *ab)
 		struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
 
 		if (!irq_grp->napi_enabled) {
-			dev_set_threaded(&irq_grp->napi_ndev, true);
 			napi_enable(&irq_grp->napi);
 			irq_grp->napi_enabled = true;
 		}
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH AUTOSEL 6.4 04/10] Revert "wifi: ath6k: silence false positive -Wno-dangling-pointer warning on GCC 12"
       [not found] <20230822113101.3549915-1-sashal@kernel.org>
  2023-08-22 11:30 ` [PATCH AUTOSEL 6.4 03/10] Revert "wifi: ath11k: Enable threaded NAPI" Sasha Levin
@ 2023-08-22 11:30 ` Sasha Levin
  2023-08-22 11:30 ` [PATCH AUTOSEL 6.4 08/10] wifi: brcmfmac: Fix field-spanning write in brcmf_scan_params_v2_to_v1() Sasha Levin
  2 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2023-08-22 11:30 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: Kalle Valo, Sasha Levin, linux-wireless

From: Kalle Valo <kvalo@kernel.org>

[ Upstream commit a1ce186db7f0e449f35d12fb55ae0da2a1b400e2 ]

This reverts commit bd1d129daa3ede265a880e2c6a7f91eab0f4dc62.

The dangling-pointer warnings were disabled kernel-wide by commit 49beadbd47c2
("gcc-12: disable '-Wdangling-pointer' warning for now") for v5.19. So this
hack in ath6kl is not needed anymore.

Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230724100823.2948804-1-kvalo@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/ath/ath6kl/Makefile | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/Makefile b/drivers/net/wireless/ath/ath6kl/Makefile
index a75bfa9fd1cfd..dc2b3b46781e1 100644
--- a/drivers/net/wireless/ath/ath6kl/Makefile
+++ b/drivers/net/wireless/ath/ath6kl/Makefile
@@ -36,11 +36,6 @@ ath6kl_core-y += wmi.o
 ath6kl_core-y += core.o
 ath6kl_core-y += recovery.o
 
-# FIXME: temporarily silence -Wdangling-pointer on non W=1+ builds
-ifndef KBUILD_EXTRA_WARN
-CFLAGS_htc_mbox.o += $(call cc-disable-warning, dangling-pointer)
-endif
-
 ath6kl_core-$(CONFIG_NL80211_TESTMODE) += testmode.o
 ath6kl_core-$(CONFIG_ATH6KL_TRACING) += trace.o
 
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH AUTOSEL 6.4 08/10] wifi: brcmfmac: Fix field-spanning write in brcmf_scan_params_v2_to_v1()
       [not found] <20230822113101.3549915-1-sashal@kernel.org>
  2023-08-22 11:30 ` [PATCH AUTOSEL 6.4 03/10] Revert "wifi: ath11k: Enable threaded NAPI" Sasha Levin
  2023-08-22 11:30 ` [PATCH AUTOSEL 6.4 04/10] Revert "wifi: ath6k: silence false positive -Wno-dangling-pointer warning on GCC 12" Sasha Levin
@ 2023-08-22 11:30 ` Sasha Levin
  2 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2023-08-22 11:30 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Hans de Goede, Kees Cook, Franky Lin, Kalle Valo, Sasha Levin,
	aspriel, hante.meuleman, linus.walleij, marcan, gustavoars,
	ryohei.kondo, linux-wireless, brcm80211-dev-list.pdl,
	SHA-cyfmac-dev-list

From: Hans de Goede <hdegoede@redhat.com>

[ Upstream commit 16e455a465fca91907af0108f3d013150386df30 ]

Using brcmfmac with 6.5-rc3 on a brcmfmac43241b4-sdio triggers
a backtrace caused by the following field-spanning warning:

memcpy: detected field-spanning write (size 120) of single field
  "&params_le->channel_list[0]" at
  drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:1072 (size 2)

The driver still works after this warning. The warning was introduced by the
new field-spanning write checks which were enabled recently.

Fix this by replacing the channel_list[1] declaration at the end of
the struct with a flexible array declaration.

Most users of struct brcmf_scan_params_le calculate the size to alloc
using the size of the non flex-array part of the struct + needed extra
space, so they do not care about sizeof(struct brcmf_scan_params_le).

brcmf_notify_escan_complete() however uses the struct on the stack,
expecting there to be room for at least 1 entry in the channel-list
to store the special -1 abort channel-id.

To make this work use an anonymous union with a padding member
added + the actual channel_list flexible array.

Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230729140500.27892-1-hdegoede@redhat.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 .../net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h  | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h
index 792adaf880b44..bece26741d3a3 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h
@@ -398,7 +398,12 @@ struct brcmf_scan_params_le {
 				 * fixed parameter portion is assumed, otherwise
 				 * ssid in the fixed portion is ignored
 				 */
-	__le16 channel_list[1];	/* list of chanspecs */
+	union {
+		__le16 padding;	/* Reserve space for at least 1 entry for abort
+				 * which uses an on stack brcmf_scan_params_le
+				 */
+		DECLARE_FLEX_ARRAY(__le16, channel_list);	/* chanspecs */
+	};
 };
 
 struct brcmf_scan_params_v2_le {
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH AUTOSEL 6.4 03/10] Revert "wifi: ath11k: Enable threaded NAPI"
  2023-08-22 11:30 ` [PATCH AUTOSEL 6.4 03/10] Revert "wifi: ath11k: Enable threaded NAPI" Sasha Levin
@ 2023-08-22 16:02   ` Johan Hovold
  2023-08-23 18:03     ` Sasha Levin
  0 siblings, 1 reply; 5+ messages in thread
From: Johan Hovold @ 2023-08-22 16:02 UTC (permalink / raw)
  To: Sasha Levin
  Cc: linux-kernel, stable, Kalle Valo, Kalle Valo, quic_jjohnson,
	ath11k, linux-wireless

On Tue, Aug 22, 2023 at 07:30:53AM -0400, Sasha Levin wrote:
> From: Kalle Valo <quic_kvalo@quicinc.com>
> 
> [ Upstream commit d265ebe41c911314bd273c218a37088835959fa1 ]
> 
> This reverts commit 13aa2fb692d3717767303817f35b3e650109add3.
> 
> This commit broke QCN9074 initialisation:
> 
> [  358.960477] ath11k_pci 0000:04:00.0: ce desc not available for wmi command 36866
> [  358.960481] ath11k_pci 0000:04:00.0: failed to send WMI_STA_POWERSAVE_PARAM_CMDID
> [  358.960484] ath11k_pci 0000:04:00.0: could not set uapsd params -105
> 
> As there's no fix available let's just revert it to get QCN9074 working again.
> 
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217536
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
> Signed-off-by: Kalle Valo <kvalo@kernel.org>
> Link: https://lore.kernel.org/r/20230720151444.2016637-1-kvalo@kernel.org
> Signed-off-by: Sasha Levin <sashal@kernel.org>

This commit break machines like the Lenovo ThinkPad X13s so please do
not backport until this has been resolved:

	https://lore.kernel.org/lkml/20230809073432.4193-1-johan+linaro@kernel.org

Johan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH AUTOSEL 6.4 03/10] Revert "wifi: ath11k: Enable threaded NAPI"
  2023-08-22 16:02   ` Johan Hovold
@ 2023-08-23 18:03     ` Sasha Levin
  0 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2023-08-23 18:03 UTC (permalink / raw)
  To: Johan Hovold
  Cc: linux-kernel, stable, Kalle Valo, Kalle Valo, quic_jjohnson,
	ath11k, linux-wireless

On Tue, Aug 22, 2023 at 06:02:32PM +0200, Johan Hovold wrote:
>On Tue, Aug 22, 2023 at 07:30:53AM -0400, Sasha Levin wrote:
>> From: Kalle Valo <quic_kvalo@quicinc.com>
>>
>> [ Upstream commit d265ebe41c911314bd273c218a37088835959fa1 ]
>>
>> This reverts commit 13aa2fb692d3717767303817f35b3e650109add3.
>>
>> This commit broke QCN9074 initialisation:
>>
>> [  358.960477] ath11k_pci 0000:04:00.0: ce desc not available for wmi command 36866
>> [  358.960481] ath11k_pci 0000:04:00.0: failed to send WMI_STA_POWERSAVE_PARAM_CMDID
>> [  358.960484] ath11k_pci 0000:04:00.0: could not set uapsd params -105
>>
>> As there's no fix available let's just revert it to get QCN9074 working again.
>>
>> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217536
>> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
>> Signed-off-by: Kalle Valo <kvalo@kernel.org>
>> Link: https://lore.kernel.org/r/20230720151444.2016637-1-kvalo@kernel.org
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>
>This commit break machines like the Lenovo ThinkPad X13s so please do
>not backport until this has been resolved:
>
>	https://lore.kernel.org/lkml/20230809073432.4193-1-johan+linaro@kernel.org

I'll drop it for now, thanks!

-- 
Thanks,
Sasha

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-23 18:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230822113101.3549915-1-sashal@kernel.org>
2023-08-22 11:30 ` [PATCH AUTOSEL 6.4 03/10] Revert "wifi: ath11k: Enable threaded NAPI" Sasha Levin
2023-08-22 16:02   ` Johan Hovold
2023-08-23 18:03     ` Sasha Levin
2023-08-22 11:30 ` [PATCH AUTOSEL 6.4 04/10] Revert "wifi: ath6k: silence false positive -Wno-dangling-pointer warning on GCC 12" Sasha Levin
2023-08-22 11:30 ` [PATCH AUTOSEL 6.4 08/10] wifi: brcmfmac: Fix field-spanning write in brcmf_scan_params_v2_to_v1() Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox