From 03baa64391cc86175b030d132ae900417665b92f Mon Sep 17 00:00:00 2001 From: stsp Date: Wed, 15 Jun 2022 08:43:17 +0000 Subject: [PATCH] In iwn(4), delay 40MHz RXON config until we have negotiated 11n mode. Enabling 40MHz too early can cause firmware sysassert 0x05 on 5300 devices when we send the initial AUTH frame to kick off association. At this point we haven't negotiated 11n mode yet (this happens later during the association sequence), so perhaps firmware saw an inconsistent configuration state? It is unclear why this problem did not seem to affect any other devices. Reported by Christian Schulte on misc@ --- sys/dev/pci/if_iwn.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c index 1446e2d9c7d..9602d91aebf 100644 --- a/sys/dev/pci/if_iwn.c +++ b/sys/dev/pci/if_iwn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwn.c,v 1.258 2022/04/21 21:03:03 stsp Exp $ */ +/* $OpenBSD: if_iwn.c,v 1.259 2022/06/15 08:43:17 stsp Exp $ */ /*- * Copyright (c) 2007-2010 Damien Bergamini @@ -5409,7 +5409,8 @@ iwn_rxon_configure_ht40(struct ieee80211com *ic, struct ieee80211_node *ni) sc->rxon.flags &= ~htole32(IWN_RXON_HT_CHANMODE_MIXED2040 | IWN_RXON_HT_CHANMODE_PURE40 | IWN_RXON_HT_HT40MINUS); - if (ieee80211_node_supports_ht_chan40(ni) && + if ((ni->ni_flags & IEEE80211_NODE_HT) && + ieee80211_node_supports_ht_chan40(ni) && (sco == IEEE80211_HTOP0_SCO_SCA || sco == IEEE80211_HTOP0_SCO_SCB)) { if (sco == IEEE80211_HTOP0_SCO_SCB) -- 2.20.1