Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Mar 2019 13:41:21 +0000 (UTC)
From:      Andriy Voskoboinyk <avos@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r345753 - head/sys/dev/usb/wlan
Message-ID:  <201903311341.x2VDfL01069600@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avos
Date: Sun Mar 31 13:41:20 2019
New Revision: 345753
URL: https://svnweb.freebsd.org/changeset/base/345753

Log:
  run(4): do not clear PROTECTED bit if frame was not decrypted by NIC.
  
  Tested with D-Link DWA-140 rev B3, STA / MONITOR modes.
  
  MFC after:	1 week

Modified:
  head/sys/dev/usb/wlan/if_run.c

Modified: head/sys/dev/usb/wlan/if_run.c
==============================================================================
--- head/sys/dev/usb/wlan/if_run.c	Sun Mar 31 11:31:01 2019	(r345752)
+++ head/sys/dev/usb/wlan/if_run.c	Sun Mar 31 13:41:20 2019	(r345753)
@@ -2865,8 +2865,8 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uin
 
 	wh = mtod(m, struct ieee80211_frame *);
 
-	/* XXX wrong for monitor mode */
-	if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
+	if ((wh->i_fc[1] & IEEE80211_FC1_PROTECTED) != 0 &&
+	    (flags & RT2860_RX_DEC) != 0) {
 		wh->i_fc[1] &= ~IEEE80211_FC1_PROTECTED;
 		m->m_flags |= M_WEP;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903311341.x2VDfL01069600>