svn commit: r337951 - in stable/11/sys: dev/ath dev/bwi net80211
Kyle Evans
kevans at FreeBSD.org
Fri Aug 17 03:05:11 UTC 2018
Author: kevans
Date: Fri Aug 17 03:05:09 2018
New Revision: 337951
URL: https://svnweb.freebsd.org/changeset/base/337951
Log:
MFC r337570-r337573
r337570:
bwi(4): Set ic->ic_softc before bwi_getradiocaps to avoid bad deref
r337571:
net80211: Drain ageq before cleaning it up.
The comment above ieee80211_ageq_cleanup specifically notes that the queue
is assumed to be empty, and in order to make it so, ieee80211_ageq_drain
must be used.
r337572:
ieee8021_node: fix whitespace issues
r337573:
ath: Minor style cleanups
device_printf => DPRINTF and two whitespace adjustments
Modified:
stable/11/sys/dev/ath/if_ath_rx_edma.c
stable/11/sys/dev/bwi/if_bwi.c
stable/11/sys/net80211/ieee80211_node.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/dev/ath/if_ath_rx_edma.c
==============================================================================
--- stable/11/sys/dev/ath/if_ath_rx_edma.c Fri Aug 17 03:03:27 2018 (r337950)
+++ stable/11/sys/dev/ath/if_ath_rx_edma.c Fri Aug 17 03:05:09 2018 (r337951)
@@ -166,7 +166,7 @@ ath_edma_stoprecv(struct ath_softc *sc, int dodelay)
ath_hal_setrxfilter(ah, 0);
/*
- *
+ *
*/
if (ath_hal_stopdmarecv(ah) == AH_TRUE)
sc->sc_rx_stopped = 1;
@@ -727,7 +727,7 @@ ath_edma_rxbuf_alloc(struct ath_softc *sc)
bf = TAILQ_FIRST(&sc->sc_rxbuf);
/* XXX shouldn't happen upon startup? */
if (bf == NULL) {
- device_printf(sc->sc_dev, "%s: nothing on rxbuf?!\n",
+ DPRINTF(sc, ATH_DEBUG_EDMA_RX, "%s: nothing on rxbuf?!\n",
__func__);
return (NULL);
}
@@ -808,7 +808,7 @@ ath_edma_rxfifo_alloc(struct ath_softc *sc, HAL_RX_QUE
bf = ath_edma_rxbuf_alloc(sc);
/* XXX should ensure the FIFO is not NULL? */
if (bf == NULL) {
- device_printf(sc->sc_dev,
+ DPRINTF(sc, ATH_DEBUG_EDMA_RX,
"%s: Q%d: alloc failed: i=%d, nbufs=%d?\n",
__func__,
qtype,
@@ -925,7 +925,7 @@ ath_edma_rxfifo_free(struct ath_softc *sc, HAL_RX_QUEU
device_printf(sc->sc_dev, "%s: called; qtype=%d\n",
__func__,
qtype);
-
+
free(re->m_fifo, M_ATHDEV);
return (0);
Modified: stable/11/sys/dev/bwi/if_bwi.c
==============================================================================
--- stable/11/sys/dev/bwi/if_bwi.c Fri Aug 17 03:03:27 2018 (r337950)
+++ stable/11/sys/dev/bwi/if_bwi.c Fri Aug 17 03:05:09 2018 (r337951)
@@ -488,10 +488,12 @@ bwi_attach(struct bwi_softc *sc)
BWI_SPROM_CARD_INFO_LOCALE);
DPRINTF(sc, BWI_DBG_ATTACH, "locale: %d\n", sc->sc_locale);
/* XXX use locale */
+
+ ic->ic_softc = sc;
+
bwi_getradiocaps(ic, IEEE80211_CHAN_MAX, &ic->ic_nchans,
ic->ic_channels);
- ic->ic_softc = sc;
ic->ic_name = device_get_nameunit(dev);
ic->ic_caps = IEEE80211_C_STA |
IEEE80211_C_SHSLOT |
Modified: stable/11/sys/net80211/ieee80211_node.c
==============================================================================
--- stable/11/sys/net80211/ieee80211_node.c Fri Aug 17 03:03:27 2018 (r337950)
+++ stable/11/sys/net80211/ieee80211_node.c Fri Aug 17 03:05:09 2018 (r337951)
@@ -30,13 +30,13 @@ __FBSDID("$FreeBSD$");
#include "opt_wlan.h"
#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
+#include <sys/systm.h>
+#include <sys/mbuf.h>
#include <sys/malloc.h>
#include <sys/kernel.h>
#include <sys/socket.h>
-
+
#include <net/if.h>
#include <net/if_var.h>
#include <net/if_media.h>
@@ -134,6 +134,7 @@ ieee80211_node_detach(struct ieee80211com *ic)
callout_drain(&ic->ic_inact);
ieee80211_node_table_cleanup(&ic->ic_sta);
+ ieee80211_ageq_drain(&ic->ic_stageq);
ieee80211_ageq_cleanup(&ic->ic_stageq);
}
@@ -199,7 +200,7 @@ ieee80211_node_vdetach(struct ieee80211vap *vap)
}
}
-/*
+/*
* Port authorize/unauthorize interfaces for use by an authenticator.
*/
@@ -370,7 +371,7 @@ ieee80211_create_ibss(struct ieee80211vap* vap, struct
memcpy(ni->ni_meshid, vap->iv_mesh->ms_id, ni->ni_meshidlen);
#endif
}
- /*
+ /*
* Fix the channel and related attributes.
*/
/* clear DFS CAC state on previous channel */
@@ -550,8 +551,8 @@ check_bss_debug(struct ieee80211vap *vap, struct ieee8
printf("%s\n", fail & 0x10 ? "!" : "");
}
#endif /* IEEE80211_DEBUG */
-
+
int
ieee80211_ibss_merge_check(struct ieee80211_node *ni)
{
@@ -811,7 +812,7 @@ ieee80211_sta_join1(struct ieee80211_node *selbs)
* Set the erp state (mostly the slot time) to deal with
* the auto-select case; this should be redundant if the
* mode is locked.
- */
+ */
ieee80211_reset_erp(ic);
ieee80211_wme_initparams(vap);
@@ -1517,7 +1518,7 @@ ieee80211_fakeup_adhoc_node(struct ieee80211vap *vap,
/*
* In adhoc demo mode there are no management
* frames to use to discover neighbor capabilities,
- * so blindly propagate the local configuration
+ * so blindly propagate the local configuration
* so we can do interesting things (e.g. use
* WME to disable ACK's).
*/
@@ -2099,7 +2100,7 @@ timeout_stations(void *arg __unused, struct ieee80211_
/* XXX before inact decrement? */
if (ni == vap->iv_bss)
return;
- if (ni->ni_associd != 0 ||
+ if (ni->ni_associd != 0 ||
(vap->iv_opmode == IEEE80211_M_IBSS ||
vap->iv_opmode == IEEE80211_M_AHDEMO)) {
/*
More information about the svn-src-all
mailing list