Re: fix iwm/iwx updatechan callbacks

2023-04-13 Thread Todd C . Miller
On Wed, 12 Apr 2023 23:27:08 +0200, Stefan Sperling wrote:

> The iwm_updatechan and iwx_updatechan callbacks are not reachable
> because they were never wired up. Only the iwn driver already has
> this callback pointer set as intended.
>
> With the patch below iwm/iwx should get triggered when an AP switches
> between 20MHz and 40/80MHz channel width, as indicated by the
> 11n HT-operation information element in beacons.

Working fine here with:

iwm0 at pci2 dev 0 function 0 "Intel AC 8260" rev 0x3a, msi
iwm0: hw rev 0x200, fw ver 36.ca7b901d.0, address xx:xx:xx:xx:xx:xx

though I don't think my AP switches channel widths.

 - todd



Re: fix iwm/iwx updatechan callbacks

2023-04-13 Thread Florian Obser
On 2023-04-12 23:27 +02, Stefan Sperling  wrote:
> The iwm_updatechan and iwx_updatechan callbacks are not reachable
> because they were never wired up. Only the iwn driver already has
> this callback pointer set as intended.
>
> With the patch below iwm/iwx should get triggered when an AP switches
> between 20MHz and 40/80MHz channel width, as indicated by the
> 11n HT-operation information element in beacons.
>
> Tests for regressions on any iwm/iwx devices would be welcome.
>

Seems to be working fine with on x395 with

iwm0 at pci1 dev 0 function 0 "Intel Dual Band Wireless-AC 9260" rev 0x29, msix
iwm0: hw rev 0x320, fw ver 46.ea3728ee.0, address 40:74:e0:38:11:11

... but as far as I know my APs do not switch channel width.

-- 
In my defence, I have been left unsupervised.



fix iwm/iwx updatechan callbacks

2023-04-12 Thread Stefan Sperling
The iwm_updatechan and iwx_updatechan callbacks are not reachable
because they were never wired up. Only the iwn driver already has
this callback pointer set as intended.

With the patch below iwm/iwx should get triggered when an AP switches
between 20MHz and 40/80MHz channel width, as indicated by the
11n HT-operation information element in beacons.

Tests for regressions on any iwm/iwx devices would be welcome.

diff /usr/src
commit - d5650cee3563531d216bf9be18275aff4dec8349
path + /usr/src
blob - 437a2b9f3722bb3684750a56a51535ef9b8b59ca
file + sys/dev/pci/if_iwm.c
--- sys/dev/pci/if_iwm.c
+++ sys/dev/pci/if_iwm.c
@@ -12009,6 +12009,7 @@ iwm_attach(struct device *parent, struct device *self,
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;
blob - a61031f47f65c1778069b2205a21ce0ce30a6f83
file + sys/dev/pci/if_iwx.c
--- sys/dev/pci/if_iwx.c
+++ sys/dev/pci/if_iwx.c
@@ -11330,6 +11330,7 @@ iwx_attach(struct device *parent, struct device *self,
/* 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;