From: stsp Date: Wed, 20 Dec 2023 07:32:05 +0000 (+0000) Subject: Ensure that iwm/iwx devices announce VHT capabilities in probe requests. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=be47d0a5f00c62ce8dd784cf7f90f635203434ae;p=openbsd Ensure that iwm/iwx devices announce VHT capabilities in probe requests. The previous code did not update the per-band-data length field, resulting in firmware skipping the VHT information element in the probe-request frame template. Patch by Mikhail Pchelin --- diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index fbab94fecb8..f0977cd84e8 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.412 2023/11/06 08:34:41 stsp Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.413 2023/12/20 07:32:05 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh @@ -7704,6 +7704,7 @@ iwm_fill_probe_req(struct iwm_softc *sc, struct iwm_scan_probe_req *preq) return ENOBUFS; frm = ieee80211_add_vhtcaps(frm, ic); remain -= frm - pos; + preq->band_data[1].len = htole16(frm - pos); } } diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c index 612b68e3c69..a86049ac726 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.177 2023/10/06 15:15:29 stsp Exp $ */ +/* $OpenBSD: if_iwx.c,v 1.178 2023/12/20 07:32:05 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh @@ -6977,6 +6977,7 @@ iwx_fill_probe_req(struct iwx_softc *sc, struct iwx_scan_probe_req *preq) return ENOBUFS; frm = ieee80211_add_vhtcaps(frm, ic); remain -= frm - pos; + preq->band_data[1].len = htole16(frm - pos); } }