From 5f55f2baab3ca39ebf52439e03cf72f13d58bd78 Mon Sep 17 00:00:00 2001 From: stsp Date: Tue, 19 May 2026 08:53:41 +0000 Subject: [PATCH] Add peer to qwx(4) firmware after starting the vdev, not before. From mglocker@ via qwz(4) On ath12k this fixed a firmware crash by avoiding the peer getting created with a half-initialized vdev. The fix does not hurt on ath11k so apply it to qwx(4) as well. --- sys/dev/ic/qwx.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sys/dev/ic/qwx.c b/sys/dev/ic/qwx.c index ac6a366bd38..bfa96404b8d 100644 --- a/sys/dev/ic/qwx.c +++ b/sys/dev/ic/qwx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qwx.c,v 1.105 2026/05/18 13:32:43 stsp Exp $ */ +/* $OpenBSD: qwx.c,v 1.106 2026/05/19 08:53:41 stsp Exp $ */ /* * Copyright 2023 Stefan Sperling @@ -26108,10 +26108,6 @@ qwx_auth(struct qwx_softc *sc) qwx_recalculate_mgmt_rate(sc, ni, arvif->vdev_id, pdev->pdev_id); ni->ni_txrate = 0; - ret = qwx_mac_station_add(sc, arvif, pdev->pdev_id, ni); - if (ret) - return ret; - /* Start vdev. */ ret = qwx_mac_vdev_start(sc, arvif, pdev->pdev_id); if (ret) { @@ -26126,7 +26122,7 @@ qwx_auth(struct qwx_softc *sc) */ qwx_recalculate_mgmt_rate(sc, ni, arvif->vdev_id, pdev->pdev_id); - return ret; + return qwx_mac_station_add(sc, arvif, pdev->pdev_id, ni); } int