diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2022-03-20 11:59:40 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2022-03-20 11:59:40 +0000 |
commit | 8b7cfdd9f0073651f6759f7a077c8c9593cf76f8 (patch) | |
tree | 6d8a03b507a569bead07122eef1f01c58047d1b8 /sys/dev/pci/if_iwm.c | |
parent | 7ae9b2a3d0f8c9fd625ffbe54ed4c4cbde2032f5 (diff) |
Don't announce VHT caps on 2GHz channels during iwm(4) and iwx(4) scans.
VHT capabilities were written into the "common" secion of the firmware
probe request frame template. This section is used on 2GHz and 5GHz bands.
Announcing VHT capabilities on 2GHz makes no sense.
Move them into the 5GHz-only section.
ok sthen@
Diffstat (limited to 'sys/dev/pci/if_iwm.c')
-rw-r--r-- | sys/dev/pci/if_iwm.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index 5cca30fccf2..582a4c76874 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.397 2022/03/19 15:19:51 stsp Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.398 2022/03/20 11:59:39 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh <info@genua.de> @@ -7661,6 +7661,12 @@ iwm_fill_probe_req(struct iwm_softc *sc, struct iwm_scan_probe_req *preq) frm = ieee80211_add_xrates(frm, rs); preq->band_data[1].len = htole16(frm - pos); remain -= frm - pos; + if (ic->ic_flags & IEEE80211_F_VHTON) { + if (remain < 14) + return ENOBUFS; + frm = ieee80211_add_vhtcaps(frm, ic); + remain -= frm - pos; + } } /* Send 11n IEs on both 2GHz and 5GHz bands. */ @@ -7674,12 +7680,6 @@ iwm_fill_probe_req(struct iwm_softc *sc, struct iwm_scan_probe_req *preq) remain -= frm - pos; } - if (ic->ic_flags & IEEE80211_F_VHTON) { - if (remain < 14) - return ENOBUFS; - frm = ieee80211_add_vhtcaps(frm, ic); - } - preq->common_data.len = htole16(frm - pos); return 0; |