svn commit: r346004 - in stable: 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan

2019-09-03 Thread Andriy Voskoboinyk
Author: avos
Date: Sun Apr  7 13:04:25 2019
New Revision: 346004
URL: https://svnweb.freebsd.org/changeset/base/346004

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

Modified:
  stable/11/sys/dev/usb/wlan/if_run.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/sys/dev/usb/wlan/if_run.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/sys/dev/usb/wlan/if_run.c
==
--- stable/11/sys/dev/usb/wlan/if_run.c Sun Apr  7 12:57:38 2019
(r346003)
+++ stable/11/sys/dev/usb/wlan/if_run.c Sun Apr  7 13:04:25 2019
(r346004)
@@ -2796,8 +2796,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;
}


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r346004 - in stable: 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan

2019-09-03 Thread Andriy Voskoboinyk
Author: avos
Date: Sun Apr  7 13:04:25 2019
New Revision: 346004
URL: https://svnweb.freebsd.org/changeset/base/346004

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

Modified:
  stable/12/sys/dev/usb/wlan/if_run.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/dev/usb/wlan/if_run.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/sys/dev/usb/wlan/if_run.c
==
--- stable/12/sys/dev/usb/wlan/if_run.c Sun Apr  7 12:57:38 2019
(r346003)
+++ stable/12/sys/dev/usb/wlan/if_run.c Sun Apr  7 13:04:25 2019
(r346004)
@@ -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;
}


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r346004 - in stable: 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan

2019-04-07 Thread Andriy Voskoboinyk
Author: avos
Date: Sun Apr  7 13:04:25 2019
New Revision: 346004
URL: https://svnweb.freebsd.org/changeset/base/346004

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

Modified:
  stable/11/sys/dev/usb/wlan/if_run.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/sys/dev/usb/wlan/if_run.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/sys/dev/usb/wlan/if_run.c
==
--- stable/11/sys/dev/usb/wlan/if_run.c Sun Apr  7 12:57:38 2019
(r346003)
+++ stable/11/sys/dev/usb/wlan/if_run.c Sun Apr  7 13:04:25 2019
(r346004)
@@ -2796,8 +2796,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;
}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r346004 - in stable: 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan

2019-04-07 Thread Andriy Voskoboinyk
Author: avos
Date: Sun Apr  7 13:04:25 2019
New Revision: 346004
URL: https://svnweb.freebsd.org/changeset/base/346004

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

Modified:
  stable/12/sys/dev/usb/wlan/if_run.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/dev/usb/wlan/if_run.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/sys/dev/usb/wlan/if_run.c
==
--- stable/12/sys/dev/usb/wlan/if_run.c Sun Apr  7 12:57:38 2019
(r346003)
+++ stable/12/sys/dev/usb/wlan/if_run.c Sun Apr  7 13:04:25 2019
(r346004)
@@ -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;
}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"