From 45b99ba90844baca4175c7ec19aa856307f525a5 Mon Sep 17 00:00:00 2001 From: stsp Date: Thu, 11 May 2023 16:55:46 +0000 Subject: [PATCH] Stop sending a PHY context update in iwx_run_stop() Fixes firmware error iwx0: 0x20101A28 | ADVANCED_SYSASSERT which would occur while tearing down the state of our association to the AP. The problem occurred when we were trying to reconfigure the PHY context in a way that is incompatible with the TLC configuration. Since we will always call iwx_deauth() next, which removes the AP station and related data such as TLC from firmware before updating the PHY context yet again we can simply skip the redundant PHY context update in iwx_run_stop() to prevent this firmware error. A reliable way to reproduce the problem is an attempt to connect to an 11ac access point on a 5GHz channel while the wrong WPA key is set which happened to me because mpi@ uses a French WPA passphrase. Problem confirmed fixed by me with this simple reproducer. Helpful hints provided by Johannes Berg at Linux/Intel, thanks! --- sys/dev/pci/if_iwx.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c index bf04f4a264c..8aa8740bcf8 100644 --- a/sys/dev/pci/if_iwx.c +++ b/sys/dev/pci/if_iwx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwx.c,v 1.170 2023/04/14 12:45:10 stsp Exp $ */ +/* $OpenBSD: if_iwx.c,v 1.171 2023/05/11 16:55:46 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh @@ -8431,17 +8431,6 @@ iwx_run_stop(struct iwx_softc *sc) return err; } - /* Reset Tx chains in case MIMO or 40 MHz channels were enabled. */ - if (in->in_ni.ni_flags & IEEE80211_NODE_HT) { - err = iwx_phy_ctxt_update(sc, in->in_phyctxt, - in->in_phyctxt->channel, 1, 1, 0, IEEE80211_HTOP0_SCO_SCN, - IEEE80211_VHTOP0_CHAN_WIDTH_HT); - if (err) { - printf("%s: failed to update PHY\n", DEVNAME(sc)); - return err; - } - } - return 0; } -- 2.20.1