From df7acab6f5b2069cc35c9be749e197697893ad70 Mon Sep 17 00:00:00 2001 From: stsp Date: Fri, 14 Apr 2023 12:45:10 +0000 Subject: [PATCH] Wire up the iwm_updatechan and iwx_updatechan callbacks. These callbacks were not reachable by mistake. This change is a first step towards preventing iwx SYSASSERT 0x20101A28 as seen by beck@ and Mikhail when an 11ac AP switches channel width. The callbacks may still not trigger after this change. Possibly because APs use channel switch announcements (CSA) which we currently ignore. We only check the 11n HTOP IE for channel info. We may eventually need to add CSA support in order to detect channel width changes in 11ac mode. No regressions seen by jmc@ on iwx, nor by florian@, millert@ on iwm --- sys/dev/pci/if_iwm.c | 3 ++- sys/dev/pci/if_iwx.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index 6c75baca82c..1547120ea8f 100644 --- a/sys/dev/pci/if_iwm.c +++ b/sys/dev/pci/if_iwm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwm.c,v 1.406 2023/04/11 00:45:08 jsg Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.407 2023/04/14 12:45:10 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh @@ -12009,6 +12009,7 @@ iwm_attach(struct device *parent, struct device *self, void *aux) ic->ic_updateprot = iwm_updateprot; ic->ic_updateslot = iwm_updateslot; ic->ic_updateedca = iwm_updateedca; + ic->ic_updatechan = iwm_updatechan; ic->ic_updatedtim = iwm_updatedtim; ic->ic_ampdu_rx_start = iwm_ampdu_rx_start; ic->ic_ampdu_rx_stop = iwm_ampdu_rx_stop; diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c index a61031f47f6..bf04f4a264c 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.169 2023/03/06 11:42:11 stsp Exp $ */ +/* $OpenBSD: if_iwx.c,v 1.170 2023/04/14 12:45:10 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh @@ -11330,6 +11330,7 @@ iwx_attach(struct device *parent, struct device *self, void *aux) /* Override 802.11 state transition machine. */ sc->sc_newstate = ic->ic_newstate; ic->ic_newstate = iwx_newstate; + ic->ic_updatechan = iwx_updatechan; ic->ic_updateprot = iwx_updateprot; ic->ic_updateslot = iwx_updateslot; ic->ic_updateedca = iwx_updateedca; -- 2.20.1