All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5.12] ath11k: fix AP mode for QCA6390
@ 2021-02-22 15:14 ` Kalle Valo
  0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2021-02-22 15:14 UTC (permalink / raw)
  To: ath11k; +Cc: linux-wireless

Commit c134d1f8c436 ("ath11k: Handle errors if peer creation fails") completely
broke AP mode on QCA6390:

kernel: [  151.230734] ath11k_pci 0000:06:00.0: failed to create peer after vdev start delay: -22
wpa_supplicant[2307]: Failed to set beacon parameters
wpa_supplicant[2307]: Interface initialization failed
wpa_supplicant[2307]: wlan0: interface state UNINITIALIZED->DISABLED
wpa_supplicant[2307]: wlan0: AP-DISABLED
wpa_supplicant[2307]: wlan0: Unable to setup interface.
wpa_supplicant[2307]: Failed to initialize AP interface

This was because commit c134d1f8c436 ("ath11k: Handle errors if peer creation
fails") added error handling for ath11k_peer_create(), which had been failing
all along but was unnoticed due to the missing error handling. The actual bug
was introduced already in commit aa44b2f3ecd4 ("ath11k: start vdev if a bss peer is
already created").

ath11k_peer_create() was failing because for AP mode the peer is created
already earlier op_add_interface() and we should skip creation here, but the
check for modes was wrong.  Fixing that makes AP mode work again.

This shouldn't affect IPQ8074 nor QCN9074 as they have hw_params.vdev_start_delay disabled.

Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1

Fixes: c134d1f8c436 ("ath11k: Handle errors if peer creation fails")
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/mac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 335d49af7dd5..76f3343183fe 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -5450,8 +5450,8 @@ ath11k_mac_op_assign_vif_chanctx(struct ieee80211_hw *hw,
 	}
 
 	if (ab->hw_params.vdev_start_delay &&
-	    (arvif->vdev_type == WMI_VDEV_TYPE_AP ||
-	    arvif->vdev_type == WMI_VDEV_TYPE_MONITOR)) {
+	    arvif->vdev_type != WMI_VDEV_TYPE_AP &&
+	    arvif->vdev_type != WMI_VDEV_TYPE_MONITOR) {
 		param.vdev_id = arvif->vdev_id;
 		param.peer_type = WMI_PEER_TYPE_DEFAULT;
 		param.peer_addr = ar->mac_addr;
-- 
2.7.4


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

* [PATCH 5.12] ath11k: fix AP mode for QCA6390
@ 2021-02-22 15:14 ` Kalle Valo
  0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2021-02-22 15:14 UTC (permalink / raw)
  To: ath11k; +Cc: linux-wireless

Commit c134d1f8c436 ("ath11k: Handle errors if peer creation fails") completely
broke AP mode on QCA6390:

kernel: [  151.230734] ath11k_pci 0000:06:00.0: failed to create peer after vdev start delay: -22
wpa_supplicant[2307]: Failed to set beacon parameters
wpa_supplicant[2307]: Interface initialization failed
wpa_supplicant[2307]: wlan0: interface state UNINITIALIZED->DISABLED
wpa_supplicant[2307]: wlan0: AP-DISABLED
wpa_supplicant[2307]: wlan0: Unable to setup interface.
wpa_supplicant[2307]: Failed to initialize AP interface

This was because commit c134d1f8c436 ("ath11k: Handle errors if peer creation
fails") added error handling for ath11k_peer_create(), which had been failing
all along but was unnoticed due to the missing error handling. The actual bug
was introduced already in commit aa44b2f3ecd4 ("ath11k: start vdev if a bss peer is
already created").

ath11k_peer_create() was failing because for AP mode the peer is created
already earlier op_add_interface() and we should skip creation here, but the
check for modes was wrong.  Fixing that makes AP mode work again.

This shouldn't affect IPQ8074 nor QCN9074 as they have hw_params.vdev_start_delay disabled.

Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1

Fixes: c134d1f8c436 ("ath11k: Handle errors if peer creation fails")
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/mac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 335d49af7dd5..76f3343183fe 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -5450,8 +5450,8 @@ ath11k_mac_op_assign_vif_chanctx(struct ieee80211_hw *hw,
 	}
 
 	if (ab->hw_params.vdev_start_delay &&
-	    (arvif->vdev_type == WMI_VDEV_TYPE_AP ||
-	    arvif->vdev_type == WMI_VDEV_TYPE_MONITOR)) {
+	    arvif->vdev_type != WMI_VDEV_TYPE_AP &&
+	    arvif->vdev_type != WMI_VDEV_TYPE_MONITOR) {
 		param.vdev_id = arvif->vdev_id;
 		param.peer_type = WMI_PEER_TYPE_DEFAULT;
 		param.peer_addr = ar->mac_addr;
-- 
2.7.4


-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

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

* Re: [PATCH 5.12] ath11k: fix AP mode for QCA6390
  2021-02-22 15:14 ` Kalle Valo
  (?)
@ 2021-02-24  6:38 ` Kalle Valo
  -1 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2021-02-24  6:38 UTC (permalink / raw)
  To: Kalle Valo; +Cc: ath11k, linux-wireless

Kalle Valo <kvalo@codeaurora.org> wrote:

> Commit c134d1f8c436 ("ath11k: Handle errors if peer creation fails") completely
> broke AP mode on QCA6390:
> 
> kernel: [  151.230734] ath11k_pci 0000:06:00.0: failed to create peer after vdev start delay: -22
> wpa_supplicant[2307]: Failed to set beacon parameters
> wpa_supplicant[2307]: Interface initialization failed
> wpa_supplicant[2307]: wlan0: interface state UNINITIALIZED->DISABLED
> wpa_supplicant[2307]: wlan0: AP-DISABLED
> wpa_supplicant[2307]: wlan0: Unable to setup interface.
> wpa_supplicant[2307]: Failed to initialize AP interface
> 
> This was because commit c134d1f8c436 ("ath11k: Handle errors if peer creation
> fails") added error handling for ath11k_peer_create(), which had been failing
> all along but was unnoticed due to the missing error handling. The actual bug
> was introduced already in commit aa44b2f3ecd4 ("ath11k: start vdev if a bss peer is
> already created").
> 
> ath11k_peer_create() was failing because for AP mode the peer is created
> already earlier op_add_interface() and we should skip creation here, but the
> check for modes was wrong.  Fixing that makes AP mode work again.
> 
> This shouldn't affect IPQ8074 nor QCN9074 as they have hw_params.vdev_start_delay disabled.
> 
> Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
> 
> Fixes: c134d1f8c436 ("ath11k: Handle errors if peer creation fails")
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to wireless-drivers.git, thanks.

77d7e87128d4 ath11k: fix AP mode for QCA6390

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/1614006849-25764-1-git-send-email-kvalo@codeaurora.org/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


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

* Re: [PATCH 5.12] ath11k: fix AP mode for QCA6390
  2021-02-22 15:14 ` Kalle Valo
  (?)
  (?)
@ 2021-02-24  6:38 ` Kalle Valo
  -1 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2021-02-24  6:38 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, ath11k

Kalle Valo <kvalo@codeaurora.org> wrote:

> Commit c134d1f8c436 ("ath11k: Handle errors if peer creation fails") completely
> broke AP mode on QCA6390:
> 
> kernel: [  151.230734] ath11k_pci 0000:06:00.0: failed to create peer after vdev start delay: -22
> wpa_supplicant[2307]: Failed to set beacon parameters
> wpa_supplicant[2307]: Interface initialization failed
> wpa_supplicant[2307]: wlan0: interface state UNINITIALIZED->DISABLED
> wpa_supplicant[2307]: wlan0: AP-DISABLED
> wpa_supplicant[2307]: wlan0: Unable to setup interface.
> wpa_supplicant[2307]: Failed to initialize AP interface
> 
> This was because commit c134d1f8c436 ("ath11k: Handle errors if peer creation
> fails") added error handling for ath11k_peer_create(), which had been failing
> all along but was unnoticed due to the missing error handling. The actual bug
> was introduced already in commit aa44b2f3ecd4 ("ath11k: start vdev if a bss peer is
> already created").
> 
> ath11k_peer_create() was failing because for AP mode the peer is created
> already earlier op_add_interface() and we should skip creation here, but the
> check for modes was wrong.  Fixing that makes AP mode work again.
> 
> This shouldn't affect IPQ8074 nor QCN9074 as they have hw_params.vdev_start_delay disabled.
> 
> Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
> 
> Fixes: c134d1f8c436 ("ath11k: Handle errors if peer creation fails")
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to wireless-drivers.git, thanks.

77d7e87128d4 ath11k: fix AP mode for QCA6390

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/1614006849-25764-1-git-send-email-kvalo@codeaurora.org/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

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

end of thread, other threads:[~2021-02-24  6:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-22 15:14 [PATCH 5.12] ath11k: fix AP mode for QCA6390 Kalle Valo
2021-02-22 15:14 ` Kalle Valo
2021-02-24  6:38 ` Kalle Valo
2021-02-24  6:38 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.