summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2005-07-12 18:18:14 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2005-07-12 18:18:14 +0000
commit92a93ab835c691c6eaf7d860011b95d369f0f881 (patch)
tree381af1d97d1dc9706f4d072ad17ae8eac4b5be23 /sys
parent8cc2fb3ae6fdf8381b691180bc5f5537c86614b9 (diff)
h/w doesn't decrypt rx frames in monitor mode so don't try to remove the
iv and crc fields or to clear the wep bit from the 802.11 header. fix by Pedro la Peu. closes kern/4284.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_iwi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pci/if_iwi.c b/sys/dev/pci/if_iwi.c
index f711ed84551..dff8e1e4c41 100644
--- a/sys/dev/pci/if_iwi.c
+++ b/sys/dev/pci/if_iwi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwi.c,v 1.46 2005/07/02 23:10:11 brad Exp $ */
+/* $OpenBSD: if_iwi.c,v 1.47 2005/07/12 18:18:13 damien Exp $ */
/*-
* Copyright (c) 2004, 2005
@@ -760,7 +760,8 @@ iwi_frame_intr(struct iwi_softc *sc, struct iwi_rx_buf *buf, int i,
m_adj(m, sizeof (struct iwi_hdr) + sizeof (struct iwi_frame));
wh = mtod(m, struct ieee80211_frame *);
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if ((wh->i_fc[1] & IEEE80211_FC1_WEP) &&
+ ic->ic_opmode != IEEE80211_M_MONITOR) {
/*
* Hardware decrypts the frame itself but leaves the WEP bit
* set in the 802.11 header and don't remove the iv and crc