summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2017-08-12 22:05:21 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2017-08-12 22:05:21 +0000
commitbce7daa33ac65d92799249e4646e94f4555022d8 (patch)
tree3ea259c0ea78c752a047281a8099454f6a6a5cf0 /sys/dev
parentcf89f0846483b6dd9925d60641d0ce40ff972ec0 (diff)
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@
Diffstat (limited to 'sys/dev')
-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;