From 92a93ab835c691c6eaf7d860011b95d369f0f881 Mon Sep 17 00:00:00 2001 From: Damien Bergamini Date: Tue, 12 Jul 2005 18:18:14 +0000 Subject: 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. --- sys/dev/pci/if_iwi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/dev/pci') 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 -- cgit v1.2.3