summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2023-03-06 11:42:12 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2023-03-06 11:42:12 +0000
commitc3c615e87a2eed53309567d2b9fec55ed50aec77 (patch)
tree709f86ba105c7bf6f622bbb7034bdf03de36538e /sys
parent08b0208adac2044d9e7d59f1281b277b672d4e06 (diff)
Make iwx(4) get the primary channel number from AP beacon info, rather
than assuming that it always matches our currently configured channel. Should prevent problems on 40/80Mhz channels if there is a mismatch.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_iwx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c
index edd3cb77a45..a61031f47f6 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.168 2023/03/06 11:37:14 stsp Exp $ */
+/* $OpenBSD: if_iwx.c,v 1.169 2023/03/06 11:42:11 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -5552,7 +5552,7 @@ uint8_t
iwx_get_vht_ctrl_pos(struct ieee80211com *ic, struct ieee80211_channel *chan)
{
int center_idx = ic->ic_bss->ni_vht_chan_center_freq_idx0;
- int primary_idx = ieee80211_chan2ieee(ic, ic->ic_bss->ni_chan);
+ int primary_idx = ic->ic_bss->ni_primary_chan;
/*
* The FW is expected to check the control channel position only
* when in HT/VHT and the channel width is not 20MHz. Return