summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2017-08-12 22:05:20 +0000
committerstsp <stsp@openbsd.org>2017-08-12 22:05:20 +0000
commit09fe13d316d3b7642e4cc174ab92513026d0e25c (patch)
treecc74ba5c8a0fe9bdeb1b9b9915f10ba256a092c5
parentAdd regress coverage for the TLS signature algorithms extension. (diff)
downloadwireguard-openbsd-09fe13d316d3b7642e4cc174ab92513026d0e25c.tar.xz
wireguard-openbsd-09fe13d316d3b7642e4cc174ab92513026d0e25c.zip
Fix iwm(4) channel reporting, broken by my unrelated tweak during commit of
my CID 1453280 fix (r1.205). Some APs were showing up on the wrong channel. Problem reported by & ok mpi@
-rw-r--r--sys/dev/pci/if_iwm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c
index a5817481130..84243133017 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.207 2017/08/12 19:23:42 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.208 2017/08/12 22:05:20 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -3392,11 +3392,11 @@ iwm_rx_rx_mpdu(struct iwm_softc *sc, struct iwm_rx_packet *pkt,
if (iwm_rx_addbuf(sc, IWM_RBUF_SIZE, sc->rxq.cur) != 0)
return;
- ni = ieee80211_find_rxnode(ic, wh);
-
- chanidx = phy_info->channel;
+ chanidx = letoh32(phy_info->channel);
if (chanidx < 0 || chanidx >= nitems(ic->ic_channels))
- chanidx = ieee80211_chan2ieee(ic, ni->ni_chan);
+ chanidx = ieee80211_chan2ieee(ic, ic->ic_ibss_chan);
+ ni = ieee80211_find_rxnode(ic, wh);
+ ni->ni_chan = &ic->ic_channels[chanidx];
memset(&rxi, 0, sizeof(rxi));
rxi.rxi_rssi = rssi;