aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2015-10-03 22:12:25 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2015-10-03 22:12:25 +0000
commit210ab3c2580ab8bf3ba79a4437b3fc7feeedc416 (patch)
treeddd556123f798621a1a133ae754477522eb9c3d1 /sys/dev
parentbc813c40bf44cc36ce850d3689598b532acf19c3 (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ath/if_ath_beacon.c6
-rw-r--r--sys/dev/mwl/if_mwl.c3
-rw-r--r--sys/dev/ral/rt2560.c5
-rw-r--r--sys/dev/ral/rt2661.c4
-rw-r--r--sys/dev/ral/rt2860.c3
-rw-r--r--sys/dev/usb/wlan/if_rum.c6
-rw-r--r--sys/dev/usb/wlan/if_run.c7
-rw-r--r--sys/dev/usb/wlan/if_ural.c2
-rw-r--r--sys/dev/wpi/if_wpi.c7
-rw-r--r--sys/dev/wtap/if_wtap.c4
10 files changed, 20 insertions, 27 deletions
diff --git a/sys/dev/ath/if_ath_beacon.c b/sys/dev/ath/if_ath_beacon.c
index 1ef3d58d6068..5db0ba416c83 100644
--- a/sys/dev/ath/if_ath_beacon.c
+++ b/sys/dev/ath/if_ath_beacon.c
@@ -199,7 +199,7 @@ ath_beacon_alloc(struct ath_softc *sc, struct ieee80211_node *ni)
* we assume the mbuf routines will return us something
* with this alignment (perhaps should assert).
*/
- m = ieee80211_beacon_alloc(ni, &vap->iv_bcn_off);
+ m = ieee80211_beacon_alloc(ni);
if (m == NULL) {
device_printf(sc->sc_dev, "%s: cannot get mbuf\n", __func__);
sc->sc_stats.ast_be_nombuf++;
@@ -713,7 +713,7 @@ ath_beacon_generate(struct ath_softc *sc, struct ieee80211vap *vap)
/* XXX lock mcastq? */
nmcastq = avp->av_mcastq.axq_depth;
- if (ieee80211_beacon_update(bf->bf_node, &vap->iv_bcn_off, m, nmcastq)) {
+ if (ieee80211_beacon_update(bf->bf_node, m, nmcastq)) {
/* XXX too conservative? */
bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap);
error = bus_dmamap_load_mbuf_sg(sc->sc_dmat, bf->bf_dmamap, m,
@@ -829,7 +829,7 @@ ath_beacon_start_adhoc(struct ath_softc *sc, struct ieee80211vap *vap)
*/
bf = avp->av_bcbuf;
m = bf->bf_m;
- if (ieee80211_beacon_update(bf->bf_node, &vap->iv_bcn_off, m, 0)) {
+ if (ieee80211_beacon_update(bf->bf_node, m, 0)) {
/* XXX too conservative? */
bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap);
error = bus_dmamap_load_mbuf_sg(sc->sc_dmat, bf->bf_dmamap, m,
diff --git a/sys/dev/mwl/if_mwl.c b/sys/dev/mwl/if_mwl.c
index bfbba356c955..7f9d8e010e98 100644
--- a/sys/dev/mwl/if_mwl.c
+++ b/sys/dev/mwl/if_mwl.c
@@ -1843,10 +1843,9 @@ mwl_beacon_setup(struct ieee80211vap *vap)
{
struct mwl_hal_vap *hvap = MWL_VAP(vap)->mv_hvap;
struct ieee80211_node *ni = vap->iv_bss;
- struct ieee80211_beacon_offsets *bo = &vap->iv_bcn_off;
struct mbuf *m;
- m = ieee80211_beacon_alloc(ni, bo);
+ m = ieee80211_beacon_alloc(ni);
if (m == NULL)
return ENOBUFS;
mwl_hal_setbeacon(hvap, mtod(m, const void *), m->m_len);
diff --git a/sys/dev/ral/rt2560.c b/sys/dev/ral/rt2560.c
index ef5a01c4e936..b03e8faaf242 100644
--- a/sys/dev/ral/rt2560.c
+++ b/sys/dev/ral/rt2560.c
@@ -768,7 +768,7 @@ rt2560_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
if (vap->iv_opmode == IEEE80211_M_HOSTAP ||
vap->iv_opmode == IEEE80211_M_IBSS ||
vap->iv_opmode == IEEE80211_M_MBSS) {
- m = ieee80211_beacon_alloc(ni, &vap->iv_bcn_off);
+ m = ieee80211_beacon_alloc(ni);
if (m == NULL) {
device_printf(sc->sc_dev,
"could not allocate beacon\n");
@@ -1286,7 +1286,6 @@ static void
rt2560_beacon_expire(struct rt2560_softc *sc)
{
struct ieee80211com *ic = &sc->sc_ic;
- struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
struct rt2560_tx_data *data;
if (ic->ic_opmode != IEEE80211_M_IBSS &&
@@ -1305,7 +1304,7 @@ rt2560_beacon_expire(struct rt2560_softc *sc)
bus_dmamap_unload(sc->bcnq.data_dmat, data->map);
/* XXX 1 =>'s mcast frames which means all PS sta's will wakeup! */
- ieee80211_beacon_update(data->ni, &vap->iv_bcn_off, data->m, 1);
+ ieee80211_beacon_update(data->ni, data->m, 1);
rt2560_tx_bcn(sc, data->m, data->ni);
diff --git a/sys/dev/ral/rt2661.c b/sys/dev/ral/rt2661.c
index 5c73ba02e0c5..100b5d613424 100644
--- a/sys/dev/ral/rt2661.c
+++ b/sys/dev/ral/rt2661.c
@@ -2626,13 +2626,11 @@ static int
rt2661_prepare_beacon(struct rt2661_softc *sc, struct ieee80211vap *vap)
{
struct ieee80211com *ic = vap->iv_ic;
- struct ieee80211_beacon_offsets *bo = &vap->iv_bcn_off;
struct rt2661_tx_desc desc;
struct mbuf *m0;
int rate;
- m0 = ieee80211_beacon_alloc(vap->iv_bss, bo);
- if (m0 == NULL) {
+ if ((m0 = ieee80211_beacon_alloc(vap->iv_bss))== NULL) {
device_printf(sc->sc_dev, "could not allocate beacon frame\n");
return ENOBUFS;
}
diff --git a/sys/dev/ral/rt2860.c b/sys/dev/ral/rt2860.c
index a6b1e26a7069..9c7fa532957d 100644
--- a/sys/dev/ral/rt2860.c
+++ b/sys/dev/ral/rt2860.c
@@ -4268,12 +4268,11 @@ static int
rt2860_setup_beacon(struct rt2860_softc *sc, struct ieee80211vap *vap)
{
struct ieee80211com *ic = vap->iv_ic;
- struct ieee80211_beacon_offsets *bo = &vap->iv_bcn_off;
struct rt2860_txwi txwi;
struct mbuf *m;
int ridx;
- if ((m = ieee80211_beacon_alloc(vap->iv_bss, bo)) == NULL)
+ if ((m = ieee80211_beacon_alloc(vap->iv_bss)) == NULL)
return ENOBUFS;
memset(&txwi, 0, sizeof txwi);
diff --git a/sys/dev/usb/wlan/if_rum.c b/sys/dev/usb/wlan/if_rum.c
index de277cdbf449..d52806fca801 100644
--- a/sys/dev/usb/wlan/if_rum.c
+++ b/sys/dev/usb/wlan/if_rum.c
@@ -2420,7 +2420,7 @@ rum_alloc_beacon(struct rum_softc *sc, struct ieee80211vap *vap)
if (ni->ni_chan == IEEE80211_CHAN_ANYC)
return EINVAL;
- m = ieee80211_beacon_alloc(ni, &vap->iv_bcn_off);
+ m = ieee80211_beacon_alloc(ni);
if (m == NULL)
return ENOMEM;
@@ -2454,7 +2454,7 @@ rum_update_beacon(struct ieee80211vap *vap, int item)
RUM_LOCK(sc);
if (m == NULL) {
- m = ieee80211_beacon_alloc(ni, bo);
+ m = ieee80211_beacon_alloc(ni);
if (m == NULL) {
device_printf(sc->sc_dev,
"%s: could not allocate beacon frame\n", __func__);
@@ -2477,7 +2477,7 @@ rum_update_beacon(struct ieee80211vap *vap, int item)
RUM_UNLOCK(sc);
setbit(bo->bo_flags, item);
- ieee80211_beacon_update(ni, bo, m, mcast);
+ ieee80211_beacon_update(ni, m, mcast);
rum_cmd_sleepable(sc, &vap, sizeof(vap), 0, rum_update_beacon_cb);
}
diff --git a/sys/dev/usb/wlan/if_run.c b/sys/dev/usb/wlan/if_run.c
index 7e50e0106a9f..635b5ae3c0e7 100644
--- a/sys/dev/usb/wlan/if_run.c
+++ b/sys/dev/usb/wlan/if_run.c
@@ -4866,11 +4866,11 @@ run_update_beacon(struct ieee80211vap *vap, int item)
setbit(bo->bo_flags, item);
if (rvp->beacon_mbuf == NULL) {
- rvp->beacon_mbuf = ieee80211_beacon_alloc(ni, bo);
+ rvp->beacon_mbuf = ieee80211_beacon_alloc(ni);
if (rvp->beacon_mbuf == NULL)
return;
}
- ieee80211_beacon_update(ni, bo, rvp->beacon_mbuf, mcast);
+ ieee80211_beacon_update(ni, rvp->beacon_mbuf, mcast);
i = RUN_CMDQ_GET(&sc->cmdq_store);
DPRINTF("cmdq_store=%d\n", i);
@@ -4904,8 +4904,7 @@ run_update_beacon_cb(void *arg)
* is taking care of apropriate calls.
*/
if (rvp->beacon_mbuf == NULL) {
- rvp->beacon_mbuf = ieee80211_beacon_alloc(ni,
- &vap->iv_bcn_off);
+ rvp->beacon_mbuf = ieee80211_beacon_alloc(ni);
if (rvp->beacon_mbuf == NULL)
return;
}
diff --git a/sys/dev/usb/wlan/if_ural.c b/sys/dev/usb/wlan/if_ural.c
index a085c3012d3c..6f6686f21c8c 100644
--- a/sys/dev/usb/wlan/if_ural.c
+++ b/sys/dev/usb/wlan/if_ural.c
@@ -710,7 +710,7 @@ ural_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
if (vap->iv_opmode == IEEE80211_M_HOSTAP ||
vap->iv_opmode == IEEE80211_M_IBSS) {
- m = ieee80211_beacon_alloc(ni, &vap->iv_bcn_off);
+ m = ieee80211_beacon_alloc(ni);
if (m == NULL) {
device_printf(sc->sc_dev,
"could not allocate beacon\n");
diff --git a/sys/dev/wpi/if_wpi.c b/sys/dev/wpi/if_wpi.c
index 6c7dbd023cc0..0d7c1c1d3c12 100644
--- a/sys/dev/wpi/if_wpi.c
+++ b/sys/dev/wpi/if_wpi.c
@@ -4354,7 +4354,6 @@ static int
wpi_setup_beacon(struct wpi_softc *sc, struct ieee80211_node *ni)
{
struct ieee80211vap *vap = ni->ni_vap;
- struct ieee80211_beacon_offsets *bo = &vap->iv_bcn_off;
struct wpi_vap *wvp = WPI_VAP(vap);
struct wpi_buf *bcn = &wvp->wv_bcbuf;
struct mbuf *m;
@@ -4365,7 +4364,7 @@ wpi_setup_beacon(struct wpi_softc *sc, struct ieee80211_node *ni)
if (ni->ni_chan == IEEE80211_CHAN_ANYC)
return EINVAL;
- m = ieee80211_beacon_alloc(ni, bo);
+ m = ieee80211_beacon_alloc(ni);
if (m == NULL) {
device_printf(sc->sc_dev,
"%s: could not allocate beacon frame\n", __func__);
@@ -4398,7 +4397,7 @@ wpi_update_beacon(struct ieee80211vap *vap, int item)
WPI_VAP_LOCK(wvp);
if (bcn->m == NULL) {
- bcn->m = ieee80211_beacon_alloc(ni, bo);
+ bcn->m = ieee80211_beacon_alloc(ni);
if (bcn->m == NULL) {
device_printf(sc->sc_dev,
"%s: could not allocate beacon frame\n", __func__);
@@ -4416,7 +4415,7 @@ wpi_update_beacon(struct ieee80211vap *vap, int item)
mcast = 1; /* TODO */
setbit(bo->bo_flags, item);
- ieee80211_beacon_update(ni, bo, bcn->m, mcast);
+ ieee80211_beacon_update(ni, bcn->m, mcast);
WPI_VAP_LOCK(wvp);
wpi_config_beacon(wvp);
diff --git a/sys/dev/wtap/if_wtap.c b/sys/dev/wtap/if_wtap.c
index 7c15c358de83..847ffcb5a034 100644
--- a/sys/dev/wtap/if_wtap.c
+++ b/sys/dev/wtap/if_wtap.c
@@ -205,7 +205,7 @@ wtap_beacon_alloc(struct wtap_softc *sc, struct ieee80211_node *ni)
* we assume the mbuf routines will return us something
* with this alignment (perhaps should assert).
*/
- avp->beacon = ieee80211_beacon_alloc(ni, &vap->iv_bcn_off);
+ avp->beacon = ieee80211_beacon_alloc(ni);
if (avp->beacon == NULL) {
printf("%s: cannot get mbuf\n", __func__);
return ENOMEM;
@@ -242,7 +242,7 @@ wtap_beacon_intrp(void *arg)
* of the TIM bitmap).
*/
m = m_dup(avp->beacon, M_NOWAIT);
- if (ieee80211_beacon_update(avp->bf_node, &vap->iv_bcn_off, m, 0)) {
+ if (ieee80211_beacon_update(avp->bf_node, m, 0)) {
printf("%s, need to remap the memory because the beacon frame"
" changed size.\n",__func__);
}