summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2021-07-09 11:29:09 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2021-07-09 11:29:09 +0000
commit0e639b6afdd766223586ad869aac46940c680041 (patch)
tree60fb0b629a1d7dcddb737d28dca8ca19587ca3e0 /sys/dev/pci
parent1dc6f2fdf1765f361f3e31cbc0e4df29e7b2aa99 (diff)
Do not ask iwm(4) firmware to send probe requests on passive channels.
This seems to fix a problem where newer 9k firmware versions become unresponsive after association and eventually raise a fatal error.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/if_iwm.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c
index 615d9a492b0..8563cc1b943 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.350 2021/07/09 11:24:55 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.351 2021/07/09 11:29:08 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -7105,7 +7105,12 @@ iwm_lmac_scan_fill_channels(struct iwm_softc *sc,
chan->iter_count = htole16(1);
chan->iter_interval = 0;
chan->flags = htole32(IWM_UNIFIED_SCAN_CHANNEL_PARTIAL);
- if (n_ssids != 0 && !bgscan)
+ /*
+ * Firmware may become unresponsive when asked to send
+ * a directed probe request on a passive channel.
+ */
+ if (n_ssids != 0 && !bgscan &&
+ (c->ic_flags & IEEE80211_CHAN_PASSIVE) == 0)
chan->flags |= htole32(1 << 1); /* select SSID 0 */
chan++;
nchan++;
@@ -7132,7 +7137,12 @@ iwm_umac_scan_fill_channels(struct iwm_softc *sc,
chan->channel_num = ieee80211_mhz2ieee(c->ic_freq, 0);
chan->iter_count = 1;
chan->iter_interval = htole16(0);
- if (n_ssids != 0 && !bgscan)
+ /*
+ * Firmware may become unresponsive when asked to send
+ * a directed probe request on a passive channel.
+ */
+ if (n_ssids != 0 && !bgscan &&
+ (c->ic_flags & IEEE80211_CHAN_PASSIVE) == 0)
chan->flags = htole32(1 << 0); /* select SSID 0 */
chan++;
nchan++;