svn commit: r346073 - in head/sys/dev: iwi otus usb/wlan

2019-09-03 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Apr 10 08:17:56 2019
New Revision: 346073
URL: https://svnweb.freebsd.org/changeset/base/346073

Log:
  urtw(4), otus(4), iwi(4): allow to set non-default MAC address via ifconfig(8)
  
  Tested with Netgear WG111 v3 (RTL8187B, urtw(4)), STA mode.
  
  MFC after:1 week

Modified:
  head/sys/dev/iwi/if_iwi.c
  head/sys/dev/otus/if_otus.c
  head/sys/dev/usb/wlan/if_urtw.c

Modified: head/sys/dev/iwi/if_iwi.c
==
--- head/sys/dev/iwi/if_iwi.c   Wed Apr 10 07:51:13 2019(r346072)
+++ head/sys/dev/iwi/if_iwi.c   Wed Apr 10 08:17:56 2019(r346073)
@@ -2576,15 +2576,18 @@ static int
 iwi_config(struct iwi_softc *sc)
 {
struct ieee80211com *ic = >sc_ic;
+   struct ieee80211vap *vap = TAILQ_FIRST(>ic_vaps);
struct iwi_configuration config;
struct iwi_txpower power;
+   uint8_t *macaddr;
uint32_t data;
int error, i;
 
IWI_LOCK_ASSERT(sc);
 
-   DPRINTF(("Setting MAC address to %6D\n", ic->ic_macaddr, ":"));
-   error = iwi_cmd(sc, IWI_CMD_SET_MAC_ADDRESS, ic->ic_macaddr,
+   macaddr = vap ? vap->iv_myaddr : ic->ic_macaddr;
+   DPRINTF(("Setting MAC address to %6D\n", macaddr, ":"));
+   error = iwi_cmd(sc, IWI_CMD_SET_MAC_ADDRESS, macaddr,
IEEE80211_ADDR_LEN);
if (error != 0)
return error;

Modified: head/sys/dev/otus/if_otus.c
==
--- head/sys/dev/otus/if_otus.c Wed Apr 10 07:51:13 2019(r346072)
+++ head/sys/dev/otus/if_otus.c Wed Apr 10 08:17:56 2019(r346073)
@@ -3108,7 +3108,7 @@ otus_set_operating_mode(struct otus_softc *sc)
 */
IEEE80211_ADDR_COPY(bssid, zero_macaddr);
vap = TAILQ_FIRST(>ic_vaps);
-   macaddr = ic->ic_macaddr;
+   macaddr = vap ? vap->iv_myaddr : ic->ic_macaddr;
 
switch (ic->ic_opmode) {
case IEEE80211_M_STA:

Modified: head/sys/dev/usb/wlan/if_urtw.c
==
--- head/sys/dev/usb/wlan/if_urtw.c Wed Apr 10 07:51:13 2019
(r346072)
+++ head/sys/dev/usb/wlan/if_urtw.c Wed Apr 10 08:17:56 2019
(r346073)
@@ -752,6 +752,7 @@ static void urtw_free_tx_data_list(struct 
urtw_softc 
 static voidurtw_free_rx_data_list(struct urtw_softc *);
 static voidurtw_free_data_list(struct urtw_softc *,
struct urtw_data data[], int, int);
+static usb_error_t urtw_set_macaddr(struct urtw_softc *, const uint8_t *);
 static usb_error_t urtw_adapter_start(struct urtw_softc *);
 static usb_error_t urtw_adapter_start_b(struct urtw_softc *);
 static usb_error_t urtw_set_mode(struct urtw_softc *, uint32_t);
@@ -1187,9 +1188,23 @@ fail:
 }
 
 static usb_error_t
+urtw_set_macaddr(struct urtw_softc *sc, const uint8_t *macaddr)
+{
+   usb_error_t error;
+
+   urtw_write32_m(sc, URTW_MAC0, ((const uint32_t *)macaddr)[0]);
+   urtw_write16_m(sc, URTW_MAC4, ((const uint32_t *)macaddr)[1] & 0x);
+
+fail:
+   return (error);
+}
+
+static usb_error_t
 urtw_adapter_start(struct urtw_softc *sc)
 {
struct ieee80211com *ic = >sc_ic;
+   struct ieee80211vap *vap = TAILQ_FIRST(>ic_vaps);
+   const uint8_t *macaddr;
usb_error_t error;
 
error = urtw_reset(sc);
@@ -1209,8 +1224,11 @@ urtw_adapter_start(struct urtw_softc *sc)
if (error)
goto fail;
/* applying MAC address again.  */
-   urtw_write32_m(sc, URTW_MAC0, ((uint32_t *)ic->ic_macaddr)[0]);
-   urtw_write16_m(sc, URTW_MAC4, ((uint32_t *)ic->ic_macaddr)[1] & 0x);
+   macaddr = vap ? vap->iv_myaddr : ic->ic_macaddr;
+   urtw_set_macaddr(sc, macaddr);
+   if (error)
+   goto fail;
+
error = urtw_set_mode(sc, URTW_EPROM_CMD_NORMAL);
if (error)
goto fail;
@@ -3180,6 +3198,8 @@ static usb_error_t
 urtw_8225v2b_rf_init(struct urtw_softc *sc)
 {
struct ieee80211com *ic = >sc_ic;
+   struct ieee80211vap *vap = TAILQ_FIRST(>ic_vaps);
+   const uint8_t *macaddr;
unsigned int i;
uint8_t data8;
usb_error_t error;
@@ -3227,8 +3247,10 @@ urtw_8225v2b_rf_init(struct urtw_softc *sc)
urtw_write8_m(sc, URTW_CONFIG1, data8);
 
/* applying MAC address again.  */
-   urtw_write32_m(sc, URTW_MAC0, ((uint32_t *)ic->ic_macaddr)[0]);
-   urtw_write16_m(sc, URTW_MAC4, ((uint32_t *)ic->ic_macaddr)[1] & 0x);
+   macaddr = vap ? vap->iv_myaddr : ic->ic_macaddr;
+   error = urtw_set_macaddr(sc, macaddr);
+   if (error)
+   goto fail;
 
error = urtw_set_mode(sc, URTW_EPROM_CMD_NORMAL);
if (error)


___
svn-src-all@freebsd.org mailing list

svn commit: r346006 - 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:26:45 2019
New Revision: 346006
URL: https://svnweb.freebsd.org/changeset/base/346006

Log:
  MFC r345754:
  run(4): properly set F_DATAPAD radiotap flag if frame has padding between
  frame header and data.
  
  This will fix 'Mysterious OLPC stuff' for received frames and wrong
  CCMP / TKIP / data decoding for transmitted frames in net/wireshark
  dissector.
  
  While here, drop unneeded comment - net80211 handles padding requirements
  for Tx & Rx without driver adjustment.
  
  Was tested with D-Link DWA-140 rev B3, STA mode.

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 13:11:40 2019
(r346005)
+++ stable/11/sys/dev/usb/wlan/if_run.c Sun Apr  7 13:26:45 2019
(r346006)
@@ -2783,10 +2783,6 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uin
}
 
if (flags & RT2860_RX_L2PAD) {
-   /*
-* XXX OpenBSD removes padding between header
-* and payload here...
-*/
DPRINTFN(8, "received RT2860_RX_L2PAD frame\n");
len += 2;
}
@@ -2826,6 +2822,8 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uin
uint16_t phy;
 
tap->wr_flags = 0;
+   if (flags & RT2860_RX_L2PAD)
+   tap->wr_flags |= IEEE80211_RADIOTAP_F_DATAPAD;
tap->wr_antsignal = rssi;
tap->wr_antenna = ant;
tap->wr_dbm_antsignal = run_rssi2dbm(sc, rssi, ant);
@@ -3085,14 +3083,23 @@ tr_setup:
 
vap = data->ni->ni_vap;
if (ieee80211_radiotap_active_vap(vap)) {
+   const struct ieee80211_frame *wh;
struct run_tx_radiotap_header *tap = >sc_txtap;
struct rt2860_txwi *txwi = 
(struct rt2860_txwi *)(>desc + sizeof(struct 
rt2870_txd));
+   int has_l2pad;
+
+   wh = mtod(m, struct ieee80211_frame *);
+   has_l2pad = IEEE80211_HAS_ADDR4(wh) !=
+   IEEE80211_QOS_HAS_SEQ(wh);
+
tap->wt_flags = 0;
tap->wt_rate = rt2860_rates[data->ridx].rate;
tap->wt_hwqueue = index;
if (le16toh(txwi->phy) & RT2860_PHY_SHPRE)
tap->wt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE;
+   if (has_l2pad)
+   tap->wt_flags |= IEEE80211_RADIOTAP_F_DATAPAD;
 
ieee80211_radiotap_tx(vap, m);
}


___
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/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: r346005 - 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:11:40 2019
New Revision: 346005
URL: https://svnweb.freebsd.org/changeset/base/346005

Log:
  MFC r345751:
  uath(4), urtw(4): restart driver if device does not respond after Tx request

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

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

Modified: stable/11/sys/dev/usb/wlan/if_uath.c
==
--- stable/11/sys/dev/usb/wlan/if_uath.cSun Apr  7 13:04:25 2019
(r346004)
+++ stable/11/sys/dev/usb/wlan/if_uath.cSun Apr  7 13:11:40 2019
(r346005)
@@ -1271,8 +1271,8 @@ uath_watchdog(void *arg)
if (sc->sc_tx_timer > 0) {
if (--sc->sc_tx_timer == 0) {
device_printf(sc->sc_dev, "device timeout\n");
-   /*uath_init(sc); XXX needs a process context! */
counter_u64_add(ic->ic_oerrors, 1);
+   ieee80211_restart_all(ic);
return;
}
callout_reset(>watchdog_ch, hz, uath_watchdog, sc);

Modified: stable/11/sys/dev/usb/wlan/if_urtw.c
==
--- stable/11/sys/dev/usb/wlan/if_urtw.cSun Apr  7 13:04:25 2019
(r346004)
+++ stable/11/sys/dev/usb/wlan/if_urtw.cSun Apr  7 13:11:40 2019
(r346005)
@@ -1883,11 +1883,13 @@ static void
 urtw_watchdog(void *arg)
 {
struct urtw_softc *sc = arg;
+   struct ieee80211com *ic = >sc_ic;
 
if (sc->sc_txtimer > 0) {
if (--sc->sc_txtimer == 0) {
device_printf(sc->sc_dev, "device timeout\n");
-   counter_u64_add(sc->sc_ic.ic_oerrors, 1);
+   counter_u64_add(ic->ic_oerrors, 1);
+   ieee80211_restart_all(ic);
return;
}
callout_reset(>sc_watchdog_ch, hz, urtw_watchdog, sc);


___
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: r346005 - 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:11:40 2019
New Revision: 346005
URL: https://svnweb.freebsd.org/changeset/base/346005

Log:
  MFC r345751:
  uath(4), urtw(4): restart driver if device does not respond after Tx request

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

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

Modified: stable/12/sys/dev/usb/wlan/if_uath.c
==
--- stable/12/sys/dev/usb/wlan/if_uath.cSun Apr  7 13:04:25 2019
(r346004)
+++ stable/12/sys/dev/usb/wlan/if_uath.cSun Apr  7 13:11:40 2019
(r346005)
@@ -1276,8 +1276,8 @@ uath_watchdog(void *arg)
if (sc->sc_tx_timer > 0) {
if (--sc->sc_tx_timer == 0) {
device_printf(sc->sc_dev, "device timeout\n");
-   /*uath_init(sc); XXX needs a process context! */
counter_u64_add(ic->ic_oerrors, 1);
+   ieee80211_restart_all(ic);
return;
}
callout_reset(>watchdog_ch, hz, uath_watchdog, sc);

Modified: stable/12/sys/dev/usb/wlan/if_urtw.c
==
--- stable/12/sys/dev/usb/wlan/if_urtw.cSun Apr  7 13:04:25 2019
(r346004)
+++ stable/12/sys/dev/usb/wlan/if_urtw.cSun Apr  7 13:11:40 2019
(r346005)
@@ -1891,11 +1891,13 @@ static void
 urtw_watchdog(void *arg)
 {
struct urtw_softc *sc = arg;
+   struct ieee80211com *ic = >sc_ic;
 
if (sc->sc_txtimer > 0) {
if (--sc->sc_txtimer == 0) {
device_printf(sc->sc_dev, "device timeout\n");
-   counter_u64_add(sc->sc_ic.ic_oerrors, 1);
+   counter_u64_add(ic->ic_oerrors, 1);
+   ieee80211_restart_all(ic);
return;
}
callout_reset(>sc_watchdog_ch, hz, urtw_watchdog, sc);


___
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: r346006 - 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:26:45 2019
New Revision: 346006
URL: https://svnweb.freebsd.org/changeset/base/346006

Log:
  MFC r345754:
  run(4): properly set F_DATAPAD radiotap flag if frame has padding between
  frame header and data.
  
  This will fix 'Mysterious OLPC stuff' for received frames and wrong
  CCMP / TKIP / data decoding for transmitted frames in net/wireshark
  dissector.
  
  While here, drop unneeded comment - net80211 handles padding requirements
  for Tx & Rx without driver adjustment.
  
  Was tested with D-Link DWA-140 rev B3, STA mode.

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 13:11:40 2019
(r346005)
+++ stable/12/sys/dev/usb/wlan/if_run.c Sun Apr  7 13:26:45 2019
(r346006)
@@ -2851,10 +2851,6 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uin
}
 
if (flags & RT2860_RX_L2PAD) {
-   /*
-* XXX OpenBSD removes padding between header
-* and payload here...
-*/
RUN_DPRINTF(sc, RUN_DEBUG_RECV,
"received RT2860_RX_L2PAD frame\n");
len += 2;
@@ -2896,6 +2892,8 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uin
uint16_t phy;
 
tap->wr_flags = 0;
+   if (flags & RT2860_RX_L2PAD)
+   tap->wr_flags |= IEEE80211_RADIOTAP_F_DATAPAD;
tap->wr_antsignal = rssi;
tap->wr_antenna = ant;
tap->wr_dbm_antsignal = run_rssi2dbm(sc, rssi, ant);
@@ -3162,14 +3160,23 @@ tr_setup:
 
vap = data->ni->ni_vap;
if (ieee80211_radiotap_active_vap(vap)) {
+   const struct ieee80211_frame *wh;
struct run_tx_radiotap_header *tap = >sc_txtap;
struct rt2860_txwi *txwi = 
(struct rt2860_txwi *)(>desc + sizeof(struct 
rt2870_txd));
+   int has_l2pad;
+
+   wh = mtod(m, struct ieee80211_frame *);
+   has_l2pad = IEEE80211_HAS_ADDR4(wh) !=
+   IEEE80211_QOS_HAS_SEQ(wh);
+
tap->wt_flags = 0;
tap->wt_rate = rt2860_rates[data->ridx].rate;
tap->wt_hwqueue = index;
if (le16toh(txwi->phy) & RT2860_PHY_SHPRE)
tap->wt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE;
+   if (has_l2pad)
+   tap->wt_flags |= IEEE80211_RADIOTAP_F_DATAPAD;
 
ieee80211_radiotap_tx(vap, m);
}


___
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: r346003 - in stable: 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan

2019-09-03 Thread Andriy Voskoboinyk
Author: avos
Date: Sun Apr  7 12:57:38 2019
New Revision: 346003
URL: https://svnweb.freebsd.org/changeset/base/346003

Log:
  MFC r345729:
  urtw(4): export TSF timestamp for received frames via radiotap
  
  Was tested with Netgear WG111 v3 (RTL8187B), STA mode.

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

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

Modified: stable/11/sys/dev/usb/wlan/if_urtw.c
==
--- stable/11/sys/dev/usb/wlan/if_urtw.cSun Apr  7 12:20:17 2019
(r346002)
+++ stable/11/sys/dev/usb/wlan/if_urtw.cSun Apr  7 12:57:38 2019
(r346003)
@@ -3937,6 +3937,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
struct urtw_softc *sc = data->sc;
struct ieee80211com *ic = >sc_ic;
uint8_t noise = 0, rate;
+   uint64_t mactime;
 
usbd_xfer_status(xfer, , NULL, NULL, NULL);
 
@@ -3956,6 +3957,9 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
/* XXX correct? */
rssi = rx->rssi & URTW_RX_RSSI_MASK;
noise = rx->noise;
+
+   if (ieee80211_radiotap_active(ic))
+   mactime = rx->mactime;
} else {
struct urtw_8187l_rxhdr *rx;
 
@@ -3972,6 +3976,9 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
/* XXX correct? */
rssi = rx->rssi & URTW_RX_8187L_RSSI_MASK;
noise = rx->noise;
+
+   if (ieee80211_radiotap_active(ic))
+   mactime = rx->mactime;
}
 
if (flen < IEEE80211_ACK_LEN)
@@ -3991,6 +3998,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
if (ieee80211_radiotap_active(ic)) {
struct urtw_rx_radiotap_header *tap = >sc_rxtap;
 
+   tap->wr_tsf = mactime;
tap->wr_flags = 0;
tap->wr_dbm_antsignal = (int8_t)rssi;
}

Modified: stable/11/sys/dev/usb/wlan/if_urtwvar.h
==
--- stable/11/sys/dev/usb/wlan/if_urtwvar.h Sun Apr  7 12:20:17 2019
(r346002)
+++ stable/11/sys/dev/usb/wlan/if_urtwvar.h Sun Apr  7 12:57:38 2019
(r346003)
@@ -55,6 +55,7 @@ typedef STAILQ_HEAD(, urtw_data) urtw_datahead;
 
 struct urtw_rx_radiotap_header {
struct ieee80211_radiotap_header wr_ihdr;
+   uint64_twr_tsf;
uint8_t wr_flags;
uint8_t wr_pad;
uint16_twr_chan_freq;
@@ -63,7 +64,8 @@ struct urtw_rx_radiotap_header {
 } __packed __aligned(8);
 
 #define URTW_RX_RADIOTAP_PRESENT   \
-   ((1 << IEEE80211_RADIOTAP_FLAGS) |  \
+   ((1 << IEEE80211_RADIOTAP_TSFT) |   \
+(1 << IEEE80211_RADIOTAP_FLAGS) |  \
 (1 << IEEE80211_RADIOTAP_CHANNEL) |\
 (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL))
 


___
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: r346003 - in stable: 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan

2019-09-03 Thread Andriy Voskoboinyk
Author: avos
Date: Sun Apr  7 12:57:38 2019
New Revision: 346003
URL: https://svnweb.freebsd.org/changeset/base/346003

Log:
  MFC r345729:
  urtw(4): export TSF timestamp for received frames via radiotap
  
  Was tested with Netgear WG111 v3 (RTL8187B), STA mode.

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

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

Modified: stable/12/sys/dev/usb/wlan/if_urtw.c
==
--- stable/12/sys/dev/usb/wlan/if_urtw.cSun Apr  7 12:20:17 2019
(r346002)
+++ stable/12/sys/dev/usb/wlan/if_urtw.cSun Apr  7 12:57:38 2019
(r346003)
@@ -3932,6 +3932,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
struct urtw_softc *sc = data->sc;
struct ieee80211com *ic = >sc_ic;
uint8_t noise = 0, rate;
+   uint64_t mactime;
 
usbd_xfer_status(xfer, , NULL, NULL, NULL);
 
@@ -3951,6 +3952,9 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
/* XXX correct? */
rssi = rx->rssi & URTW_RX_RSSI_MASK;
noise = rx->noise;
+
+   if (ieee80211_radiotap_active(ic))
+   mactime = rx->mactime;
} else {
struct urtw_8187l_rxhdr *rx;
 
@@ -3967,6 +3971,9 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
/* XXX correct? */
rssi = rx->rssi & URTW_RX_8187L_RSSI_MASK;
noise = rx->noise;
+
+   if (ieee80211_radiotap_active(ic))
+   mactime = rx->mactime;
}
 
if (flen < IEEE80211_ACK_LEN)
@@ -3986,6 +3993,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
if (ieee80211_radiotap_active(ic)) {
struct urtw_rx_radiotap_header *tap = >sc_rxtap;
 
+   tap->wr_tsf = mactime;
tap->wr_flags = 0;
tap->wr_dbm_antsignal = (int8_t)rssi;
}

Modified: stable/12/sys/dev/usb/wlan/if_urtwvar.h
==
--- stable/12/sys/dev/usb/wlan/if_urtwvar.h Sun Apr  7 12:20:17 2019
(r346002)
+++ stable/12/sys/dev/usb/wlan/if_urtwvar.h Sun Apr  7 12:57:38 2019
(r346003)
@@ -55,6 +55,7 @@ typedef STAILQ_HEAD(, urtw_data) urtw_datahead;
 
 struct urtw_rx_radiotap_header {
struct ieee80211_radiotap_header wr_ihdr;
+   uint64_twr_tsf;
uint8_t wr_flags;
uint8_t wr_pad;
uint16_twr_chan_freq;
@@ -63,7 +64,8 @@ struct urtw_rx_radiotap_header {
 } __packed __aligned(8);
 
 #define URTW_RX_RADIOTAP_PRESENT   \
-   ((1 << IEEE80211_RADIOTAP_FLAGS) |  \
+   ((1 << IEEE80211_RADIOTAP_TSFT) |   \
+(1 << IEEE80211_RADIOTAP_FLAGS) |  \
 (1 << IEEE80211_RADIOTAP_CHANNEL) |\
 (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL))
 


___
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: r345754 - head/sys/dev/usb/wlan

2019-09-03 Thread Andriy Voskoboinyk
Author: avos
Date: Sun Mar 31 14:18:02 2019
New Revision: 345754
URL: https://svnweb.freebsd.org/changeset/base/345754

Log:
  run(4): properly set F_DATAPAD radiotap flag if frame has padding between
  frame header and data.
  
  This will fix 'Mysterious OLPC stuff' for received frames and wrong
  CCMP / TKIP / data decoding for transmitted frames in net/wireshark
  dissector.
  
  While here, drop unneeded comment - net80211 handles padding requirements
  for Tx & Rx without driver adjustment.
  
  Tested with D-Link DWA-140 rev B3, STA mode.
  
  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 13:41:20 2019
(r345753)
+++ head/sys/dev/usb/wlan/if_run.c  Sun Mar 31 14:18:02 2019
(r345754)
@@ -2851,10 +2851,6 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uin
}
 
if (flags & RT2860_RX_L2PAD) {
-   /*
-* XXX OpenBSD removes padding between header
-* and payload here...
-*/
RUN_DPRINTF(sc, RUN_DEBUG_RECV,
"received RT2860_RX_L2PAD frame\n");
len += 2;
@@ -2896,6 +2892,8 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uin
uint16_t phy;
 
tap->wr_flags = 0;
+   if (flags & RT2860_RX_L2PAD)
+   tap->wr_flags |= IEEE80211_RADIOTAP_F_DATAPAD;
tap->wr_antsignal = rssi;
tap->wr_antenna = ant;
tap->wr_dbm_antsignal = run_rssi2dbm(sc, rssi, ant);
@@ -3162,14 +3160,23 @@ tr_setup:
 
vap = data->ni->ni_vap;
if (ieee80211_radiotap_active_vap(vap)) {
+   const struct ieee80211_frame *wh;
struct run_tx_radiotap_header *tap = >sc_txtap;
struct rt2860_txwi *txwi = 
(struct rt2860_txwi *)(>desc + sizeof(struct 
rt2870_txd));
+   int has_l2pad;
+
+   wh = mtod(m, struct ieee80211_frame *);
+   has_l2pad = IEEE80211_HAS_ADDR4(wh) !=
+   IEEE80211_QOS_HAS_SEQ(wh);
+
tap->wt_flags = 0;
tap->wt_rate = rt2860_rates[data->ridx].rate;
tap->wt_hwqueue = index;
if (le16toh(txwi->phy) & RT2860_PHY_SHPRE)
tap->wt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE;
+   if (has_l2pad)
+   tap->wt_flags |= IEEE80211_RADIOTAP_F_DATAPAD;
 
ieee80211_radiotap_tx(vap, m);
}


___
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: r345761 - in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211

2019-09-03 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Apr  1 07:54:27 2019
New Revision: 345761
URL: https://svnweb.freebsd.org/changeset/base/345761

Log:
  MFC r345252:
  net80211: correct check for SMPS node flags updates
  
  Update node flags when driver supports SMPS, not when it is disabled or
  in dynamic mode ((iv_htcaps & HTCAP_SMPS) != 0).
  
  Was checked with RTL8188EE (1T1R), STA mode - 'smps' word should disappear
  from 'ifconfig wlan0' output.

Modified:
  stable/10/sys/net80211/ieee80211_ht.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/net80211/ieee80211_ht.c
  stable/12/sys/net80211/ieee80211_ht.c
Directory Properties:
  stable/11/   (props changed)
  stable/12/   (props changed)

Modified: stable/10/sys/net80211/ieee80211_ht.c
==
--- stable/10/sys/net80211/ieee80211_ht.c   Mon Apr  1 07:46:41 2019
(r345760)
+++ stable/10/sys/net80211/ieee80211_ht.c   Mon Apr  1 07:54:27 2019
(r345761)
@@ -1542,7 +1542,7 @@ ieee80211_ht_updateparams(struct ieee80211_node *ni,
int ret = 0;
 
ieee80211_parse_htcap(ni, htcapie);
-   if (vap->iv_htcaps & IEEE80211_HTCAP_SMPS)
+   if (vap->iv_htcaps & IEEE80211_HTC_SMPS)
htcap_update_mimo_ps(ni);
htcap_update_shortgi(ni);
 
@@ -1584,7 +1584,7 @@ ieee80211_ht_updatehtcap(struct ieee80211_node *ni, co
int htflags;
 
ieee80211_parse_htcap(ni, htcapie);
-   if (vap->iv_htcaps & IEEE80211_HTCAP_SMPS)
+   if (vap->iv_htcaps & IEEE80211_HTC_SMPS)
htcap_update_mimo_ps(ni);
htcap_update_shortgi(ni);
 


___
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: r345752 - in stable: 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan

2019-09-03 Thread Andriy Voskoboinyk
Author: avos
Date: Sun Mar 31 11:31:01 2019
New Revision: 345752
URL: https://svnweb.freebsd.org/changeset/base/345752

Log:
  MFC r345493:
  run(4): merge some common TSF-related code into run_disable_tsf()
  
  No functional change intended.

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 Mar 31 09:52:36 2019
(r345751)
+++ stable/12/sys/dev/usb/wlan/if_run.c Sun Mar 31 11:31:01 2019
(r345752)
@@ -464,6 +464,7 @@ static void run_usb_timeout_cb(void *);
 static voidrun_reset_livelock(struct run_softc *);
 static voidrun_enable_tsf_sync(struct run_softc *);
 static voidrun_enable_tsf(struct run_softc *);
+static voidrun_disable_tsf(struct run_softc *);
 static voidrun_get_tsf(struct run_softc *, uint64_t *);
 static voidrun_enable_mrr(struct run_softc *);
 static voidrun_set_txpreamble(struct run_softc *);
@@ -2090,7 +2091,6 @@ run_newstate(struct ieee80211vap *vap, enum ieee80211_
struct run_vap *rvp = RUN_VAP(vap);
enum ieee80211_state ostate;
uint32_t sta[3];
-   uint32_t tmp;
uint8_t ratectl;
uint8_t restart_ratectl = 0;
uint8_t bid = 1 << rvp->rvp_id;
@@ -2123,12 +2123,8 @@ run_newstate(struct ieee80211vap *vap, enum ieee80211_
sc->runbmap &= ~bid;
 
/* abort TSF synchronization if there is no vap running */
-   if (--sc->running == 0) {
-   run_read(sc, RT2860_BCN_TIME_CFG, );
-   run_write(sc, RT2860_BCN_TIME_CFG,
-   tmp & ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN |
-   RT2860_TBTT_TIMER_EN));
-   }
+   if (--sc->running == 0)
+   run_disable_tsf(sc);
break;
 
case IEEE80211_S_RUN:
@@ -4863,15 +4859,11 @@ static void
 run_scan_start(struct ieee80211com *ic)
 {
struct run_softc *sc = ic->ic_softc;
-   uint32_t tmp;
 
RUN_LOCK(sc);
 
/* abort TSF synchronization */
-   run_read(sc, RT2860_BCN_TIME_CFG, );
-   run_write(sc, RT2860_BCN_TIME_CFG,
-   tmp & ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN |
-   RT2860_TBTT_TIMER_EN));
+   run_disable_tsf(sc);
run_set_bssid(sc, ieee80211broadcastaddr);
 
RUN_UNLOCK(sc);
@@ -5158,6 +5150,18 @@ run_enable_tsf(struct run_softc *sc)
 }
 
 static void
+run_disable_tsf(struct run_softc *sc)
+{
+   uint32_t tmp;
+
+   if (run_read(sc, RT2860_BCN_TIME_CFG, ) == 0) {
+   tmp &= ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN |
+   RT2860_TBTT_TIMER_EN);
+   run_write(sc, RT2860_BCN_TIME_CFG, tmp);
+   }
+}
+
+static void
 run_get_tsf(struct run_softc *sc, uint64_t *buf)
 {
run_read_region_1(sc, RT2860_TSF_TIMER_DW0, (uint8_t *)buf,
@@ -6108,10 +6112,7 @@ run_init_locked(struct run_softc *sc)
}
 
/* abort TSF synchronization */
-   run_read(sc, RT2860_BCN_TIME_CFG, );
-   tmp &= ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN |
-   RT2860_TBTT_TIMER_EN);
-   run_write(sc, RT2860_BCN_TIME_CFG, tmp);
+   run_disable_tsf(sc);
 
/* clear RX WCID search table */
run_set_region_4(sc, RT2860_WCID_ENTRY(0), 0, 512);


___
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: r345761 - in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211

2019-09-03 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Apr  1 07:54:27 2019
New Revision: 345761
URL: https://svnweb.freebsd.org/changeset/base/345761

Log:
  MFC r345252:
  net80211: correct check for SMPS node flags updates
  
  Update node flags when driver supports SMPS, not when it is disabled or
  in dynamic mode ((iv_htcaps & HTCAP_SMPS) != 0).
  
  Was checked with RTL8188EE (1T1R), STA mode - 'smps' word should disappear
  from 'ifconfig wlan0' output.

Modified:
  stable/11/sys/net80211/ieee80211_ht.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/net80211/ieee80211_ht.c
  stable/12/sys/net80211/ieee80211_ht.c
Directory Properties:
  stable/10/   (props changed)
  stable/12/   (props changed)

Modified: stable/11/sys/net80211/ieee80211_ht.c
==
--- stable/11/sys/net80211/ieee80211_ht.c   Mon Apr  1 07:46:41 2019
(r345760)
+++ stable/11/sys/net80211/ieee80211_ht.c   Mon Apr  1 07:54:27 2019
(r345761)
@@ -1567,7 +1567,7 @@ ieee80211_ht_updateparams(struct ieee80211_node *ni,
int ret = 0;
 
ieee80211_parse_htcap(ni, htcapie);
-   if (vap->iv_htcaps & IEEE80211_HTCAP_SMPS)
+   if (vap->iv_htcaps & IEEE80211_HTC_SMPS)
htcap_update_mimo_ps(ni);
htcap_update_shortgi(ni);
 
@@ -1609,7 +1609,7 @@ ieee80211_ht_updatehtcap(struct ieee80211_node *ni, co
int htflags;
 
ieee80211_parse_htcap(ni, htcapie);
-   if (vap->iv_htcaps & IEEE80211_HTCAP_SMPS)
+   if (vap->iv_htcaps & IEEE80211_HTC_SMPS)
htcap_update_mimo_ps(ni);
htcap_update_shortgi(ni);
 


___
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: r345753 - head/sys/dev/usb/wlan

2019-09-03 Thread Andriy Voskoboinyk
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;
}


___
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: r345761 - in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211

2019-09-03 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Apr  1 07:54:27 2019
New Revision: 345761
URL: https://svnweb.freebsd.org/changeset/base/345761

Log:
  MFC r345252:
  net80211: correct check for SMPS node flags updates
  
  Update node flags when driver supports SMPS, not when it is disabled or
  in dynamic mode ((iv_htcaps & HTCAP_SMPS) != 0).
  
  Was checked with RTL8188EE (1T1R), STA mode - 'smps' word should disappear
  from 'ifconfig wlan0' output.

Modified:
  stable/12/sys/net80211/ieee80211_ht.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/net80211/ieee80211_ht.c
  stable/11/sys/net80211/ieee80211_ht.c
Directory Properties:
  stable/10/   (props changed)
  stable/11/   (props changed)

Modified: stable/12/sys/net80211/ieee80211_ht.c
==
--- stable/12/sys/net80211/ieee80211_ht.c   Mon Apr  1 07:46:41 2019
(r345760)
+++ stable/12/sys/net80211/ieee80211_ht.c   Mon Apr  1 07:54:27 2019
(r345761)
@@ -1727,7 +1727,7 @@ ieee80211_ht_updateparams(struct ieee80211_node *ni,
const struct ieee80211_ie_htinfo *htinfo;
 
ieee80211_parse_htcap(ni, htcapie);
-   if (vap->iv_htcaps & IEEE80211_HTCAP_SMPS)
+   if (vap->iv_htcaps & IEEE80211_HTC_SMPS)
htcap_update_mimo_ps(ni);
htcap_update_shortgi(ni);
htcap_update_ldpc(ni);
@@ -1880,7 +1880,7 @@ ieee80211_ht_updatehtcap(struct ieee80211_node *ni, co
struct ieee80211vap *vap = ni->ni_vap;
 
ieee80211_parse_htcap(ni, htcapie);
-   if (vap->iv_htcaps & IEEE80211_HTCAP_SMPS)
+   if (vap->iv_htcaps & IEEE80211_HTC_SMPS)
htcap_update_mimo_ps(ni);
htcap_update_shortgi(ni);
htcap_update_ldpc(ni);


___
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: r345752 - in stable: 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan

2019-09-03 Thread Andriy Voskoboinyk
Author: avos
Date: Sun Mar 31 11:31:01 2019
New Revision: 345752
URL: https://svnweb.freebsd.org/changeset/base/345752

Log:
  MFC r345493:
  run(4): merge some common TSF-related code into run_disable_tsf()
  
  No functional change intended.

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 Mar 31 09:52:36 2019
(r345751)
+++ stable/11/sys/dev/usb/wlan/if_run.c Sun Mar 31 11:31:01 2019
(r345752)
@@ -431,6 +431,7 @@ static void run_usb_timeout_cb(void *);
 static voidrun_reset_livelock(struct run_softc *);
 static voidrun_enable_tsf_sync(struct run_softc *);
 static voidrun_enable_tsf(struct run_softc *);
+static voidrun_disable_tsf(struct run_softc *);
 static voidrun_get_tsf(struct run_softc *, uint64_t *);
 static voidrun_enable_mrr(struct run_softc *);
 static voidrun_set_txpreamble(struct run_softc *);
@@ -2042,7 +2043,6 @@ run_newstate(struct ieee80211vap *vap, enum ieee80211_
struct run_vap *rvp = RUN_VAP(vap);
enum ieee80211_state ostate;
uint32_t sta[3];
-   uint32_t tmp;
uint8_t ratectl;
uint8_t restart_ratectl = 0;
uint8_t bid = 1 << rvp->rvp_id;
@@ -2075,12 +2075,8 @@ run_newstate(struct ieee80211vap *vap, enum ieee80211_
sc->runbmap &= ~bid;
 
/* abort TSF synchronization if there is no vap running */
-   if (--sc->running == 0) {
-   run_read(sc, RT2860_BCN_TIME_CFG, );
-   run_write(sc, RT2860_BCN_TIME_CFG,
-   tmp & ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN |
-   RT2860_TBTT_TIMER_EN));
-   }
+   if (--sc->running == 0)
+   run_disable_tsf(sc);
break;
 
case IEEE80211_S_RUN:
@@ -4816,15 +4812,11 @@ static void
 run_scan_start(struct ieee80211com *ic)
 {
struct run_softc *sc = ic->ic_softc;
-   uint32_t tmp;
 
RUN_LOCK(sc);
 
/* abort TSF synchronization */
-   run_read(sc, RT2860_BCN_TIME_CFG, );
-   run_write(sc, RT2860_BCN_TIME_CFG,
-   tmp & ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN |
-   RT2860_TBTT_TIMER_EN));
+   run_disable_tsf(sc);
run_set_bssid(sc, ieee80211broadcastaddr);
 
RUN_UNLOCK(sc);
@@ -5107,6 +5099,18 @@ run_enable_tsf(struct run_softc *sc)
 }
 
 static void
+run_disable_tsf(struct run_softc *sc)
+{
+   uint32_t tmp;
+
+   if (run_read(sc, RT2860_BCN_TIME_CFG, ) == 0) {
+   tmp &= ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN |
+   RT2860_TBTT_TIMER_EN);
+   run_write(sc, RT2860_BCN_TIME_CFG, tmp);
+   }
+}
+
+static void
 run_get_tsf(struct run_softc *sc, uint64_t *buf)
 {
run_read_region_1(sc, RT2860_TSF_TIMER_DW0, (uint8_t *)buf,
@@ -6057,10 +6061,7 @@ run_init_locked(struct run_softc *sc)
}
 
/* abort TSF synchronization */
-   run_read(sc, RT2860_BCN_TIME_CFG, );
-   tmp &= ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN |
-   RT2860_TBTT_TIMER_EN);
-   run_write(sc, RT2860_BCN_TIME_CFG, tmp);
+   run_disable_tsf(sc);
 
/* clear RX WCID search table */
run_set_region_4(sc, RT2860_WCID_ENTRY(0), 0, 512);


___
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: r345751 - head/sys/dev/usb/wlan

2019-09-03 Thread Andriy Voskoboinyk
Author: avos
Date: Sun Mar 31 09:52:36 2019
New Revision: 345751
URL: https://svnweb.freebsd.org/changeset/base/345751

Log:
  uath(4), urtw(4): restart driver if device does not respond after Tx request
  
  MFC after:1 week

Modified:
  head/sys/dev/usb/wlan/if_uath.c
  head/sys/dev/usb/wlan/if_urtw.c

Modified: head/sys/dev/usb/wlan/if_uath.c
==
--- head/sys/dev/usb/wlan/if_uath.c Sun Mar 31 06:21:32 2019
(r345750)
+++ head/sys/dev/usb/wlan/if_uath.c Sun Mar 31 09:52:36 2019
(r345751)
@@ -1276,8 +1276,8 @@ uath_watchdog(void *arg)
if (sc->sc_tx_timer > 0) {
if (--sc->sc_tx_timer == 0) {
device_printf(sc->sc_dev, "device timeout\n");
-   /*uath_init(sc); XXX needs a process context! */
counter_u64_add(ic->ic_oerrors, 1);
+   ieee80211_restart_all(ic);
return;
}
callout_reset(>watchdog_ch, hz, uath_watchdog, sc);

Modified: head/sys/dev/usb/wlan/if_urtw.c
==
--- head/sys/dev/usb/wlan/if_urtw.c Sun Mar 31 06:21:32 2019
(r345750)
+++ head/sys/dev/usb/wlan/if_urtw.c Sun Mar 31 09:52:36 2019
(r345751)
@@ -1891,11 +1891,13 @@ static void
 urtw_watchdog(void *arg)
 {
struct urtw_softc *sc = arg;
+   struct ieee80211com *ic = >sc_ic;
 
if (sc->sc_txtimer > 0) {
if (--sc->sc_txtimer == 0) {
device_printf(sc->sc_dev, "device timeout\n");
-   counter_u64_add(sc->sc_ic.ic_oerrors, 1);
+   counter_u64_add(ic->ic_oerrors, 1);
+   ieee80211_restart_all(ic);
return;
}
callout_reset(>sc_watchdog_ch, hz, urtw_watchdog, sc);


___
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: r345729 - head/sys/dev/usb/wlan

2019-09-03 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Mar 30 09:24:06 2019
New Revision: 345729
URL: https://svnweb.freebsd.org/changeset/base/345729

Log:
  urtw(4): export TSF timestamp for received frames via radiotap
  
  Tested with Netgear WG111 v3 (RTL8187B), STA mode.
  
  MFC after:1 week

Modified:
  head/sys/dev/usb/wlan/if_urtw.c
  head/sys/dev/usb/wlan/if_urtwvar.h

Modified: head/sys/dev/usb/wlan/if_urtw.c
==
--- head/sys/dev/usb/wlan/if_urtw.c Sat Mar 30 07:29:20 2019
(r345728)
+++ head/sys/dev/usb/wlan/if_urtw.c Sat Mar 30 09:24:06 2019
(r345729)
@@ -3932,6 +3932,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
struct urtw_softc *sc = data->sc;
struct ieee80211com *ic = >sc_ic;
uint8_t noise = 0, rate;
+   uint64_t mactime;
 
usbd_xfer_status(xfer, , NULL, NULL, NULL);
 
@@ -3951,6 +3952,9 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
/* XXX correct? */
rssi = rx->rssi & URTW_RX_RSSI_MASK;
noise = rx->noise;
+
+   if (ieee80211_radiotap_active(ic))
+   mactime = rx->mactime;
} else {
struct urtw_8187l_rxhdr *rx;
 
@@ -3967,6 +3971,9 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
/* XXX correct? */
rssi = rx->rssi & URTW_RX_8187L_RSSI_MASK;
noise = rx->noise;
+
+   if (ieee80211_radiotap_active(ic))
+   mactime = rx->mactime;
}
 
if (flen < IEEE80211_ACK_LEN)
@@ -3986,6 +3993,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
if (ieee80211_radiotap_active(ic)) {
struct urtw_rx_radiotap_header *tap = >sc_rxtap;
 
+   tap->wr_tsf = mactime;
tap->wr_flags = 0;
tap->wr_dbm_antsignal = (int8_t)rssi;
}

Modified: head/sys/dev/usb/wlan/if_urtwvar.h
==
--- head/sys/dev/usb/wlan/if_urtwvar.h  Sat Mar 30 07:29:20 2019
(r345728)
+++ head/sys/dev/usb/wlan/if_urtwvar.h  Sat Mar 30 09:24:06 2019
(r345729)
@@ -55,6 +55,7 @@ typedef STAILQ_HEAD(, urtw_data) urtw_datahead;
 
 struct urtw_rx_radiotap_header {
struct ieee80211_radiotap_header wr_ihdr;
+   uint64_twr_tsf;
uint8_t wr_flags;
uint8_t wr_pad;
uint16_twr_chan_freq;
@@ -63,7 +64,8 @@ struct urtw_rx_radiotap_header {
 } __packed __aligned(8);
 
 #define URTW_RX_RADIOTAP_PRESENT   \
-   ((1 << IEEE80211_RADIOTAP_FLAGS) |  \
+   ((1 << IEEE80211_RADIOTAP_TSFT) |   \
+(1 << IEEE80211_RADIOTAP_FLAGS) |  \
 (1 << IEEE80211_RADIOTAP_CHANNEL) |\
 (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL))
 


___
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: r345636 - in stable/11: share/man/man9 sys/dev/ath sys/dev/bwi sys/dev/bwn sys/dev/ipw sys/dev/iwi sys/dev/iwm sys/dev/iwn sys/dev/malo sys/dev/mwl sys/dev/otus sys/dev/ral sys/dev/rtwn...

2019-09-03 Thread Andriy Voskoboinyk
Author: avos
Date: Thu Mar 28 09:50:25 2019
New Revision: 345636
URL: https://svnweb.freebsd.org/changeset/base/345636

Log:
  MFC r344990:
  Fix ieee80211_radiotap(9) usage in wireless drivers:
  
  - Alignment issues:
   * Add missing __packed attributes + padding across all drivers; in
  most places there was an assumption that padding will be always
  minimally suitable; in few places - e.g., in urtw(4) / rtwn(4) -
  padding was just missing.
   * Add __aligned(8) attribute for all Rx radiotap headers since they can
  contain 64-bit TSF timestamp; it cannot appear in Tx radiotap headers, so
  just drop the attribute here. Refresh ieee80211_radiotap(9) man page
  accordingly.
  
  - Since net80211 automatically updates channel frequency / flags in
  ieee80211_radiotap_chan_change() drop duplicate setup for these fields
  in drivers.

Modified:
  stable/11/share/man/man9/ieee80211_radiotap.9
  stable/11/sys/dev/ath/if_athioctl.h
  stable/11/sys/dev/bwi/if_bwi.c
  stable/11/sys/dev/bwi/if_bwivar.h
  stable/11/sys/dev/bwn/if_bwn.c
  stable/11/sys/dev/bwn/if_bwnvar.h
  stable/11/sys/dev/ipw/if_ipwvar.h
  stable/11/sys/dev/iwi/if_iwivar.h
  stable/11/sys/dev/iwm/if_iwmvar.h
  stable/11/sys/dev/iwn/if_iwn.c
  stable/11/sys/dev/iwn/if_iwnvar.h
  stable/11/sys/dev/malo/if_maloioctl.h
  stable/11/sys/dev/mwl/if_mwlioctl.h
  stable/11/sys/dev/otus/if_otus.c
  stable/11/sys/dev/otus/if_otusreg.h
  stable/11/sys/dev/ral/rt2560var.h
  stable/11/sys/dev/ral/rt2661var.h
  stable/11/sys/dev/ral/rt2860var.h
  stable/11/sys/dev/rtwn/if_rtwn.c
  stable/11/sys/dev/rtwn/if_rtwnreg.h
  stable/11/sys/dev/urtwn/if_urtwn.c
  stable/11/sys/dev/urtwn/if_urtwnvar.h
  stable/11/sys/dev/usb/wlan/if_rsu.c
  stable/11/sys/dev/usb/wlan/if_rsureg.h
  stable/11/sys/dev/usb/wlan/if_rumvar.h
  stable/11/sys/dev/usb/wlan/if_run.c
  stable/11/sys/dev/usb/wlan/if_runvar.h
  stable/11/sys/dev/usb/wlan/if_uathvar.h
  stable/11/sys/dev/usb/wlan/if_upgtvar.h
  stable/11/sys/dev/usb/wlan/if_uralvar.h
  stable/11/sys/dev/usb/wlan/if_urtw.c
  stable/11/sys/dev/usb/wlan/if_urtwvar.h
  stable/11/sys/dev/usb/wlan/if_zydreg.h
  stable/11/sys/dev/wi/if_wireg.h
  stable/11/sys/dev/wpi/if_wpivar.h
  stable/11/sys/dev/wtap/if_wtapioctl.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/man/man9/ieee80211_radiotap.9
==
--- stable/11/share/man/man9/ieee80211_radiotap.9   Thu Mar 28 09:18:22 
2019(r345635)
+++ stable/11/share/man/man9/ieee80211_radiotap.9   Thu Mar 28 09:50:25 
2019(r345636)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 4, 2009
+.Dd March 28, 2019
 .Dt IEEE80211_RADIOTAP 9
 .Os
 .Sh NAME
@@ -257,7 +257,7 @@ struct wi_rx_radiotap_header {
 uint16_t   wr_chan_flags;
 uint8_twr_antsignal;
 uint8_twr_antnoise;
-} __packed;
+} __packed __aligned(8);
 .Ed
 .Pp
 and transmit definitions for the Atheros driver:

Modified: stable/11/sys/dev/ath/if_athioctl.h
==
--- stable/11/sys/dev/ath/if_athioctl.h Thu Mar 28 09:18:22 2019
(r345635)
+++ stable/11/sys/dev/ath/if_athioctl.h Thu Mar 28 09:50:25 2019
(r345636)
@@ -371,7 +371,7 @@ struct ath_rx_radiotap_header {
 */
struct ath_radiotap_vendor_hdr wr_v;
 #endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */
-} __packed;
+} __packed __aligned(8);
 
 #define ATH_TX_RADIOTAP_PRESENT (  \
(1 << IEEE80211_RADIOTAP_FLAGS) | \

Modified: stable/11/sys/dev/bwi/if_bwi.c
==
--- stable/11/sys/dev/bwi/if_bwi.c  Thu Mar 28 09:18:22 2019
(r345635)
+++ stable/11/sys/dev/bwi/if_bwi.c  Thu Mar 28 09:50:25 2019
(r345636)
@@ -1727,15 +1727,6 @@ bwi_set_channel(struct ieee80211com *ic)
bwi_rf_set_chan(mac, ieee80211_chan2ieee(ic, c), 0);
 
sc->sc_rates = ieee80211_get_ratetable(c);
-
-   /*
-* Setup radio tap channel freq and flags
-*/
-   sc->sc_tx_th.wt_chan_freq = sc->sc_rx_th.wr_chan_freq =
-   htole16(c->ic_freq);
-   sc->sc_tx_th.wt_chan_flags = sc->sc_rx_th.wr_chan_flags =
-   htole16(c->ic_flags & 0x);
-
BWI_UNLOCK(sc);
 }
 

Modified: stable/11/sys/dev/bwi/if_bwivar.h
==
--- stable/11/sys/dev/bwi/if_bwivar.h   Thu Mar 28 09:18:22 2019
(r345635)
+++ stable/11/sys/dev/bwi/if_bwivar.h   Thu Mar 28 09:50:25 2019
(r345636)
@@ -511,7 +511,7 @@ struct bwi_tx_radiotap_hdr {
uint8_t wt_rate;
uint16_twt_chan_freq;
uint16_twt_chan_flags;
-};
+} __packed;
 
 #define BWI_RX_RADIOTAP_PRESENT\
((1 << IEEE80211_RADIOTAP_TSFT) |   \
@@ -531,7 +531,7 @@ struct 

svn commit: r345635 - in stable/11: share/man/man9 sys/dev/ath sys/dev/usb/wlan

2019-09-03 Thread Andriy Voskoboinyk
Author: avos
Date: Thu Mar 28 09:18:22 2019
New Revision: 345635
URL: https://svnweb.freebsd.org/changeset/base/345635

Log:
  MFC r306049:
  net80211: remove IEEE80211_RADIOTAP_TSFT field from transmit definitions.
  
  This field may be used for received frames only.

Modified:
  stable/11/share/man/man9/ieee80211_radiotap.9
  stable/11/sys/dev/ath/if_ath_tx.c
  stable/11/sys/dev/ath/if_athioctl.h
  stable/11/sys/dev/usb/wlan/if_rum.c
  stable/11/sys/dev/usb/wlan/if_rumvar.h
  stable/11/sys/dev/usb/wlan/if_run.c
  stable/11/sys/dev/usb/wlan/if_runvar.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/man/man9/ieee80211_radiotap.9
==
--- stable/11/share/man/man9/ieee80211_radiotap.9   Thu Mar 28 09:16:00 
2019(r345634)
+++ stable/11/share/man/man9/ieee80211_radiotap.9   Thu Mar 28 09:18:22 
2019(r345635)
@@ -263,7 +263,6 @@ struct wi_rx_radiotap_header {
 and transmit definitions for the Atheros driver:
 .Bd -literal -offset indent
 #define ATH_TX_RADIOTAP_PRESENT (   \\
-(1 << IEEE80211_RADIOTAP_TSFT)  | \\
 (1 << IEEE80211_RADIOTAP_FLAGS) | \\
 (1 << IEEE80211_RADIOTAP_RATE)  | \\
 (1 << IEEE80211_RADIOTAP_DBM_TX_POWER)  | \\
@@ -273,7 +272,6 @@ and transmit definitions for the Atheros driver:
 
 struct ath_tx_radiotap_header {
 struct ieee80211_radiotap_header wt_ihdr;
-uint64_t   wt_tsf;
 uint8_twt_flags;
 uint8_twt_rate;
 uint8_twt_txpower;

Modified: stable/11/sys/dev/ath/if_ath_tx.c
==
--- stable/11/sys/dev/ath/if_ath_tx.c   Thu Mar 28 09:16:00 2019
(r345634)
+++ stable/11/sys/dev/ath/if_ath_tx.c   Thu Mar 28 09:18:22 2019
(r345635)
@@ -1527,7 +1527,6 @@ ath_tx_normal_setup(struct ath_softc *sc, struct ieee8
 struct ath_buf *bf, struct mbuf *m0, struct ath_txq *txq)
 {
struct ieee80211vap *vap = ni->ni_vap;
-   struct ath_hal *ah = sc->sc_ah;
struct ieee80211com *ic = >sc_ic;
const struct chanAccParams *cap = >ic_wme.wme_chanParams;
int error, iswep, ismcast, isfrag, ismrr;
@@ -1783,9 +1782,6 @@ ath_tx_normal_setup(struct ath_softc *sc, struct ieee8
sc->sc_hwmap[rix].ieeerate, -1);
 
if (ieee80211_radiotap_active_vap(vap)) {
-   u_int64_t tsf = ath_hal_gettsf64(ah);
-
-   sc->sc_tx_th.wt_tsf = htole64(tsf);
sc->sc_tx_th.wt_flags = sc->sc_hwmap[rix].txflags;
if (iswep)
sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_WEP;
@@ -2066,7 +2062,6 @@ ath_tx_raw_start(struct ath_softc *sc, struct ieee8021
const struct ieee80211_bpf_params *params)
 {
struct ieee80211com *ic = >sc_ic;
-   struct ath_hal *ah = sc->sc_ah;
struct ieee80211vap *vap = ni->ni_vap;
int error, ismcast, ismrr;
int keyix, hdrlen, pktlen, try0, txantenna;
@@ -2201,9 +2196,6 @@ ath_tx_raw_start(struct ath_softc *sc, struct ieee8021
sc->sc_hwmap[rix].ieeerate, -1);
 
if (ieee80211_radiotap_active_vap(vap)) {
-   u_int64_t tsf = ath_hal_gettsf64(ah);
-
-   sc->sc_tx_th.wt_tsf = htole64(tsf);
sc->sc_tx_th.wt_flags = sc->sc_hwmap[rix].txflags;
if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED)
sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_WEP;

Modified: stable/11/sys/dev/ath/if_athioctl.h
==
--- stable/11/sys/dev/ath/if_athioctl.h Thu Mar 28 09:16:00 2019
(r345634)
+++ stable/11/sys/dev/ath/if_athioctl.h Thu Mar 28 09:18:22 2019
(r345635)
@@ -374,7 +374,6 @@ struct ath_rx_radiotap_header {
 } __packed;
 
 #define ATH_TX_RADIOTAP_PRESENT (  \
-   (1 << IEEE80211_RADIOTAP_TSFT)  | \
(1 << IEEE80211_RADIOTAP_FLAGS) | \
(1 << IEEE80211_RADIOTAP_RATE)  | \
(1 << IEEE80211_RADIOTAP_DBM_TX_POWER)  | \
@@ -384,7 +383,6 @@ struct ath_rx_radiotap_header {
 
 struct ath_tx_radiotap_header {
struct ieee80211_radiotap_header wt_ihdr;
-   u_int64_t   wt_tsf;
u_int8_twt_flags;
u_int8_twt_rate;
u_int8_twt_txpower;

Modified: stable/11/sys/dev/usb/wlan/if_rum.c
==
--- stable/11/sys/dev/usb/wlan/if_rum.c Thu Mar 28 09:16:00 2019
(r345634)
+++ stable/11/sys/dev/usb/wlan/if_rum.c Thu Mar 28 09:18:22 2019
(r345635)
@@ -1075,7 +1075,6 @@ tr_setup:
 
tap->wt_flags = 0;
tap->wt_rate = data->rate;
-   rum_get_tsf(sc, >wt_tsf);
 

svn commit: r345634 - in stable/12: share/man/man9 sys/dev/ath sys/dev/bwi sys/dev/bwn sys/dev/ipw sys/dev/iwi sys/dev/iwm sys/dev/iwn sys/dev/malo sys/dev/mwl sys/dev/otus sys/dev/ral sys/dev/rtwn...

2019-09-03 Thread Andriy Voskoboinyk
Author: avos
Date: Thu Mar 28 09:16:00 2019
New Revision: 345634
URL: https://svnweb.freebsd.org/changeset/base/345634

Log:
  MFC r344990:
  Fix ieee80211_radiotap(9) usage in wireless drivers:
  
  - Alignment issues:
   * Add missing __packed attributes + padding across all drivers; in
  most places there was an assumption that padding will be always
  minimally suitable; in few places - e.g., in urtw(4) / rtwn(4) -
  padding was just missing.
   * Add __aligned(8) attribute for all Rx radiotap headers since they can
  contain 64-bit TSF timestamp; it cannot appear in Tx radiotap headers, so
  just drop the attribute here. Refresh ieee80211_radiotap(9) man page
  accordingly.
  
  - Since net80211 automatically updates channel frequency / flags in
  ieee80211_radiotap_chan_change() drop duplicate setup for these fields
  in drivers.

Modified:
  stable/12/share/man/man9/ieee80211_radiotap.9
  stable/12/sys/dev/ath/if_athioctl.h
  stable/12/sys/dev/bwi/if_bwi.c
  stable/12/sys/dev/bwi/if_bwivar.h
  stable/12/sys/dev/bwn/if_bwn.c
  stable/12/sys/dev/bwn/if_bwnvar.h
  stable/12/sys/dev/ipw/if_ipwvar.h
  stable/12/sys/dev/iwi/if_iwivar.h
  stable/12/sys/dev/iwm/if_iwmvar.h
  stable/12/sys/dev/iwn/if_iwn.c
  stable/12/sys/dev/iwn/if_iwnvar.h
  stable/12/sys/dev/malo/if_maloioctl.h
  stable/12/sys/dev/mwl/if_mwlioctl.h
  stable/12/sys/dev/otus/if_otus.c
  stable/12/sys/dev/otus/if_otusreg.h
  stable/12/sys/dev/ral/rt2560var.h
  stable/12/sys/dev/ral/rt2661var.h
  stable/12/sys/dev/ral/rt2860var.h
  stable/12/sys/dev/rtwn/if_rtwn.c
  stable/12/sys/dev/rtwn/if_rtwnvar.h
  stable/12/sys/dev/usb/wlan/if_rsu.c
  stable/12/sys/dev/usb/wlan/if_rsureg.h
  stable/12/sys/dev/usb/wlan/if_rumvar.h
  stable/12/sys/dev/usb/wlan/if_run.c
  stable/12/sys/dev/usb/wlan/if_runvar.h
  stable/12/sys/dev/usb/wlan/if_uathvar.h
  stable/12/sys/dev/usb/wlan/if_upgtvar.h
  stable/12/sys/dev/usb/wlan/if_uralvar.h
  stable/12/sys/dev/usb/wlan/if_urtw.c
  stable/12/sys/dev/usb/wlan/if_urtwvar.h
  stable/12/sys/dev/usb/wlan/if_zydreg.h
  stable/12/sys/dev/wi/if_wireg.h
  stable/12/sys/dev/wpi/if_wpivar.h
  stable/12/sys/dev/wtap/if_wtapioctl.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/share/man/man9/ieee80211_radiotap.9
==
--- stable/12/share/man/man9/ieee80211_radiotap.9   Thu Mar 28 09:00:56 
2019(r345633)
+++ stable/12/share/man/man9/ieee80211_radiotap.9   Thu Mar 28 09:16:00 
2019(r345634)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 4, 2009
+.Dd March 11, 2019
 .Dt IEEE80211_RADIOTAP 9
 .Os
 .Sh NAME
@@ -257,7 +257,7 @@ struct wi_rx_radiotap_header {
 uint16_t   wr_chan_flags;
 uint8_twr_antsignal;
 uint8_twr_antnoise;
-} __packed;
+} __packed __aligned(8);
 .Ed
 .Pp
 and transmit definitions for the Atheros driver:

Modified: stable/12/sys/dev/ath/if_athioctl.h
==
--- stable/12/sys/dev/ath/if_athioctl.h Thu Mar 28 09:00:56 2019
(r345633)
+++ stable/12/sys/dev/ath/if_athioctl.h Thu Mar 28 09:16:00 2019
(r345634)
@@ -373,7 +373,7 @@ struct ath_rx_radiotap_header {
 */
struct ath_radiotap_vendor_hdr wr_v;
 #endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */
-} __packed;
+} __packed __aligned(8);
 
 #define ATH_TX_RADIOTAP_PRESENT (  \
(1 << IEEE80211_RADIOTAP_FLAGS) | \

Modified: stable/12/sys/dev/bwi/if_bwi.c
==
--- stable/12/sys/dev/bwi/if_bwi.c  Thu Mar 28 09:00:56 2019
(r345633)
+++ stable/12/sys/dev/bwi/if_bwi.c  Thu Mar 28 09:16:00 2019
(r345634)
@@ -1729,15 +1729,6 @@ bwi_set_channel(struct ieee80211com *ic)
bwi_rf_set_chan(mac, ieee80211_chan2ieee(ic, c), 0);
 
sc->sc_rates = ieee80211_get_ratetable(c);
-
-   /*
-* Setup radio tap channel freq and flags
-*/
-   sc->sc_tx_th.wt_chan_freq = sc->sc_rx_th.wr_chan_freq =
-   htole16(c->ic_freq);
-   sc->sc_tx_th.wt_chan_flags = sc->sc_rx_th.wr_chan_flags =
-   htole16(c->ic_flags & 0x);
-
BWI_UNLOCK(sc);
 }
 

Modified: stable/12/sys/dev/bwi/if_bwivar.h
==
--- stable/12/sys/dev/bwi/if_bwivar.h   Thu Mar 28 09:00:56 2019
(r345633)
+++ stable/12/sys/dev/bwi/if_bwivar.h   Thu Mar 28 09:16:00 2019
(r345634)
@@ -513,7 +513,7 @@ struct bwi_tx_radiotap_hdr {
uint8_t wt_rate;
uint16_twt_chan_freq;
uint16_twt_chan_flags;
-};
+} __packed;
 
 #define BWI_RX_RADIOTAP_PRESENT\
((1 << IEEE80211_RADIOTAP_TSFT) |   \
@@ -533,7 +533,7 @@ struct bwi_rx_radiotap_hdr {
int8_t  wr_antsignal;
int8_t

svn commit: r350885 - head/sys/dev/rtwn/pci

2019-08-12 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Aug 12 08:01:21 2019
New Revision: 350885
URL: https://svnweb.freebsd.org/changeset/base/350885

Log:
  rtwn_pci: add device ID for RTL8192CE.
  
  PR:   239795
  Submitted by: James Parsons 
  MFC after:1 week
  Relnotes: yes

Modified:
  head/sys/dev/rtwn/pci/rtwn_pci_attach.h

Modified: head/sys/dev/rtwn/pci/rtwn_pci_attach.h
==
--- head/sys/dev/rtwn/pci/rtwn_pci_attach.h Mon Aug 12 05:25:40 2019
(r350884)
+++ head/sys/dev/rtwn/pci/rtwn_pci_attach.h Mon Aug 12 08:01:21 2019
(r350885)
@@ -35,6 +35,7 @@ struct rtwn_pci_ident {
 static const struct rtwn_pci_ident rtwn_pci_ident_table[] = {
{ 0x10ec, 0x8176, "Realtek RTL8188CE", RTWN_CHIP_RTL8192CE },
{ 0x10ec, 0x8179, "Realtek RTL8188EE", RTWN_CHIP_RTL8188EE },
+   { 0x10ec, 0x8178, "Realtek RTL8192CE", RTWN_CHIP_RTL8192CE },
{ 0, 0, NULL, RTWN_CHIP_MAX_PCI }
 };
 
___
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: r347511 - in stable: 11/sys/dev/iwi 11/sys/dev/otus 11/sys/dev/usb/wlan 12/sys/dev/iwi 12/sys/dev/otus 12/sys/dev/usb/wlan

2019-05-12 Thread Andriy Voskoboinyk
Author: avos
Date: Sun May 12 12:30:45 2019
New Revision: 347511
URL: https://svnweb.freebsd.org/changeset/base/347511

Log:
  MFC r346073:
  urtw(4), otus(4), iwi(4): allow to set non-default MAC address via ifconfig(8)
  
  Was tested with Netgear WG111 v3 (RTL8187B, urtw(4)), STA mode.

Modified:
  stable/12/sys/dev/iwi/if_iwi.c
  stable/12/sys/dev/otus/if_otus.c
  stable/12/sys/dev/usb/wlan/if_urtw.c
Directory Properties:
  stable/12/   (props changed)

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

Modified: stable/12/sys/dev/iwi/if_iwi.c
==
--- stable/12/sys/dev/iwi/if_iwi.c  Sun May 12 07:56:01 2019
(r347510)
+++ stable/12/sys/dev/iwi/if_iwi.c  Sun May 12 12:30:45 2019
(r347511)
@@ -2576,15 +2576,18 @@ static int
 iwi_config(struct iwi_softc *sc)
 {
struct ieee80211com *ic = >sc_ic;
+   struct ieee80211vap *vap = TAILQ_FIRST(>ic_vaps);
struct iwi_configuration config;
struct iwi_txpower power;
+   uint8_t *macaddr;
uint32_t data;
int error, i;
 
IWI_LOCK_ASSERT(sc);
 
-   DPRINTF(("Setting MAC address to %6D\n", ic->ic_macaddr, ":"));
-   error = iwi_cmd(sc, IWI_CMD_SET_MAC_ADDRESS, ic->ic_macaddr,
+   macaddr = vap ? vap->iv_myaddr : ic->ic_macaddr;
+   DPRINTF(("Setting MAC address to %6D\n", macaddr, ":"));
+   error = iwi_cmd(sc, IWI_CMD_SET_MAC_ADDRESS, macaddr,
IEEE80211_ADDR_LEN);
if (error != 0)
return error;

Modified: stable/12/sys/dev/otus/if_otus.c
==
--- stable/12/sys/dev/otus/if_otus.cSun May 12 07:56:01 2019
(r347510)
+++ stable/12/sys/dev/otus/if_otus.cSun May 12 12:30:45 2019
(r347511)
@@ -3108,7 +3108,7 @@ otus_set_operating_mode(struct otus_softc *sc)
 */
IEEE80211_ADDR_COPY(bssid, zero_macaddr);
vap = TAILQ_FIRST(>ic_vaps);
-   macaddr = ic->ic_macaddr;
+   macaddr = vap ? vap->iv_myaddr : ic->ic_macaddr;
 
switch (ic->ic_opmode) {
case IEEE80211_M_STA:

Modified: stable/12/sys/dev/usb/wlan/if_urtw.c
==
--- stable/12/sys/dev/usb/wlan/if_urtw.cSun May 12 07:56:01 2019
(r347510)
+++ stable/12/sys/dev/usb/wlan/if_urtw.cSun May 12 12:30:45 2019
(r347511)
@@ -752,6 +752,7 @@ static void urtw_free_tx_data_list(struct 
urtw_softc 
 static voidurtw_free_rx_data_list(struct urtw_softc *);
 static voidurtw_free_data_list(struct urtw_softc *,
struct urtw_data data[], int, int);
+static usb_error_t urtw_set_macaddr(struct urtw_softc *, const uint8_t *);
 static usb_error_t urtw_adapter_start(struct urtw_softc *);
 static usb_error_t urtw_adapter_start_b(struct urtw_softc *);
 static usb_error_t urtw_set_mode(struct urtw_softc *, uint32_t);
@@ -1187,9 +1188,23 @@ fail:
 }
 
 static usb_error_t
+urtw_set_macaddr(struct urtw_softc *sc, const uint8_t *macaddr)
+{
+   usb_error_t error;
+
+   urtw_write32_m(sc, URTW_MAC0, ((const uint32_t *)macaddr)[0]);
+   urtw_write16_m(sc, URTW_MAC4, ((const uint32_t *)macaddr)[1] & 0x);
+
+fail:
+   return (error);
+}
+
+static usb_error_t
 urtw_adapter_start(struct urtw_softc *sc)
 {
struct ieee80211com *ic = >sc_ic;
+   struct ieee80211vap *vap = TAILQ_FIRST(>ic_vaps);
+   const uint8_t *macaddr;
usb_error_t error;
 
error = urtw_reset(sc);
@@ -1209,8 +1224,11 @@ urtw_adapter_start(struct urtw_softc *sc)
if (error)
goto fail;
/* applying MAC address again.  */
-   urtw_write32_m(sc, URTW_MAC0, ((uint32_t *)ic->ic_macaddr)[0]);
-   urtw_write16_m(sc, URTW_MAC4, ((uint32_t *)ic->ic_macaddr)[1] & 0x);
+   macaddr = vap ? vap->iv_myaddr : ic->ic_macaddr;
+   urtw_set_macaddr(sc, macaddr);
+   if (error)
+   goto fail;
+
error = urtw_set_mode(sc, URTW_EPROM_CMD_NORMAL);
if (error)
goto fail;
@@ -3180,6 +3198,8 @@ static usb_error_t
 urtw_8225v2b_rf_init(struct urtw_softc *sc)
 {
struct ieee80211com *ic = >sc_ic;
+   struct ieee80211vap *vap = TAILQ_FIRST(>ic_vaps);
+   const uint8_t *macaddr;
unsigned int i;
uint8_t data8;
usb_error_t error;
@@ -3227,8 +3247,10 @@ urtw_8225v2b_rf_init(struct urtw_softc *sc)
urtw_write8_m(sc, URTW_CONFIG1, data8);
 
/* applying MAC address again.  */
-   urtw_write32_m(sc, URTW_MAC0, ((uint32_t *)ic->ic_macaddr)[0]);
-   urtw_write16_m(sc, URTW_MAC4, ((uint32_t *)ic->ic_macaddr)[1] & 0x);
+   macaddr = vap ? 

svn commit: r347511 - in stable: 11/sys/dev/iwi 11/sys/dev/otus 11/sys/dev/usb/wlan 12/sys/dev/iwi 12/sys/dev/otus 12/sys/dev/usb/wlan

2019-05-12 Thread Andriy Voskoboinyk
Author: avos
Date: Sun May 12 12:30:45 2019
New Revision: 347511
URL: https://svnweb.freebsd.org/changeset/base/347511

Log:
  MFC r346073:
  urtw(4), otus(4), iwi(4): allow to set non-default MAC address via ifconfig(8)
  
  Was tested with Netgear WG111 v3 (RTL8187B, urtw(4)), STA mode.

Modified:
  stable/11/sys/dev/iwi/if_iwi.c
  stable/11/sys/dev/otus/if_otus.c
  stable/11/sys/dev/usb/wlan/if_urtw.c
Directory Properties:
  stable/11/   (props changed)

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

Modified: stable/11/sys/dev/iwi/if_iwi.c
==
--- stable/11/sys/dev/iwi/if_iwi.c  Sun May 12 07:56:01 2019
(r347510)
+++ stable/11/sys/dev/iwi/if_iwi.c  Sun May 12 12:30:45 2019
(r347511)
@@ -2549,16 +2549,19 @@ static int
 iwi_config(struct iwi_softc *sc)
 {
struct ieee80211com *ic = >sc_ic;
+   struct ieee80211vap *vap = TAILQ_FIRST(>ic_vaps);
struct iwi_configuration config;
struct iwi_rateset rs;
struct iwi_txpower power;
+   uint8_t *macaddr;
uint32_t data;
int error, i;
 
IWI_LOCK_ASSERT(sc);
 
-   DPRINTF(("Setting MAC address to %6D\n", ic->ic_macaddr, ":"));
-   error = iwi_cmd(sc, IWI_CMD_SET_MAC_ADDRESS, ic->ic_macaddr,
+   macaddr = vap ? vap->iv_myaddr : ic->ic_macaddr;
+   DPRINTF(("Setting MAC address to %6D\n", macaddr, ":"));
+   error = iwi_cmd(sc, IWI_CMD_SET_MAC_ADDRESS, macaddr,
IEEE80211_ADDR_LEN);
if (error != 0)
return error;

Modified: stable/11/sys/dev/otus/if_otus.c
==
--- stable/11/sys/dev/otus/if_otus.cSun May 12 07:56:01 2019
(r347510)
+++ stable/11/sys/dev/otus/if_otus.cSun May 12 12:30:45 2019
(r347511)
@@ -3095,7 +3095,7 @@ otus_set_operating_mode(struct otus_softc *sc)
 */
IEEE80211_ADDR_COPY(bssid, zero_macaddr);
vap = TAILQ_FIRST(>ic_vaps);
-   macaddr = ic->ic_macaddr;
+   macaddr = vap ? vap->iv_myaddr : ic->ic_macaddr;
 
switch (ic->ic_opmode) {
case IEEE80211_M_STA:

Modified: stable/11/sys/dev/usb/wlan/if_urtw.c
==
--- stable/11/sys/dev/usb/wlan/if_urtw.cSun May 12 07:56:01 2019
(r347510)
+++ stable/11/sys/dev/usb/wlan/if_urtw.cSun May 12 12:30:45 2019
(r347511)
@@ -744,6 +744,7 @@ static void urtw_free_tx_data_list(struct 
urtw_softc 
 static voidurtw_free_rx_data_list(struct urtw_softc *);
 static voidurtw_free_data_list(struct urtw_softc *,
struct urtw_data data[], int, int);
+static usb_error_t urtw_set_macaddr(struct urtw_softc *, const uint8_t *);
 static usb_error_t urtw_adapter_start(struct urtw_softc *);
 static usb_error_t urtw_adapter_start_b(struct urtw_softc *);
 static usb_error_t urtw_set_mode(struct urtw_softc *, uint32_t);
@@ -1179,9 +1180,23 @@ fail:
 }
 
 static usb_error_t
+urtw_set_macaddr(struct urtw_softc *sc, const uint8_t *macaddr)
+{
+   usb_error_t error;
+
+   urtw_write32_m(sc, URTW_MAC0, ((const uint32_t *)macaddr)[0]);
+   urtw_write16_m(sc, URTW_MAC4, ((const uint32_t *)macaddr)[1] & 0x);
+
+fail:
+   return (error);
+}
+
+static usb_error_t
 urtw_adapter_start(struct urtw_softc *sc)
 {
struct ieee80211com *ic = >sc_ic;
+   struct ieee80211vap *vap = TAILQ_FIRST(>ic_vaps);
+   const uint8_t *macaddr;
usb_error_t error;
 
error = urtw_reset(sc);
@@ -1201,8 +1216,11 @@ urtw_adapter_start(struct urtw_softc *sc)
if (error)
goto fail;
/* applying MAC address again.  */
-   urtw_write32_m(sc, URTW_MAC0, ((uint32_t *)ic->ic_macaddr)[0]);
-   urtw_write16_m(sc, URTW_MAC4, ((uint32_t *)ic->ic_macaddr)[1] & 0x);
+   macaddr = vap ? vap->iv_myaddr : ic->ic_macaddr;
+   urtw_set_macaddr(sc, macaddr);
+   if (error)
+   goto fail;
+
error = urtw_set_mode(sc, URTW_EPROM_CMD_NORMAL);
if (error)
goto fail;
@@ -3185,6 +3203,8 @@ static usb_error_t
 urtw_8225v2b_rf_init(struct urtw_softc *sc)
 {
struct ieee80211com *ic = >sc_ic;
+   struct ieee80211vap *vap = TAILQ_FIRST(>ic_vaps);
+   const uint8_t *macaddr;
unsigned int i;
uint8_t data8;
usb_error_t error;
@@ -3232,8 +3252,10 @@ urtw_8225v2b_rf_init(struct urtw_softc *sc)
urtw_write8_m(sc, URTW_CONFIG1, data8);
 
/* applying MAC address again.  */
-   urtw_write32_m(sc, URTW_MAC0, ((uint32_t *)ic->ic_macaddr)[0]);
-   urtw_write16_m(sc, URTW_MAC4, ((uint32_t *)ic->ic_macaddr)[1] & 

svn commit: r346073 - in head/sys/dev: iwi otus usb/wlan

2019-04-10 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Apr 10 08:17:56 2019
New Revision: 346073
URL: https://svnweb.freebsd.org/changeset/base/346073

Log:
  urtw(4), otus(4), iwi(4): allow to set non-default MAC address via ifconfig(8)
  
  Tested with Netgear WG111 v3 (RTL8187B, urtw(4)), STA mode.
  
  MFC after:1 week

Modified:
  head/sys/dev/iwi/if_iwi.c
  head/sys/dev/otus/if_otus.c
  head/sys/dev/usb/wlan/if_urtw.c

Modified: head/sys/dev/iwi/if_iwi.c
==
--- head/sys/dev/iwi/if_iwi.c   Wed Apr 10 07:51:13 2019(r346072)
+++ head/sys/dev/iwi/if_iwi.c   Wed Apr 10 08:17:56 2019(r346073)
@@ -2576,15 +2576,18 @@ static int
 iwi_config(struct iwi_softc *sc)
 {
struct ieee80211com *ic = >sc_ic;
+   struct ieee80211vap *vap = TAILQ_FIRST(>ic_vaps);
struct iwi_configuration config;
struct iwi_txpower power;
+   uint8_t *macaddr;
uint32_t data;
int error, i;
 
IWI_LOCK_ASSERT(sc);
 
-   DPRINTF(("Setting MAC address to %6D\n", ic->ic_macaddr, ":"));
-   error = iwi_cmd(sc, IWI_CMD_SET_MAC_ADDRESS, ic->ic_macaddr,
+   macaddr = vap ? vap->iv_myaddr : ic->ic_macaddr;
+   DPRINTF(("Setting MAC address to %6D\n", macaddr, ":"));
+   error = iwi_cmd(sc, IWI_CMD_SET_MAC_ADDRESS, macaddr,
IEEE80211_ADDR_LEN);
if (error != 0)
return error;

Modified: head/sys/dev/otus/if_otus.c
==
--- head/sys/dev/otus/if_otus.c Wed Apr 10 07:51:13 2019(r346072)
+++ head/sys/dev/otus/if_otus.c Wed Apr 10 08:17:56 2019(r346073)
@@ -3108,7 +3108,7 @@ otus_set_operating_mode(struct otus_softc *sc)
 */
IEEE80211_ADDR_COPY(bssid, zero_macaddr);
vap = TAILQ_FIRST(>ic_vaps);
-   macaddr = ic->ic_macaddr;
+   macaddr = vap ? vap->iv_myaddr : ic->ic_macaddr;
 
switch (ic->ic_opmode) {
case IEEE80211_M_STA:

Modified: head/sys/dev/usb/wlan/if_urtw.c
==
--- head/sys/dev/usb/wlan/if_urtw.c Wed Apr 10 07:51:13 2019
(r346072)
+++ head/sys/dev/usb/wlan/if_urtw.c Wed Apr 10 08:17:56 2019
(r346073)
@@ -752,6 +752,7 @@ static void urtw_free_tx_data_list(struct 
urtw_softc 
 static voidurtw_free_rx_data_list(struct urtw_softc *);
 static voidurtw_free_data_list(struct urtw_softc *,
struct urtw_data data[], int, int);
+static usb_error_t urtw_set_macaddr(struct urtw_softc *, const uint8_t *);
 static usb_error_t urtw_adapter_start(struct urtw_softc *);
 static usb_error_t urtw_adapter_start_b(struct urtw_softc *);
 static usb_error_t urtw_set_mode(struct urtw_softc *, uint32_t);
@@ -1187,9 +1188,23 @@ fail:
 }
 
 static usb_error_t
+urtw_set_macaddr(struct urtw_softc *sc, const uint8_t *macaddr)
+{
+   usb_error_t error;
+
+   urtw_write32_m(sc, URTW_MAC0, ((const uint32_t *)macaddr)[0]);
+   urtw_write16_m(sc, URTW_MAC4, ((const uint32_t *)macaddr)[1] & 0x);
+
+fail:
+   return (error);
+}
+
+static usb_error_t
 urtw_adapter_start(struct urtw_softc *sc)
 {
struct ieee80211com *ic = >sc_ic;
+   struct ieee80211vap *vap = TAILQ_FIRST(>ic_vaps);
+   const uint8_t *macaddr;
usb_error_t error;
 
error = urtw_reset(sc);
@@ -1209,8 +1224,11 @@ urtw_adapter_start(struct urtw_softc *sc)
if (error)
goto fail;
/* applying MAC address again.  */
-   urtw_write32_m(sc, URTW_MAC0, ((uint32_t *)ic->ic_macaddr)[0]);
-   urtw_write16_m(sc, URTW_MAC4, ((uint32_t *)ic->ic_macaddr)[1] & 0x);
+   macaddr = vap ? vap->iv_myaddr : ic->ic_macaddr;
+   urtw_set_macaddr(sc, macaddr);
+   if (error)
+   goto fail;
+
error = urtw_set_mode(sc, URTW_EPROM_CMD_NORMAL);
if (error)
goto fail;
@@ -3180,6 +3198,8 @@ static usb_error_t
 urtw_8225v2b_rf_init(struct urtw_softc *sc)
 {
struct ieee80211com *ic = >sc_ic;
+   struct ieee80211vap *vap = TAILQ_FIRST(>ic_vaps);
+   const uint8_t *macaddr;
unsigned int i;
uint8_t data8;
usb_error_t error;
@@ -3227,8 +3247,10 @@ urtw_8225v2b_rf_init(struct urtw_softc *sc)
urtw_write8_m(sc, URTW_CONFIG1, data8);
 
/* applying MAC address again.  */
-   urtw_write32_m(sc, URTW_MAC0, ((uint32_t *)ic->ic_macaddr)[0]);
-   urtw_write16_m(sc, URTW_MAC4, ((uint32_t *)ic->ic_macaddr)[1] & 0x);
+   macaddr = vap ? vap->iv_myaddr : ic->ic_macaddr;
+   error = urtw_set_macaddr(sc, macaddr);
+   if (error)
+   goto fail;
 
error = urtw_set_mode(sc, URTW_EPROM_CMD_NORMAL);
if (error)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all

svn commit: r346006 - 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:26:45 2019
New Revision: 346006
URL: https://svnweb.freebsd.org/changeset/base/346006

Log:
  MFC r345754:
  run(4): properly set F_DATAPAD radiotap flag if frame has padding between
  frame header and data.
  
  This will fix 'Mysterious OLPC stuff' for received frames and wrong
  CCMP / TKIP / data decoding for transmitted frames in net/wireshark
  dissector.
  
  While here, drop unneeded comment - net80211 handles padding requirements
  for Tx & Rx without driver adjustment.
  
  Was tested with D-Link DWA-140 rev B3, STA mode.

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 13:11:40 2019
(r346005)
+++ stable/11/sys/dev/usb/wlan/if_run.c Sun Apr  7 13:26:45 2019
(r346006)
@@ -2783,10 +2783,6 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uin
}
 
if (flags & RT2860_RX_L2PAD) {
-   /*
-* XXX OpenBSD removes padding between header
-* and payload here...
-*/
DPRINTFN(8, "received RT2860_RX_L2PAD frame\n");
len += 2;
}
@@ -2826,6 +2822,8 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uin
uint16_t phy;
 
tap->wr_flags = 0;
+   if (flags & RT2860_RX_L2PAD)
+   tap->wr_flags |= IEEE80211_RADIOTAP_F_DATAPAD;
tap->wr_antsignal = rssi;
tap->wr_antenna = ant;
tap->wr_dbm_antsignal = run_rssi2dbm(sc, rssi, ant);
@@ -3085,14 +3083,23 @@ tr_setup:
 
vap = data->ni->ni_vap;
if (ieee80211_radiotap_active_vap(vap)) {
+   const struct ieee80211_frame *wh;
struct run_tx_radiotap_header *tap = >sc_txtap;
struct rt2860_txwi *txwi = 
(struct rt2860_txwi *)(>desc + sizeof(struct 
rt2870_txd));
+   int has_l2pad;
+
+   wh = mtod(m, struct ieee80211_frame *);
+   has_l2pad = IEEE80211_HAS_ADDR4(wh) !=
+   IEEE80211_QOS_HAS_SEQ(wh);
+
tap->wt_flags = 0;
tap->wt_rate = rt2860_rates[data->ridx].rate;
tap->wt_hwqueue = index;
if (le16toh(txwi->phy) & RT2860_PHY_SHPRE)
tap->wt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE;
+   if (has_l2pad)
+   tap->wt_flags |= IEEE80211_RADIOTAP_F_DATAPAD;
 
ieee80211_radiotap_tx(vap, m);
}
___
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: r346006 - 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:26:45 2019
New Revision: 346006
URL: https://svnweb.freebsd.org/changeset/base/346006

Log:
  MFC r345754:
  run(4): properly set F_DATAPAD radiotap flag if frame has padding between
  frame header and data.
  
  This will fix 'Mysterious OLPC stuff' for received frames and wrong
  CCMP / TKIP / data decoding for transmitted frames in net/wireshark
  dissector.
  
  While here, drop unneeded comment - net80211 handles padding requirements
  for Tx & Rx without driver adjustment.
  
  Was tested with D-Link DWA-140 rev B3, STA mode.

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 13:11:40 2019
(r346005)
+++ stable/12/sys/dev/usb/wlan/if_run.c Sun Apr  7 13:26:45 2019
(r346006)
@@ -2851,10 +2851,6 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uin
}
 
if (flags & RT2860_RX_L2PAD) {
-   /*
-* XXX OpenBSD removes padding between header
-* and payload here...
-*/
RUN_DPRINTF(sc, RUN_DEBUG_RECV,
"received RT2860_RX_L2PAD frame\n");
len += 2;
@@ -2896,6 +2892,8 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uin
uint16_t phy;
 
tap->wr_flags = 0;
+   if (flags & RT2860_RX_L2PAD)
+   tap->wr_flags |= IEEE80211_RADIOTAP_F_DATAPAD;
tap->wr_antsignal = rssi;
tap->wr_antenna = ant;
tap->wr_dbm_antsignal = run_rssi2dbm(sc, rssi, ant);
@@ -3162,14 +3160,23 @@ tr_setup:
 
vap = data->ni->ni_vap;
if (ieee80211_radiotap_active_vap(vap)) {
+   const struct ieee80211_frame *wh;
struct run_tx_radiotap_header *tap = >sc_txtap;
struct rt2860_txwi *txwi = 
(struct rt2860_txwi *)(>desc + sizeof(struct 
rt2870_txd));
+   int has_l2pad;
+
+   wh = mtod(m, struct ieee80211_frame *);
+   has_l2pad = IEEE80211_HAS_ADDR4(wh) !=
+   IEEE80211_QOS_HAS_SEQ(wh);
+
tap->wt_flags = 0;
tap->wt_rate = rt2860_rates[data->ridx].rate;
tap->wt_hwqueue = index;
if (le16toh(txwi->phy) & RT2860_PHY_SHPRE)
tap->wt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE;
+   if (has_l2pad)
+   tap->wt_flags |= IEEE80211_RADIOTAP_F_DATAPAD;
 
ieee80211_radiotap_tx(vap, m);
}
___
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: r346005 - 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:11:40 2019
New Revision: 346005
URL: https://svnweb.freebsd.org/changeset/base/346005

Log:
  MFC r345751:
  uath(4), urtw(4): restart driver if device does not respond after Tx request

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

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

Modified: stable/12/sys/dev/usb/wlan/if_uath.c
==
--- stable/12/sys/dev/usb/wlan/if_uath.cSun Apr  7 13:04:25 2019
(r346004)
+++ stable/12/sys/dev/usb/wlan/if_uath.cSun Apr  7 13:11:40 2019
(r346005)
@@ -1276,8 +1276,8 @@ uath_watchdog(void *arg)
if (sc->sc_tx_timer > 0) {
if (--sc->sc_tx_timer == 0) {
device_printf(sc->sc_dev, "device timeout\n");
-   /*uath_init(sc); XXX needs a process context! */
counter_u64_add(ic->ic_oerrors, 1);
+   ieee80211_restart_all(ic);
return;
}
callout_reset(>watchdog_ch, hz, uath_watchdog, sc);

Modified: stable/12/sys/dev/usb/wlan/if_urtw.c
==
--- stable/12/sys/dev/usb/wlan/if_urtw.cSun Apr  7 13:04:25 2019
(r346004)
+++ stable/12/sys/dev/usb/wlan/if_urtw.cSun Apr  7 13:11:40 2019
(r346005)
@@ -1891,11 +1891,13 @@ static void
 urtw_watchdog(void *arg)
 {
struct urtw_softc *sc = arg;
+   struct ieee80211com *ic = >sc_ic;
 
if (sc->sc_txtimer > 0) {
if (--sc->sc_txtimer == 0) {
device_printf(sc->sc_dev, "device timeout\n");
-   counter_u64_add(sc->sc_ic.ic_oerrors, 1);
+   counter_u64_add(ic->ic_oerrors, 1);
+   ieee80211_restart_all(ic);
return;
}
callout_reset(>sc_watchdog_ch, hz, urtw_watchdog, sc);
___
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: r346005 - 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:11:40 2019
New Revision: 346005
URL: https://svnweb.freebsd.org/changeset/base/346005

Log:
  MFC r345751:
  uath(4), urtw(4): restart driver if device does not respond after Tx request

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

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

Modified: stable/11/sys/dev/usb/wlan/if_uath.c
==
--- stable/11/sys/dev/usb/wlan/if_uath.cSun Apr  7 13:04:25 2019
(r346004)
+++ stable/11/sys/dev/usb/wlan/if_uath.cSun Apr  7 13:11:40 2019
(r346005)
@@ -1271,8 +1271,8 @@ uath_watchdog(void *arg)
if (sc->sc_tx_timer > 0) {
if (--sc->sc_tx_timer == 0) {
device_printf(sc->sc_dev, "device timeout\n");
-   /*uath_init(sc); XXX needs a process context! */
counter_u64_add(ic->ic_oerrors, 1);
+   ieee80211_restart_all(ic);
return;
}
callout_reset(>watchdog_ch, hz, uath_watchdog, sc);

Modified: stable/11/sys/dev/usb/wlan/if_urtw.c
==
--- stable/11/sys/dev/usb/wlan/if_urtw.cSun Apr  7 13:04:25 2019
(r346004)
+++ stable/11/sys/dev/usb/wlan/if_urtw.cSun Apr  7 13:11:40 2019
(r346005)
@@ -1883,11 +1883,13 @@ static void
 urtw_watchdog(void *arg)
 {
struct urtw_softc *sc = arg;
+   struct ieee80211com *ic = >sc_ic;
 
if (sc->sc_txtimer > 0) {
if (--sc->sc_txtimer == 0) {
device_printf(sc->sc_dev, "device timeout\n");
-   counter_u64_add(sc->sc_ic.ic_oerrors, 1);
+   counter_u64_add(ic->ic_oerrors, 1);
+   ieee80211_restart_all(ic);
return;
}
callout_reset(>sc_watchdog_ch, hz, urtw_watchdog, sc);
___
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"


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

2019-04-07 Thread Andriy Voskoboinyk
Author: avos
Date: Sun Apr  7 12:57:38 2019
New Revision: 346003
URL: https://svnweb.freebsd.org/changeset/base/346003

Log:
  MFC r345729:
  urtw(4): export TSF timestamp for received frames via radiotap
  
  Was tested with Netgear WG111 v3 (RTL8187B), STA mode.

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

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

Modified: stable/11/sys/dev/usb/wlan/if_urtw.c
==
--- stable/11/sys/dev/usb/wlan/if_urtw.cSun Apr  7 12:20:17 2019
(r346002)
+++ stable/11/sys/dev/usb/wlan/if_urtw.cSun Apr  7 12:57:38 2019
(r346003)
@@ -3937,6 +3937,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
struct urtw_softc *sc = data->sc;
struct ieee80211com *ic = >sc_ic;
uint8_t noise = 0, rate;
+   uint64_t mactime;
 
usbd_xfer_status(xfer, , NULL, NULL, NULL);
 
@@ -3956,6 +3957,9 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
/* XXX correct? */
rssi = rx->rssi & URTW_RX_RSSI_MASK;
noise = rx->noise;
+
+   if (ieee80211_radiotap_active(ic))
+   mactime = rx->mactime;
} else {
struct urtw_8187l_rxhdr *rx;
 
@@ -3972,6 +3976,9 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
/* XXX correct? */
rssi = rx->rssi & URTW_RX_8187L_RSSI_MASK;
noise = rx->noise;
+
+   if (ieee80211_radiotap_active(ic))
+   mactime = rx->mactime;
}
 
if (flen < IEEE80211_ACK_LEN)
@@ -3991,6 +3998,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
if (ieee80211_radiotap_active(ic)) {
struct urtw_rx_radiotap_header *tap = >sc_rxtap;
 
+   tap->wr_tsf = mactime;
tap->wr_flags = 0;
tap->wr_dbm_antsignal = (int8_t)rssi;
}

Modified: stable/11/sys/dev/usb/wlan/if_urtwvar.h
==
--- stable/11/sys/dev/usb/wlan/if_urtwvar.h Sun Apr  7 12:20:17 2019
(r346002)
+++ stable/11/sys/dev/usb/wlan/if_urtwvar.h Sun Apr  7 12:57:38 2019
(r346003)
@@ -55,6 +55,7 @@ typedef STAILQ_HEAD(, urtw_data) urtw_datahead;
 
 struct urtw_rx_radiotap_header {
struct ieee80211_radiotap_header wr_ihdr;
+   uint64_twr_tsf;
uint8_t wr_flags;
uint8_t wr_pad;
uint16_twr_chan_freq;
@@ -63,7 +64,8 @@ struct urtw_rx_radiotap_header {
 } __packed __aligned(8);
 
 #define URTW_RX_RADIOTAP_PRESENT   \
-   ((1 << IEEE80211_RADIOTAP_FLAGS) |  \
+   ((1 << IEEE80211_RADIOTAP_TSFT) |   \
+(1 << IEEE80211_RADIOTAP_FLAGS) |  \
 (1 << IEEE80211_RADIOTAP_CHANNEL) |\
 (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL))
 
___
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: r346003 - in stable: 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan

2019-04-07 Thread Andriy Voskoboinyk
Author: avos
Date: Sun Apr  7 12:57:38 2019
New Revision: 346003
URL: https://svnweb.freebsd.org/changeset/base/346003

Log:
  MFC r345729:
  urtw(4): export TSF timestamp for received frames via radiotap
  
  Was tested with Netgear WG111 v3 (RTL8187B), STA mode.

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

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

Modified: stable/12/sys/dev/usb/wlan/if_urtw.c
==
--- stable/12/sys/dev/usb/wlan/if_urtw.cSun Apr  7 12:20:17 2019
(r346002)
+++ stable/12/sys/dev/usb/wlan/if_urtw.cSun Apr  7 12:57:38 2019
(r346003)
@@ -3932,6 +3932,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
struct urtw_softc *sc = data->sc;
struct ieee80211com *ic = >sc_ic;
uint8_t noise = 0, rate;
+   uint64_t mactime;
 
usbd_xfer_status(xfer, , NULL, NULL, NULL);
 
@@ -3951,6 +3952,9 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
/* XXX correct? */
rssi = rx->rssi & URTW_RX_RSSI_MASK;
noise = rx->noise;
+
+   if (ieee80211_radiotap_active(ic))
+   mactime = rx->mactime;
} else {
struct urtw_8187l_rxhdr *rx;
 
@@ -3967,6 +3971,9 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
/* XXX correct? */
rssi = rx->rssi & URTW_RX_8187L_RSSI_MASK;
noise = rx->noise;
+
+   if (ieee80211_radiotap_active(ic))
+   mactime = rx->mactime;
}
 
if (flen < IEEE80211_ACK_LEN)
@@ -3986,6 +3993,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
if (ieee80211_radiotap_active(ic)) {
struct urtw_rx_radiotap_header *tap = >sc_rxtap;
 
+   tap->wr_tsf = mactime;
tap->wr_flags = 0;
tap->wr_dbm_antsignal = (int8_t)rssi;
}

Modified: stable/12/sys/dev/usb/wlan/if_urtwvar.h
==
--- stable/12/sys/dev/usb/wlan/if_urtwvar.h Sun Apr  7 12:20:17 2019
(r346002)
+++ stable/12/sys/dev/usb/wlan/if_urtwvar.h Sun Apr  7 12:57:38 2019
(r346003)
@@ -55,6 +55,7 @@ typedef STAILQ_HEAD(, urtw_data) urtw_datahead;
 
 struct urtw_rx_radiotap_header {
struct ieee80211_radiotap_header wr_ihdr;
+   uint64_twr_tsf;
uint8_t wr_flags;
uint8_t wr_pad;
uint16_twr_chan_freq;
@@ -63,7 +64,8 @@ struct urtw_rx_radiotap_header {
 } __packed __aligned(8);
 
 #define URTW_RX_RADIOTAP_PRESENT   \
-   ((1 << IEEE80211_RADIOTAP_FLAGS) |  \
+   ((1 << IEEE80211_RADIOTAP_TSFT) |   \
+(1 << IEEE80211_RADIOTAP_FLAGS) |  \
 (1 << IEEE80211_RADIOTAP_CHANNEL) |\
 (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL))
 
___
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: r345761 - in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211

2019-04-01 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Apr  1 07:54:27 2019
New Revision: 345761
URL: https://svnweb.freebsd.org/changeset/base/345761

Log:
  MFC r345252:
  net80211: correct check for SMPS node flags updates
  
  Update node flags when driver supports SMPS, not when it is disabled or
  in dynamic mode ((iv_htcaps & HTCAP_SMPS) != 0).
  
  Was checked with RTL8188EE (1T1R), STA mode - 'smps' word should disappear
  from 'ifconfig wlan0' output.

Modified:
  stable/12/sys/net80211/ieee80211_ht.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/net80211/ieee80211_ht.c
  stable/11/sys/net80211/ieee80211_ht.c
Directory Properties:
  stable/10/   (props changed)
  stable/11/   (props changed)

Modified: stable/12/sys/net80211/ieee80211_ht.c
==
--- stable/12/sys/net80211/ieee80211_ht.c   Mon Apr  1 07:46:41 2019
(r345760)
+++ stable/12/sys/net80211/ieee80211_ht.c   Mon Apr  1 07:54:27 2019
(r345761)
@@ -1727,7 +1727,7 @@ ieee80211_ht_updateparams(struct ieee80211_node *ni,
const struct ieee80211_ie_htinfo *htinfo;
 
ieee80211_parse_htcap(ni, htcapie);
-   if (vap->iv_htcaps & IEEE80211_HTCAP_SMPS)
+   if (vap->iv_htcaps & IEEE80211_HTC_SMPS)
htcap_update_mimo_ps(ni);
htcap_update_shortgi(ni);
htcap_update_ldpc(ni);
@@ -1880,7 +1880,7 @@ ieee80211_ht_updatehtcap(struct ieee80211_node *ni, co
struct ieee80211vap *vap = ni->ni_vap;
 
ieee80211_parse_htcap(ni, htcapie);
-   if (vap->iv_htcaps & IEEE80211_HTCAP_SMPS)
+   if (vap->iv_htcaps & IEEE80211_HTC_SMPS)
htcap_update_mimo_ps(ni);
htcap_update_shortgi(ni);
htcap_update_ldpc(ni);
___
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: r345761 - in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211

2019-04-01 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Apr  1 07:54:27 2019
New Revision: 345761
URL: https://svnweb.freebsd.org/changeset/base/345761

Log:
  MFC r345252:
  net80211: correct check for SMPS node flags updates
  
  Update node flags when driver supports SMPS, not when it is disabled or
  in dynamic mode ((iv_htcaps & HTCAP_SMPS) != 0).
  
  Was checked with RTL8188EE (1T1R), STA mode - 'smps' word should disappear
  from 'ifconfig wlan0' output.

Modified:
  stable/11/sys/net80211/ieee80211_ht.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/net80211/ieee80211_ht.c
  stable/12/sys/net80211/ieee80211_ht.c
Directory Properties:
  stable/10/   (props changed)
  stable/12/   (props changed)

Modified: stable/11/sys/net80211/ieee80211_ht.c
==
--- stable/11/sys/net80211/ieee80211_ht.c   Mon Apr  1 07:46:41 2019
(r345760)
+++ stable/11/sys/net80211/ieee80211_ht.c   Mon Apr  1 07:54:27 2019
(r345761)
@@ -1567,7 +1567,7 @@ ieee80211_ht_updateparams(struct ieee80211_node *ni,
int ret = 0;
 
ieee80211_parse_htcap(ni, htcapie);
-   if (vap->iv_htcaps & IEEE80211_HTCAP_SMPS)
+   if (vap->iv_htcaps & IEEE80211_HTC_SMPS)
htcap_update_mimo_ps(ni);
htcap_update_shortgi(ni);
 
@@ -1609,7 +1609,7 @@ ieee80211_ht_updatehtcap(struct ieee80211_node *ni, co
int htflags;
 
ieee80211_parse_htcap(ni, htcapie);
-   if (vap->iv_htcaps & IEEE80211_HTCAP_SMPS)
+   if (vap->iv_htcaps & IEEE80211_HTC_SMPS)
htcap_update_mimo_ps(ni);
htcap_update_shortgi(ni);
 
___
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: r345761 - in stable: 10/sys/net80211 11/sys/net80211 12/sys/net80211

2019-04-01 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Apr  1 07:54:27 2019
New Revision: 345761
URL: https://svnweb.freebsd.org/changeset/base/345761

Log:
  MFC r345252:
  net80211: correct check for SMPS node flags updates
  
  Update node flags when driver supports SMPS, not when it is disabled or
  in dynamic mode ((iv_htcaps & HTCAP_SMPS) != 0).
  
  Was checked with RTL8188EE (1T1R), STA mode - 'smps' word should disappear
  from 'ifconfig wlan0' output.

Modified:
  stable/10/sys/net80211/ieee80211_ht.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/net80211/ieee80211_ht.c
  stable/12/sys/net80211/ieee80211_ht.c
Directory Properties:
  stable/11/   (props changed)
  stable/12/   (props changed)

Modified: stable/10/sys/net80211/ieee80211_ht.c
==
--- stable/10/sys/net80211/ieee80211_ht.c   Mon Apr  1 07:46:41 2019
(r345760)
+++ stable/10/sys/net80211/ieee80211_ht.c   Mon Apr  1 07:54:27 2019
(r345761)
@@ -1542,7 +1542,7 @@ ieee80211_ht_updateparams(struct ieee80211_node *ni,
int ret = 0;
 
ieee80211_parse_htcap(ni, htcapie);
-   if (vap->iv_htcaps & IEEE80211_HTCAP_SMPS)
+   if (vap->iv_htcaps & IEEE80211_HTC_SMPS)
htcap_update_mimo_ps(ni);
htcap_update_shortgi(ni);
 
@@ -1584,7 +1584,7 @@ ieee80211_ht_updatehtcap(struct ieee80211_node *ni, co
int htflags;
 
ieee80211_parse_htcap(ni, htcapie);
-   if (vap->iv_htcaps & IEEE80211_HTCAP_SMPS)
+   if (vap->iv_htcaps & IEEE80211_HTC_SMPS)
htcap_update_mimo_ps(ni);
htcap_update_shortgi(ni);
 
___
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: r345752 - in stable: 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan

2019-03-31 Thread Andriy Voskoboinyk
Author: avos
Date: Sun Mar 31 11:31:01 2019
New Revision: 345752
URL: https://svnweb.freebsd.org/changeset/base/345752

Log:
  MFC r345493:
  run(4): merge some common TSF-related code into run_disable_tsf()
  
  No functional change intended.

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 Mar 31 09:52:36 2019
(r345751)
+++ stable/12/sys/dev/usb/wlan/if_run.c Sun Mar 31 11:31:01 2019
(r345752)
@@ -464,6 +464,7 @@ static void run_usb_timeout_cb(void *);
 static voidrun_reset_livelock(struct run_softc *);
 static voidrun_enable_tsf_sync(struct run_softc *);
 static voidrun_enable_tsf(struct run_softc *);
+static voidrun_disable_tsf(struct run_softc *);
 static voidrun_get_tsf(struct run_softc *, uint64_t *);
 static voidrun_enable_mrr(struct run_softc *);
 static voidrun_set_txpreamble(struct run_softc *);
@@ -2090,7 +2091,6 @@ run_newstate(struct ieee80211vap *vap, enum ieee80211_
struct run_vap *rvp = RUN_VAP(vap);
enum ieee80211_state ostate;
uint32_t sta[3];
-   uint32_t tmp;
uint8_t ratectl;
uint8_t restart_ratectl = 0;
uint8_t bid = 1 << rvp->rvp_id;
@@ -2123,12 +2123,8 @@ run_newstate(struct ieee80211vap *vap, enum ieee80211_
sc->runbmap &= ~bid;
 
/* abort TSF synchronization if there is no vap running */
-   if (--sc->running == 0) {
-   run_read(sc, RT2860_BCN_TIME_CFG, );
-   run_write(sc, RT2860_BCN_TIME_CFG,
-   tmp & ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN |
-   RT2860_TBTT_TIMER_EN));
-   }
+   if (--sc->running == 0)
+   run_disable_tsf(sc);
break;
 
case IEEE80211_S_RUN:
@@ -4863,15 +4859,11 @@ static void
 run_scan_start(struct ieee80211com *ic)
 {
struct run_softc *sc = ic->ic_softc;
-   uint32_t tmp;
 
RUN_LOCK(sc);
 
/* abort TSF synchronization */
-   run_read(sc, RT2860_BCN_TIME_CFG, );
-   run_write(sc, RT2860_BCN_TIME_CFG,
-   tmp & ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN |
-   RT2860_TBTT_TIMER_EN));
+   run_disable_tsf(sc);
run_set_bssid(sc, ieee80211broadcastaddr);
 
RUN_UNLOCK(sc);
@@ -5158,6 +5150,18 @@ run_enable_tsf(struct run_softc *sc)
 }
 
 static void
+run_disable_tsf(struct run_softc *sc)
+{
+   uint32_t tmp;
+
+   if (run_read(sc, RT2860_BCN_TIME_CFG, ) == 0) {
+   tmp &= ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN |
+   RT2860_TBTT_TIMER_EN);
+   run_write(sc, RT2860_BCN_TIME_CFG, tmp);
+   }
+}
+
+static void
 run_get_tsf(struct run_softc *sc, uint64_t *buf)
 {
run_read_region_1(sc, RT2860_TSF_TIMER_DW0, (uint8_t *)buf,
@@ -6108,10 +6112,7 @@ run_init_locked(struct run_softc *sc)
}
 
/* abort TSF synchronization */
-   run_read(sc, RT2860_BCN_TIME_CFG, );
-   tmp &= ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN |
-   RT2860_TBTT_TIMER_EN);
-   run_write(sc, RT2860_BCN_TIME_CFG, tmp);
+   run_disable_tsf(sc);
 
/* clear RX WCID search table */
run_set_region_4(sc, RT2860_WCID_ENTRY(0), 0, 512);
___
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: r345754 - head/sys/dev/usb/wlan

2019-03-31 Thread Andriy Voskoboinyk
Author: avos
Date: Sun Mar 31 14:18:02 2019
New Revision: 345754
URL: https://svnweb.freebsd.org/changeset/base/345754

Log:
  run(4): properly set F_DATAPAD radiotap flag if frame has padding between
  frame header and data.
  
  This will fix 'Mysterious OLPC stuff' for received frames and wrong
  CCMP / TKIP / data decoding for transmitted frames in net/wireshark
  dissector.
  
  While here, drop unneeded comment - net80211 handles padding requirements
  for Tx & Rx without driver adjustment.
  
  Tested with D-Link DWA-140 rev B3, STA mode.
  
  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 13:41:20 2019
(r345753)
+++ head/sys/dev/usb/wlan/if_run.c  Sun Mar 31 14:18:02 2019
(r345754)
@@ -2851,10 +2851,6 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uin
}
 
if (flags & RT2860_RX_L2PAD) {
-   /*
-* XXX OpenBSD removes padding between header
-* and payload here...
-*/
RUN_DPRINTF(sc, RUN_DEBUG_RECV,
"received RT2860_RX_L2PAD frame\n");
len += 2;
@@ -2896,6 +2892,8 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uin
uint16_t phy;
 
tap->wr_flags = 0;
+   if (flags & RT2860_RX_L2PAD)
+   tap->wr_flags |= IEEE80211_RADIOTAP_F_DATAPAD;
tap->wr_antsignal = rssi;
tap->wr_antenna = ant;
tap->wr_dbm_antsignal = run_rssi2dbm(sc, rssi, ant);
@@ -3162,14 +3160,23 @@ tr_setup:
 
vap = data->ni->ni_vap;
if (ieee80211_radiotap_active_vap(vap)) {
+   const struct ieee80211_frame *wh;
struct run_tx_radiotap_header *tap = >sc_txtap;
struct rt2860_txwi *txwi = 
(struct rt2860_txwi *)(>desc + sizeof(struct 
rt2870_txd));
+   int has_l2pad;
+
+   wh = mtod(m, struct ieee80211_frame *);
+   has_l2pad = IEEE80211_HAS_ADDR4(wh) !=
+   IEEE80211_QOS_HAS_SEQ(wh);
+
tap->wt_flags = 0;
tap->wt_rate = rt2860_rates[data->ridx].rate;
tap->wt_hwqueue = index;
if (le16toh(txwi->phy) & RT2860_PHY_SHPRE)
tap->wt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE;
+   if (has_l2pad)
+   tap->wt_flags |= IEEE80211_RADIOTAP_F_DATAPAD;
 
ieee80211_radiotap_tx(vap, m);
}
___
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: r345753 - head/sys/dev/usb/wlan

2019-03-31 Thread Andriy Voskoboinyk
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;
}
___
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: r345751 - head/sys/dev/usb/wlan

2019-03-31 Thread Andriy Voskoboinyk
Author: avos
Date: Sun Mar 31 09:52:36 2019
New Revision: 345751
URL: https://svnweb.freebsd.org/changeset/base/345751

Log:
  uath(4), urtw(4): restart driver if device does not respond after Tx request
  
  MFC after:1 week

Modified:
  head/sys/dev/usb/wlan/if_uath.c
  head/sys/dev/usb/wlan/if_urtw.c

Modified: head/sys/dev/usb/wlan/if_uath.c
==
--- head/sys/dev/usb/wlan/if_uath.c Sun Mar 31 06:21:32 2019
(r345750)
+++ head/sys/dev/usb/wlan/if_uath.c Sun Mar 31 09:52:36 2019
(r345751)
@@ -1276,8 +1276,8 @@ uath_watchdog(void *arg)
if (sc->sc_tx_timer > 0) {
if (--sc->sc_tx_timer == 0) {
device_printf(sc->sc_dev, "device timeout\n");
-   /*uath_init(sc); XXX needs a process context! */
counter_u64_add(ic->ic_oerrors, 1);
+   ieee80211_restart_all(ic);
return;
}
callout_reset(>watchdog_ch, hz, uath_watchdog, sc);

Modified: head/sys/dev/usb/wlan/if_urtw.c
==
--- head/sys/dev/usb/wlan/if_urtw.c Sun Mar 31 06:21:32 2019
(r345750)
+++ head/sys/dev/usb/wlan/if_urtw.c Sun Mar 31 09:52:36 2019
(r345751)
@@ -1891,11 +1891,13 @@ static void
 urtw_watchdog(void *arg)
 {
struct urtw_softc *sc = arg;
+   struct ieee80211com *ic = >sc_ic;
 
if (sc->sc_txtimer > 0) {
if (--sc->sc_txtimer == 0) {
device_printf(sc->sc_dev, "device timeout\n");
-   counter_u64_add(sc->sc_ic.ic_oerrors, 1);
+   counter_u64_add(ic->ic_oerrors, 1);
+   ieee80211_restart_all(ic);
return;
}
callout_reset(>sc_watchdog_ch, hz, urtw_watchdog, sc);
___
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: r345752 - in stable: 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan

2019-03-31 Thread Andriy Voskoboinyk
Author: avos
Date: Sun Mar 31 11:31:01 2019
New Revision: 345752
URL: https://svnweb.freebsd.org/changeset/base/345752

Log:
  MFC r345493:
  run(4): merge some common TSF-related code into run_disable_tsf()
  
  No functional change intended.

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 Mar 31 09:52:36 2019
(r345751)
+++ stable/11/sys/dev/usb/wlan/if_run.c Sun Mar 31 11:31:01 2019
(r345752)
@@ -431,6 +431,7 @@ static void run_usb_timeout_cb(void *);
 static voidrun_reset_livelock(struct run_softc *);
 static voidrun_enable_tsf_sync(struct run_softc *);
 static voidrun_enable_tsf(struct run_softc *);
+static voidrun_disable_tsf(struct run_softc *);
 static voidrun_get_tsf(struct run_softc *, uint64_t *);
 static voidrun_enable_mrr(struct run_softc *);
 static voidrun_set_txpreamble(struct run_softc *);
@@ -2042,7 +2043,6 @@ run_newstate(struct ieee80211vap *vap, enum ieee80211_
struct run_vap *rvp = RUN_VAP(vap);
enum ieee80211_state ostate;
uint32_t sta[3];
-   uint32_t tmp;
uint8_t ratectl;
uint8_t restart_ratectl = 0;
uint8_t bid = 1 << rvp->rvp_id;
@@ -2075,12 +2075,8 @@ run_newstate(struct ieee80211vap *vap, enum ieee80211_
sc->runbmap &= ~bid;
 
/* abort TSF synchronization if there is no vap running */
-   if (--sc->running == 0) {
-   run_read(sc, RT2860_BCN_TIME_CFG, );
-   run_write(sc, RT2860_BCN_TIME_CFG,
-   tmp & ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN |
-   RT2860_TBTT_TIMER_EN));
-   }
+   if (--sc->running == 0)
+   run_disable_tsf(sc);
break;
 
case IEEE80211_S_RUN:
@@ -4816,15 +4812,11 @@ static void
 run_scan_start(struct ieee80211com *ic)
 {
struct run_softc *sc = ic->ic_softc;
-   uint32_t tmp;
 
RUN_LOCK(sc);
 
/* abort TSF synchronization */
-   run_read(sc, RT2860_BCN_TIME_CFG, );
-   run_write(sc, RT2860_BCN_TIME_CFG,
-   tmp & ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN |
-   RT2860_TBTT_TIMER_EN));
+   run_disable_tsf(sc);
run_set_bssid(sc, ieee80211broadcastaddr);
 
RUN_UNLOCK(sc);
@@ -5107,6 +5099,18 @@ run_enable_tsf(struct run_softc *sc)
 }
 
 static void
+run_disable_tsf(struct run_softc *sc)
+{
+   uint32_t tmp;
+
+   if (run_read(sc, RT2860_BCN_TIME_CFG, ) == 0) {
+   tmp &= ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN |
+   RT2860_TBTT_TIMER_EN);
+   run_write(sc, RT2860_BCN_TIME_CFG, tmp);
+   }
+}
+
+static void
 run_get_tsf(struct run_softc *sc, uint64_t *buf)
 {
run_read_region_1(sc, RT2860_TSF_TIMER_DW0, (uint8_t *)buf,
@@ -6057,10 +6061,7 @@ run_init_locked(struct run_softc *sc)
}
 
/* abort TSF synchronization */
-   run_read(sc, RT2860_BCN_TIME_CFG, );
-   tmp &= ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN |
-   RT2860_TBTT_TIMER_EN);
-   run_write(sc, RT2860_BCN_TIME_CFG, tmp);
+   run_disable_tsf(sc);
 
/* clear RX WCID search table */
run_set_region_4(sc, RT2860_WCID_ENTRY(0), 0, 512);
___
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: r345729 - head/sys/dev/usb/wlan

2019-03-30 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Mar 30 09:24:06 2019
New Revision: 345729
URL: https://svnweb.freebsd.org/changeset/base/345729

Log:
  urtw(4): export TSF timestamp for received frames via radiotap
  
  Tested with Netgear WG111 v3 (RTL8187B), STA mode.
  
  MFC after:1 week

Modified:
  head/sys/dev/usb/wlan/if_urtw.c
  head/sys/dev/usb/wlan/if_urtwvar.h

Modified: head/sys/dev/usb/wlan/if_urtw.c
==
--- head/sys/dev/usb/wlan/if_urtw.c Sat Mar 30 07:29:20 2019
(r345728)
+++ head/sys/dev/usb/wlan/if_urtw.c Sat Mar 30 09:24:06 2019
(r345729)
@@ -3932,6 +3932,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
struct urtw_softc *sc = data->sc;
struct ieee80211com *ic = >sc_ic;
uint8_t noise = 0, rate;
+   uint64_t mactime;
 
usbd_xfer_status(xfer, , NULL, NULL, NULL);
 
@@ -3951,6 +3952,9 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
/* XXX correct? */
rssi = rx->rssi & URTW_RX_RSSI_MASK;
noise = rx->noise;
+
+   if (ieee80211_radiotap_active(ic))
+   mactime = rx->mactime;
} else {
struct urtw_8187l_rxhdr *rx;
 
@@ -3967,6 +3971,9 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
/* XXX correct? */
rssi = rx->rssi & URTW_RX_8187L_RSSI_MASK;
noise = rx->noise;
+
+   if (ieee80211_radiotap_active(ic))
+   mactime = rx->mactime;
}
 
if (flen < IEEE80211_ACK_LEN)
@@ -3986,6 +3993,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
if (ieee80211_radiotap_active(ic)) {
struct urtw_rx_radiotap_header *tap = >sc_rxtap;
 
+   tap->wr_tsf = mactime;
tap->wr_flags = 0;
tap->wr_dbm_antsignal = (int8_t)rssi;
}

Modified: head/sys/dev/usb/wlan/if_urtwvar.h
==
--- head/sys/dev/usb/wlan/if_urtwvar.h  Sat Mar 30 07:29:20 2019
(r345728)
+++ head/sys/dev/usb/wlan/if_urtwvar.h  Sat Mar 30 09:24:06 2019
(r345729)
@@ -55,6 +55,7 @@ typedef STAILQ_HEAD(, urtw_data) urtw_datahead;
 
 struct urtw_rx_radiotap_header {
struct ieee80211_radiotap_header wr_ihdr;
+   uint64_twr_tsf;
uint8_t wr_flags;
uint8_t wr_pad;
uint16_twr_chan_freq;
@@ -63,7 +64,8 @@ struct urtw_rx_radiotap_header {
 } __packed __aligned(8);
 
 #define URTW_RX_RADIOTAP_PRESENT   \
-   ((1 << IEEE80211_RADIOTAP_FLAGS) |  \
+   ((1 << IEEE80211_RADIOTAP_TSFT) |   \
+(1 << IEEE80211_RADIOTAP_FLAGS) |  \
 (1 << IEEE80211_RADIOTAP_CHANNEL) |\
 (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL))
 
___
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: r345636 - in stable/11: share/man/man9 sys/dev/ath sys/dev/bwi sys/dev/bwn sys/dev/ipw sys/dev/iwi sys/dev/iwm sys/dev/iwn sys/dev/malo sys/dev/mwl sys/dev/otus sys/dev/ral sys/dev/rtwn...

2019-03-28 Thread Andriy Voskoboinyk
Author: avos
Date: Thu Mar 28 09:50:25 2019
New Revision: 345636
URL: https://svnweb.freebsd.org/changeset/base/345636

Log:
  MFC r344990:
  Fix ieee80211_radiotap(9) usage in wireless drivers:
  
  - Alignment issues:
   * Add missing __packed attributes + padding across all drivers; in
  most places there was an assumption that padding will be always
  minimally suitable; in few places - e.g., in urtw(4) / rtwn(4) -
  padding was just missing.
   * Add __aligned(8) attribute for all Rx radiotap headers since they can
  contain 64-bit TSF timestamp; it cannot appear in Tx radiotap headers, so
  just drop the attribute here. Refresh ieee80211_radiotap(9) man page
  accordingly.
  
  - Since net80211 automatically updates channel frequency / flags in
  ieee80211_radiotap_chan_change() drop duplicate setup for these fields
  in drivers.

Modified:
  stable/11/share/man/man9/ieee80211_radiotap.9
  stable/11/sys/dev/ath/if_athioctl.h
  stable/11/sys/dev/bwi/if_bwi.c
  stable/11/sys/dev/bwi/if_bwivar.h
  stable/11/sys/dev/bwn/if_bwn.c
  stable/11/sys/dev/bwn/if_bwnvar.h
  stable/11/sys/dev/ipw/if_ipwvar.h
  stable/11/sys/dev/iwi/if_iwivar.h
  stable/11/sys/dev/iwm/if_iwmvar.h
  stable/11/sys/dev/iwn/if_iwn.c
  stable/11/sys/dev/iwn/if_iwnvar.h
  stable/11/sys/dev/malo/if_maloioctl.h
  stable/11/sys/dev/mwl/if_mwlioctl.h
  stable/11/sys/dev/otus/if_otus.c
  stable/11/sys/dev/otus/if_otusreg.h
  stable/11/sys/dev/ral/rt2560var.h
  stable/11/sys/dev/ral/rt2661var.h
  stable/11/sys/dev/ral/rt2860var.h
  stable/11/sys/dev/rtwn/if_rtwn.c
  stable/11/sys/dev/rtwn/if_rtwnreg.h
  stable/11/sys/dev/urtwn/if_urtwn.c
  stable/11/sys/dev/urtwn/if_urtwnvar.h
  stable/11/sys/dev/usb/wlan/if_rsu.c
  stable/11/sys/dev/usb/wlan/if_rsureg.h
  stable/11/sys/dev/usb/wlan/if_rumvar.h
  stable/11/sys/dev/usb/wlan/if_run.c
  stable/11/sys/dev/usb/wlan/if_runvar.h
  stable/11/sys/dev/usb/wlan/if_uathvar.h
  stable/11/sys/dev/usb/wlan/if_upgtvar.h
  stable/11/sys/dev/usb/wlan/if_uralvar.h
  stable/11/sys/dev/usb/wlan/if_urtw.c
  stable/11/sys/dev/usb/wlan/if_urtwvar.h
  stable/11/sys/dev/usb/wlan/if_zydreg.h
  stable/11/sys/dev/wi/if_wireg.h
  stable/11/sys/dev/wpi/if_wpivar.h
  stable/11/sys/dev/wtap/if_wtapioctl.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/man/man9/ieee80211_radiotap.9
==
--- stable/11/share/man/man9/ieee80211_radiotap.9   Thu Mar 28 09:18:22 
2019(r345635)
+++ stable/11/share/man/man9/ieee80211_radiotap.9   Thu Mar 28 09:50:25 
2019(r345636)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 4, 2009
+.Dd March 28, 2019
 .Dt IEEE80211_RADIOTAP 9
 .Os
 .Sh NAME
@@ -257,7 +257,7 @@ struct wi_rx_radiotap_header {
 uint16_t   wr_chan_flags;
 uint8_twr_antsignal;
 uint8_twr_antnoise;
-} __packed;
+} __packed __aligned(8);
 .Ed
 .Pp
 and transmit definitions for the Atheros driver:

Modified: stable/11/sys/dev/ath/if_athioctl.h
==
--- stable/11/sys/dev/ath/if_athioctl.h Thu Mar 28 09:18:22 2019
(r345635)
+++ stable/11/sys/dev/ath/if_athioctl.h Thu Mar 28 09:50:25 2019
(r345636)
@@ -371,7 +371,7 @@ struct ath_rx_radiotap_header {
 */
struct ath_radiotap_vendor_hdr wr_v;
 #endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */
-} __packed;
+} __packed __aligned(8);
 
 #define ATH_TX_RADIOTAP_PRESENT (  \
(1 << IEEE80211_RADIOTAP_FLAGS) | \

Modified: stable/11/sys/dev/bwi/if_bwi.c
==
--- stable/11/sys/dev/bwi/if_bwi.c  Thu Mar 28 09:18:22 2019
(r345635)
+++ stable/11/sys/dev/bwi/if_bwi.c  Thu Mar 28 09:50:25 2019
(r345636)
@@ -1727,15 +1727,6 @@ bwi_set_channel(struct ieee80211com *ic)
bwi_rf_set_chan(mac, ieee80211_chan2ieee(ic, c), 0);
 
sc->sc_rates = ieee80211_get_ratetable(c);
-
-   /*
-* Setup radio tap channel freq and flags
-*/
-   sc->sc_tx_th.wt_chan_freq = sc->sc_rx_th.wr_chan_freq =
-   htole16(c->ic_freq);
-   sc->sc_tx_th.wt_chan_flags = sc->sc_rx_th.wr_chan_flags =
-   htole16(c->ic_flags & 0x);
-
BWI_UNLOCK(sc);
 }
 

Modified: stable/11/sys/dev/bwi/if_bwivar.h
==
--- stable/11/sys/dev/bwi/if_bwivar.h   Thu Mar 28 09:18:22 2019
(r345635)
+++ stable/11/sys/dev/bwi/if_bwivar.h   Thu Mar 28 09:50:25 2019
(r345636)
@@ -511,7 +511,7 @@ struct bwi_tx_radiotap_hdr {
uint8_t wt_rate;
uint16_twt_chan_freq;
uint16_twt_chan_flags;
-};
+} __packed;
 
 #define BWI_RX_RADIOTAP_PRESENT\
((1 << IEEE80211_RADIOTAP_TSFT) |   \
@@ -531,7 +531,7 @@ struct 

svn commit: r345635 - in stable/11: share/man/man9 sys/dev/ath sys/dev/usb/wlan

2019-03-28 Thread Andriy Voskoboinyk
Author: avos
Date: Thu Mar 28 09:18:22 2019
New Revision: 345635
URL: https://svnweb.freebsd.org/changeset/base/345635

Log:
  MFC r306049:
  net80211: remove IEEE80211_RADIOTAP_TSFT field from transmit definitions.
  
  This field may be used for received frames only.

Modified:
  stable/11/share/man/man9/ieee80211_radiotap.9
  stable/11/sys/dev/ath/if_ath_tx.c
  stable/11/sys/dev/ath/if_athioctl.h
  stable/11/sys/dev/usb/wlan/if_rum.c
  stable/11/sys/dev/usb/wlan/if_rumvar.h
  stable/11/sys/dev/usb/wlan/if_run.c
  stable/11/sys/dev/usb/wlan/if_runvar.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/man/man9/ieee80211_radiotap.9
==
--- stable/11/share/man/man9/ieee80211_radiotap.9   Thu Mar 28 09:16:00 
2019(r345634)
+++ stable/11/share/man/man9/ieee80211_radiotap.9   Thu Mar 28 09:18:22 
2019(r345635)
@@ -263,7 +263,6 @@ struct wi_rx_radiotap_header {
 and transmit definitions for the Atheros driver:
 .Bd -literal -offset indent
 #define ATH_TX_RADIOTAP_PRESENT (   \\
-(1 << IEEE80211_RADIOTAP_TSFT)  | \\
 (1 << IEEE80211_RADIOTAP_FLAGS) | \\
 (1 << IEEE80211_RADIOTAP_RATE)  | \\
 (1 << IEEE80211_RADIOTAP_DBM_TX_POWER)  | \\
@@ -273,7 +272,6 @@ and transmit definitions for the Atheros driver:
 
 struct ath_tx_radiotap_header {
 struct ieee80211_radiotap_header wt_ihdr;
-uint64_t   wt_tsf;
 uint8_twt_flags;
 uint8_twt_rate;
 uint8_twt_txpower;

Modified: stable/11/sys/dev/ath/if_ath_tx.c
==
--- stable/11/sys/dev/ath/if_ath_tx.c   Thu Mar 28 09:16:00 2019
(r345634)
+++ stable/11/sys/dev/ath/if_ath_tx.c   Thu Mar 28 09:18:22 2019
(r345635)
@@ -1527,7 +1527,6 @@ ath_tx_normal_setup(struct ath_softc *sc, struct ieee8
 struct ath_buf *bf, struct mbuf *m0, struct ath_txq *txq)
 {
struct ieee80211vap *vap = ni->ni_vap;
-   struct ath_hal *ah = sc->sc_ah;
struct ieee80211com *ic = >sc_ic;
const struct chanAccParams *cap = >ic_wme.wme_chanParams;
int error, iswep, ismcast, isfrag, ismrr;
@@ -1783,9 +1782,6 @@ ath_tx_normal_setup(struct ath_softc *sc, struct ieee8
sc->sc_hwmap[rix].ieeerate, -1);
 
if (ieee80211_radiotap_active_vap(vap)) {
-   u_int64_t tsf = ath_hal_gettsf64(ah);
-
-   sc->sc_tx_th.wt_tsf = htole64(tsf);
sc->sc_tx_th.wt_flags = sc->sc_hwmap[rix].txflags;
if (iswep)
sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_WEP;
@@ -2066,7 +2062,6 @@ ath_tx_raw_start(struct ath_softc *sc, struct ieee8021
const struct ieee80211_bpf_params *params)
 {
struct ieee80211com *ic = >sc_ic;
-   struct ath_hal *ah = sc->sc_ah;
struct ieee80211vap *vap = ni->ni_vap;
int error, ismcast, ismrr;
int keyix, hdrlen, pktlen, try0, txantenna;
@@ -2201,9 +2196,6 @@ ath_tx_raw_start(struct ath_softc *sc, struct ieee8021
sc->sc_hwmap[rix].ieeerate, -1);
 
if (ieee80211_radiotap_active_vap(vap)) {
-   u_int64_t tsf = ath_hal_gettsf64(ah);
-
-   sc->sc_tx_th.wt_tsf = htole64(tsf);
sc->sc_tx_th.wt_flags = sc->sc_hwmap[rix].txflags;
if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED)
sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_WEP;

Modified: stable/11/sys/dev/ath/if_athioctl.h
==
--- stable/11/sys/dev/ath/if_athioctl.h Thu Mar 28 09:16:00 2019
(r345634)
+++ stable/11/sys/dev/ath/if_athioctl.h Thu Mar 28 09:18:22 2019
(r345635)
@@ -374,7 +374,6 @@ struct ath_rx_radiotap_header {
 } __packed;
 
 #define ATH_TX_RADIOTAP_PRESENT (  \
-   (1 << IEEE80211_RADIOTAP_TSFT)  | \
(1 << IEEE80211_RADIOTAP_FLAGS) | \
(1 << IEEE80211_RADIOTAP_RATE)  | \
(1 << IEEE80211_RADIOTAP_DBM_TX_POWER)  | \
@@ -384,7 +383,6 @@ struct ath_rx_radiotap_header {
 
 struct ath_tx_radiotap_header {
struct ieee80211_radiotap_header wt_ihdr;
-   u_int64_t   wt_tsf;
u_int8_twt_flags;
u_int8_twt_rate;
u_int8_twt_txpower;

Modified: stable/11/sys/dev/usb/wlan/if_rum.c
==
--- stable/11/sys/dev/usb/wlan/if_rum.c Thu Mar 28 09:16:00 2019
(r345634)
+++ stable/11/sys/dev/usb/wlan/if_rum.c Thu Mar 28 09:18:22 2019
(r345635)
@@ -1075,7 +1075,6 @@ tr_setup:
 
tap->wt_flags = 0;
tap->wt_rate = data->rate;
-   rum_get_tsf(sc, >wt_tsf);
 

svn commit: r345634 - in stable/12: share/man/man9 sys/dev/ath sys/dev/bwi sys/dev/bwn sys/dev/ipw sys/dev/iwi sys/dev/iwm sys/dev/iwn sys/dev/malo sys/dev/mwl sys/dev/otus sys/dev/ral sys/dev/rtwn...

2019-03-28 Thread Andriy Voskoboinyk
Author: avos
Date: Thu Mar 28 09:16:00 2019
New Revision: 345634
URL: https://svnweb.freebsd.org/changeset/base/345634

Log:
  MFC r344990:
  Fix ieee80211_radiotap(9) usage in wireless drivers:
  
  - Alignment issues:
   * Add missing __packed attributes + padding across all drivers; in
  most places there was an assumption that padding will be always
  minimally suitable; in few places - e.g., in urtw(4) / rtwn(4) -
  padding was just missing.
   * Add __aligned(8) attribute for all Rx radiotap headers since they can
  contain 64-bit TSF timestamp; it cannot appear in Tx radiotap headers, so
  just drop the attribute here. Refresh ieee80211_radiotap(9) man page
  accordingly.
  
  - Since net80211 automatically updates channel frequency / flags in
  ieee80211_radiotap_chan_change() drop duplicate setup for these fields
  in drivers.

Modified:
  stable/12/share/man/man9/ieee80211_radiotap.9
  stable/12/sys/dev/ath/if_athioctl.h
  stable/12/sys/dev/bwi/if_bwi.c
  stable/12/sys/dev/bwi/if_bwivar.h
  stable/12/sys/dev/bwn/if_bwn.c
  stable/12/sys/dev/bwn/if_bwnvar.h
  stable/12/sys/dev/ipw/if_ipwvar.h
  stable/12/sys/dev/iwi/if_iwivar.h
  stable/12/sys/dev/iwm/if_iwmvar.h
  stable/12/sys/dev/iwn/if_iwn.c
  stable/12/sys/dev/iwn/if_iwnvar.h
  stable/12/sys/dev/malo/if_maloioctl.h
  stable/12/sys/dev/mwl/if_mwlioctl.h
  stable/12/sys/dev/otus/if_otus.c
  stable/12/sys/dev/otus/if_otusreg.h
  stable/12/sys/dev/ral/rt2560var.h
  stable/12/sys/dev/ral/rt2661var.h
  stable/12/sys/dev/ral/rt2860var.h
  stable/12/sys/dev/rtwn/if_rtwn.c
  stable/12/sys/dev/rtwn/if_rtwnvar.h
  stable/12/sys/dev/usb/wlan/if_rsu.c
  stable/12/sys/dev/usb/wlan/if_rsureg.h
  stable/12/sys/dev/usb/wlan/if_rumvar.h
  stable/12/sys/dev/usb/wlan/if_run.c
  stable/12/sys/dev/usb/wlan/if_runvar.h
  stable/12/sys/dev/usb/wlan/if_uathvar.h
  stable/12/sys/dev/usb/wlan/if_upgtvar.h
  stable/12/sys/dev/usb/wlan/if_uralvar.h
  stable/12/sys/dev/usb/wlan/if_urtw.c
  stable/12/sys/dev/usb/wlan/if_urtwvar.h
  stable/12/sys/dev/usb/wlan/if_zydreg.h
  stable/12/sys/dev/wi/if_wireg.h
  stable/12/sys/dev/wpi/if_wpivar.h
  stable/12/sys/dev/wtap/if_wtapioctl.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/share/man/man9/ieee80211_radiotap.9
==
--- stable/12/share/man/man9/ieee80211_radiotap.9   Thu Mar 28 09:00:56 
2019(r345633)
+++ stable/12/share/man/man9/ieee80211_radiotap.9   Thu Mar 28 09:16:00 
2019(r345634)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 4, 2009
+.Dd March 11, 2019
 .Dt IEEE80211_RADIOTAP 9
 .Os
 .Sh NAME
@@ -257,7 +257,7 @@ struct wi_rx_radiotap_header {
 uint16_t   wr_chan_flags;
 uint8_twr_antsignal;
 uint8_twr_antnoise;
-} __packed;
+} __packed __aligned(8);
 .Ed
 .Pp
 and transmit definitions for the Atheros driver:

Modified: stable/12/sys/dev/ath/if_athioctl.h
==
--- stable/12/sys/dev/ath/if_athioctl.h Thu Mar 28 09:00:56 2019
(r345633)
+++ stable/12/sys/dev/ath/if_athioctl.h Thu Mar 28 09:16:00 2019
(r345634)
@@ -373,7 +373,7 @@ struct ath_rx_radiotap_header {
 */
struct ath_radiotap_vendor_hdr wr_v;
 #endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */
-} __packed;
+} __packed __aligned(8);
 
 #define ATH_TX_RADIOTAP_PRESENT (  \
(1 << IEEE80211_RADIOTAP_FLAGS) | \

Modified: stable/12/sys/dev/bwi/if_bwi.c
==
--- stable/12/sys/dev/bwi/if_bwi.c  Thu Mar 28 09:00:56 2019
(r345633)
+++ stable/12/sys/dev/bwi/if_bwi.c  Thu Mar 28 09:16:00 2019
(r345634)
@@ -1729,15 +1729,6 @@ bwi_set_channel(struct ieee80211com *ic)
bwi_rf_set_chan(mac, ieee80211_chan2ieee(ic, c), 0);
 
sc->sc_rates = ieee80211_get_ratetable(c);
-
-   /*
-* Setup radio tap channel freq and flags
-*/
-   sc->sc_tx_th.wt_chan_freq = sc->sc_rx_th.wr_chan_freq =
-   htole16(c->ic_freq);
-   sc->sc_tx_th.wt_chan_flags = sc->sc_rx_th.wr_chan_flags =
-   htole16(c->ic_flags & 0x);
-
BWI_UNLOCK(sc);
 }
 

Modified: stable/12/sys/dev/bwi/if_bwivar.h
==
--- stable/12/sys/dev/bwi/if_bwivar.h   Thu Mar 28 09:00:56 2019
(r345633)
+++ stable/12/sys/dev/bwi/if_bwivar.h   Thu Mar 28 09:16:00 2019
(r345634)
@@ -513,7 +513,7 @@ struct bwi_tx_radiotap_hdr {
uint8_t wt_rate;
uint16_twt_chan_freq;
uint16_twt_chan_flags;
-};
+} __packed;
 
 #define BWI_RX_RADIOTAP_PRESENT\
((1 << IEEE80211_RADIOTAP_TSFT) |   \
@@ -533,7 +533,7 @@ struct bwi_rx_radiotap_hdr {
int8_t  wr_antsignal;
int8_t

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

2019-03-27 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Mar 27 09:18:34 2019
New Revision: 345570
URL: https://svnweb.freebsd.org/changeset/base/345570

Log:
  MFC r344994:
  urtw(4): add promiscuous mode callback
  
  Also, pass control frames to the host while in MONITOR mode and / or
  when promiscuous mode is enabled.
  
  Was tested with Netgear WG111 v3 (RTL8187B), STA / MONITOR modes.

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

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

Modified: stable/12/sys/dev/usb/wlan/if_urtw.c
==
--- stable/12/sys/dev/usb/wlan/if_urtw.cWed Mar 27 08:55:59 2019
(r345569)
+++ stable/12/sys/dev/usb/wlan/if_urtw.cWed Mar 27 09:18:34 2019
(r345570)
@@ -670,6 +670,7 @@ static void urtw_scan_end(struct ieee80211com *);
 static voidurtw_getradiocaps(struct ieee80211com *, int, int *,
   struct ieee80211_channel[]);
 static voidurtw_set_channel(struct ieee80211com *);
+static voidurtw_update_promisc(struct ieee80211com *);
 static voidurtw_update_mcast(struct ieee80211com *);
 static int urtw_tx_start(struct urtw_softc *,
struct ieee80211_node *, struct mbuf *,
@@ -896,6 +897,7 @@ urtw_attach(device_t dev)
ic->ic_updateslot = urtw_updateslot;
ic->ic_vap_create = urtw_vap_create;
ic->ic_vap_delete = urtw_vap_delete;
+   ic->ic_update_promisc = urtw_update_promisc;
ic->ic_update_mcast = urtw_update_mcast;
ic->ic_parent = urtw_parent;
ic->ic_transmit = urtw_transmit;
@@ -1631,6 +1633,17 @@ fail:
 }
 
 static void
+urtw_update_promisc(struct ieee80211com *ic)
+{
+   struct urtw_softc *sc = ic->ic_softc;
+
+   URTW_LOCK(sc);
+   if (sc->sc_flags & URTW_RUNNING)
+   urtw_rx_setconf(sc);
+   URTW_UNLOCK(sc);
+}
+
+static void
 urtw_update_mcast(struct ieee80211com *ic)
 {
 
@@ -3877,7 +3890,6 @@ urtw_rx_setconf(struct urtw_softc *sc)
if (sc->sc_flags & URTW_RTL8187B) {
data = data | URTW_RX_FILTER_MNG | URTW_RX_FILTER_DATA |
URTW_RX_FILTER_MCAST | URTW_RX_FILTER_BCAST |
-   URTW_RX_FILTER_NICMAC | URTW_RX_CHECK_BSSID |
URTW_RX_FIFO_THRESHOLD_NONE |
URTW_MAX_RX_DMA_2048 |
URTW_RX_AUTORESETPHY | URTW_RCR_ONLYERLPKT;
@@ -3892,19 +3904,21 @@ urtw_rx_setconf(struct urtw_softc *sc)
if (sc->sc_crcmon == 1 && ic->ic_opmode == IEEE80211_M_MONITOR)
data = data | URTW_RX_FILTER_CRCERR;
 
-   if (ic->ic_opmode == IEEE80211_M_MONITOR ||
-   ic->ic_promisc > 0 || ic->ic_allmulti > 0) {
-   data = data | URTW_RX_FILTER_ALLMAC;
-   } else {
-   data = data | URTW_RX_FILTER_NICMAC;
-   data = data | URTW_RX_CHECK_BSSID;
-   }
-
data = data &~ URTW_RX_FIFO_THRESHOLD_MASK;
data = data | URTW_RX_FIFO_THRESHOLD_NONE |
URTW_RX_AUTORESETPHY;
data = data &~ URTW_MAX_RX_DMA_MASK;
data = data | URTW_MAX_RX_DMA_2048 | URTW_RCR_ONLYERLPKT;
+   }
+
+   /* XXX allmulti should not be checked here... */
+   if (ic->ic_opmode == IEEE80211_M_MONITOR ||
+   ic->ic_promisc > 0 || ic->ic_allmulti > 0) {
+   data = data | URTW_RX_FILTER_CTL;
+   data = data | URTW_RX_FILTER_ALLMAC;
+   } else {
+   data = data | URTW_RX_FILTER_NICMAC;
+   data = data | URTW_RX_CHECK_BSSID;
}
 
urtw_write32_m(sc, URTW_RX, data);
___
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: r345570 - in stable: 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan

2019-03-27 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Mar 27 09:18:34 2019
New Revision: 345570
URL: https://svnweb.freebsd.org/changeset/base/345570

Log:
  MFC r344994:
  urtw(4): add promiscuous mode callback
  
  Also, pass control frames to the host while in MONITOR mode and / or
  when promiscuous mode is enabled.
  
  Was tested with Netgear WG111 v3 (RTL8187B), STA / MONITOR modes.

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

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

Modified: stable/11/sys/dev/usb/wlan/if_urtw.c
==
--- stable/11/sys/dev/usb/wlan/if_urtw.cWed Mar 27 08:55:59 2019
(r345569)
+++ stable/11/sys/dev/usb/wlan/if_urtw.cWed Mar 27 09:18:34 2019
(r345570)
@@ -661,6 +661,7 @@ static void urtw_scan_end(struct ieee80211com *);
 static voidurtw_getradiocaps(struct ieee80211com *, int, int *,
   struct ieee80211_channel[]);
 static voidurtw_set_channel(struct ieee80211com *);
+static voidurtw_update_promisc(struct ieee80211com *);
 static voidurtw_update_mcast(struct ieee80211com *);
 static int urtw_tx_start(struct urtw_softc *,
struct ieee80211_node *, struct mbuf *,
@@ -888,6 +889,7 @@ urtw_attach(device_t dev)
ic->ic_updateslot = urtw_updateslot;
ic->ic_vap_create = urtw_vap_create;
ic->ic_vap_delete = urtw_vap_delete;
+   ic->ic_update_promisc = urtw_update_promisc;
ic->ic_update_mcast = urtw_update_mcast;
ic->ic_parent = urtw_parent;
ic->ic_transmit = urtw_transmit;
@@ -1623,6 +1625,17 @@ fail:
 }
 
 static void
+urtw_update_promisc(struct ieee80211com *ic)
+{
+   struct urtw_softc *sc = ic->ic_softc;
+
+   URTW_LOCK(sc);
+   if (sc->sc_flags & URTW_RUNNING)
+   urtw_rx_setconf(sc);
+   URTW_UNLOCK(sc);
+}
+
+static void
 urtw_update_mcast(struct ieee80211com *ic)
 {
 
@@ -3882,7 +3895,6 @@ urtw_rx_setconf(struct urtw_softc *sc)
if (sc->sc_flags & URTW_RTL8187B) {
data = data | URTW_RX_FILTER_MNG | URTW_RX_FILTER_DATA |
URTW_RX_FILTER_MCAST | URTW_RX_FILTER_BCAST |
-   URTW_RX_FILTER_NICMAC | URTW_RX_CHECK_BSSID |
URTW_RX_FIFO_THRESHOLD_NONE |
URTW_MAX_RX_DMA_2048 |
URTW_RX_AUTORESETPHY | URTW_RCR_ONLYERLPKT;
@@ -3897,19 +3909,21 @@ urtw_rx_setconf(struct urtw_softc *sc)
if (sc->sc_crcmon == 1 && ic->ic_opmode == IEEE80211_M_MONITOR)
data = data | URTW_RX_FILTER_CRCERR;
 
-   if (ic->ic_opmode == IEEE80211_M_MONITOR ||
-   ic->ic_promisc > 0 || ic->ic_allmulti > 0) {
-   data = data | URTW_RX_FILTER_ALLMAC;
-   } else {
-   data = data | URTW_RX_FILTER_NICMAC;
-   data = data | URTW_RX_CHECK_BSSID;
-   }
-
data = data &~ URTW_RX_FIFO_THRESHOLD_MASK;
data = data | URTW_RX_FIFO_THRESHOLD_NONE |
URTW_RX_AUTORESETPHY;
data = data &~ URTW_MAX_RX_DMA_MASK;
data = data | URTW_MAX_RX_DMA_2048 | URTW_RCR_ONLYERLPKT;
+   }
+
+   /* XXX allmulti should not be checked here... */
+   if (ic->ic_opmode == IEEE80211_M_MONITOR ||
+   ic->ic_promisc > 0 || ic->ic_allmulti > 0) {
+   data = data | URTW_RX_FILTER_CTL;
+   data = data | URTW_RX_FILTER_ALLMAC;
+   } else {
+   data = data | URTW_RX_FILTER_NICMAC;
+   data = data | URTW_RX_CHECK_BSSID;
}
 
urtw_write32_m(sc, URTW_RX, data);
___
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: r345569 - in stable: 10/usr.bin/lockf 11/usr.bin/lockf 12/usr.bin/lockf

2019-03-27 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Mar 27 08:55:59 2019
New Revision: 345569
URL: https://svnweb.freebsd.org/changeset/base/345569

Log:
  MFC r345318:
  lockf(1): return EX_UNAVAILABLE if -n is used and the lock file does not
  exist
  
  Apply EX_UNAVAILABLE patch part from PR 170775 to match the documentation.
  
  Was checked with a command from PR 210770:
  lockf -n /tmp/doesnotexist echo; echo $?
  
  PR:   210770

Modified:
  stable/12/usr.bin/lockf/lockf.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/usr.bin/lockf/lockf.c
  stable/11/usr.bin/lockf/lockf.c
Directory Properties:
  stable/10/   (props changed)
  stable/11/   (props changed)

Modified: stable/12/usr.bin/lockf/lockf.c
==
--- stable/12/usr.bin/lockf/lockf.c Wed Mar 27 08:02:55 2019
(r345568)
+++ stable/12/usr.bin/lockf/lockf.c Wed Mar 27 08:55:59 2019
(r345569)
@@ -174,6 +174,8 @@ acquire_lock(const char *name, int flags)
if ((fd = open(name, O_RDONLY|O_EXLOCK|flags, 0666)) == -1) {
if (errno == EAGAIN || errno == EINTR)
return (-1);
+   else if (errno == ENOENT && (flags & O_CREAT) == 0)
+   err(EX_UNAVAILABLE, "%s", name);
err(EX_CANTCREAT, "cannot open %s", name);
}
return (fd);
___
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: r345569 - in stable: 10/usr.bin/lockf 11/usr.bin/lockf 12/usr.bin/lockf

2019-03-27 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Mar 27 08:55:59 2019
New Revision: 345569
URL: https://svnweb.freebsd.org/changeset/base/345569

Log:
  MFC r345318:
  lockf(1): return EX_UNAVAILABLE if -n is used and the lock file does not
  exist
  
  Apply EX_UNAVAILABLE patch part from PR 170775 to match the documentation.
  
  Was checked with a command from PR 210770:
  lockf -n /tmp/doesnotexist echo; echo $?
  
  PR:   210770

Modified:
  stable/10/usr.bin/lockf/lockf.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/usr.bin/lockf/lockf.c
  stable/12/usr.bin/lockf/lockf.c
Directory Properties:
  stable/11/   (props changed)
  stable/12/   (props changed)

Modified: stable/10/usr.bin/lockf/lockf.c
==
--- stable/10/usr.bin/lockf/lockf.c Wed Mar 27 08:02:55 2019
(r345568)
+++ stable/10/usr.bin/lockf/lockf.c Wed Mar 27 08:55:59 2019
(r345569)
@@ -172,6 +172,8 @@ acquire_lock(const char *name, int flags)
if ((fd = open(name, O_RDONLY|O_EXLOCK|flags, 0666)) == -1) {
if (errno == EAGAIN || errno == EINTR)
return (-1);
+   else if (errno == ENOENT && (flags & O_CREAT) == 0)
+   err(EX_UNAVAILABLE, "%s", name);
err(EX_CANTCREAT, "cannot open %s", name);
}
return (fd);
___
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: r345569 - in stable: 10/usr.bin/lockf 11/usr.bin/lockf 12/usr.bin/lockf

2019-03-27 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Mar 27 08:55:59 2019
New Revision: 345569
URL: https://svnweb.freebsd.org/changeset/base/345569

Log:
  MFC r345318:
  lockf(1): return EX_UNAVAILABLE if -n is used and the lock file does not
  exist
  
  Apply EX_UNAVAILABLE patch part from PR 170775 to match the documentation.
  
  Was checked with a command from PR 210770:
  lockf -n /tmp/doesnotexist echo; echo $?
  
  PR:   210770

Modified:
  stable/11/usr.bin/lockf/lockf.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/usr.bin/lockf/lockf.c
  stable/12/usr.bin/lockf/lockf.c
Directory Properties:
  stable/10/   (props changed)
  stable/12/   (props changed)

Modified: stable/11/usr.bin/lockf/lockf.c
==
--- stable/11/usr.bin/lockf/lockf.c Wed Mar 27 08:02:55 2019
(r345568)
+++ stable/11/usr.bin/lockf/lockf.c Wed Mar 27 08:55:59 2019
(r345569)
@@ -174,6 +174,8 @@ acquire_lock(const char *name, int flags)
if ((fd = open(name, O_RDONLY|O_EXLOCK|flags, 0666)) == -1) {
if (errno == EAGAIN || errno == EINTR)
return (-1);
+   else if (errno == ENOENT && (flags & O_CREAT) == 0)
+   err(EX_UNAVAILABLE, "%s", name);
err(EX_CANTCREAT, "cannot open %s", name);
}
return (fd);
___
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: r345493 - head/sys/dev/usb/wlan

2019-03-25 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Mar 25 09:10:07 2019
New Revision: 345493
URL: https://svnweb.freebsd.org/changeset/base/345493

Log:
  run(4): merge some common TSF-related code into run_disable_tsf()
  
  No functional change intended.
  
  MFC after:5 days

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  Mon Mar 25 07:48:52 2019
(r345492)
+++ head/sys/dev/usb/wlan/if_run.c  Mon Mar 25 09:10:07 2019
(r345493)
@@ -464,6 +464,7 @@ static void run_usb_timeout_cb(void *);
 static voidrun_reset_livelock(struct run_softc *);
 static voidrun_enable_tsf_sync(struct run_softc *);
 static voidrun_enable_tsf(struct run_softc *);
+static voidrun_disable_tsf(struct run_softc *);
 static voidrun_get_tsf(struct run_softc *, uint64_t *);
 static voidrun_enable_mrr(struct run_softc *);
 static voidrun_set_txpreamble(struct run_softc *);
@@ -2090,7 +2091,6 @@ run_newstate(struct ieee80211vap *vap, enum ieee80211_
struct run_vap *rvp = RUN_VAP(vap);
enum ieee80211_state ostate;
uint32_t sta[3];
-   uint32_t tmp;
uint8_t ratectl;
uint8_t restart_ratectl = 0;
uint8_t bid = 1 << rvp->rvp_id;
@@ -2123,12 +2123,8 @@ run_newstate(struct ieee80211vap *vap, enum ieee80211_
sc->runbmap &= ~bid;
 
/* abort TSF synchronization if there is no vap running */
-   if (--sc->running == 0) {
-   run_read(sc, RT2860_BCN_TIME_CFG, );
-   run_write(sc, RT2860_BCN_TIME_CFG,
-   tmp & ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN |
-   RT2860_TBTT_TIMER_EN));
-   }
+   if (--sc->running == 0)
+   run_disable_tsf(sc);
break;
 
case IEEE80211_S_RUN:
@@ -4863,15 +4859,11 @@ static void
 run_scan_start(struct ieee80211com *ic)
 {
struct run_softc *sc = ic->ic_softc;
-   uint32_t tmp;
 
RUN_LOCK(sc);
 
/* abort TSF synchronization */
-   run_read(sc, RT2860_BCN_TIME_CFG, );
-   run_write(sc, RT2860_BCN_TIME_CFG,
-   tmp & ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN |
-   RT2860_TBTT_TIMER_EN));
+   run_disable_tsf(sc);
run_set_bssid(sc, ieee80211broadcastaddr);
 
RUN_UNLOCK(sc);
@@ -5158,6 +5150,18 @@ run_enable_tsf(struct run_softc *sc)
 }
 
 static void
+run_disable_tsf(struct run_softc *sc)
+{
+   uint32_t tmp;
+
+   if (run_read(sc, RT2860_BCN_TIME_CFG, ) == 0) {
+   tmp &= ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN |
+   RT2860_TBTT_TIMER_EN);
+   run_write(sc, RT2860_BCN_TIME_CFG, tmp);
+   }
+}
+
+static void
 run_get_tsf(struct run_softc *sc, uint64_t *buf)
 {
run_read_region_1(sc, RT2860_TSF_TIMER_DW0, (uint8_t *)buf,
@@ -6108,10 +6112,7 @@ run_init_locked(struct run_softc *sc)
}
 
/* abort TSF synchronization */
-   run_read(sc, RT2860_BCN_TIME_CFG, );
-   tmp &= ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN |
-   RT2860_TBTT_TIMER_EN);
-   run_write(sc, RT2860_BCN_TIME_CFG, tmp);
+   run_disable_tsf(sc);
 
/* clear RX WCID search table */
run_set_region_4(sc, RT2860_WCID_ENTRY(0), 0, 512);
___
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: r345318 - head/usr.bin/lockf

2019-03-20 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Mar 20 07:40:38 2019
New Revision: 345318
URL: https://svnweb.freebsd.org/changeset/base/345318

Log:
  lockf(1): return EX_UNAVAILABLE if -n is used and the lock file does not
  exist
  
  Apply EX_UNAVAILABLE patch part from PR 170775 to match the documentation.
  
  Checked with a command from PR 210770:
  lockf -n /tmp/doesnotexist echo; echo $?
  
  PR:   210770
  MFC after:1 week

Modified:
  head/usr.bin/lockf/lockf.c

Modified: head/usr.bin/lockf/lockf.c
==
--- head/usr.bin/lockf/lockf.c  Wed Mar 20 07:24:21 2019(r345317)
+++ head/usr.bin/lockf/lockf.c  Wed Mar 20 07:40:38 2019(r345318)
@@ -174,6 +174,8 @@ acquire_lock(const char *name, int flags)
if ((fd = open(name, O_RDONLY|O_EXLOCK|flags, 0666)) == -1) {
if (errno == EAGAIN || errno == EINTR)
return (-1);
+   else if (errno == ENOENT && (flags & O_CREAT) == 0)
+   err(EX_UNAVAILABLE, "%s", name);
err(EX_CANTCREAT, "cannot open %s", name);
}
return (fd);
___
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: r345254 - stable/11/sys/dev/urtwn

2019-03-17 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Mar 18 02:58:34 2019
New Revision: 345254
URL: https://svnweb.freebsd.org/changeset/base/345254

Log:
  MFC r344745:
  urtwn(4): fix Tx instability with RTL8192CU chipsets
  
  PR:   233949

Modified:
  stable/11/sys/dev/urtwn/if_urtwn.c
  stable/11/sys/dev/urtwn/if_urtwnreg.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/urtwn/if_urtwn.c
==
--- stable/11/sys/dev/urtwn/if_urtwn.c  Mon Mar 18 02:56:51 2019
(r345253)
+++ stable/11/sys/dev/urtwn/if_urtwn.c  Mon Mar 18 02:58:34 2019
(r345254)
@@ -3036,10 +3036,17 @@ urtwn_tx_data(struct urtwn_softc *sc, struct ieee80211
R92C_TXDW4_HWRTSEN);
}
 
-   /* XXX TODO: rtsrate is configurable? 24mbit may
-* be a bit high for RTS rate? */
-   txd->txdw4 |= htole32(SM(R92C_TXDW4_RTSRATE,
-   URTWN_RIDX_OFDM24));
+   if (!(sc->chip & URTWN_CHIP_88E)) {
+   /* XXX other rates will not work without
+* urtwn_ra_init() */
+   txd->txdw4 |= htole32(SM(R92C_TXDW4_RTSRATE,
+   URTWN_RIDX_CCK1));
+   } else {
+   /* XXX TODO: rtsrate is configurable? 24mbit
+* may be a bit high for RTS rate? */
+   txd->txdw4 |= htole32(SM(R92C_TXDW4_RTSRATE,
+   URTWN_RIDX_OFDM24));
+   }
 
txd->txdw5 |= htole32(0x0001ff00);
} else  /* IEEE80211_FC0_TYPE_MGT */
@@ -5498,6 +5505,9 @@ urtwn_init(struct urtwn_softc *sc)
urtwn_write_1(sc, R88E_TX_RPT_CTRL,
urtwn_read_1(sc, R88E_TX_RPT_CTRL) | R88E_TX_RPT1_ENA);
}
+
+   if (!(sc->chip & URTWN_CHIP_88E))
+   urtwn_write_4(sc, R92C_POWER_STATUS, 0x5);
 
/* Perform LO and IQ calibrations. */
urtwn_iq_calib(sc);

Modified: stable/11/sys/dev/urtwn/if_urtwnreg.h
==
--- stable/11/sys/dev/urtwn/if_urtwnreg.h   Mon Mar 18 02:56:51 2019
(r345253)
+++ stable/11/sys/dev/urtwn/if_urtwnreg.h   Mon Mar 18 02:58:34 2019
(r345254)
@@ -163,6 +163,7 @@
 #define R92C_RD_RESP_PKT_TH0x463
 #define R92C_INIRTS_RATE_SEL   0x480
 #define R92C_INIDATA_RATE_SEL(macid)   (0x484 + (macid))
+#define R92C_POWER_STATUS  0x4a4
 #define R92C_MAX_AGGR_NUM  0x4ca
 #define R88E_TX_RPT_CTRL   0x4ec
 #define R88E_TX_RPT_MACID_MAX  0x4ed
___
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: r345253 - in stable/12/sys/dev/rtwn/rtl8192c: . usb

2019-03-17 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Mar 18 02:56:51 2019
New Revision: 345253
URL: https://svnweb.freebsd.org/changeset/base/345253

Log:
  MFC r344745:
  rtwn_usb(4): fix Tx instability with RTL8192CU chipsets
  
  PR:   233949

Modified:
  stable/12/sys/dev/rtwn/rtl8192c/r92c_reg.h
  stable/12/sys/dev/rtwn/rtl8192c/r92c_tx.c
  stable/12/sys/dev/rtwn/rtl8192c/usb/r92cu_init.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/rtwn/rtl8192c/r92c_reg.h
==
--- stable/12/sys/dev/rtwn/rtl8192c/r92c_reg.h  Mon Mar 18 02:40:22 2019
(r345252)
+++ stable/12/sys/dev/rtwn/rtl8192c/r92c_reg.h  Mon Mar 18 02:56:51 2019
(r345253)
@@ -148,6 +148,7 @@
 #define R92C_RD_RESP_PKT_TH0x463
 #define R92C_INIRTS_RATE_SEL   0x480
 #define R92C_INIDATA_RATE_SEL(macid)   (0x484 + (macid))
+#define R92C_POWER_STATUS  0x4a4
 #define R92C_QUEUE_CTRL0x4c6
 #define R92C_MAX_AGGR_NUM  0x4ca
 #define R92C_BAR_MODE_CTRL 0x4cc

Modified: stable/12/sys/dev/rtwn/rtl8192c/r92c_tx.c
==
--- stable/12/sys/dev/rtwn/rtl8192c/r92c_tx.c   Mon Mar 18 02:40:22 2019
(r345252)
+++ stable/12/sys/dev/rtwn/rtl8192c/r92c_tx.c   Mon Mar 18 02:56:51 2019
(r345253)
@@ -211,6 +211,12 @@ r92c_tx_setup_macid(void *buf, int id)
struct r92c_tx_desc *txd = (struct r92c_tx_desc *)buf;
 
txd->txdw1 |= htole32(SM(R92C_TXDW1_MACID, id));
+
+   /* XXX does not belong here */
+   /* XXX temporary (I hope) */
+   /* Force CCK1 for RTS / CTS frames (driver bug) */
+   txd->txdw4 &= ~htole32(SM(R92C_TXDW4_RTSRATE, R92C_TXDW4_RTSRATE_M));
+   txd->txdw4 &= ~htole32(R92C_TXDW4_RTS_SHORT);
 }
 
 void

Modified: stable/12/sys/dev/rtwn/rtl8192c/usb/r92cu_init.c
==
--- stable/12/sys/dev/rtwn/rtl8192c/usb/r92cu_init.cMon Mar 18 02:40:22 
2019(r345252)
+++ stable/12/sys/dev/rtwn/rtl8192c/usb/r92cu_init.cMon Mar 18 02:56:51 
2019(r345253)
@@ -357,6 +357,8 @@ void
 r92cu_post_init(struct rtwn_softc *sc)
 {
 
+   rtwn_write_4(sc, R92C_POWER_STATUS, 0x5);
+
/* Perform LO and IQ calibrations. */
r92c_iq_calib(sc);
/* Perform LC calibration. */
___
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: r345252 - head/sys/net80211

2019-03-17 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Mar 18 02:40:22 2019
New Revision: 345252
URL: https://svnweb.freebsd.org/changeset/base/345252

Log:
  net80211: correct check for SMPS node flags updates
  
  Update node flags when driver supports SMPS, not when it is disabled or
  in dynamic mode ((iv_htcaps & HTCAP_SMPS) != 0).
  
  Checked with RTL8188EE (1T1R), STA mode - 'smps' word should disappear
  from 'ifconfig wlan0' output.
  
  MFC after:2 weeks

Modified:
  head/sys/net80211/ieee80211_ht.c

Modified: head/sys/net80211/ieee80211_ht.c
==
--- head/sys/net80211/ieee80211_ht.cSun Mar 17 22:26:50 2019
(r345251)
+++ head/sys/net80211/ieee80211_ht.cMon Mar 18 02:40:22 2019
(r345252)
@@ -1727,7 +1727,7 @@ ieee80211_ht_updateparams(struct ieee80211_node *ni,
const struct ieee80211_ie_htinfo *htinfo;
 
ieee80211_parse_htcap(ni, htcapie);
-   if (vap->iv_htcaps & IEEE80211_HTCAP_SMPS)
+   if (vap->iv_htcaps & IEEE80211_HTC_SMPS)
htcap_update_mimo_ps(ni);
htcap_update_shortgi(ni);
htcap_update_ldpc(ni);
@@ -1880,7 +1880,7 @@ ieee80211_ht_updatehtcap(struct ieee80211_node *ni, co
struct ieee80211vap *vap = ni->ni_vap;
 
ieee80211_parse_htcap(ni, htcapie);
-   if (vap->iv_htcaps & IEEE80211_HTCAP_SMPS)
+   if (vap->iv_htcaps & IEEE80211_HTC_SMPS)
htcap_update_mimo_ps(ni);
htcap_update_shortgi(ni);
htcap_update_ldpc(ni);
___
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: r345174 - stable/10/sbin/ifconfig

2019-03-15 Thread Andriy Voskoboinyk
Author: avos
Date: Fri Mar 15 08:21:11 2019
New Revision: 345174
URL: https://svnweb.freebsd.org/changeset/base/345174

Log:
  MFC r344748:
  Allow to build ifconfig(8) without wireless support
  
  The change removes SIOC[GS]IEEE80211 handling from ifconfig(8)
  if WITHOUT_WIRELESS_SUPPORT=yes is set in src.conf(5).
  
  Reviewed by:  bz
  Differential Revision:https://reviews.freebsd.org/D19289

Modified:
  stable/10/sbin/ifconfig/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/ifconfig/Makefile
==
--- stable/10/sbin/ifconfig/MakefileFri Mar 15 08:18:02 2019
(r345173)
+++ stable/10/sbin/ifconfig/MakefileFri Mar 15 08:21:11 2019
(r345174)
@@ -39,9 +39,11 @@ SRCS+=   sfp.c   # SFP/SFP+ information
 DPADD+=${LIBM}
 LDADD+=-lm
 
+.if ${MK_WIRELESS_SUPPORT} != "no"
 SRCS+= ifieee80211.c regdomain.c # SIOC[GS]IEEE80211 support
 DPADD+=${LIBBSDXML} ${LIBSBUF}
 LDADD+=-lbsdxml -lsbuf
+.endif
 
 SRCS+= carp.c  # SIOC[GS]VH support
 SRCS+= ifgroup.c   # ...
___
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: r345173 - in stable: 11/sbin/ifconfig 12/sbin/ifconfig

2019-03-15 Thread Andriy Voskoboinyk
Author: avos
Date: Fri Mar 15 08:18:02 2019
New Revision: 345173
URL: https://svnweb.freebsd.org/changeset/base/345173

Log:
  MFC r344748:
  Allow to build ifconfig(8) without wireless support
  
  The change removes SIOC[GS]IEEE80211 handling from ifconfig(8)
  if WITHOUT_WIRELESS_SUPPORT=yes is set in src.conf(5).
  
  Reviewed by:  bz
  Differential Revision:https://reviews.freebsd.org/D19289

Modified:
  stable/12/sbin/ifconfig/Makefile
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sbin/ifconfig/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/sbin/ifconfig/Makefile
==
--- stable/12/sbin/ifconfig/MakefileFri Mar 15 07:34:06 2019
(r345172)
+++ stable/12/sbin/ifconfig/MakefileFri Mar 15 08:18:02 2019
(r345173)
@@ -39,8 +39,10 @@ SRCS+=   ifipsec.c   # IPsec VTI
 SRCS+= sfp.c   # SFP/SFP+ information
 LIBADD+=   m
 
+.if ${MK_WIRELESS_SUPPORT} != "no"
 SRCS+= ifieee80211.c   # SIOC[GS]IEEE80211 support
 LIBADD+=   80211
+.endif
 
 SRCS+= carp.c  # SIOC[GS]VH support
 SRCS+= ifgroup.c   # ...
___
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: r345173 - in stable: 11/sbin/ifconfig 12/sbin/ifconfig

2019-03-15 Thread Andriy Voskoboinyk
Author: avos
Date: Fri Mar 15 08:18:02 2019
New Revision: 345173
URL: https://svnweb.freebsd.org/changeset/base/345173

Log:
  MFC r344748:
  Allow to build ifconfig(8) without wireless support
  
  The change removes SIOC[GS]IEEE80211 handling from ifconfig(8)
  if WITHOUT_WIRELESS_SUPPORT=yes is set in src.conf(5).
  
  Reviewed by:  bz
  Differential Revision:https://reviews.freebsd.org/D19289

Modified:
  stable/11/sbin/ifconfig/Makefile
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/sbin/ifconfig/Makefile
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/sbin/ifconfig/Makefile
==
--- stable/11/sbin/ifconfig/MakefileFri Mar 15 07:34:06 2019
(r345172)
+++ stable/11/sbin/ifconfig/MakefileFri Mar 15 08:18:02 2019
(r345173)
@@ -39,8 +39,10 @@ SRCS+=   ifipsec.c   # IPsec VTI
 SRCS+= sfp.c   # SFP/SFP+ information
 LIBADD+=   m
 
+.if ${MK_WIRELESS_SUPPORT} != "no"
 SRCS+= ifieee80211.c   # SIOC[GS]IEEE80211 support
 LIBADD+=   80211
+.endif
 
 SRCS+= carp.c  # SIOC[GS]VH support
 SRCS+= ifgroup.c   # ...
___
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: r345172 - stable/12/sys/dev/iwm

2019-03-15 Thread Andriy Voskoboinyk
Author: avos
Date: Fri Mar 15 07:34:06 2019
New Revision: 345172
URL: https://svnweb.freebsd.org/changeset/base/345172

Log:
  MFC r345002:
  iwm(4): use correct channel list source for Intel 3168
  
  Intel 3168 uses another EEPROM section to store channel flags;
  port missing bits from iwlwifi to make it work.
  
  PR:   230750, 236235
  Tested by:Bert JW Regeer 

Modified:
  stable/12/sys/dev/iwm/if_iwm.c
  stable/12/sys/dev/iwm/if_iwm_7000.c
  stable/12/sys/dev/iwm/if_iwm_config.h
  stable/12/sys/dev/iwm/if_iwmreg.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/iwm/if_iwm.c
==
--- stable/12/sys/dev/iwm/if_iwm.c  Fri Mar 15 02:11:28 2019
(r345171)
+++ stable/12/sys/dev/iwm/if_iwm.c  Fri Mar 15 07:34:06 2019
(r345172)
@@ -2237,7 +2237,8 @@ iwm_parse_nvm_data(struct iwm_softc *sc,
}
 
if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) {
-   memcpy(data->nvm_ch_flags, _sw[IWM_NVM_CHANNELS],
+   memcpy(data->nvm_ch_flags, sc->cfg->nvm_type == IWM_NVM_SDP ?
+   [0] : _sw[IWM_NVM_CHANNELS],
IWM_NUM_CHANNELS * sizeof(uint16_t));
} else {
memcpy(data->nvm_ch_flags, [IWM_NVM_CHANNELS_8000],
@@ -2297,8 +2298,9 @@ iwm_parse_nvm_sections(struct iwm_softc *sc, struct iw
sw = (const uint16_t *)sections[IWM_NVM_SECTION_TYPE_SW].data;
calib = (const uint16_t *)
sections[IWM_NVM_SECTION_TYPE_CALIBRATION].data;
-   regulatory = (const uint16_t *)
-   sections[IWM_NVM_SECTION_TYPE_REGULATORY].data;
+   regulatory = sc->cfg->nvm_type == IWM_NVM_SDP ?
+   (const uint16_t 
*)sections[IWM_NVM_SECTION_TYPE_REGULATORY_SDP].data :
+   (const uint16_t *)sections[IWM_NVM_SECTION_TYPE_REGULATORY].data;
mac_override = (const uint16_t *)
sections[IWM_NVM_SECTION_TYPE_MAC_OVERRIDE].data;
phy_sku = (const uint16_t *)sections[IWM_NVM_SECTION_TYPE_PHY_SKU].data;

Modified: stable/12/sys/dev/iwm/if_iwm_7000.c
==
--- stable/12/sys/dev/iwm/if_iwm_7000.c Fri Mar 15 02:11:28 2019
(r345171)
+++ stable/12/sys/dev/iwm/if_iwm_7000.c Fri Mar 15 07:34:06 2019
(r345172)
@@ -119,6 +119,7 @@ const struct iwm_cfg iwm3168_cfg = {
.fw_name = IWM3168_FW,
IWM_DEVICE_7000_COMMON,
.host_interrupt_operation_mode = 0,
+   .nvm_type = IWM_NVM_SDP,
 };
 
 const struct iwm_cfg iwm7265_cfg = {

Modified: stable/12/sys/dev/iwm/if_iwm_config.h
==
--- stable/12/sys/dev/iwm/if_iwm_config.h   Fri Mar 15 02:11:28 2019
(r345171)
+++ stable/12/sys/dev/iwm/if_iwm_config.h   Fri Mar 15 07:34:06 2019
(r345172)
@@ -102,7 +102,20 @@ static inline uint8_t num_of_ant(uint8_t mask)
 #define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000 (32 * 512 * sizeof(uint16_t)) 
/* 32 KB */
 #define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_9000 
IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000
 
+
 /**
+ * enum iwl_nvm_type - nvm formats
+ * @IWM_NVM: the regular format
+ * @IWM_NVM_EXT: extended NVM format
+ * @IWM_NVM_SDP: NVM format used by 3168 series
+ */
+enum iwm_nvm_type {
+   IWM_NVM,
+   IWM_NVM_EXT,
+   IWM_NVM_SDP,
+};
+
+/**
  * struct iwm_cfg
  * @name: Official name of the device
  * @fw_name: Firmware filename.
@@ -111,6 +124,7 @@ static inline uint8_t num_of_ant(uint8_t mask)
  * @nvm_hw_section_num: the ID of the HW NVM section
  * @apmg_wake_up_wa: should the MAC access REQ be asserted when a command
  *  is in flight. This is due to a HW bug in 7260, 3160 and 7265.
+ * @nvm_type: see  iwl_nvm_type
  */
 struct iwm_cfg {
const char *name;
@@ -120,6 +134,7 @@ struct iwm_cfg {
 int host_interrupt_operation_mode;
 uint8_t nvm_hw_section_num;
 int apmg_wake_up_wa;
+enum iwm_nvm_type nvm_type;
 };
 
 /*

Modified: stable/12/sys/dev/iwm/if_iwmreg.h
==
--- stable/12/sys/dev/iwm/if_iwmreg.h   Fri Mar 15 02:11:28 2019
(r345171)
+++ stable/12/sys/dev/iwm/if_iwmreg.h   Fri Mar 15 07:34:06 2019
(r345172)
@@ -1992,6 +1992,7 @@ enum {
IWM_NVM_SECTION_TYPE_REGULATORY = 3,
IWM_NVM_SECTION_TYPE_CALIBRATION = 4,
IWM_NVM_SECTION_TYPE_PRODUCTION = 5,
+   IWM_NVM_SECTION_TYPE_REGULATORY_SDP = 8,
IWM_NVM_SECTION_TYPE_MAC_OVERRIDE = 11,
IWM_NVM_SECTION_TYPE_PHY_SKU = 12,
IWM_NVM_MAX_NUM_SECTIONS = 13,
___
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"


Re: svn commit: r344990 - in head: share/man/man9 sys/dev/ath sys/dev/bwi sys/dev/bwn sys/dev/ipw sys/dev/iwi sys/dev/iwm sys/dev/iwn sys/dev/malo sys/dev/mwl sys/dev/otus sys/dev/ral sys/dev/rtwn sys

2019-03-11 Thread Andriy Voskoboinyk





On Sun, Mar 10, 2019 at 8:12 PM Rodney W. Grimes  
 wrote:

Author: avos



Date: Mon Mar 11 01:27:01 2019



New Revision: 344990



URL: https://svnweb.freebsd.org/changeset/base/344990







Log:



  Fix ieee80211_radiotap(9) usage in wireless drivers:







  - Alignment issues:



   * Add missing __packed attributes + padding across all drivers; in



  most places there was an assumption that padding will be always



  minimally suitable; in few places - e.g., in urtw(4) / rtwn(4) -



  padding was just missing.


   * Add __aligned(8) attribute for all Rx radiotap headers since they  
can


  contain 64-bit TSF timestamp; it cannot appear in Tx radiotap  
headers, so



  just drop the attribute here. Refresh ieee80211_radiotap(9) man page



  accordingly.







  - Since net80211 automatically updates channel frequency / flags in


  ieee80211_radiotap_chan_change() drop duplicate setup for these  
fields



  in drivers.







  Tested with Netgear WG111 v3 (urtw(4)), STA mode.







  MFC after:  2 weeks




Isnt this going to seriously break module load compatibility

due to struct size and alignment changes if you merge this to stable/12?


It looks like all these changes are within the modules, not in the  
KBI... It looks like this will make things work >better on architectures  
that don't like unaligned accesses. It seems like modules that aren't  
updated don't work today >on those architectures...


Yes, only drivers are touched - updated structures and
driver's softc (where they are stored) are not exposed
to other modules, so there is no need to keep size /
offsets for structure members + the commit removes
unaligned access, so urtw(4) (for example) will not work
without this change on architectures, where unaligned
access is prohibited.




Warner




Modified:



  head/share/man/man9/ieee80211_radiotap.9



  head/sys/dev/ath/if_athioctl.h



  head/sys/dev/bwi/if_bwi.c



  head/sys/dev/bwi/if_bwivar.h



  head/sys/dev/bwn/if_bwn.c



  head/sys/dev/bwn/if_bwnvar.h


...





--
Rod Grimes  
rgri...@freebsd.org





___
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: r345002 - head/sys/dev/iwm

2019-03-11 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Mar 11 08:30:29 2019
New Revision: 345002
URL: https://svnweb.freebsd.org/changeset/base/345002

Log:
  iwm(4): use correct channel list source for Intel 3168
  
  Intel 3168 uses another EEPROM section to store channel flags;
  port missing bits from iwlwifi to make it work.
  
  PR:   230750, 236235
  Tested by:Bert JW Regeer 
  MFC after:3 days

Modified:
  head/sys/dev/iwm/if_iwm.c
  head/sys/dev/iwm/if_iwm_7000.c
  head/sys/dev/iwm/if_iwm_config.h
  head/sys/dev/iwm/if_iwmreg.h

Modified: head/sys/dev/iwm/if_iwm.c
==
--- head/sys/dev/iwm/if_iwm.c   Mon Mar 11 07:18:40 2019(r345001)
+++ head/sys/dev/iwm/if_iwm.c   Mon Mar 11 08:30:29 2019(r345002)
@@ -2211,7 +2211,8 @@ iwm_parse_nvm_data(struct iwm_softc *sc,
}
 
if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) {
-   memcpy(data->nvm_ch_flags, _sw[IWM_NVM_CHANNELS],
+   memcpy(data->nvm_ch_flags, sc->cfg->nvm_type == IWM_NVM_SDP ?
+   [0] : _sw[IWM_NVM_CHANNELS],
IWM_NUM_CHANNELS * sizeof(uint16_t));
} else {
memcpy(data->nvm_ch_flags, [IWM_NVM_CHANNELS_8000],
@@ -2271,8 +2272,9 @@ iwm_parse_nvm_sections(struct iwm_softc *sc, struct iw
sw = (const uint16_t *)sections[IWM_NVM_SECTION_TYPE_SW].data;
calib = (const uint16_t *)
sections[IWM_NVM_SECTION_TYPE_CALIBRATION].data;
-   regulatory = (const uint16_t *)
-   sections[IWM_NVM_SECTION_TYPE_REGULATORY].data;
+   regulatory = sc->cfg->nvm_type == IWM_NVM_SDP ?
+   (const uint16_t 
*)sections[IWM_NVM_SECTION_TYPE_REGULATORY_SDP].data :
+   (const uint16_t *)sections[IWM_NVM_SECTION_TYPE_REGULATORY].data;
mac_override = (const uint16_t *)
sections[IWM_NVM_SECTION_TYPE_MAC_OVERRIDE].data;
phy_sku = (const uint16_t *)sections[IWM_NVM_SECTION_TYPE_PHY_SKU].data;

Modified: head/sys/dev/iwm/if_iwm_7000.c
==
--- head/sys/dev/iwm/if_iwm_7000.c  Mon Mar 11 07:18:40 2019
(r345001)
+++ head/sys/dev/iwm/if_iwm_7000.c  Mon Mar 11 08:30:29 2019
(r345002)
@@ -119,6 +119,7 @@ const struct iwm_cfg iwm3168_cfg = {
.fw_name = IWM3168_FW,
IWM_DEVICE_7000_COMMON,
.host_interrupt_operation_mode = 0,
+   .nvm_type = IWM_NVM_SDP,
 };
 
 const struct iwm_cfg iwm7265_cfg = {

Modified: head/sys/dev/iwm/if_iwm_config.h
==
--- head/sys/dev/iwm/if_iwm_config.hMon Mar 11 07:18:40 2019
(r345001)
+++ head/sys/dev/iwm/if_iwm_config.hMon Mar 11 08:30:29 2019
(r345002)
@@ -104,7 +104,20 @@ static inline uint8_t num_of_ant(uint8_t mask)
 #define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000 (32 * 512 * sizeof(uint16_t)) 
/* 32 KB */
 #define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_9000 
IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000
 
+
 /**
+ * enum iwl_nvm_type - nvm formats
+ * @IWM_NVM: the regular format
+ * @IWM_NVM_EXT: extended NVM format
+ * @IWM_NVM_SDP: NVM format used by 3168 series
+ */
+enum iwm_nvm_type {
+   IWM_NVM,
+   IWM_NVM_EXT,
+   IWM_NVM_SDP,
+};
+
+/**
  * struct iwm_cfg
  * @name: Official name of the device
  * @fw_name: Firmware filename.
@@ -113,6 +126,7 @@ static inline uint8_t num_of_ant(uint8_t mask)
  * @nvm_hw_section_num: the ID of the HW NVM section
  * @apmg_wake_up_wa: should the MAC access REQ be asserted when a command
  *  is in flight. This is due to a HW bug in 7260, 3160 and 7265.
+ * @nvm_type: see  iwl_nvm_type
  */
 struct iwm_cfg {
const char *name;
@@ -122,6 +136,7 @@ struct iwm_cfg {
 int host_interrupt_operation_mode;
 uint8_t nvm_hw_section_num;
 int apmg_wake_up_wa;
+enum iwm_nvm_type nvm_type;
 };
 
 /*

Modified: head/sys/dev/iwm/if_iwmreg.h
==
--- head/sys/dev/iwm/if_iwmreg.hMon Mar 11 07:18:40 2019
(r345001)
+++ head/sys/dev/iwm/if_iwmreg.hMon Mar 11 08:30:29 2019
(r345002)
@@ -2032,6 +2032,7 @@ enum {
IWM_NVM_SECTION_TYPE_REGULATORY = 3,
IWM_NVM_SECTION_TYPE_CALIBRATION = 4,
IWM_NVM_SECTION_TYPE_PRODUCTION = 5,
+   IWM_NVM_SECTION_TYPE_REGULATORY_SDP = 8,
IWM_NVM_SECTION_TYPE_MAC_OVERRIDE = 11,
IWM_NVM_SECTION_TYPE_PHY_SKU = 12,
IWM_NVM_MAX_NUM_SECTIONS = 13,
___
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: r344994 - head/sys/dev/usb/wlan

2019-03-10 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Mar 11 02:02:04 2019
New Revision: 344994
URL: https://svnweb.freebsd.org/changeset/base/344994

Log:
  urtw(4): add promiscuous mode callback
  
  Also, pass control frames to the host while in MONITOR mode and / or
  when promiscuous mode is enabled.
  
  Tested with Netgear WG111 v3 (RTL8187B), STA / MONITOR modes.
  
  MFC after:2 weeks

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

Modified: head/sys/dev/usb/wlan/if_urtw.c
==
--- head/sys/dev/usb/wlan/if_urtw.c Mon Mar 11 01:45:26 2019
(r344993)
+++ head/sys/dev/usb/wlan/if_urtw.c Mon Mar 11 02:02:04 2019
(r344994)
@@ -670,6 +670,7 @@ static void urtw_scan_end(struct ieee80211com *);
 static voidurtw_getradiocaps(struct ieee80211com *, int, int *,
   struct ieee80211_channel[]);
 static voidurtw_set_channel(struct ieee80211com *);
+static voidurtw_update_promisc(struct ieee80211com *);
 static voidurtw_update_mcast(struct ieee80211com *);
 static int urtw_tx_start(struct urtw_softc *,
struct ieee80211_node *, struct mbuf *,
@@ -896,6 +897,7 @@ urtw_attach(device_t dev)
ic->ic_updateslot = urtw_updateslot;
ic->ic_vap_create = urtw_vap_create;
ic->ic_vap_delete = urtw_vap_delete;
+   ic->ic_update_promisc = urtw_update_promisc;
ic->ic_update_mcast = urtw_update_mcast;
ic->ic_parent = urtw_parent;
ic->ic_transmit = urtw_transmit;
@@ -1631,6 +1633,17 @@ fail:
 }
 
 static void
+urtw_update_promisc(struct ieee80211com *ic)
+{
+   struct urtw_softc *sc = ic->ic_softc;
+
+   URTW_LOCK(sc);
+   if (sc->sc_flags & URTW_RUNNING)
+   urtw_rx_setconf(sc);
+   URTW_UNLOCK(sc);
+}
+
+static void
 urtw_update_mcast(struct ieee80211com *ic)
 {
 
@@ -3873,7 +3886,6 @@ urtw_rx_setconf(struct urtw_softc *sc)
if (sc->sc_flags & URTW_RTL8187B) {
data = data | URTW_RX_FILTER_MNG | URTW_RX_FILTER_DATA |
URTW_RX_FILTER_MCAST | URTW_RX_FILTER_BCAST |
-   URTW_RX_FILTER_NICMAC | URTW_RX_CHECK_BSSID |
URTW_RX_FIFO_THRESHOLD_NONE |
URTW_MAX_RX_DMA_2048 |
URTW_RX_AUTORESETPHY | URTW_RCR_ONLYERLPKT;
@@ -3888,19 +3900,21 @@ urtw_rx_setconf(struct urtw_softc *sc)
if (sc->sc_crcmon == 1 && ic->ic_opmode == IEEE80211_M_MONITOR)
data = data | URTW_RX_FILTER_CRCERR;
 
-   if (ic->ic_opmode == IEEE80211_M_MONITOR ||
-   ic->ic_promisc > 0 || ic->ic_allmulti > 0) {
-   data = data | URTW_RX_FILTER_ALLMAC;
-   } else {
-   data = data | URTW_RX_FILTER_NICMAC;
-   data = data | URTW_RX_CHECK_BSSID;
-   }
-
data = data &~ URTW_RX_FIFO_THRESHOLD_MASK;
data = data | URTW_RX_FIFO_THRESHOLD_NONE |
URTW_RX_AUTORESETPHY;
data = data &~ URTW_MAX_RX_DMA_MASK;
data = data | URTW_MAX_RX_DMA_2048 | URTW_RCR_ONLYERLPKT;
+   }
+
+   /* XXX allmulti should not be checked here... */
+   if (ic->ic_opmode == IEEE80211_M_MONITOR ||
+   ic->ic_promisc > 0 || ic->ic_allmulti > 0) {
+   data = data | URTW_RX_FILTER_CTL;
+   data = data | URTW_RX_FILTER_ALLMAC;
+   } else {
+   data = data | URTW_RX_FILTER_NICMAC;
+   data = data | URTW_RX_CHECK_BSSID;
}
 
urtw_write32_m(sc, URTW_RX, data);
___
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: r344990 - in head: share/man/man9 sys/dev/ath sys/dev/bwi sys/dev/bwn sys/dev/ipw sys/dev/iwi sys/dev/iwm sys/dev/iwn sys/dev/malo sys/dev/mwl sys/dev/otus sys/dev/ral sys/dev/rtwn sys/...

2019-03-10 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Mar 11 01:27:01 2019
New Revision: 344990
URL: https://svnweb.freebsd.org/changeset/base/344990

Log:
  Fix ieee80211_radiotap(9) usage in wireless drivers:
  
  - Alignment issues:
   * Add missing __packed attributes + padding across all drivers; in
  most places there was an assumption that padding will be always
  minimally suitable; in few places - e.g., in urtw(4) / rtwn(4) -
  padding was just missing.
   * Add __aligned(8) attribute for all Rx radiotap headers since they can
  contain 64-bit TSF timestamp; it cannot appear in Tx radiotap headers, so
  just drop the attribute here. Refresh ieee80211_radiotap(9) man page
  accordingly.
  
  - Since net80211 automatically updates channel frequency / flags in
  ieee80211_radiotap_chan_change() drop duplicate setup for these fields
  in drivers.
  
  Tested with Netgear WG111 v3 (urtw(4)), STA mode.
  
  MFC after:2 weeks

Modified:
  head/share/man/man9/ieee80211_radiotap.9
  head/sys/dev/ath/if_athioctl.h
  head/sys/dev/bwi/if_bwi.c
  head/sys/dev/bwi/if_bwivar.h
  head/sys/dev/bwn/if_bwn.c
  head/sys/dev/bwn/if_bwnvar.h
  head/sys/dev/ipw/if_ipwvar.h
  head/sys/dev/iwi/if_iwivar.h
  head/sys/dev/iwm/if_iwmvar.h
  head/sys/dev/iwn/if_iwn.c
  head/sys/dev/iwn/if_iwnvar.h
  head/sys/dev/malo/if_maloioctl.h
  head/sys/dev/mwl/if_mwlioctl.h
  head/sys/dev/otus/if_otus.c
  head/sys/dev/otus/if_otusreg.h
  head/sys/dev/ral/rt2560var.h
  head/sys/dev/ral/rt2661var.h
  head/sys/dev/ral/rt2860var.h
  head/sys/dev/rtwn/if_rtwn.c
  head/sys/dev/rtwn/if_rtwnvar.h
  head/sys/dev/usb/wlan/if_rsu.c
  head/sys/dev/usb/wlan/if_rsureg.h
  head/sys/dev/usb/wlan/if_rumvar.h
  head/sys/dev/usb/wlan/if_run.c
  head/sys/dev/usb/wlan/if_runvar.h
  head/sys/dev/usb/wlan/if_uathvar.h
  head/sys/dev/usb/wlan/if_upgtvar.h
  head/sys/dev/usb/wlan/if_uralvar.h
  head/sys/dev/usb/wlan/if_urtw.c
  head/sys/dev/usb/wlan/if_urtwvar.h
  head/sys/dev/usb/wlan/if_zydreg.h
  head/sys/dev/wi/if_wireg.h
  head/sys/dev/wpi/if_wpivar.h
  head/sys/dev/wtap/if_wtapioctl.h

Modified: head/share/man/man9/ieee80211_radiotap.9
==
--- head/share/man/man9/ieee80211_radiotap.9Mon Mar 11 01:12:23 2019
(r344989)
+++ head/share/man/man9/ieee80211_radiotap.9Mon Mar 11 01:27:01 2019
(r344990)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 4, 2009
+.Dd March 11, 2019
 .Dt IEEE80211_RADIOTAP 9
 .Os
 .Sh NAME
@@ -257,7 +257,7 @@ struct wi_rx_radiotap_header {
 uint16_t   wr_chan_flags;
 uint8_twr_antsignal;
 uint8_twr_antnoise;
-} __packed;
+} __packed __aligned(8);
 .Ed
 .Pp
 and transmit definitions for the Atheros driver:

Modified: head/sys/dev/ath/if_athioctl.h
==
--- head/sys/dev/ath/if_athioctl.h  Mon Mar 11 01:12:23 2019
(r344989)
+++ head/sys/dev/ath/if_athioctl.h  Mon Mar 11 01:27:01 2019
(r344990)
@@ -373,7 +373,7 @@ struct ath_rx_radiotap_header {
 */
struct ath_radiotap_vendor_hdr wr_v;
 #endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */
-} __packed;
+} __packed __aligned(8);
 
 #define ATH_TX_RADIOTAP_PRESENT (  \
(1 << IEEE80211_RADIOTAP_FLAGS) | \

Modified: head/sys/dev/bwi/if_bwi.c
==
--- head/sys/dev/bwi/if_bwi.c   Mon Mar 11 01:12:23 2019(r344989)
+++ head/sys/dev/bwi/if_bwi.c   Mon Mar 11 01:27:01 2019(r344990)
@@ -1729,15 +1729,6 @@ bwi_set_channel(struct ieee80211com *ic)
bwi_rf_set_chan(mac, ieee80211_chan2ieee(ic, c), 0);
 
sc->sc_rates = ieee80211_get_ratetable(c);
-
-   /*
-* Setup radio tap channel freq and flags
-*/
-   sc->sc_tx_th.wt_chan_freq = sc->sc_rx_th.wr_chan_freq =
-   htole16(c->ic_freq);
-   sc->sc_tx_th.wt_chan_flags = sc->sc_rx_th.wr_chan_flags =
-   htole16(c->ic_flags & 0x);
-
BWI_UNLOCK(sc);
 }
 

Modified: head/sys/dev/bwi/if_bwivar.h
==
--- head/sys/dev/bwi/if_bwivar.hMon Mar 11 01:12:23 2019
(r344989)
+++ head/sys/dev/bwi/if_bwivar.hMon Mar 11 01:27:01 2019
(r344990)
@@ -513,7 +513,7 @@ struct bwi_tx_radiotap_hdr {
uint8_t wt_rate;
uint16_twt_chan_freq;
uint16_twt_chan_flags;
-};
+} __packed;
 
 #define BWI_RX_RADIOTAP_PRESENT\
((1 << IEEE80211_RADIOTAP_TSFT) |   \
@@ -533,7 +533,7 @@ struct bwi_rx_radiotap_hdr {
int8_t  wr_antsignal;
int8_t  wr_antnoise;
/* TODO: sq */
-};
+} __packed __aligned(8);
 
 struct bwi_vap {
struct ieee80211vap bv_vap;

Modified: head/sys/dev/bwn/if_bwn.c

svn commit: r344969 - in stable: 11/sys/dev/malo 11/sys/dev/mwl 11/sys/dev/usb/wlan 11/sys/net80211 12/sys/dev/malo 12/sys/dev/mwl 12/sys/dev/usb/wlan 12/sys/net80211

2019-03-09 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Mar  9 12:54:10 2019
New Revision: 344969
URL: https://svnweb.freebsd.org/changeset/base/344969

Log:
  MFC r343990:
  net80211: hide casts for 'i_seq' field offset calculation inside
  ieee80211_getqos() and reuse it in various places.

Modified:
  stable/12/sys/dev/malo/if_malo.c
  stable/12/sys/dev/mwl/if_mwl.c
  stable/12/sys/dev/usb/wlan/if_run.c
  stable/12/sys/net80211/ieee80211_adhoc.c
  stable/12/sys/net80211/ieee80211_hostap.c
  stable/12/sys/net80211/ieee80211_ht.c
  stable/12/sys/net80211/ieee80211_mesh.c
  stable/12/sys/net80211/ieee80211_output.c
  stable/12/sys/net80211/ieee80211_proto.h
  stable/12/sys/net80211/ieee80211_sta.c
  stable/12/sys/net80211/ieee80211_wds.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/dev/malo/if_malo.c
  stable/11/sys/dev/mwl/if_mwl.c
  stable/11/sys/dev/usb/wlan/if_run.c
  stable/11/sys/net80211/ieee80211_adhoc.c
  stable/11/sys/net80211/ieee80211_hostap.c
  stable/11/sys/net80211/ieee80211_ht.c
  stable/11/sys/net80211/ieee80211_mesh.c
  stable/11/sys/net80211/ieee80211_output.c
  stable/11/sys/net80211/ieee80211_proto.h
  stable/11/sys/net80211/ieee80211_sta.c
  stable/11/sys/net80211/ieee80211_wds.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/sys/dev/malo/if_malo.c
==
--- stable/12/sys/dev/malo/if_malo.cSat Mar  9 12:44:05 2019
(r344968)
+++ stable/12/sys/dev/malo/if_malo.cSat Mar  9 12:54:10 2019
(r344969)
@@ -1051,13 +1051,9 @@ malo_tx_start(struct malo_softc *sc, struct ieee80211_
copyhdrlen = hdrlen = ieee80211_anyhdrsize(wh);
pktlen = m0->m_pkthdr.len;
if (IEEE80211_QOS_HAS_SEQ(wh)) {
-   if (IEEE80211_IS_DSTODS(wh)) {
-   qos = *(uint16_t *)
-   (((struct ieee80211_qosframe_addr4 *) wh)->i_qos);
+   qos = *(uint16_t *)ieee80211_getqos(wh);
+   if (IEEE80211_IS_DSTODS(wh))
copyhdrlen -= sizeof(qos);
-   } else
-   qos = *(uint16_t *)
-   (((struct ieee80211_qosframe *) wh)->i_qos);
} else
qos = 0;
 
@@ -1952,7 +1948,6 @@ malo_rx_proc(void *arg, int npending)
struct malo_rxdesc *ds;
struct mbuf *m, *mnew;
struct ieee80211_qosframe *wh;
-   struct ieee80211_qosframe_addr4 *wh4;
struct ieee80211_node *ni;
int off, len, hdrlen, pktlen, rssi, ntodo;
uint8_t *data, status;
@@ -2062,15 +2057,8 @@ malo_rx_proc(void *arg, int npending)
/* NB: don't need to do this sometimes but ... */
/* XXX special case so we can memcpy after m_devget? */
ovbcopy(data + sizeof(uint16_t), wh, hdrlen);
-   if (IEEE80211_QOS_HAS_SEQ(wh)) {
-   if (IEEE80211_IS_DSTODS(wh)) {
-   wh4 = mtod(m,
-   struct ieee80211_qosframe_addr4*);
-   *(uint16_t *)wh4->i_qos = ds->qosctrl;
-   } else {
-   *(uint16_t *)wh->i_qos = ds->qosctrl;
-   }
-   }
+   if (IEEE80211_QOS_HAS_SEQ(wh))
+   *(uint16_t *)ieee80211_getqos(wh) = ds->qosctrl;
if (ieee80211_radiotap_active(ic)) {
sc->malo_rx_th.wr_flags = 0;
sc->malo_rx_th.wr_rate = ds->rate;

Modified: stable/12/sys/dev/mwl/if_mwl.c
==
--- stable/12/sys/dev/mwl/if_mwl.c  Sat Mar  9 12:44:05 2019
(r344968)
+++ stable/12/sys/dev/mwl/if_mwl.c  Sat Mar  9 12:54:10 2019
(r344969)
@@ -2614,7 +2614,6 @@ mwl_rx_proc(void *arg, int npending)
struct mwl_rxdesc *ds;
struct mbuf *m;
struct ieee80211_qosframe *wh;
-   struct ieee80211_qosframe_addr4 *wh4;
struct ieee80211_node *ni;
struct mwl_node *mn;
int off, len, hdrlen, pktlen, rssi, ntodo;
@@ -2761,15 +2760,8 @@ mwl_rx_proc(void *arg, int npending)
/* NB: don't need to do this sometimes but ... */
/* XXX special case so we can memcpy after m_devget? */
ovbcopy(data + sizeof(uint16_t), wh, hdrlen);
-   if (IEEE80211_QOS_HAS_SEQ(wh)) {
-   if (IEEE80211_IS_DSTODS(wh)) {
-   wh4 = mtod(m,
-   struct ieee80211_qosframe_addr4*);
-   *(uint16_t *)wh4->i_qos = ds->QosCtrl;
-   } else {
-   *(uint16_t *)wh->i_qos = ds->QosCtrl;
-   }
-   }
+   if (IEEE80211_QOS_HAS_SEQ(wh))
+   

svn commit: r344969 - in stable: 11/sys/dev/malo 11/sys/dev/mwl 11/sys/dev/usb/wlan 11/sys/net80211 12/sys/dev/malo 12/sys/dev/mwl 12/sys/dev/usb/wlan 12/sys/net80211

2019-03-09 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Mar  9 12:54:10 2019
New Revision: 344969
URL: https://svnweb.freebsd.org/changeset/base/344969

Log:
  MFC r343990:
  net80211: hide casts for 'i_seq' field offset calculation inside
  ieee80211_getqos() and reuse it in various places.

Modified:
  stable/11/sys/dev/malo/if_malo.c
  stable/11/sys/dev/mwl/if_mwl.c
  stable/11/sys/dev/usb/wlan/if_run.c
  stable/11/sys/net80211/ieee80211_adhoc.c
  stable/11/sys/net80211/ieee80211_hostap.c
  stable/11/sys/net80211/ieee80211_ht.c
  stable/11/sys/net80211/ieee80211_mesh.c
  stable/11/sys/net80211/ieee80211_output.c
  stable/11/sys/net80211/ieee80211_proto.h
  stable/11/sys/net80211/ieee80211_sta.c
  stable/11/sys/net80211/ieee80211_wds.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/sys/dev/malo/if_malo.c
  stable/12/sys/dev/mwl/if_mwl.c
  stable/12/sys/dev/usb/wlan/if_run.c
  stable/12/sys/net80211/ieee80211_adhoc.c
  stable/12/sys/net80211/ieee80211_hostap.c
  stable/12/sys/net80211/ieee80211_ht.c
  stable/12/sys/net80211/ieee80211_mesh.c
  stable/12/sys/net80211/ieee80211_output.c
  stable/12/sys/net80211/ieee80211_proto.h
  stable/12/sys/net80211/ieee80211_sta.c
  stable/12/sys/net80211/ieee80211_wds.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/sys/dev/malo/if_malo.c
==
--- stable/11/sys/dev/malo/if_malo.cSat Mar  9 12:44:05 2019
(r344968)
+++ stable/11/sys/dev/malo/if_malo.cSat Mar  9 12:54:10 2019
(r344969)
@@ -1049,13 +1049,9 @@ malo_tx_start(struct malo_softc *sc, struct ieee80211_
copyhdrlen = hdrlen = ieee80211_anyhdrsize(wh);
pktlen = m0->m_pkthdr.len;
if (IEEE80211_QOS_HAS_SEQ(wh)) {
-   if (IEEE80211_IS_DSTODS(wh)) {
-   qos = *(uint16_t *)
-   (((struct ieee80211_qosframe_addr4 *) wh)->i_qos);
+   qos = *(uint16_t *)ieee80211_getqos(wh);
+   if (IEEE80211_IS_DSTODS(wh))
copyhdrlen -= sizeof(qos);
-   } else
-   qos = *(uint16_t *)
-   (((struct ieee80211_qosframe *) wh)->i_qos);
} else
qos = 0;
 
@@ -1950,7 +1946,6 @@ malo_rx_proc(void *arg, int npending)
struct malo_rxdesc *ds;
struct mbuf *m, *mnew;
struct ieee80211_qosframe *wh;
-   struct ieee80211_qosframe_addr4 *wh4;
struct ieee80211_node *ni;
int off, len, hdrlen, pktlen, rssi, ntodo;
uint8_t *data, status;
@@ -2060,15 +2055,8 @@ malo_rx_proc(void *arg, int npending)
/* NB: don't need to do this sometimes but ... */
/* XXX special case so we can memcpy after m_devget? */
ovbcopy(data + sizeof(uint16_t), wh, hdrlen);
-   if (IEEE80211_QOS_HAS_SEQ(wh)) {
-   if (IEEE80211_IS_DSTODS(wh)) {
-   wh4 = mtod(m,
-   struct ieee80211_qosframe_addr4*);
-   *(uint16_t *)wh4->i_qos = ds->qosctrl;
-   } else {
-   *(uint16_t *)wh->i_qos = ds->qosctrl;
-   }
-   }
+   if (IEEE80211_QOS_HAS_SEQ(wh))
+   *(uint16_t *)ieee80211_getqos(wh) = ds->qosctrl;
if (ieee80211_radiotap_active(ic)) {
sc->malo_rx_th.wr_flags = 0;
sc->malo_rx_th.wr_rate = ds->rate;

Modified: stable/11/sys/dev/mwl/if_mwl.c
==
--- stable/11/sys/dev/mwl/if_mwl.c  Sat Mar  9 12:44:05 2019
(r344968)
+++ stable/11/sys/dev/mwl/if_mwl.c  Sat Mar  9 12:54:10 2019
(r344969)
@@ -2612,7 +2612,6 @@ mwl_rx_proc(void *arg, int npending)
struct mwl_rxdesc *ds;
struct mbuf *m;
struct ieee80211_qosframe *wh;
-   struct ieee80211_qosframe_addr4 *wh4;
struct ieee80211_node *ni;
struct mwl_node *mn;
int off, len, hdrlen, pktlen, rssi, ntodo;
@@ -2759,15 +2758,8 @@ mwl_rx_proc(void *arg, int npending)
/* NB: don't need to do this sometimes but ... */
/* XXX special case so we can memcpy after m_devget? */
ovbcopy(data + sizeof(uint16_t), wh, hdrlen);
-   if (IEEE80211_QOS_HAS_SEQ(wh)) {
-   if (IEEE80211_IS_DSTODS(wh)) {
-   wh4 = mtod(m,
-   struct ieee80211_qosframe_addr4*);
-   *(uint16_t *)wh4->i_qos = ds->QosCtrl;
-   } else {
-   *(uint16_t *)wh->i_qos = ds->QosCtrl;
-   }
-   }
+   if (IEEE80211_QOS_HAS_SEQ(wh))
+   

svn commit: r344968 - stable/12/sys/dev/rtwn/rtl8192c

2019-03-09 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Mar  9 12:44:05 2019
New Revision: 344968
URL: https://svnweb.freebsd.org/changeset/base/344968

Log:
  MFC r344744:
  rtwn_usb(4): fix LED blinking for RTL8192CU during scanning

Modified:
  stable/12/sys/dev/rtwn/rtl8192c/r92c_init.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/rtwn/rtl8192c/r92c_init.c
==
--- stable/12/sys/dev/rtwn/rtl8192c/r92c_init.c Sat Mar  9 10:35:37 2019
(r344967)
+++ stable/12/sys/dev/rtwn/rtl8192c/r92c_init.c Sat Mar  9 12:44:05 2019
(r344968)
@@ -322,6 +322,7 @@ r92c_init_antsel(struct rtwn_softc *sc)
rtwn_bb_setbits(sc, R92C_FPGA0_RFPARAM(0), 0, 0x2000);
reg = rtwn_bb_read(sc, R92C_FPGA0_RFIFACEOE(0));
sc->sc_ant = MS(reg, R92C_FPGA0_RFIFACEOE0_ANT);/* XXX */
+   rtwn_setbits_1(sc, R92C_LEDCFG2, 0x80, 0);
 }
 
 void
___
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: r344748 - head/sbin/ifconfig

2019-03-03 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Mar  4 03:47:06 2019
New Revision: 344748
URL: https://svnweb.freebsd.org/changeset/base/344748

Log:
  Allow to build ifconfig(8) without wireless support
  
  The change removes SIOC[GS]IEEE80211 handling from ifconfig(8)
  if WITHOUT_WIRELESS_SUPPORT=yes is set in src.conf(5).
  
  Reviewed by:  bz
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D19289

Modified:
  head/sbin/ifconfig/Makefile

Modified: head/sbin/ifconfig/Makefile
==
--- head/sbin/ifconfig/Makefile Mon Mar  4 03:38:43 2019(r344747)
+++ head/sbin/ifconfig/Makefile Mon Mar  4 03:47:06 2019(r344748)
@@ -39,8 +39,10 @@ SRCS+=   ifipsec.c   # IPsec VTI
 SRCS+= sfp.c   # SFP/SFP+ information
 LIBADD+=   m
 
+.if ${MK_WIRELESS_SUPPORT} != "no"
 SRCS+= ifieee80211.c   # SIOC[GS]IEEE80211 support
 LIBADD+=   80211
+.endif
 
 SRCS+= carp.c  # SIOC[GS]VH support
 SRCS+= ifgroup.c   # ...
___
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: r344747 - in stable: 10/usr.sbin/bsnmpd/modules/snmp_hostres 11/usr.sbin/bsnmpd/modules/snmp_hostres 12/usr.sbin/bsnmpd/modules/snmp_hostres

2019-03-03 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Mar  4 03:38:43 2019
New Revision: 344747
URL: https://svnweb.freebsd.org/changeset/base/344747

Log:
  MFC r344245:
  snmp_hostres(3): fix a typo in sanity checks in handle_chunk()
  
  PR:   204253
  Submitted by: David Binderman 

Modified:
  stable/12/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c
  stable/11/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c
Directory Properties:
  stable/10/   (props changed)
  stable/11/   (props changed)

Modified: stable/12/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c
==
--- stable/12/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c  
Mon Mar  4 03:30:39 2019(r344746)
+++ stable/12/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c  
Mon Mar  4 03:38:43 2019(r344747)
@@ -312,7 +312,7 @@ handle_chunk(int32_t ds_index, const char *chunk_name,
 
assert(chunk_name != NULL);
assert(chunk_name[0] != '\0');
-   if (chunk_name == NULL || chunk_name == '\0')
+   if (chunk_name == NULL || chunk_name[0] == '\0')
return;
 
HRDBG("ANALYZE chunk %s", chunk_name);
___
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: r344747 - in stable: 10/usr.sbin/bsnmpd/modules/snmp_hostres 11/usr.sbin/bsnmpd/modules/snmp_hostres 12/usr.sbin/bsnmpd/modules/snmp_hostres

2019-03-03 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Mar  4 03:38:43 2019
New Revision: 344747
URL: https://svnweb.freebsd.org/changeset/base/344747

Log:
  MFC r344245:
  snmp_hostres(3): fix a typo in sanity checks in handle_chunk()
  
  PR:   204253
  Submitted by: David Binderman 

Modified:
  stable/11/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c
  stable/12/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c
Directory Properties:
  stable/10/   (props changed)
  stable/12/   (props changed)

Modified: stable/11/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c
==
--- stable/11/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c  
Mon Mar  4 03:30:39 2019(r344746)
+++ stable/11/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c  
Mon Mar  4 03:38:43 2019(r344747)
@@ -316,7 +316,7 @@ handle_chunk(int32_t ds_index, const char *chunk_name,
 
assert(chunk_name != NULL);
assert(chunk_name[0] != '\0');
-   if (chunk_name == NULL || chunk_name == '\0')
+   if (chunk_name == NULL || chunk_name[0] == '\0')
return;
 
HRDBG("ANALYZE chunk %s", chunk_name);
___
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: r344747 - in stable: 10/usr.sbin/bsnmpd/modules/snmp_hostres 11/usr.sbin/bsnmpd/modules/snmp_hostres 12/usr.sbin/bsnmpd/modules/snmp_hostres

2019-03-03 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Mar  4 03:38:43 2019
New Revision: 344747
URL: https://svnweb.freebsd.org/changeset/base/344747

Log:
  MFC r344245:
  snmp_hostres(3): fix a typo in sanity checks in handle_chunk()
  
  PR:   204253
  Submitted by: David Binderman 

Modified:
  stable/10/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c
  stable/12/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c
Directory Properties:
  stable/11/   (props changed)
  stable/12/   (props changed)

Modified: stable/10/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c
==
--- stable/10/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c  
Mon Mar  4 03:30:39 2019(r344746)
+++ stable/10/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c  
Mon Mar  4 03:38:43 2019(r344747)
@@ -316,7 +316,7 @@ handle_chunk(int32_t ds_index, const char *chunk_name,
 
assert(chunk_name != NULL);
assert(chunk_name[0] != '\0');
-   if (chunk_name == NULL || chunk_name == '\0')
+   if (chunk_name == NULL || chunk_name[0] == '\0')
return;
 
HRDBG("ANALYZE chunk %s", chunk_name);
___
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: r344746 - in stable: 10/usr.sbin/rpc.ypupdated 11/usr.sbin/rpc.ypupdated 12/usr.sbin/rpc.ypupdated

2019-03-03 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Mar  4 03:30:39 2019
New Revision: 344746
URL: https://svnweb.freebsd.org/changeset/base/344746

Log:
  MFC r344244:
  Fix memory / resource leaks in usr.sbin/rpc.ypupdated/update.c
  
  Re-apply r343909 to this file to get the issue fixed.
  
  PR:   204956
  Reported by:  David Binderman 

Modified:
  stable/10/usr.sbin/rpc.ypupdated/update.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/usr.sbin/rpc.ypupdated/update.c
  stable/12/usr.sbin/rpc.ypupdated/update.c
Directory Properties:
  stable/11/   (props changed)
  stable/12/   (props changed)

Modified: stable/10/usr.sbin/rpc.ypupdated/update.c
==
--- stable/10/usr.sbin/rpc.ypupdated/update.c   Mon Mar  4 03:02:14 2019
(r344745)
+++ stable/10/usr.sbin/rpc.ypupdated/update.c   Mon Mar  4 03:30:39 2019
(r344746)
@@ -263,11 +263,14 @@ localupdate(char *name, char *filename, u_int op, u_in
sprintf(tmpname, "%s.tmp", filename);
rf = fopen(filename, "r");
if (rf == NULL) {
-   return (ERR_READ);
+   err = ERR_READ;
+   goto cleanup;
}
wf = fopen(tmpname, "w");
if (wf == NULL) {
-   return (ERR_WRITE);
+   fclose(rf);
+   err = ERR_WRITE;
+   goto cleanup;
}
err = -1;
while (fgets(line, sizeof (line), rf)) {
@@ -307,13 +310,17 @@ localupdate(char *name, char *filename, u_int op, u_in
fclose(rf);
if (err == 0) {
if (rename(tmpname, filename) < 0) {
-   return (ERR_DBASE);
+   err = ERR_DBASE;
+   goto cleanup;
}
} else {
if (unlink(tmpname) < 0) {
-   return (ERR_DBASE);
+   err = ERR_DBASE;
+   goto cleanup;
}
}
+cleanup:
+   free(tmpname);
return (err);
 }
 
___
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: r344746 - in stable: 10/usr.sbin/rpc.ypupdated 11/usr.sbin/rpc.ypupdated 12/usr.sbin/rpc.ypupdated

2019-03-03 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Mar  4 03:30:39 2019
New Revision: 344746
URL: https://svnweb.freebsd.org/changeset/base/344746

Log:
  MFC r344244:
  Fix memory / resource leaks in usr.sbin/rpc.ypupdated/update.c
  
  Re-apply r343909 to this file to get the issue fixed.
  
  PR:   204956
  Reported by:  David Binderman 

Modified:
  stable/11/usr.sbin/rpc.ypupdated/update.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/usr.sbin/rpc.ypupdated/update.c
  stable/12/usr.sbin/rpc.ypupdated/update.c
Directory Properties:
  stable/10/   (props changed)
  stable/12/   (props changed)

Modified: stable/11/usr.sbin/rpc.ypupdated/update.c
==
--- stable/11/usr.sbin/rpc.ypupdated/update.c   Mon Mar  4 03:02:14 2019
(r344745)
+++ stable/11/usr.sbin/rpc.ypupdated/update.c   Mon Mar  4 03:30:39 2019
(r344746)
@@ -263,11 +263,14 @@ localupdate(char *name, char *filename, u_int op, u_in
sprintf(tmpname, "%s.tmp", filename);
rf = fopen(filename, "r");
if (rf == NULL) {
-   return (ERR_READ);
+   err = ERR_READ;
+   goto cleanup;
}
wf = fopen(tmpname, "w");
if (wf == NULL) {
-   return (ERR_WRITE);
+   fclose(rf);
+   err = ERR_WRITE;
+   goto cleanup;
}
err = -1;
while (fgets(line, sizeof (line), rf)) {
@@ -307,13 +310,17 @@ localupdate(char *name, char *filename, u_int op, u_in
fclose(rf);
if (err == 0) {
if (rename(tmpname, filename) < 0) {
-   return (ERR_DBASE);
+   err = ERR_DBASE;
+   goto cleanup;
}
} else {
if (unlink(tmpname) < 0) {
-   return (ERR_DBASE);
+   err = ERR_DBASE;
+   goto cleanup;
}
}
+cleanup:
+   free(tmpname);
return (err);
 }
 
___
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: r344746 - in stable: 10/usr.sbin/rpc.ypupdated 11/usr.sbin/rpc.ypupdated 12/usr.sbin/rpc.ypupdated

2019-03-03 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Mar  4 03:30:39 2019
New Revision: 344746
URL: https://svnweb.freebsd.org/changeset/base/344746

Log:
  MFC r344244:
  Fix memory / resource leaks in usr.sbin/rpc.ypupdated/update.c
  
  Re-apply r343909 to this file to get the issue fixed.
  
  PR:   204956
  Reported by:  David Binderman 

Modified:
  stable/12/usr.sbin/rpc.ypupdated/update.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/usr.sbin/rpc.ypupdated/update.c
  stable/11/usr.sbin/rpc.ypupdated/update.c
Directory Properties:
  stable/10/   (props changed)
  stable/11/   (props changed)

Modified: stable/12/usr.sbin/rpc.ypupdated/update.c
==
--- stable/12/usr.sbin/rpc.ypupdated/update.c   Mon Mar  4 03:02:14 2019
(r344745)
+++ stable/12/usr.sbin/rpc.ypupdated/update.c   Mon Mar  4 03:30:39 2019
(r344746)
@@ -263,11 +263,14 @@ localupdate(char *name, char *filename, u_int op, u_in
sprintf(tmpname, "%s.tmp", filename);
rf = fopen(filename, "r");
if (rf == NULL) {
-   return (ERR_READ);
+   err = ERR_READ;
+   goto cleanup;
}
wf = fopen(tmpname, "w");
if (wf == NULL) {
-   return (ERR_WRITE);
+   fclose(rf);
+   err = ERR_WRITE;
+   goto cleanup;
}
err = -1;
while (fgets(line, sizeof (line), rf)) {
@@ -307,13 +310,17 @@ localupdate(char *name, char *filename, u_int op, u_in
fclose(rf);
if (err == 0) {
if (rename(tmpname, filename) < 0) {
-   return (ERR_DBASE);
+   err = ERR_DBASE;
+   goto cleanup;
}
} else {
if (unlink(tmpname) < 0) {
-   return (ERR_DBASE);
+   err = ERR_DBASE;
+   goto cleanup;
}
}
+cleanup:
+   free(tmpname);
return (err);
 }
 
___
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: r344745 - in head/sys/dev/rtwn/rtl8192c: . usb

2019-03-03 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Mar  4 03:02:14 2019
New Revision: 344745
URL: https://svnweb.freebsd.org/changeset/base/344745

Log:
  rtwn_usb(4): fix Tx instability with RTL8192CU chipsets
  
  - Fix data frames transmission via POWER_STATUS register setup -
  it seems to be set by MACID_CONFIG firmware command, which was broken*
  in r290439 and later disabled in r307529.
  
  We can re-enable it later if / when firmware rate adaptation will be
  ready; however, this step will be required anyway - for firmware-less
  builds.
  
  - Force RTS / CTS protection frame rate to CCK1 (this rate works fine
  without any additional setup; no better workaround is known yet).
  
  The problem was not observed on the channel 1 or with CCK1 rate enforced
  ('ifconfig wlan0 ucastrate 1' for 11 b/g; not possible for 11n networks
  due to ifconfig(8) bug).
  
  * I'm not sure if it works before r290439 because - AFAIR - I never seen
  firmware rate adaptation working for 10-STABLE urtwn(4)
  (It needs EN_BCN bit set and RSSI updates at least).
  
  Tested with RTL8188CUS in STA mode
  (in regular mode and with disabled MRR - DARFRC*8 is set to 0)
  
  PR:   233949
  MFC after:2 weeks

Modified:
  head/sys/dev/rtwn/rtl8192c/r92c_reg.h
  head/sys/dev/rtwn/rtl8192c/r92c_tx.c
  head/sys/dev/rtwn/rtl8192c/usb/r92cu_init.c

Modified: head/sys/dev/rtwn/rtl8192c/r92c_reg.h
==
--- head/sys/dev/rtwn/rtl8192c/r92c_reg.h   Mon Mar  4 01:54:28 2019
(r344744)
+++ head/sys/dev/rtwn/rtl8192c/r92c_reg.h   Mon Mar  4 03:02:14 2019
(r344745)
@@ -148,6 +148,7 @@
 #define R92C_RD_RESP_PKT_TH0x463
 #define R92C_INIRTS_RATE_SEL   0x480
 #define R92C_INIDATA_RATE_SEL(macid)   (0x484 + (macid))
+#define R92C_POWER_STATUS  0x4a4
 #define R92C_QUEUE_CTRL0x4c6
 #define R92C_MAX_AGGR_NUM  0x4ca
 #define R92C_BAR_MODE_CTRL 0x4cc

Modified: head/sys/dev/rtwn/rtl8192c/r92c_tx.c
==
--- head/sys/dev/rtwn/rtl8192c/r92c_tx.cMon Mar  4 01:54:28 2019
(r344744)
+++ head/sys/dev/rtwn/rtl8192c/r92c_tx.cMon Mar  4 03:02:14 2019
(r344745)
@@ -211,6 +211,12 @@ r92c_tx_setup_macid(void *buf, int id)
struct r92c_tx_desc *txd = (struct r92c_tx_desc *)buf;
 
txd->txdw1 |= htole32(SM(R92C_TXDW1_MACID, id));
+
+   /* XXX does not belong here */
+   /* XXX temporary (I hope) */
+   /* Force CCK1 for RTS / CTS frames (driver bug) */
+   txd->txdw4 &= ~htole32(SM(R92C_TXDW4_RTSRATE, R92C_TXDW4_RTSRATE_M));
+   txd->txdw4 &= ~htole32(R92C_TXDW4_RTS_SHORT);
 }
 
 void

Modified: head/sys/dev/rtwn/rtl8192c/usb/r92cu_init.c
==
--- head/sys/dev/rtwn/rtl8192c/usb/r92cu_init.c Mon Mar  4 01:54:28 2019
(r344744)
+++ head/sys/dev/rtwn/rtl8192c/usb/r92cu_init.c Mon Mar  4 03:02:14 2019
(r344745)
@@ -357,6 +357,8 @@ void
 r92cu_post_init(struct rtwn_softc *sc)
 {
 
+   rtwn_write_4(sc, R92C_POWER_STATUS, 0x5);
+
/* Perform LO and IQ calibrations. */
r92c_iq_calib(sc);
/* Perform LC calibration. */
___
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: r344744 - head/sys/dev/rtwn/rtl8192c

2019-03-03 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Mar  4 01:54:28 2019
New Revision: 344744
URL: https://svnweb.freebsd.org/changeset/base/344744

Log:
  rtwn_usb(4): fix LED blinking for RTL8192CU during scanning
  
  Tested with RTL8188CUS, STA mode.
  
  MFC after:5 days

Modified:
  head/sys/dev/rtwn/rtl8192c/r92c_init.c

Modified: head/sys/dev/rtwn/rtl8192c/r92c_init.c
==
--- head/sys/dev/rtwn/rtl8192c/r92c_init.c  Mon Mar  4 00:49:07 2019
(r344743)
+++ head/sys/dev/rtwn/rtl8192c/r92c_init.c  Mon Mar  4 01:54:28 2019
(r344744)
@@ -322,6 +322,7 @@ r92c_init_antsel(struct rtwn_softc *sc)
rtwn_bb_setbits(sc, R92C_FPGA0_RFPARAM(0), 0, 0x2000);
reg = rtwn_bb_read(sc, R92C_FPGA0_RFIFACEOE(0));
sc->sc_ant = MS(reg, R92C_FPGA0_RFIFACEOE0_ANT);/* XXX */
+   rtwn_setbits_1(sc, R92C_LEDCFG2, 0x80, 0);
 }
 
 void
___
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: r344462 - stable/11/tools/build/mk

2019-02-22 Thread Andriy Voskoboinyk
Author: avos
Date: Fri Feb 22 08:10:58 2019
New Revision: 344462
URL: https://svnweb.freebsd.org/changeset/base/344462

Log:
  MFC r344214:
  Refresh OptionalObsoleteFiles.inc for MK_PMC:
  
  - Add missing pmc.haswellxeon.3 to the list.
  - Correct man page section for pmcstudy.8.

Modified:
  stable/11/tools/build/mk/OptionalObsoleteFiles.inc
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc
==
--- stable/11/tools/build/mk/OptionalObsoleteFiles.inc  Fri Feb 22 08:04:50 
2019(r344461)
+++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc  Fri Feb 22 08:10:58 
2019(r344462)
@@ -7036,7 +7036,6 @@ OLD_FILES+=usr/lib32/libpmc_p.a
 OLD_FILES+=usr/sbin/pmcannotate
 OLD_FILES+=usr/sbin/pmccontrol
 OLD_FILES+=usr/sbin/pmcstat
-OLD_FILES+=usr/share/man/man1/pmcstudy.1.gz
 OLD_FILES+=usr/share/man/man3/pmc.3.gz
 OLD_FILES+=usr/share/man/man3/pmc.atom.3.gz
 OLD_FILES+=usr/share/man/man3/pmc.atomsilvermont.3.gz
@@ -7046,6 +7045,7 @@ OLD_FILES+=usr/share/man/man3/pmc.corei7.3.gz
 OLD_FILES+=usr/share/man/man3/pmc.corei7uc.3.gz
 OLD_FILES+=usr/share/man/man3/pmc.haswell.3.gz
 OLD_FILES+=usr/share/man/man3/pmc.haswelluc.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.haswellxeon.3.gz
 OLD_FILES+=usr/share/man/man3/pmc.iaf.3.gz
 OLD_FILES+=usr/share/man/man3/pmc.ivybridge.3.gz
 OLD_FILES+=usr/share/man/man3/pmc.ivybridgexeon.3.gz
@@ -7105,6 +7105,7 @@ OLD_FILES+=usr/share/man/man3/pmclog_read.3.gz
 OLD_FILES+=usr/share/man/man8/pmcannotate.8.gz
 OLD_FILES+=usr/share/man/man8/pmccontrol.8.gz
 OLD_FILES+=usr/share/man/man8/pmcstat.8.gz
+OLD_FILES+=usr/share/man/man8/pmcstudy.8.gz
 .endif
 
 .if ${MK_PORTSNAP} == no
___
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: r344461 - stable/12/tools/build/mk

2019-02-22 Thread Andriy Voskoboinyk
Author: avos
Date: Fri Feb 22 08:04:50 2019
New Revision: 344461
URL: https://svnweb.freebsd.org/changeset/base/344461

Log:
  MFC r344214:
  Refresh OptionalObsoleteFiles.inc for MK_PMC:
  
  - Add missing /usr/sbin/pmc, pmcformat.h, libpmcstat.h and pmc.haswellxeon.3
  to the list.
  - Correct man page section for pmcstudy.8.
  - Include recently added libipt and libopencsd for corresponding TARGET_ARCH

Modified:
  stable/12/tools/build/mk/OptionalObsoleteFiles.inc
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/tools/build/mk/OptionalObsoleteFiles.inc
==
--- stable/12/tools/build/mk/OptionalObsoleteFiles.inc  Fri Feb 22 07:00:23 
2019(r344460)
+++ stable/12/tools/build/mk/OptionalObsoleteFiles.inc  Fri Feb 22 08:04:50 
2019(r344461)
@@ -7370,8 +7370,76 @@ OLD_FILES+=usr/share/man/man7/pkg.7.gz
 
 .if ${MK_PMC} == no
 OLD_FILES+=usr/bin/pmcstudy
+.if ${TARGET_ARCH} == "amd64"
+OLD_FILES+=usr/include/libipt/pt_last_ip.h
+OLD_FILES+=usr/include/libipt/intel-pt.h
+OLD_FILES+=usr/include/libipt/pt_time.h
+OLD_FILES+=usr/include/libipt/pt_cpu.h
+OLD_FILES+=usr/include/libipt/pt_compiler.h
+OLD_DIRS+=usr/include/libipt
+.endif
+.if ${TARGET_ARCH} == "aarch64"
+OLD_FILES+=usr/include/opencsd/c_api/opencsd_c_api.h
+OLD_FILES+=usr/include/opencsd/c_api/ocsd_c_api_cust_impl.h
+OLD_FILES+=usr/include/opencsd/c_api/ocsd_c_api_types.h
+OLD_FILES+=usr/include/opencsd/c_api/ocsd_c_api_cust_fact.h
+OLD_FILES+=usr/include/opencsd/c_api/ocsd_c_api_custom.h
+OLD_DIRS+=usr/include/opencsd/c_api
+OLD_FILES+=usr/include/opencsd/ocsd_if_types.h
+OLD_FILES+=usr/include/opencsd/ptm/trc_dcd_mngr_ptm.h
+OLD_FILES+=usr/include/opencsd/ptm/trc_pkt_proc_ptm.h
+OLD_FILES+=usr/include/opencsd/ptm/trc_cmp_cfg_ptm.h
+OLD_FILES+=usr/include/opencsd/ptm/ptm_decoder.h
+OLD_FILES+=usr/include/opencsd/ptm/trc_pkt_elem_ptm.h
+OLD_FILES+=usr/include/opencsd/ptm/trc_pkt_decode_ptm.h
+OLD_FILES+=usr/include/opencsd/ptm/trc_pkt_types_ptm.h
+OLD_DIRS+=usr/include/opencsd/ptm
+OLD_FILES+=usr/include/opencsd/trc_gen_elem_types.h
+OLD_FILES+=usr/include/opencsd/etmv4/trc_pkt_proc_etmv4.h
+OLD_FILES+=usr/include/opencsd/etmv4/trc_etmv4_stack_elem.h
+OLD_FILES+=usr/include/opencsd/etmv4/etmv4_decoder.h
+OLD_FILES+=usr/include/opencsd/etmv4/trc_pkt_elem_etmv4i.h
+OLD_FILES+=usr/include/opencsd/etmv4/trc_dcd_mngr_etmv4i.h
+OLD_FILES+=usr/include/opencsd/etmv4/trc_pkt_types_etmv4.h
+OLD_FILES+=usr/include/opencsd/etmv4/trc_pkt_elem_etmv4d.h
+OLD_FILES+=usr/include/opencsd/etmv4/trc_pkt_decode_etmv4i.h
+OLD_FILES+=usr/include/opencsd/etmv4/trc_cmp_cfg_etmv4.h
+OLD_DIRS+=usr/include/opencsd/etmv4
+OLD_FILES+=usr/include/opencsd/etmv3/trc_pkt_decode_etmv3.h
+OLD_FILES+=usr/include/opencsd/etmv3/trc_cmp_cfg_etmv3.h
+OLD_FILES+=usr/include/opencsd/etmv3/etmv3_decoder.h
+OLD_FILES+=usr/include/opencsd/etmv3/trc_pkt_proc_etmv3.h
+OLD_FILES+=usr/include/opencsd/etmv3/trc_pkt_elem_etmv3.h
+OLD_FILES+=usr/include/opencsd/etmv3/trc_pkt_types_etmv3.h
+OLD_FILES+=usr/include/opencsd/etmv3/trc_dcd_mngr_etmv3.h
+OLD_DIRS+=usr/include/opencsd/etmv3
+OLD_FILES+=usr/include/opencsd/trc_pkt_types.h
+OLD_FILES+=usr/include/opencsd/stm/trc_pkt_proc_stm.h
+OLD_FILES+=usr/include/opencsd/stm/trc_pkt_types_stm.h
+OLD_FILES+=usr/include/opencsd/stm/stm_decoder.h
+OLD_FILES+=usr/include/opencsd/stm/trc_dcd_mngr_stm.h
+OLD_FILES+=usr/include/opencsd/stm/trc_cmp_cfg_stm.h
+OLD_FILES+=usr/include/opencsd/stm/trc_pkt_elem_stm.h
+OLD_FILES+=usr/include/opencsd/stm/trc_pkt_decode_stm.h
+OLD_DIRS+=usr/include/opencsd/stm
+OLD_DIRS+=usr/include/opencsd
+.endif
 OLD_FILES+=usr/include/pmc.h
 OLD_FILES+=usr/include/pmclog.h
+OLD_FILES+=usr/include/pmcformat.h
+OLD_FILES+=usr/include/libpmcstat.h
+.if ${TARGET_ARCH} == "amd64"
+OLD_FILES+=usr/lib/libipt.a
+OLD_FILES+=usr/lib/libipt.so
+OLD_LIBS+=lib/libipt.so.0
+OLD_FILES+=usr/lib/libipt_p.a
+.endif
+.if ${TARGET_ARCH} == "aarch64"
+OLD_FILES+=usr/lib/libopencsd.a
+OLD_FILES+=usr/lib/libopencsd.so
+OLD_LIBS+=lib/libopencsd.so.0
+OLD_FILES+=usr/lib/libopencsd_p.a
+.endif
 OLD_FILES+=usr/lib/libpmc.a
 OLD_FILES+=usr/lib/libpmc.so
 OLD_LIBS+=usr/lib/libpmc.so.5
@@ -7380,10 +7448,10 @@ OLD_FILES+=usr/lib32/libpmc.a
 OLD_FILES+=usr/lib32/libpmc.so
 OLD_LIBS+=usr/lib32/libpmc.so.5
 OLD_FILES+=usr/lib32/libpmc_p.a
+OLD_FILES+=usr/sbin/pmc
 OLD_FILES+=usr/sbin/pmcannotate
 OLD_FILES+=usr/sbin/pmccontrol
 OLD_FILES+=usr/sbin/pmcstat
-OLD_FILES+=usr/share/man/man1/pmcstudy.1.gz
 OLD_FILES+=usr/share/man/man3/pmc.3.gz
 OLD_FILES+=usr/share/man/man3/pmc.atom.3.gz
 OLD_FILES+=usr/share/man/man3/pmc.atomsilvermont.3.gz
@@ -7393,6 +7461,7 @@ OLD_FILES+=usr/share/man/man3/pmc.corei7.3.gz
 OLD_FILES+=usr/share/man/man3/pmc.corei7uc.3.gz
 OLD_FILES+=usr/share/man/man3/pmc.haswell.3.gz
 OLD_FILES+=usr/share/man/man3/pmc.haswelluc.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.haswellxeon.3.gz
 OLD_FILES+=usr/share/man/man3/pmc.iaf.3.gz
 

svn commit: r344454 - in stable: 11/tools/build/mk 12/tools/build/mk

2019-02-21 Thread Andriy Voskoboinyk
Author: avos
Date: Thu Feb 21 23:53:52 2019
New Revision: 344454
URL: https://svnweb.freebsd.org/changeset/base/344454

Log:
  MFC r344201:
  Remove vi(1)-related files via 'make delete-old' when WITHOUT_VI=1 is set.

Modified:
  stable/12/tools/build/mk/OptionalObsoleteFiles.inc
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/tools/build/mk/OptionalObsoleteFiles.inc
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/tools/build/mk/OptionalObsoleteFiles.inc
==
--- stable/12/tools/build/mk/OptionalObsoleteFiles.inc  Thu Feb 21 22:56:54 
2019(r344453)
+++ stable/12/tools/build/mk/OptionalObsoleteFiles.inc  Thu Feb 21 23:53:52 
2019(r344454)
@@ -9720,6 +9720,32 @@ OLD_FILES+=usr/share/man/man8/lastlogin.8.gz
 OLD_FILES+=usr/share/man/man8/utx.8.gz
 .endif
 
+.if ${MK_VI} == no
+OLD_FILES+=etc/rc.d/virecover
+OLD_FILES+=rescue/ex
+OLD_FILES+=rescue/vi
+OLD_FILES+=usr/bin/ex
+OLD_FILES+=usr/bin/nex
+OLD_FILES+=usr/bin/nvi
+OLD_FILES+=usr/bin/nview
+OLD_FILES+=usr/bin/vi
+OLD_FILES+=usr/bin/view
+OLD_FILES+=usr/share/man/man1/ex.1.gz
+OLD_FILES+=usr/share/man/man1/nex.1.gz
+OLD_FILES+=usr/share/man/man1/nvi.1.gz
+OLD_FILES+=usr/share/man/man1/nview.1.gz
+OLD_FILES+=usr/share/man/man1/vi.1.gz
+OLD_FILES+=usr/share/man/man1/view.1.gz
+.  if exists(${DESTDIR}/usr/share/vi)
+VI_DIRS!=find ${DESTDIR}/usr/share/vi -type d \
+| sed -e 's,^${DESTDIR}/,,'; echo
+VI_FILES!=find ${DESTDIR}/usr/share/vi \! -type d \
+| sed -e 's,^${DESTDIR}/,,'; echo
+OLD_DIRS+=${VI_DIRS}
+OLD_FILES+=${VI_FILES}
+.  endif
+.endif
+
 .if ${MK_WIRELESS} == no
 OLD_FILES+=etc/regdomain.xml
 OLD_FILES+=etc/rc.d/hostapd
___
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: r344454 - in stable: 11/tools/build/mk 12/tools/build/mk

2019-02-21 Thread Andriy Voskoboinyk
Author: avos
Date: Thu Feb 21 23:53:52 2019
New Revision: 344454
URL: https://svnweb.freebsd.org/changeset/base/344454

Log:
  MFC r344201:
  Remove vi(1)-related files via 'make delete-old' when WITHOUT_VI=1 is set.

Modified:
  stable/11/tools/build/mk/OptionalObsoleteFiles.inc
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/tools/build/mk/OptionalObsoleteFiles.inc
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc
==
--- stable/11/tools/build/mk/OptionalObsoleteFiles.inc  Thu Feb 21 22:56:54 
2019(r344453)
+++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc  Thu Feb 21 23:53:52 
2019(r344454)
@@ -9339,6 +9339,32 @@ OLD_FILES+=usr/share/man/man8/lastlogin.8.gz
 OLD_FILES+=usr/share/man/man8/utx.8.gz
 .endif
 
+.if ${MK_VI} == no
+OLD_FILES+=etc/rc.d/virecover
+OLD_FILES+=rescue/ex
+OLD_FILES+=rescue/vi
+OLD_FILES+=usr/bin/ex
+OLD_FILES+=usr/bin/nex
+OLD_FILES+=usr/bin/nvi
+OLD_FILES+=usr/bin/nview
+OLD_FILES+=usr/bin/vi
+OLD_FILES+=usr/bin/view
+OLD_FILES+=usr/share/man/man1/ex.1.gz
+OLD_FILES+=usr/share/man/man1/nex.1.gz
+OLD_FILES+=usr/share/man/man1/nvi.1.gz
+OLD_FILES+=usr/share/man/man1/nview.1.gz
+OLD_FILES+=usr/share/man/man1/vi.1.gz
+OLD_FILES+=usr/share/man/man1/view.1.gz
+.  if exists(${DESTDIR}/usr/share/vi)
+VI_DIRS!=find ${DESTDIR}/usr/share/vi -type d \
+| sed -e 's,^${DESTDIR}/,,'; echo
+VI_FILES!=find ${DESTDIR}/usr/share/vi \! -type d \
+| sed -e 's,^${DESTDIR}/,,'; echo
+OLD_DIRS+=${VI_DIRS}
+OLD_FILES+=${VI_FILES}
+.  endif
+.endif
+
 .if ${MK_WIRELESS} == no
 OLD_FILES+=etc/regdomain.xml
 OLD_FILES+=etc/rc.d/hostapd
___
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: r344430 - in stable: 11/sys/conf 11/sys/dev/ata 12/sys/conf 12/sys/dev/ata

2019-02-21 Thread Andriy Voskoboinyk
Author: avos
Date: Thu Feb 21 09:54:10 2019
New Revision: 344430
URL: https://svnweb.freebsd.org/changeset/base/344430

Log:
  MFC r344198:
  GC ATA_REQUEST_TIMEOUT option remnants
  
  It was removed from code in r249083 and from sys/conf/options in r249213.
  
  PR:   193935, 222170

Modified:
  stable/11/sys/conf/NOTES
  stable/11/sys/dev/ata/ata-all.h
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/sys/conf/NOTES
  stable/12/sys/dev/ata/ata-all.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/sys/conf/NOTES
==
--- stable/11/sys/conf/NOTESThu Feb 21 09:43:14 2019(r344429)
+++ stable/11/sys/conf/NOTESThu Feb 21 09:54:10 2019(r344430)
@@ -1785,14 +1785,6 @@ hint.ata.1.port="0x170"
 hint.ata.1.irq="15"
 
 #
-# The following options are valid on the ATA driver:
-#
-# ATA_REQUEST_TIMEOUT: the number of seconds to wait for an ATA request
-#  before timing out.
-
-#options   ATA_REQUEST_TIMEOUT=10
-
-#
 # Standard floppy disk controllers and floppy tapes, supports
 # the Y-E DATA External FDD (PC Card)
 #

Modified: stable/11/sys/dev/ata/ata-all.h
==
--- stable/11/sys/dev/ata/ata-all.h Thu Feb 21 09:43:14 2019
(r344429)
+++ stable/11/sys/dev/ata/ata-all.h Thu Feb 21 09:54:10 2019
(r344430)
@@ -207,10 +207,6 @@
 #define ATA_OP_FINISHED 1
 #define ATA_MAX_28BIT_LBA   268435455UL
 
-#ifndefATA_REQUEST_TIMEOUT
-#defineATA_REQUEST_TIMEOUT 10
-#endif
-
 /* structure used for composite atomic operations */
 #define MAX_COMPOSITES  32  /* u_int32_t bits */
 struct ata_composite {
___
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: r344430 - in stable: 11/sys/conf 11/sys/dev/ata 12/sys/conf 12/sys/dev/ata

2019-02-21 Thread Andriy Voskoboinyk
Author: avos
Date: Thu Feb 21 09:54:10 2019
New Revision: 344430
URL: https://svnweb.freebsd.org/changeset/base/344430

Log:
  MFC r344198:
  GC ATA_REQUEST_TIMEOUT option remnants
  
  It was removed from code in r249083 and from sys/conf/options in r249213.
  
  PR:   193935, 222170

Modified:
  stable/12/sys/conf/NOTES
  stable/12/sys/dev/ata/ata-all.h
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/conf/NOTES
  stable/11/sys/dev/ata/ata-all.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/sys/conf/NOTES
==
--- stable/12/sys/conf/NOTESThu Feb 21 09:43:14 2019(r344429)
+++ stable/12/sys/conf/NOTESThu Feb 21 09:54:10 2019(r344430)
@@ -1813,14 +1813,6 @@ hint.ata.1.port="0x170"
 hint.ata.1.irq="15"
 
 #
-# The following options are valid on the ATA driver:
-#
-# ATA_REQUEST_TIMEOUT: the number of seconds to wait for an ATA request
-#  before timing out.
-
-#options   ATA_REQUEST_TIMEOUT=10
-
-#
 # Standard floppy disk controllers and floppy tapes, supports
 # the Y-E DATA External FDD (PC Card)
 #

Modified: stable/12/sys/dev/ata/ata-all.h
==
--- stable/12/sys/dev/ata/ata-all.h Thu Feb 21 09:43:14 2019
(r344429)
+++ stable/12/sys/dev/ata/ata-all.h Thu Feb 21 09:54:10 2019
(r344430)
@@ -203,10 +203,6 @@
 #define ATA_OP_FINISHED 1
 #define ATA_MAX_28BIT_LBA   268435455UL
 
-#ifndefATA_REQUEST_TIMEOUT
-#defineATA_REQUEST_TIMEOUT 10
-#endif
-
 /* structure used for composite atomic operations */
 #define MAX_COMPOSITES  32  /* u_int32_t bits */
 struct ata_composite {
___
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: r344431 - in stable/10/sys: conf dev/ata

2019-02-21 Thread Andriy Voskoboinyk
Author: avos
Date: Thu Feb 21 09:54:57 2019
New Revision: 344431
URL: https://svnweb.freebsd.org/changeset/base/344431

Log:
  MFC r344198:
  GC ATA_REQUEST_TIMEOUT option remnants
  
  It was removed from code in r249083 and from sys/conf/options in r249213.
  
  PR:   193935, 222170

Modified:
  stable/10/sys/conf/NOTES
  stable/10/sys/dev/ata/ata-all.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/conf/NOTES
==
--- stable/10/sys/conf/NOTESThu Feb 21 09:54:10 2019(r344430)
+++ stable/10/sys/conf/NOTESThu Feb 21 09:54:57 2019(r344431)
@@ -1765,11 +1765,8 @@ hint.ata.1.irq="15"
 #
 # ATA_STATIC_ID:   controller numbering is static ie depends on location
 #  else the device numbers are dynamically allocated.
-# ATA_REQUEST_TIMEOUT: the number of seconds to wait for an ATA request
-#  before timing out.
 
 optionsATA_STATIC_ID
-#options   ATA_REQUEST_TIMEOUT=10
 
 #
 # Standard floppy disk controllers and floppy tapes, supports

Modified: stable/10/sys/dev/ata/ata-all.h
==
--- stable/10/sys/dev/ata/ata-all.h Thu Feb 21 09:54:10 2019
(r344430)
+++ stable/10/sys/dev/ata/ata-all.h Thu Feb 21 09:54:57 2019
(r344431)
@@ -207,10 +207,6 @@
 #define ATA_OP_FINISHED 1
 #define ATA_MAX_28BIT_LBA   268435455UL
 
-#ifndefATA_REQUEST_TIMEOUT
-#defineATA_REQUEST_TIMEOUT 10
-#endif
-
 /* structure used for composite atomic operations */
 #define MAX_COMPOSITES  32  /* u_int32_t bits */
 struct ata_composite {
___
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: r344245 - head/usr.sbin/bsnmpd/modules/snmp_hostres

2019-02-17 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Feb 18 03:23:10 2019
New Revision: 344245
URL: https://svnweb.freebsd.org/changeset/base/344245

Log:
  snmp_hostres(3): fix a typo in sanity checks in handle_chunk()
  
  PR:   204253
  Submitted by: David Binderman 
  MFC after:5 days

Modified:
  head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c

Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c
==
--- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c   Mon Feb 
18 03:15:25 2019(r344244)
+++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c   Mon Feb 
18 03:23:10 2019(r344245)
@@ -312,7 +312,7 @@ handle_chunk(int32_t ds_index, const char *chunk_name,
 
assert(chunk_name != NULL);
assert(chunk_name[0] != '\0');
-   if (chunk_name == NULL || chunk_name == '\0')
+   if (chunk_name == NULL || chunk_name[0] == '\0')
return;
 
HRDBG("ANALYZE chunk %s", chunk_name);
___
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: r344244 - head/usr.sbin/rpc.ypupdated

2019-02-17 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Feb 18 03:15:25 2019
New Revision: 344244
URL: https://svnweb.freebsd.org/changeset/base/344244

Log:
  Fix memory / resource leaks in usr.sbin/rpc.ypupdated/update.c
  
  Re-apply r343909 to this file to get the issue fixed.
  
  PR:   204956
  Reported by:  David Binderman 
  MFC after:5 days

Modified:
  head/usr.sbin/rpc.ypupdated/update.c

Modified: head/usr.sbin/rpc.ypupdated/update.c
==
--- head/usr.sbin/rpc.ypupdated/update.cMon Feb 18 02:59:47 2019
(r344243)
+++ head/usr.sbin/rpc.ypupdated/update.cMon Feb 18 03:15:25 2019
(r344244)
@@ -263,11 +263,14 @@ localupdate(char *name, char *filename, u_int op, u_in
sprintf(tmpname, "%s.tmp", filename);
rf = fopen(filename, "r");
if (rf == NULL) {
-   return (ERR_READ);
+   err = ERR_READ;
+   goto cleanup;
}
wf = fopen(tmpname, "w");
if (wf == NULL) {
-   return (ERR_WRITE);
+   fclose(rf);
+   err = ERR_WRITE;
+   goto cleanup;
}
err = -1;
while (fgets(line, sizeof (line), rf)) {
@@ -307,13 +310,17 @@ localupdate(char *name, char *filename, u_int op, u_in
fclose(rf);
if (err == 0) {
if (rename(tmpname, filename) < 0) {
-   return (ERR_DBASE);
+   err = ERR_DBASE;
+   goto cleanup;
}
} else {
if (unlink(tmpname) < 0) {
-   return (ERR_DBASE);
+   err = ERR_DBASE;
+   goto cleanup;
}
}
+cleanup:
+   free(tmpname);
return (err);
 }
 
___
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: r344225 - stable/11/sys/net80211

2019-02-17 Thread Andriy Voskoboinyk
Author: avos
Date: Sun Feb 17 03:21:42 2019
New Revision: 344225
URL: https://svnweb.freebsd.org/changeset/base/344225

Log:
  MFC r343699:
  net80211: do not setup Tx parameters for unsupported modes.
  
  That should shorten 'ifconfig  list txparam' output since
  unsupported modes will not be shown.

Modified:
  stable/11/sys/net80211/ieee80211_proto.c
  stable/11/sys/net80211/ieee80211_tdma.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/net80211/ieee80211_proto.c
==
--- stable/11/sys/net80211/ieee80211_proto.cSun Feb 17 03:21:18 2019
(r344224)
+++ stable/11/sys/net80211/ieee80211_proto.cSun Feb 17 03:21:42 2019
(r344225)
@@ -345,6 +345,9 @@ ieee80211_proto_vattach(struct ieee80211vap *vap)
 * driver and/or user applications.
 */
for (i = IEEE80211_MODE_11A; i < IEEE80211_MODE_MAX; i++) {
+   if (isclr(ic->ic_modecaps, i))
+   continue;
+
const struct ieee80211_rateset *rs = >ic_sup_rates[i];
 
vap->iv_txparms[i].ucastrate = IEEE80211_FIXED_RATE_NONE;

Modified: stable/11/sys/net80211/ieee80211_tdma.c
==
--- stable/11/sys/net80211/ieee80211_tdma.c Sun Feb 17 03:21:18 2019
(r344224)
+++ stable/11/sys/net80211/ieee80211_tdma.c Sun Feb 17 03:21:42 2019
(r344225)
@@ -125,6 +125,9 @@ static int tdma_process_params(struct ieee80211_node *
 static void
 settxparms(struct ieee80211vap *vap, enum ieee80211_phymode mode, int rate)
 {
+   if (isclr(vap->iv_ic->ic_modecaps, mode))
+   return;
+
vap->iv_txparms[mode].ucastrate = rate;
vap->iv_txparms[mode].mcastrate = rate;
 }
___
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: r344224 - stable/12/sys/net80211

2019-02-17 Thread Andriy Voskoboinyk
Author: avos
Date: Sun Feb 17 03:21:18 2019
New Revision: 344224
URL: https://svnweb.freebsd.org/changeset/base/344224

Log:
  MFC r343699:
  net80211: do not setup Tx parameters for unsupported modes.
  
  That should shorten 'ifconfig  list txparam' output since
  unsupported modes will not be shown.

Modified:
  stable/12/sys/net80211/ieee80211_proto.c
  stable/12/sys/net80211/ieee80211_tdma.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/net80211/ieee80211_proto.c
==
--- stable/12/sys/net80211/ieee80211_proto.cSun Feb 17 03:12:27 2019
(r344223)
+++ stable/12/sys/net80211/ieee80211_proto.cSun Feb 17 03:21:18 2019
(r344224)
@@ -347,6 +347,9 @@ ieee80211_proto_vattach(struct ieee80211vap *vap)
 * driver and/or user applications.
 */
for (i = IEEE80211_MODE_11A; i < IEEE80211_MODE_MAX; i++) {
+   if (isclr(ic->ic_modecaps, i))
+   continue;
+
const struct ieee80211_rateset *rs = >ic_sup_rates[i];
 
vap->iv_txparms[i].ucastrate = IEEE80211_FIXED_RATE_NONE;

Modified: stable/12/sys/net80211/ieee80211_tdma.c
==
--- stable/12/sys/net80211/ieee80211_tdma.c Sun Feb 17 03:12:27 2019
(r344223)
+++ stable/12/sys/net80211/ieee80211_tdma.c Sun Feb 17 03:21:18 2019
(r344224)
@@ -127,6 +127,9 @@ static int tdma_process_params(struct ieee80211_node *
 static void
 settxparms(struct ieee80211vap *vap, enum ieee80211_phymode mode, int rate)
 {
+   if (isclr(vap->iv_ic->ic_modecaps, mode))
+   return;
+
vap->iv_txparms[mode].ucastrate = rate;
vap->iv_txparms[mode].mcastrate = rate;
 }
___
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: r344222 - stable/12/sys/net80211

2019-02-17 Thread Andriy Voskoboinyk
Author: avos
Date: Sun Feb 17 03:11:42 2019
New Revision: 344222
URL: https://svnweb.freebsd.org/changeset/base/344222

Log:
  MFC r343696:
  net80211: do not setup roaming parameters for unsupported modes.
  
  ifconfig(8) prints per-mode parameters if they are non-zero; since
  we have 13 possible modes with 3...5 typically supported this change
  should greatly reduce amount of information for 'ifconfig  list roam'
  command.
  
  While here ensure that sta_roam_check() will not use roaming parameters
  for unsupported modes (it should not).
  
  This change effectively reverts r188776.

Modified:
  stable/12/sys/net80211/ieee80211_scan.c
  stable/12/sys/net80211/ieee80211_scan_sta.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/net80211/ieee80211_scan.c
==
--- stable/12/sys/net80211/ieee80211_scan.c Sun Feb 17 02:58:44 2019
(r344221)
+++ stable/12/sys/net80211/ieee80211_scan.c Sun Feb 17 03:11:42 2019
(r344222)
@@ -130,13 +130,21 @@ void
 ieee80211_scan_vattach(struct ieee80211vap *vap)
 {
struct ieee80211com *ic = vap->iv_ic;
+   int m;
 
vap->iv_bgscanidle = (IEEE80211_BGSCAN_IDLE_DEFAULT*1000)/hz;
vap->iv_bgscanintvl = IEEE80211_BGSCAN_INTVAL_DEFAULT*hz;
vap->iv_scanvalid = IEEE80211_SCAN_VALID_DEFAULT*hz;
 
vap->iv_roaming = IEEE80211_ROAMING_AUTO;
-   memcpy(vap->iv_roamparms, defroam, sizeof(defroam));
+
+   memset(vap->iv_roamparms, 0, sizeof(vap->iv_roamparms));
+   for (m = IEEE80211_MODE_AUTO + 1; m < IEEE80211_MODE_MAX; m++) {
+   if (isclr(ic->ic_modecaps, m))
+   continue;
+
+   memcpy(>iv_roamparms[m], [m], sizeof(defroam[m]));
+   }
 
ic->ic_scan_methods->sc_vattach(vap);
 }

Modified: stable/12/sys/net80211/ieee80211_scan_sta.c
==
--- stable/12/sys/net80211/ieee80211_scan_sta.c Sun Feb 17 02:58:44 2019
(r344221)
+++ stable/12/sys/net80211/ieee80211_scan_sta.c Sun Feb 17 03:11:42 2019
(r344222)
@@ -1354,6 +1354,9 @@ sta_roam_check(struct ieee80211_scan_state *ss, struct
mode = ieee80211_chan2mode(ic->ic_bsschan);
roamRate = vap->iv_roamparms[mode].rate;
roamRssi = vap->iv_roamparms[mode].rssi;
+   KASSERT(roamRate != 0 && roamRssi != 0, ("iv_roamparms are not"
+   "initialized for %s mode!", ieee80211_phymode_name[mode]));
+
ucastRate = vap->iv_txparms[mode].ucastrate;
/* NB: the most up to date rssi is in the node, not the scan cache */
curRssi = ic->ic_node_getrssi(ni);
___
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: r344221 - in stable: 10/sys/cam/scsi 11/sys/cam/scsi 12/sys/cam/scsi

2019-02-17 Thread Andriy Voskoboinyk
Author: avos
Date: Sun Feb 17 02:58:44 2019
New Revision: 344221
URL: https://svnweb.freebsd.org/changeset/base/344221

Log:
  MFC r343501:
  Add NO_6_BYTE / NO_SYNC_CACHE quirks for (C|D|E).* Olympus digital cameras
  
  PR:   97472
  Submitted by: Fabio Luis Girardi 
  Reviewed by:  imp

Modified:
  stable/11/sys/cam/scsi/scsi_da.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/cam/scsi/scsi_da.c
  stable/12/sys/cam/scsi/scsi_da.c
Directory Properties:
  stable/10/   (props changed)
  stable/12/   (props changed)

Modified: stable/11/sys/cam/scsi/scsi_da.c
==
--- stable/11/sys/cam/scsi/scsi_da.cSun Feb 17 02:39:17 2019
(r344220)
+++ stable/11/sys/cam/scsi/scsi_da.cSun Feb 17 02:58:44 2019
(r344221)
@@ -1059,6 +1059,30 @@ static struct da_quirk_entry da_quirk_table[] =
},
{
/*
+* Olympus digital cameras (C-3040ZOOM, C-2040ZOOM, C-1)
+* PR: usb/97472
+*/
+   { T_DIRECT, SIP_MEDIA_REMOVABLE, "OLYMPUS", "C*", "*"},
+   /*quirks*/ DA_Q_NO_6_BYTE | DA_Q_NO_SYNC_CACHE
+   },
+   {
+   /*
+* Olympus digital cameras (D-370)
+* PR: usb/97472
+*/
+   { T_DIRECT, SIP_MEDIA_REMOVABLE, "OLYMPUS", "D*", "*"},
+   /*quirks*/ DA_Q_NO_6_BYTE
+   },
+   {
+   /*
+* Olympus digital cameras (E-100RS, E-10).
+* PR: usb/97472
+*/
+   { T_DIRECT, SIP_MEDIA_REMOVABLE, "OLYMPUS", "E*", "*"},
+   /*quirks*/ DA_Q_NO_6_BYTE | DA_Q_NO_SYNC_CACHE
+   },
+   {
+   /*
 * Olympus FE-210 camera
 */
{T_DIRECT, SIP_MEDIA_REMOVABLE, "OLYMPUS", "FE210*",
___
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"


Re: svn commit: r344223 - stable/11/sys/net80211

2019-02-17 Thread Andriy Voskoboinyk
Sun, 17 Feb 2019 05:12:27 +0200 було написано Andriy Voskoboinyk  
:



Author: avos
Date: Sun Feb 17 03:12:27 2019
New Revision: 344223
URL: https://svnweb.freebsd.org/changeset/base/344223

Log:
  MFC r343696:
  net80211: do not setup roaming parameters for unsupported modes.
 ifconfig(8) prints per-mode parameters if they are non-zero; since
  we have 13 possible modes with 3...5 typically supported this change
  should greatly reduce amount of information for 'ifconfig  list  
roam'

  command.


Note for 11-STABLE: here we have only 11 modes (no VHT 2GHz / 5GHz).
___
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: r344223 - stable/11/sys/net80211

2019-02-17 Thread Andriy Voskoboinyk
Author: avos
Date: Sun Feb 17 03:12:27 2019
New Revision: 344223
URL: https://svnweb.freebsd.org/changeset/base/344223

Log:
  MFC r343696:
  net80211: do not setup roaming parameters for unsupported modes.
  
  ifconfig(8) prints per-mode parameters if they are non-zero; since
  we have 13 possible modes with 3...5 typically supported this change
  should greatly reduce amount of information for 'ifconfig  list roam'
  command.
  
  While here ensure that sta_roam_check() will not use roaming parameters
  for unsupported modes (it should not).
  
  This change effectively reverts r188776.

Modified:
  stable/11/sys/net80211/ieee80211_scan.c
  stable/11/sys/net80211/ieee80211_scan_sta.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/net80211/ieee80211_scan.c
==
--- stable/11/sys/net80211/ieee80211_scan.c Sun Feb 17 03:11:42 2019
(r344222)
+++ stable/11/sys/net80211/ieee80211_scan.c Sun Feb 17 03:12:27 2019
(r344223)
@@ -122,13 +122,21 @@ void
 ieee80211_scan_vattach(struct ieee80211vap *vap)
 {
struct ieee80211com *ic = vap->iv_ic;
+   int m;
 
vap->iv_bgscanidle = (IEEE80211_BGSCAN_IDLE_DEFAULT*1000)/hz;
vap->iv_bgscanintvl = IEEE80211_BGSCAN_INTVAL_DEFAULT*hz;
vap->iv_scanvalid = IEEE80211_SCAN_VALID_DEFAULT*hz;
 
vap->iv_roaming = IEEE80211_ROAMING_AUTO;
-   memcpy(vap->iv_roamparms, defroam, sizeof(defroam));
+
+   memset(vap->iv_roamparms, 0, sizeof(vap->iv_roamparms));
+   for (m = IEEE80211_MODE_AUTO + 1; m < IEEE80211_MODE_MAX; m++) {
+   if (isclr(ic->ic_modecaps, m))
+   continue;
+
+   memcpy(>iv_roamparms[m], [m], sizeof(defroam[m]));
+   }
 
ic->ic_scan_methods->sc_vattach(vap);
 }

Modified: stable/11/sys/net80211/ieee80211_scan_sta.c
==
--- stable/11/sys/net80211/ieee80211_scan_sta.c Sun Feb 17 03:11:42 2019
(r344222)
+++ stable/11/sys/net80211/ieee80211_scan_sta.c Sun Feb 17 03:12:27 2019
(r344223)
@@ -1324,6 +1324,9 @@ sta_roam_check(struct ieee80211_scan_state *ss, struct
mode = ieee80211_chan2mode(ic->ic_bsschan);
roamRate = vap->iv_roamparms[mode].rate;
roamRssi = vap->iv_roamparms[mode].rssi;
+   KASSERT(roamRate != 0 && roamRssi != 0, ("iv_roamparms are not"
+   "initialized for %s mode!", ieee80211_phymode_name[mode]));
+
ucastRate = vap->iv_txparms[mode].ucastrate;
/* NB: the most up to date rssi is in the node, not the scan cache */
curRssi = ic->ic_node_getrssi(ni);
___
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: r344221 - in stable: 10/sys/cam/scsi 11/sys/cam/scsi 12/sys/cam/scsi

2019-02-17 Thread Andriy Voskoboinyk
Author: avos
Date: Sun Feb 17 02:58:44 2019
New Revision: 344221
URL: https://svnweb.freebsd.org/changeset/base/344221

Log:
  MFC r343501:
  Add NO_6_BYTE / NO_SYNC_CACHE quirks for (C|D|E).* Olympus digital cameras
  
  PR:   97472
  Submitted by: Fabio Luis Girardi 
  Reviewed by:  imp

Modified:
  stable/10/sys/cam/scsi/scsi_da.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/cam/scsi/scsi_da.c
  stable/12/sys/cam/scsi/scsi_da.c
Directory Properties:
  stable/11/   (props changed)
  stable/12/   (props changed)

Modified: stable/10/sys/cam/scsi/scsi_da.c
==
--- stable/10/sys/cam/scsi/scsi_da.cSun Feb 17 02:39:17 2019
(r344220)
+++ stable/10/sys/cam/scsi/scsi_da.cSun Feb 17 02:58:44 2019
(r344221)
@@ -941,6 +941,30 @@ static struct da_quirk_entry da_quirk_table[] =
},
{
/*
+* Olympus digital cameras (C-3040ZOOM, C-2040ZOOM, C-1)
+* PR: usb/97472
+*/
+   { T_DIRECT, SIP_MEDIA_REMOVABLE, "OLYMPUS", "C*", "*"},
+   /*quirks*/ DA_Q_NO_6_BYTE | DA_Q_NO_SYNC_CACHE
+   },
+   {
+   /*
+* Olympus digital cameras (D-370)
+* PR: usb/97472
+*/
+   { T_DIRECT, SIP_MEDIA_REMOVABLE, "OLYMPUS", "D*", "*"},
+   /*quirks*/ DA_Q_NO_6_BYTE
+   },
+   {
+   /*
+* Olympus digital cameras (E-100RS, E-10).
+* PR: usb/97472
+*/
+   { T_DIRECT, SIP_MEDIA_REMOVABLE, "OLYMPUS", "E*", "*"},
+   /*quirks*/ DA_Q_NO_6_BYTE | DA_Q_NO_SYNC_CACHE
+   },
+   {
+   /*
 * Olympus FE-210 camera
 */
{T_DIRECT, SIP_MEDIA_REMOVABLE, "OLYMPUS", "FE210*",
___
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: r344221 - in stable: 10/sys/cam/scsi 11/sys/cam/scsi 12/sys/cam/scsi

2019-02-17 Thread Andriy Voskoboinyk
Author: avos
Date: Sun Feb 17 02:58:44 2019
New Revision: 344221
URL: https://svnweb.freebsd.org/changeset/base/344221

Log:
  MFC r343501:
  Add NO_6_BYTE / NO_SYNC_CACHE quirks for (C|D|E).* Olympus digital cameras
  
  PR:   97472
  Submitted by: Fabio Luis Girardi 
  Reviewed by:  imp

Modified:
  stable/12/sys/cam/scsi/scsi_da.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/cam/scsi/scsi_da.c
  stable/11/sys/cam/scsi/scsi_da.c
Directory Properties:
  stable/10/   (props changed)
  stable/11/   (props changed)

Modified: stable/12/sys/cam/scsi/scsi_da.c
==
--- stable/12/sys/cam/scsi/scsi_da.cSun Feb 17 02:39:17 2019
(r344220)
+++ stable/12/sys/cam/scsi/scsi_da.cSun Feb 17 02:58:44 2019
(r344221)
@@ -1081,6 +1081,30 @@ static struct da_quirk_entry da_quirk_table[] =
},
{
/*
+* Olympus digital cameras (C-3040ZOOM, C-2040ZOOM, C-1)
+* PR: usb/97472
+*/
+   { T_DIRECT, SIP_MEDIA_REMOVABLE, "OLYMPUS", "C*", "*"},
+   /*quirks*/ DA_Q_NO_6_BYTE | DA_Q_NO_SYNC_CACHE
+   },
+   {
+   /*
+* Olympus digital cameras (D-370)
+* PR: usb/97472
+*/
+   { T_DIRECT, SIP_MEDIA_REMOVABLE, "OLYMPUS", "D*", "*"},
+   /*quirks*/ DA_Q_NO_6_BYTE
+   },
+   {
+   /*
+* Olympus digital cameras (E-100RS, E-10).
+* PR: usb/97472
+*/
+   { T_DIRECT, SIP_MEDIA_REMOVABLE, "OLYMPUS", "E*", "*"},
+   /*quirks*/ DA_Q_NO_6_BYTE | DA_Q_NO_SYNC_CACHE
+   },
+   {
+   /*
 * Olympus FE-210 camera
 */
{T_DIRECT, SIP_MEDIA_REMOVABLE, "OLYMPUS", "FE210*",
___
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: r344216 - head/tools/build/mk

2019-02-16 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Feb 16 16:34:23 2019
New Revision: 344216
URL: https://svnweb.freebsd.org/changeset/base/344216

Log:
  Few more corrections to WITHOUT_OFED=1 make delete-old removal:
  
  - Drop profile libraries; MK_PROFILE=no is set in all Makefile's.
  - Correct library path to libmlx5.so.1 and libibverbs.so.1
  
  MFC after:5 days
  MFC with: 344207

Modified:
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Feb 16 16:17:46 
2019(r344215)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Feb 16 16:34:23 
2019(r344216)
@@ -7362,100 +7362,76 @@ OLD_DIRS+=usr/include/infiniband
 OLD_FILES+=usr/lib/libcxgb4.a
 OLD_FILES+=usr/lib/libcxgb4.so
 OLD_LIBS+=usr/lib/libcxgb4.so.1
-OLD_FILES+=usr/lib/libcxgb4_p.a
 OLD_FILES+=usr/lib/libibcm.a
 OLD_FILES+=usr/lib/libibcm.so
 OLD_LIBS+=usr/lib/libibcm.so.1
-OLD_FILES+=usr/lib/libibcm_p.a
 OLD_FILES+=usr/lib/libibmad.a
 OLD_FILES+=usr/lib/libibmad.so
 OLD_LIBS+=usr/lib/libibmad.so.5
-OLD_FILES+=usr/lib/libibmad_p.a
 OLD_FILES+=usr/lib/libibnetdisc.a
 OLD_FILES+=usr/lib/libibnetdisc.so
 OLD_LIBS+=usr/lib/libibnetdisc.so.5
-OLD_FILES+=usr/lib/libibnetdisc_p.a
 OLD_FILES+=usr/lib/libibumad.a
 OLD_FILES+=usr/lib/libibumad.so
 OLD_LIBS+=usr/lib/libibumad.so.1
-OLD_FILES+=usr/lib/libibumad_p.a
 OLD_FILES+=usr/lib/libibverbs.a
 OLD_FILES+=usr/lib/libibverbs.so
-OLD_LIBS+=usr/lib/libibverbs.so.1
-OLD_FILES+=usr/lib/libibverbs_p.a
+OLD_LIBS+=lib/libibverbs.so.1
 OLD_FILES+=usr/lib/libmlx4.a
 OLD_FILES+=usr/lib/libmlx4.so
 OLD_LIBS+=usr/lib/libmlx4.so.1
-OLD_FILES+=usr/lib/libmlx4_p.a
 OLD_FILES+=usr/lib/libmlx5.a
 OLD_FILES+=usr/lib/libmlx5.so
-OLD_LIBS+=usr/lib/libmlx5.so.1
-OLD_FILES+=usr/lib/libmlx5_p.a
+OLD_LIBS+=lib/libmlx5.so.1
 OLD_FILES+=usr/lib/libopensm.a
 OLD_FILES+=usr/lib/libopensm.so
 OLD_LIBS+=usr/lib/libopensm.so.5
-OLD_FILES+=usr/lib/libopensm_p.a
 OLD_FILES+=usr/lib/libosmcomp.a
 OLD_FILES+=usr/lib/libosmcomp.so
 OLD_LIBS+=usr/lib/libosmcomp.so.3
-OLD_FILES+=usr/lib/libosmcomp_p.a
 OLD_FILES+=usr/lib/libosmvendor.a
 OLD_FILES+=usr/lib/libosmvendor.so
 OLD_LIBS+=usr/lib/libosmvendor.so.4
-OLD_FILES+=usr/lib/libosmvendor_p.a
 OLD_FILES+=usr/lib/librdmacm.a
 OLD_FILES+=usr/lib/librdmacm.so
 OLD_LIBS+=usr/lib/librdmacm.so.1
-OLD_FILES+=usr/lib/librdmacm_p.a
 .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64"
 OLD_FILES+=usr/lib32/libcxgb4.a
 OLD_FILES+=usr/lib32/libcxgb4.so
 OLD_LIBS+=usr/lib32/libcxgb4.so.1
-OLD_FILES+=usr/lib32/libcxgb4_p.a
 OLD_FILES+=usr/lib32/libibcm.a
 OLD_FILES+=usr/lib32/libibcm.so
 OLD_LIBS+=usr/lib32/libibcm.so.1
-OLD_FILES+=usr/lib32/libibcm_p.a
 OLD_FILES+=usr/lib32/libibmad.a
 OLD_FILES+=usr/lib32/libibmad.so
 OLD_LIBS+=usr/lib32/libibmad.so.5
-OLD_FILES+=usr/lib32/libibmad_p.a
 OLD_FILES+=usr/lib32/libibnetdisc.a
 OLD_FILES+=usr/lib32/libibnetdisc.so
 OLD_LIBS+=usr/lib32/libibnetdisc.so.5
-OLD_FILES+=usr/lib32/libibnetdisc_p.a
 OLD_FILES+=usr/lib32/libibumad.a
 OLD_FILES+=usr/lib32/libibumad.so
 OLD_LIBS+=usr/lib32/libibumad.so.1
-OLD_FILES+=usr/lib32/libibumad_p.a
 OLD_FILES+=usr/lib32/libibverbs.a
 OLD_FILES+=usr/lib32/libibverbs.so
 OLD_LIBS+=usr/lib32/libibverbs.so.1
-OLD_FILES+=usr/lib32/libibverbs_p.a
 OLD_FILES+=usr/lib32/libmlx4.a
 OLD_FILES+=usr/lib32/libmlx4.so
 OLD_LIBS+=usr/lib32/libmlx4.so.1
-OLD_FILES+=usr/lib32/libmlx4_p.a
 OLD_FILES+=usr/lib32/libmlx5.a
 OLD_FILES+=usr/lib32/libmlx5.so
 OLD_LIBS+=usr/lib32/libmlx5.so.1
-OLD_FILES+=usr/lib32/libmlx5_p.a
 OLD_FILES+=usr/lib32/libopensm.a
 OLD_FILES+=usr/lib32/libopensm.so
 OLD_LIBS+=usr/lib32/libopensm.so.5
-OLD_FILES+=usr/lib32/libopensm_p.a
 OLD_FILES+=usr/lib32/libosmcomp.a
 OLD_FILES+=usr/lib32/libosmcomp.so
 OLD_LIBS+=usr/lib32/libosmcomp.so.3
-OLD_FILES+=usr/lib32/libosmcomp_p.a
 OLD_FILES+=usr/lib32/libosmvendor.a
 OLD_FILES+=usr/lib32/libosmvendor.so
 OLD_LIBS+=usr/lib32/libosmvendor.so.4
-OLD_FILES+=usr/lib32/libosmvendor_p.a
 OLD_FILES+=usr/lib32/librdmacm.a
 OLD_FILES+=usr/lib32/librdmacm.so
 OLD_LIBS+=usr/lib32/librdmacm.so.1
-OLD_FILES+=usr/lib32/librdmacm_p.a
 .endif
 OLD_FILES+=usr/share/man/man1/ibv_asyncwatch.1.gz
 OLD_FILES+=usr/share/man/man1/ibv_devices.1.gz
___
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: r344215 - head/tools/build/mk

2019-02-16 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Feb 16 16:17:46 2019
New Revision: 344215
URL: https://svnweb.freebsd.org/changeset/base/344215

Log:
  Remove corresponding lib32/ files when WITHOUT_OFED=1 is set
  
  MFC after:5 days
  MFC with: 344207

Modified:
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Feb 16 16:01:23 
2019(r344214)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Feb 16 16:17:46 
2019(r344215)
@@ -7407,6 +7407,56 @@ OLD_FILES+=usr/lib/librdmacm.a
 OLD_FILES+=usr/lib/librdmacm.so
 OLD_LIBS+=usr/lib/librdmacm.so.1
 OLD_FILES+=usr/lib/librdmacm_p.a
+.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64"
+OLD_FILES+=usr/lib32/libcxgb4.a
+OLD_FILES+=usr/lib32/libcxgb4.so
+OLD_LIBS+=usr/lib32/libcxgb4.so.1
+OLD_FILES+=usr/lib32/libcxgb4_p.a
+OLD_FILES+=usr/lib32/libibcm.a
+OLD_FILES+=usr/lib32/libibcm.so
+OLD_LIBS+=usr/lib32/libibcm.so.1
+OLD_FILES+=usr/lib32/libibcm_p.a
+OLD_FILES+=usr/lib32/libibmad.a
+OLD_FILES+=usr/lib32/libibmad.so
+OLD_LIBS+=usr/lib32/libibmad.so.5
+OLD_FILES+=usr/lib32/libibmad_p.a
+OLD_FILES+=usr/lib32/libibnetdisc.a
+OLD_FILES+=usr/lib32/libibnetdisc.so
+OLD_LIBS+=usr/lib32/libibnetdisc.so.5
+OLD_FILES+=usr/lib32/libibnetdisc_p.a
+OLD_FILES+=usr/lib32/libibumad.a
+OLD_FILES+=usr/lib32/libibumad.so
+OLD_LIBS+=usr/lib32/libibumad.so.1
+OLD_FILES+=usr/lib32/libibumad_p.a
+OLD_FILES+=usr/lib32/libibverbs.a
+OLD_FILES+=usr/lib32/libibverbs.so
+OLD_LIBS+=usr/lib32/libibverbs.so.1
+OLD_FILES+=usr/lib32/libibverbs_p.a
+OLD_FILES+=usr/lib32/libmlx4.a
+OLD_FILES+=usr/lib32/libmlx4.so
+OLD_LIBS+=usr/lib32/libmlx4.so.1
+OLD_FILES+=usr/lib32/libmlx4_p.a
+OLD_FILES+=usr/lib32/libmlx5.a
+OLD_FILES+=usr/lib32/libmlx5.so
+OLD_LIBS+=usr/lib32/libmlx5.so.1
+OLD_FILES+=usr/lib32/libmlx5_p.a
+OLD_FILES+=usr/lib32/libopensm.a
+OLD_FILES+=usr/lib32/libopensm.so
+OLD_LIBS+=usr/lib32/libopensm.so.5
+OLD_FILES+=usr/lib32/libopensm_p.a
+OLD_FILES+=usr/lib32/libosmcomp.a
+OLD_FILES+=usr/lib32/libosmcomp.so
+OLD_LIBS+=usr/lib32/libosmcomp.so.3
+OLD_FILES+=usr/lib32/libosmcomp_p.a
+OLD_FILES+=usr/lib32/libosmvendor.a
+OLD_FILES+=usr/lib32/libosmvendor.so
+OLD_LIBS+=usr/lib32/libosmvendor.so.4
+OLD_FILES+=usr/lib32/libosmvendor_p.a
+OLD_FILES+=usr/lib32/librdmacm.a
+OLD_FILES+=usr/lib32/librdmacm.so
+OLD_LIBS+=usr/lib32/librdmacm.so.1
+OLD_FILES+=usr/lib32/librdmacm_p.a
+.endif
 OLD_FILES+=usr/share/man/man1/ibv_asyncwatch.1.gz
 OLD_FILES+=usr/share/man/man1/ibv_devices.1.gz
 OLD_FILES+=usr/share/man/man1/ibv_devinfo.1.gz
___
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: r344214 - head/tools/build/mk

2019-02-16 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Feb 16 16:01:23 2019
New Revision: 344214
URL: https://svnweb.freebsd.org/changeset/base/344214

Log:
  Refresh OptionalObsoleteFiles.inc for MK_PMC:
  
  - Add missing /usr/sbin/pmc, pmcformat.h, libpmcstat.h and pmc.haswellxeon.3
  to the list.
  - Correct man page section for pmcstudy.8.
  - Include recently added libipt and libopencsd for corresponding TARGET_ARCH
  
  MFC after:5 days

Modified:
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Feb 16 15:57:29 
2019(r344213)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Feb 16 16:01:23 
2019(r344214)
@@ -7763,8 +7763,76 @@ OLD_FILES+=usr/share/man/man7/pkg.7.gz
 
 .if ${MK_PMC} == no
 OLD_FILES+=usr/bin/pmcstudy
+.if ${TARGET_ARCH} == "amd64"
+OLD_FILES+=usr/include/libipt/pt_last_ip.h
+OLD_FILES+=usr/include/libipt/intel-pt.h
+OLD_FILES+=usr/include/libipt/pt_time.h
+OLD_FILES+=usr/include/libipt/pt_cpu.h
+OLD_FILES+=usr/include/libipt/pt_compiler.h
+OLD_DIRS+=usr/include/libipt
+.endif
+.if ${TARGET_ARCH} == "aarch64"
+OLD_FILES+=usr/include/opencsd/c_api/opencsd_c_api.h
+OLD_FILES+=usr/include/opencsd/c_api/ocsd_c_api_cust_impl.h
+OLD_FILES+=usr/include/opencsd/c_api/ocsd_c_api_types.h
+OLD_FILES+=usr/include/opencsd/c_api/ocsd_c_api_cust_fact.h
+OLD_FILES+=usr/include/opencsd/c_api/ocsd_c_api_custom.h
+OLD_DIRS+=usr/include/opencsd/c_api
+OLD_FILES+=usr/include/opencsd/ocsd_if_types.h
+OLD_FILES+=usr/include/opencsd/ptm/trc_dcd_mngr_ptm.h
+OLD_FILES+=usr/include/opencsd/ptm/trc_pkt_proc_ptm.h
+OLD_FILES+=usr/include/opencsd/ptm/trc_cmp_cfg_ptm.h
+OLD_FILES+=usr/include/opencsd/ptm/ptm_decoder.h
+OLD_FILES+=usr/include/opencsd/ptm/trc_pkt_elem_ptm.h
+OLD_FILES+=usr/include/opencsd/ptm/trc_pkt_decode_ptm.h
+OLD_FILES+=usr/include/opencsd/ptm/trc_pkt_types_ptm.h
+OLD_DIRS+=usr/include/opencsd/ptm
+OLD_FILES+=usr/include/opencsd/trc_gen_elem_types.h
+OLD_FILES+=usr/include/opencsd/etmv4/trc_pkt_proc_etmv4.h
+OLD_FILES+=usr/include/opencsd/etmv4/trc_etmv4_stack_elem.h
+OLD_FILES+=usr/include/opencsd/etmv4/etmv4_decoder.h
+OLD_FILES+=usr/include/opencsd/etmv4/trc_pkt_elem_etmv4i.h
+OLD_FILES+=usr/include/opencsd/etmv4/trc_dcd_mngr_etmv4i.h
+OLD_FILES+=usr/include/opencsd/etmv4/trc_pkt_types_etmv4.h
+OLD_FILES+=usr/include/opencsd/etmv4/trc_pkt_elem_etmv4d.h
+OLD_FILES+=usr/include/opencsd/etmv4/trc_pkt_decode_etmv4i.h
+OLD_FILES+=usr/include/opencsd/etmv4/trc_cmp_cfg_etmv4.h
+OLD_DIRS+=usr/include/opencsd/etmv4
+OLD_FILES+=usr/include/opencsd/etmv3/trc_pkt_decode_etmv3.h
+OLD_FILES+=usr/include/opencsd/etmv3/trc_cmp_cfg_etmv3.h
+OLD_FILES+=usr/include/opencsd/etmv3/etmv3_decoder.h
+OLD_FILES+=usr/include/opencsd/etmv3/trc_pkt_proc_etmv3.h
+OLD_FILES+=usr/include/opencsd/etmv3/trc_pkt_elem_etmv3.h
+OLD_FILES+=usr/include/opencsd/etmv3/trc_pkt_types_etmv3.h
+OLD_FILES+=usr/include/opencsd/etmv3/trc_dcd_mngr_etmv3.h
+OLD_DIRS+=usr/include/opencsd/etmv3
+OLD_FILES+=usr/include/opencsd/trc_pkt_types.h
+OLD_FILES+=usr/include/opencsd/stm/trc_pkt_proc_stm.h
+OLD_FILES+=usr/include/opencsd/stm/trc_pkt_types_stm.h
+OLD_FILES+=usr/include/opencsd/stm/stm_decoder.h
+OLD_FILES+=usr/include/opencsd/stm/trc_dcd_mngr_stm.h
+OLD_FILES+=usr/include/opencsd/stm/trc_cmp_cfg_stm.h
+OLD_FILES+=usr/include/opencsd/stm/trc_pkt_elem_stm.h
+OLD_FILES+=usr/include/opencsd/stm/trc_pkt_decode_stm.h
+OLD_DIRS+=usr/include/opencsd/stm
+OLD_DIRS+=usr/include/opencsd
+.endif
 OLD_FILES+=usr/include/pmc.h
 OLD_FILES+=usr/include/pmclog.h
+OLD_FILES+=usr/include/pmcformat.h
+OLD_FILES+=usr/include/libpmcstat.h
+.if ${TARGET_ARCH} == "amd64"
+OLD_FILES+=usr/lib/libipt.a
+OLD_FILES+=usr/lib/libipt.so
+OLD_LIBS+=lib/libipt.so.0
+OLD_FILES+=usr/lib/libipt_p.a
+.endif
+.if ${TARGET_ARCH} == "aarch64"
+OLD_FILES+=usr/lib/libopencsd.a
+OLD_FILES+=usr/lib/libopencsd.so
+OLD_LIBS+=lib/libopencsd.so.0
+OLD_FILES+=usr/lib/libopencsd_p.a
+.endif
 OLD_FILES+=usr/lib/libpmc.a
 OLD_FILES+=usr/lib/libpmc.so
 OLD_LIBS+=usr/lib/libpmc.so.5
@@ -7773,10 +7841,10 @@ OLD_FILES+=usr/lib32/libpmc.a
 OLD_FILES+=usr/lib32/libpmc.so
 OLD_LIBS+=usr/lib32/libpmc.so.5
 OLD_FILES+=usr/lib32/libpmc_p.a
+OLD_FILES+=usr/sbin/pmc
 OLD_FILES+=usr/sbin/pmcannotate
 OLD_FILES+=usr/sbin/pmccontrol
 OLD_FILES+=usr/sbin/pmcstat
-OLD_FILES+=usr/share/man/man1/pmcstudy.1.gz
 OLD_FILES+=usr/share/man/man3/pmc.3.gz
 OLD_FILES+=usr/share/man/man3/pmc.atom.3.gz
 OLD_FILES+=usr/share/man/man3/pmc.atomsilvermont.3.gz
@@ -7786,6 +7854,7 @@ OLD_FILES+=usr/share/man/man3/pmc.corei7.3.gz
 OLD_FILES+=usr/share/man/man3/pmc.corei7uc.3.gz
 OLD_FILES+=usr/share/man/man3/pmc.haswell.3.gz
 OLD_FILES+=usr/share/man/man3/pmc.haswelluc.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.haswellxeon.3.gz
 OLD_FILES+=usr/share/man/man3/pmc.iaf.3.gz
 OLD_FILES+=usr/share/man/man3/pmc.ivybridge.3.gz
 

svn commit: r344208 - head/tools/build/mk

2019-02-16 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Feb 16 05:04:01 2019
New Revision: 344208
URL: https://svnweb.freebsd.org/changeset/base/344208

Log:
  Add more rc.d scripts / empty directors / config files into
  OptionalObsoleteFiles.inc
  
  Note: only files with conditional installation logic were
  included from the PR.
  
  PR:   233046
  Submitted by: 
  MFC after:5 days

Modified:
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Feb 16 04:49:51 
2019(r344207)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Feb 16 05:04:01 
2019(r344208)
@@ -54,6 +54,10 @@ OLD_FILES+=usr/share/man/man8/acpidump.8.gz
 OLD_FILES+=usr/share/man/man8/iasl.8.gz
 .endif
 
+.if ${MK_ACPI} == no && ${MK_APM} == no
+OLD_FILES+=etc/rc.d/powerd
+.endif
+
 .if ${MK_AMD} == no
 OLD_FILES+=etc/amd.map
 OLD_FILES+=etc/newsyslog.conf.d/amd.conf
@@ -434,6 +438,7 @@ OLD_FILES+=usr/bin/ld.bfd
 .endif
 
 .if ${MK_BLACKLIST} == no
+OLD_FILES+=etc/blacklistd.conf
 OLD_FILES+=etc/rc.d/blacklistd
 OLD_FILES+=usr/include/blacklist.h
 OLD_FILES+=usr/lib/libblacklist.a
@@ -655,6 +660,7 @@ OLD_FILES+=usr/share/man/man8/zfsloader.8.gz
 .endif
 
 .if ${MK_BOOTPARAMD} == no
+OLD_FILES+=etc/rc.d/bootparams
 OLD_FILES+=usr/sbin/bootparamd
 OLD_FILES+=usr/share/man/man5/bootparams.5.gz
 OLD_FILES+=usr/share/man/man8/bootparamd.8.gz
@@ -1131,6 +1137,7 @@ OLD_FILES+=etc/casper/system.grp
 OLD_FILES+=etc/casper/system.pwd
 OLD_FILES+=etc/casper/system.random
 OLD_FILES+=etc/casper/system.sysctl
+OLD_DIRS+=etc/casper
 OLD_FILES+=etc/rc.d/casperd
 OLD_LIBS+=lib/libcapsicum.so.0
 OLD_LIBS+=lib/libcasper.so.0
@@ -1293,6 +1300,8 @@ OLD_FILES+=etc/rc.d/zvol
 OLD_FILES+=etc/devd/zfs.conf
 OLD_FILES+=etc/periodic/daily/404.status-zfs
 OLD_FILES+=etc/periodic/daily/800.scrub-zfs
+OLD_FILES+=etc/zfs/exports
+OLD_DIRS+=etc/zfs
 OLD_LIBS+=lib/libzfs.so.2
 OLD_LIBS+=lib/libzfs.so.3
 OLD_LIBS+=lib/libzfs_core.so.2
@@ -2279,6 +2288,7 @@ OLD_DIRS+=usr/share/dict
 
 .if ${MK_DMAGENT} == no
 OLD_FILES+=etc/dma/dma.conf
+OLD_DIRS+=etc/dma
 OLD_FILES+=usr/libexec/dma
 OLD_FILES+=usr/libexec/dma-mbox-create
 OLD_FILES+=usr/share/man/man8/dma.8.gz
@@ -2914,6 +2924,7 @@ OLD_FILES+=usr/share/man/man8/gssd.8.gz
 .endif
 
 .if ${MK_HAST} == no
+OLD_FILES+=etc/rc.d/hastd
 OLD_FILES+=sbin/hastctl
 OLD_FILES+=sbin/hastd
 OLD_FILES+=usr/share/examples/hast/ucarp.sh
@@ -3106,6 +3117,7 @@ OLD_FILES+=rescue/rtsol
 .endif
 
 .if ${MK_INETD} == no
+OLD_FILES+=etc/inetd.conf
 OLD_FILES+=etc/rc.d/inetd
 OLD_FILES+=usr/sbin/inetd
 OLD_FILES+=usr/share/man/man5/inetd.conf.5.gz
@@ -3196,6 +3208,7 @@ OLD_FILES+=usr/share/man/man8/ippool.8.gz
 .endif
 
 .if ${MK_IPFW} == no
+OLD_FILES+=etc/rc.d/ipfw
 OLD_FILES+=etc/periodic/security/500.ipfwdenied
 OLD_FILES+=etc/periodic/security/550.ipfwlimit
 OLD_FILES+=sbin/ipfw
@@ -4256,6 +4269,8 @@ OLD_FILES+=usr/share/man/man1/host.1.gz
 .endif
 
 .if ${MK_LEGACY_CONSOLE} == no
+OLD_FILES+=etc/rc.d/moused
+OLD_FILES+=etc/rc.d/syscons
 OLD_FILES+=usr/sbin/kbdcontrol
 OLD_FILES+=usr/sbin/kbdmap
 OLD_FILES+=usr/sbin/moused
@@ -6029,6 +6044,7 @@ OLD_FILES+=etc/mail.rc
 OLD_FILES+=etc/mail/aliases
 OLD_FILES+=etc/mail/mailer.conf
 OLD_FILES+=etc/periodic/daily/130.clean-msgs
+OLD_FILES+=etc/rc.d/othermta
 OLD_FILES+=usr/bin/Mail
 OLD_FILES+=usr/bin/biff
 OLD_FILES+=usr/bin/from
@@ -6501,6 +6517,10 @@ OLD_FILES+=usr/share/man/man8/nghook.8.gz
 OLD_FILES+=usr/share/man/man8/pppoed.8.gz
 .endif
 
+.if ${MK_IPFW} == no || ${MK_NETGRAPH} == no
+OLD_FILES+=etc/rc.d/ipfw_netflow
+.endif
+
 .if ${MK_NETGRAPH_SUPPORT} == no
 OLD_FILES+=usr/include/bsnmp/snmp_netgraph.h
 OLD_FILES+=usr/lib/snmp_netgraph.so
@@ -6874,8 +6894,12 @@ OLD_FILES+=usr/share/man/man8/nscd.8.gz
 .endif
 
 .if ${MK_NTP} == no
+OLD_FILES+=etc/ntp/leap-seconds
+OLD_DIRS+=etc/ntp
 OLD_FILES+=etc/ntp.conf
 OLD_FILES+=etc/periodic/daily/480.status-ntpd
+OLD_FILES+=etc/periodic/daily/480.leapfile-ntpd
+OLD_FILES+=etc/rc.d/ntpd
 OLD_FILES+=usr/bin/ntpq
 OLD_FILES+=usr/sbin/ntp-keygen
 OLD_FILES+=usr/sbin/ntpd
@@ -7554,6 +7578,7 @@ OLD_FILES+=etc/rc.d/sshd
 OLD_FILES+=etc/ssh/moduli
 OLD_FILES+=etc/ssh/ssh_config
 OLD_FILES+=etc/ssh/sshd_config
+OLD_DIRS+=etc/ssh
 OLD_FILES+=usr/bin/scp
 OLD_FILES+=usr/bin/sftp
 OLD_FILES+=usr/bin/slogin
@@ -8090,6 +8115,7 @@ OLD_FILES+=${RESCUE_FILES}
 .endif
 
 .if ${MK_ROUTED} == no
+OLD_FILES+=etc/rc.d/routed
 OLD_FILES+=rescue/routed
 OLD_FILES+=rescue/rtquery
 OLD_FILES+=sbin/routed
@@ -8105,6 +8131,7 @@ OLD_FILES+=etc/periodic/daily/150.clean-hoststat
 OLD_FILES+=etc/periodic/daily/440.status-mailq
 OLD_FILES+=etc/periodic/daily/460.status-mail-rejects
 OLD_FILES+=etc/periodic/daily/500.queuerun
+OLD_FILES+=etc/rc.d/sendmail
 OLD_FILES+=bin/rmail
 OLD_FILES+=usr/bin/vacation
 OLD_FILES+=usr/include/libmilter/mfapi.h
@@ -10067,6 +10094,7 @@ 

svn commit: r344207 - head/tools/build/mk

2019-02-16 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Feb 16 04:49:51 2019
New Revision: 344207
URL: https://svnweb.freebsd.org/changeset/base/344207

Log:
  Allow to remove unused files via 'make delete-old(-libs)' when WITHOUT_OFED
  and / or WITHOUT_OFED_EXTRA src.conf(5) options are set.
  
  MFC after:5 days

Modified:
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Feb 16 04:49:10 
2019(r344206)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Feb 16 04:49:51 
2019(r344207)
@@ -7172,6 +7172,383 @@ OLD_FILES+=usr/share/man/man8/ntpq.8.gz
 OLD_FILES+=usr/share/man/man8/ntptime.8.gz
 .endif
 
+.if ${MK_OFED} == no
+OLD_FILES+=etc/newsyslog.conf.d/opensm.conf
+OLD_FILES+=etc/rc.d/opensm
+OLD_FILES+=usr/bin/ibstat
+OLD_FILES+=usr/bin/ibv_asyncwatch
+OLD_FILES+=usr/bin/ibv_devices
+OLD_FILES+=usr/bin/ibv_devinfo
+OLD_FILES+=usr/bin/ibv_rc_pingpong
+OLD_FILES+=usr/bin/ibv_srq_pingpong
+OLD_FILES+=usr/bin/ibv_uc_pingpong
+OLD_FILES+=usr/bin/ibv_ud_pingpong
+OLD_FILES+=usr/bin/mckey
+OLD_FILES+=usr/bin/rping
+OLD_FILES+=usr/bin/ucmatose
+OLD_FILES+=usr/bin/udaddy
+OLD_FILES+=usr/include/infiniband/marshall.h
+OLD_FILES+=usr/include/infiniband/kern-abi.h
+OLD_FILES+=usr/include/infiniband/umad_sm.h
+OLD_FILES+=usr/include/infiniband/umad.h
+OLD_FILES+=usr/include/infiniband/arch.h
+OLD_FILES+=usr/include/infiniband/verbs.h
+OLD_FILES+=usr/include/infiniband/ib.h
+OLD_FILES+=usr/include/infiniband/cm.h
+OLD_FILES+=usr/include/infiniband/opcode.h
+OLD_FILES+=usr/include/infiniband/ibnetdisc.h
+OLD_FILES+=usr/include/infiniband/driver.h
+OLD_FILES+=usr/include/infiniband/mad_osd.h
+OLD_FILES+=usr/include/infiniband/umad_types.h
+OLD_FILES+=usr/include/infiniband/umad_cm.h
+OLD_FILES+=usr/include/infiniband/cm_abi.h
+OLD_FILES+=usr/include/infiniband/sa-kern-abi.h
+OLD_FILES+=usr/include/infiniband/ibnetdisc_osd.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_event_plugin.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_console_io.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_ucast_cache.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_port.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_path.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_mtree.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_log.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_mcm_port.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_subnet.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_pkey.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_remote_sm.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_qos_policy.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_sm.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_node.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_mcast_mgr.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_madw.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_lid_mgr.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_congestion_control.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_port_profile.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_perfmgr.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_service.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_base.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_vl15intf.h
+OLD_FILES+=usr/include/infiniband/opensm/st.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_attrib_req.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_ucast_mgr.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_db.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_sa_mad_ctrl.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_db_pack.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_opensm.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_mesh.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_mcast_tbl.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_sm_mad_ctrl.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_stats.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_mad_pool.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_switch.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_ucast_lash.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_errors.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_partition.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_prefix_route.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_helper.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_version.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_sa.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_config.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_multicast.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_file_ids.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_perfmgr_db.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_console.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_msgdef.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_router.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_guid.h
+OLD_FILES+=usr/include/infiniband/opensm/osm_inform.h
+OLD_DIRS+=usr/include/infiniband/opensm

svn commit: r344201 - head/tools/build/mk

2019-02-16 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Feb 16 03:49:48 2019
New Revision: 344201
URL: https://svnweb.freebsd.org/changeset/base/344201

Log:
  Remove vi(1)-related files via 'make delete-old' when WITHOUT_VI=1 is set.
  
  MFC after:5 days

Modified:
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Feb 16 03:18:52 
2019(r344200)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Feb 16 03:49:48 
2019(r344201)
@@ -9704,6 +9704,32 @@ OLD_FILES+=usr/share/man/man8/lastlogin.8.gz
 OLD_FILES+=usr/share/man/man8/utx.8.gz
 .endif
 
+.if ${MK_VI} == no
+OLD_FILES+=etc/rc.d/virecover
+OLD_FILES+=rescue/ex
+OLD_FILES+=rescue/vi
+OLD_FILES+=usr/bin/ex
+OLD_FILES+=usr/bin/nex
+OLD_FILES+=usr/bin/nvi
+OLD_FILES+=usr/bin/nview
+OLD_FILES+=usr/bin/vi
+OLD_FILES+=usr/bin/view
+OLD_FILES+=usr/share/man/man1/ex.1.gz
+OLD_FILES+=usr/share/man/man1/nex.1.gz
+OLD_FILES+=usr/share/man/man1/nvi.1.gz
+OLD_FILES+=usr/share/man/man1/nview.1.gz
+OLD_FILES+=usr/share/man/man1/vi.1.gz
+OLD_FILES+=usr/share/man/man1/view.1.gz
+.  if exists(${DESTDIR}/usr/share/vi)
+VI_DIRS!=find ${DESTDIR}/usr/share/vi -type d \
+| sed -e 's,^${DESTDIR}/,,'; echo
+VI_FILES!=find ${DESTDIR}/usr/share/vi \! -type d \
+| sed -e 's,^${DESTDIR}/,,'; echo
+OLD_DIRS+=${VI_DIRS}
+OLD_FILES+=${VI_FILES}
+.  endif
+.endif
+
 .if ${MK_WIRELESS} == no
 OLD_FILES+=etc/regdomain.xml
 OLD_FILES+=etc/rc.d/hostapd
___
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: r344198 - in head/sys: conf dev/ata

2019-02-15 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Feb 16 01:48:38 2019
New Revision: 344198
URL: https://svnweb.freebsd.org/changeset/base/344198

Log:
  GC ATA_REQUEST_TIMEOUT option remnants
  
  It was removed from code in r249083 and from sys/conf/options in r249213.
  
  PR:   222170
  MFC after:3 days

Modified:
  head/sys/conf/NOTES
  head/sys/dev/ata/ata-all.h

Modified: head/sys/conf/NOTES
==
--- head/sys/conf/NOTES Sat Feb 16 01:19:14 2019(r344197)
+++ head/sys/conf/NOTES Sat Feb 16 01:48:38 2019(r344198)
@@ -1760,14 +1760,6 @@ hint.ata.1.port="0x170"
 hint.ata.1.irq="15"
 
 #
-# The following options are valid on the ATA driver:
-#
-# ATA_REQUEST_TIMEOUT: the number of seconds to wait for an ATA request
-#  before timing out.
-
-#options   ATA_REQUEST_TIMEOUT=10
-
-#
 # Standard floppy disk controllers and floppy tapes, supports
 # the Y-E DATA External FDD (PC Card)
 #

Modified: head/sys/dev/ata/ata-all.h
==
--- head/sys/dev/ata/ata-all.h  Sat Feb 16 01:19:14 2019(r344197)
+++ head/sys/dev/ata/ata-all.h  Sat Feb 16 01:48:38 2019(r344198)
@@ -203,10 +203,6 @@
 #define ATA_OP_FINISHED 1
 #define ATA_MAX_28BIT_LBA   268435455UL
 
-#ifndefATA_REQUEST_TIMEOUT
-#defineATA_REQUEST_TIMEOUT 10
-#endif
-
 /* structure used for composite atomic operations */
 #define MAX_COMPOSITES  32  /* u_int32_t bits */
 struct ata_composite {
___
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: r344197 - stable/12/sys/dev/iwn

2019-02-15 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Feb 16 01:19:14 2019
New Revision: 344197
URL: https://svnweb.freebsd.org/changeset/base/344197

Log:
  MFC r343094:
  iwn(4): (partially) rewrite A-MPDU Tx path
  
  The change fixes ifnet counters and improves Tx stability when A-MPDU
  is used.
  
  MFC r343292:
  iwn(4): drop i_seq field initialization for A-MPDU frames
  
  It is done by net80211 since r319460.
  
  PR:   192641, 210211
  Reviewed by:  adrian, dhw
  Differential Revision:https://reviews.freebsd.org/D10728

Modified:
  stable/12/sys/dev/iwn/if_iwn.c
  stable/12/sys/dev/iwn/if_iwn_debug.h
  stable/12/sys/dev/iwn/if_iwnreg.h
  stable/12/sys/dev/iwn/if_iwnvar.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/iwn/if_iwn.c
==
--- stable/12/sys/dev/iwn/if_iwn.c  Sat Feb 16 01:05:22 2019
(r344196)
+++ stable/12/sys/dev/iwn/if_iwn.c  Sat Feb 16 01:19:14 2019
(r344197)
@@ -168,6 +168,7 @@ static int  iwn_alloc_tx_ring(struct iwn_softc *, struc
int);
 static voidiwn_reset_tx_ring(struct iwn_softc *, struct iwn_tx_ring *);
 static voidiwn_free_tx_ring(struct iwn_softc *, struct iwn_tx_ring *);
+static voidiwn_check_tx_ring(struct iwn_softc *, int);
 static voidiwn5000_ict_reset(struct iwn_softc *);
 static int iwn_read_eeprom(struct iwn_softc *,
uint8_t macaddr[IEEE80211_ADDR_LEN]);
@@ -199,6 +200,8 @@ static void iwn_calib_timeout(void *);
 static voidiwn_rx_phy(struct iwn_softc *, struct iwn_rx_desc *);
 static voidiwn_rx_done(struct iwn_softc *, struct iwn_rx_desc *,
struct iwn_rx_data *);
+static voidiwn_agg_tx_complete(struct iwn_softc *, struct iwn_tx_ring *,
+   int, int, int);
 static voidiwn_rx_compressed_ba(struct iwn_softc *, struct iwn_rx_desc *);
 static voidiwn5000_rx_calib_results(struct iwn_softc *,
struct iwn_rx_desc *);
@@ -207,10 +210,13 @@ static void   iwn4965_tx_done(struct iwn_softc *, 
struct
struct iwn_rx_data *);
 static voidiwn5000_tx_done(struct iwn_softc *, struct iwn_rx_desc *,
struct iwn_rx_data *);
+static voidiwn_adj_ampdu_ptr(struct iwn_softc *, struct iwn_tx_ring *);
 static voidiwn_tx_done(struct iwn_softc *, struct iwn_rx_desc *, int, int,
uint8_t);
-static voidiwn_ampdu_tx_done(struct iwn_softc *, int, int, int, int, int,
-   void *);
+static int iwn_ampdu_check_bitmap(uint64_t, int, int);
+static int iwn_ampdu_index_check(struct iwn_softc *, struct iwn_tx_ring *,
+   uint64_t, int, int);
+static voidiwn_ampdu_tx_done(struct iwn_softc *, int, int, int, void *);
 static voidiwn_cmd_done(struct iwn_softc *, struct iwn_rx_desc *);
 static voidiwn_notif_intr(struct iwn_softc *);
 static voidiwn_wakeup_intr(struct iwn_softc *);
@@ -2069,6 +2075,8 @@ iwn_reset_tx_ring(struct iwn_softc *sc, struct iwn_tx_
ieee80211_free_node(data->ni);
data->ni = NULL;
}
+   data->remapped = 0;
+   data->long_retries = 0;
}
/* Clear TX descriptors. */
memset(ring->desc, 0, ring->desc_dma.size);
@@ -2108,6 +2116,42 @@ iwn_free_tx_ring(struct iwn_softc *sc, struct iwn_tx_r
 }
 
 static void
+iwn_check_tx_ring(struct iwn_softc *sc, int qid)
+{
+   struct iwn_tx_ring *ring = >txq[qid];
+
+   KASSERT(ring->queued >= 0, ("%s: ring->queued (%d) for queue %d < 0!",
+   __func__, ring->queued, qid));
+
+   if (qid >= sc->firstaggqueue) {
+   struct iwn_ops *ops = >ops;
+   struct ieee80211_tx_ampdu *tap = sc->qid2tap[qid];
+
+   if (ring->queued == 0 && !IEEE80211_AMPDU_RUNNING(tap)) {
+   uint16_t ssn = tap->txa_start & 0xfff;
+   uint8_t tid = tap->txa_tid;
+   int *res = tap->txa_private;
+
+   iwn_nic_lock(sc);
+   ops->ampdu_tx_stop(sc, qid, tid, ssn);
+   iwn_nic_unlock(sc);
+
+   sc->qid2tap[qid] = NULL;
+   free(res, M_DEVBUF);
+   }
+   }
+
+   if (ring->queued < IWN_TX_RING_LOMARK) {
+   sc->qfullmsk &= ~(1 << qid);
+
+   if (ring->queued == 0)
+   sc->sc_tx_timer = 0;
+   else
+   sc->sc_tx_timer = 5;
+   }
+}
+
+static void
 iwn5000_ict_reset(struct iwn_softc *sc)
 {
/* Disable interrupts. */
@@ -3163,104 +3207,129 @@ iwn_rx_done(struct iwn_softc *sc, struct iwn_rx_desc *
 
 }
 
-/* Process an incoming Compressed BlockAck. */
 static void
-iwn_rx_compressed_ba(struct iwn_softc *sc, struct iwn_rx_desc *desc)
+iwn_agg_tx_complete(struct iwn_softc *sc, struct 

  1   2   3   4   5   6   7   8   >