freebsd11_wlan: Disable sysinits.
These are currently no-ops; but soon enough they won't be...
This commit is contained in:
@@ -261,7 +261,9 @@ ic_printf(struct ieee80211com *ic, const char * fmt, ...)
|
|||||||
|
|
||||||
static LIST_HEAD(, ieee80211com) ic_head = LIST_HEAD_INITIALIZER(ic_head);
|
static LIST_HEAD(, ieee80211com) ic_head = LIST_HEAD_INITIALIZER(ic_head);
|
||||||
struct mtx ic_list_mtx;
|
struct mtx ic_list_mtx;
|
||||||
|
#if 0
|
||||||
MTX_SYSINIT(ic_list, &ic_list_mtx, "ieee80211com list", MTX_DEF);
|
MTX_SYSINIT(ic_list, &ic_list_mtx, "ieee80211com list", MTX_DEF);
|
||||||
|
#endif
|
||||||
|
|
||||||
static int
|
static int
|
||||||
sysctl_ieee80211coms(SYSCTL_HANDLER_ARGS)
|
sysctl_ieee80211coms(SYSCTL_HANDLER_ARGS)
|
||||||
|
|||||||
@@ -38,9 +38,9 @@ __FBSDID("$FreeBSD: releng/11.1/sys/net80211/ieee80211_ht.c 300232 2016-05-19 21
|
|||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/kernel.h>
|
#include <sys/kernel.h>
|
||||||
#include <sys/malloc.h>
|
#include <sys/malloc.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
#include <sys/endian.h>
|
#include <sys/endian.h>
|
||||||
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
@@ -183,27 +183,29 @@ ieee80211_ht_init(void)
|
|||||||
/*
|
/*
|
||||||
* Register action frame handlers.
|
* Register action frame handlers.
|
||||||
*/
|
*/
|
||||||
ieee80211_recv_action_register(IEEE80211_ACTION_CAT_BA,
|
ieee80211_recv_action_register(IEEE80211_ACTION_CAT_BA,
|
||||||
IEEE80211_ACTION_BA_ADDBA_REQUEST, ht_recv_action_ba_addba_request);
|
IEEE80211_ACTION_BA_ADDBA_REQUEST, ht_recv_action_ba_addba_request);
|
||||||
ieee80211_recv_action_register(IEEE80211_ACTION_CAT_BA,
|
ieee80211_recv_action_register(IEEE80211_ACTION_CAT_BA,
|
||||||
IEEE80211_ACTION_BA_ADDBA_RESPONSE, ht_recv_action_ba_addba_response);
|
IEEE80211_ACTION_BA_ADDBA_RESPONSE, ht_recv_action_ba_addba_response);
|
||||||
ieee80211_recv_action_register(IEEE80211_ACTION_CAT_BA,
|
ieee80211_recv_action_register(IEEE80211_ACTION_CAT_BA,
|
||||||
IEEE80211_ACTION_BA_DELBA, ht_recv_action_ba_delba);
|
IEEE80211_ACTION_BA_DELBA, ht_recv_action_ba_delba);
|
||||||
ieee80211_recv_action_register(IEEE80211_ACTION_CAT_HT,
|
ieee80211_recv_action_register(IEEE80211_ACTION_CAT_HT,
|
||||||
IEEE80211_ACTION_HT_MIMOPWRSAVE, ht_recv_action_ht_mimopwrsave);
|
IEEE80211_ACTION_HT_MIMOPWRSAVE, ht_recv_action_ht_mimopwrsave);
|
||||||
ieee80211_recv_action_register(IEEE80211_ACTION_CAT_HT,
|
ieee80211_recv_action_register(IEEE80211_ACTION_CAT_HT,
|
||||||
IEEE80211_ACTION_HT_TXCHWIDTH, ht_recv_action_ht_txchwidth);
|
IEEE80211_ACTION_HT_TXCHWIDTH, ht_recv_action_ht_txchwidth);
|
||||||
|
|
||||||
ieee80211_send_action_register(IEEE80211_ACTION_CAT_BA,
|
ieee80211_send_action_register(IEEE80211_ACTION_CAT_BA,
|
||||||
IEEE80211_ACTION_BA_ADDBA_REQUEST, ht_send_action_ba_addba);
|
IEEE80211_ACTION_BA_ADDBA_REQUEST, ht_send_action_ba_addba);
|
||||||
ieee80211_send_action_register(IEEE80211_ACTION_CAT_BA,
|
ieee80211_send_action_register(IEEE80211_ACTION_CAT_BA,
|
||||||
IEEE80211_ACTION_BA_ADDBA_RESPONSE, ht_send_action_ba_addba);
|
IEEE80211_ACTION_BA_ADDBA_RESPONSE, ht_send_action_ba_addba);
|
||||||
ieee80211_send_action_register(IEEE80211_ACTION_CAT_BA,
|
ieee80211_send_action_register(IEEE80211_ACTION_CAT_BA,
|
||||||
IEEE80211_ACTION_BA_DELBA, ht_send_action_ba_delba);
|
IEEE80211_ACTION_BA_DELBA, ht_send_action_ba_delba);
|
||||||
ieee80211_send_action_register(IEEE80211_ACTION_CAT_HT,
|
ieee80211_send_action_register(IEEE80211_ACTION_CAT_HT,
|
||||||
IEEE80211_ACTION_HT_TXCHWIDTH, ht_send_action_ht_txchwidth);
|
IEEE80211_ACTION_HT_TXCHWIDTH, ht_send_action_ht_txchwidth);
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
SYSINIT(wlan_ht, SI_SUB_DRIVERS, SI_ORDER_FIRST, ieee80211_ht_init, NULL);
|
SYSINIT(wlan_ht, SI_SUB_DRIVERS, SI_ORDER_FIRST, ieee80211_ht_init, NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
static int ieee80211_ampdu_enable(struct ieee80211_node *ni,
|
static int ieee80211_ampdu_enable(struct ieee80211_node *ni,
|
||||||
struct ieee80211_tx_ampdu *tap);
|
struct ieee80211_tx_ampdu *tap);
|
||||||
@@ -458,7 +460,7 @@ ieee80211_get_suphtrates(struct ieee80211com *ic,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Decap the encapsulated A-MSDU frames and dispatch all but
|
* Decap the encapsulated A-MSDU frames and dispatch all but
|
||||||
* the last for delivery. The last frame is returned for
|
* the last for delivery. The last frame is returned for
|
||||||
* delivery via the normal path.
|
* delivery via the normal path.
|
||||||
*/
|
*/
|
||||||
struct mbuf *
|
struct mbuf *
|
||||||
@@ -864,7 +866,7 @@ again:
|
|||||||
* Sec 9.10.7.6.2 a) (p.137)
|
* Sec 9.10.7.6.2 a) (p.137)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check for frames sitting too long in the reorder queue.
|
* Check for frames sitting too long in the reorder queue.
|
||||||
* This should only ever happen if frames are not delivered
|
* This should only ever happen if frames are not delivered
|
||||||
* without the sender otherwise notifying us (e.g. with a
|
* without the sender otherwise notifying us (e.g. with a
|
||||||
@@ -1137,7 +1139,7 @@ ieee80211_ht_node_age(struct ieee80211_node *ni)
|
|||||||
continue;
|
continue;
|
||||||
if (rap->rxa_qframes == 0)
|
if (rap->rxa_qframes == 0)
|
||||||
continue;
|
continue;
|
||||||
/*
|
/*
|
||||||
* Check for frames sitting too long in the reorder queue.
|
* Check for frames sitting too long in the reorder queue.
|
||||||
* See above for more details on what's happening here.
|
* See above for more details on what's happening here.
|
||||||
*/
|
*/
|
||||||
@@ -1305,7 +1307,7 @@ htinfo_update(struct ieee80211com *ic)
|
|||||||
protmode = IEEE80211_HTINFO_OPMODE_PROTOPT
|
protmode = IEEE80211_HTINFO_OPMODE_PROTOPT
|
||||||
| IEEE80211_HTINFO_NONHT_PRESENT;
|
| IEEE80211_HTINFO_NONHT_PRESENT;
|
||||||
} else if (ic->ic_bsschan != IEEE80211_CHAN_ANYC &&
|
} else if (ic->ic_bsschan != IEEE80211_CHAN_ANYC &&
|
||||||
IEEE80211_IS_CHAN_HT40(ic->ic_bsschan) &&
|
IEEE80211_IS_CHAN_HT40(ic->ic_bsschan) &&
|
||||||
ic->ic_sta_assoc != ic->ic_ht40_sta_assoc) {
|
ic->ic_sta_assoc != ic->ic_ht40_sta_assoc) {
|
||||||
protmode = IEEE80211_HTINFO_OPMODE_HT20PR;
|
protmode = IEEE80211_HTINFO_OPMODE_HT20PR;
|
||||||
} else {
|
} else {
|
||||||
@@ -1751,7 +1753,7 @@ ampdu_tx_stop(struct ieee80211_tx_ampdu *tap)
|
|||||||
*/
|
*/
|
||||||
ieee80211_txampdu_init_pps(tap);
|
ieee80211_txampdu_init_pps(tap);
|
||||||
|
|
||||||
/* NB: clearing NAK means we may re-send ADDBA */
|
/* NB: clearing NAK means we may re-send ADDBA */
|
||||||
tap->txa_flags &= ~(IEEE80211_AGGR_SETUP | IEEE80211_AGGR_NAK);
|
tap->txa_flags &= ~(IEEE80211_AGGR_SETUP | IEEE80211_AGGR_NAK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2646,7 +2648,7 @@ ht_send_action_ht_txchwidth(struct ieee80211_node *ni,
|
|||||||
if (m != NULL) {
|
if (m != NULL) {
|
||||||
*frm++ = category;
|
*frm++ = category;
|
||||||
*frm++ = action;
|
*frm++ = action;
|
||||||
*frm++ = IEEE80211_IS_CHAN_HT40(ni->ni_chan) ?
|
*frm++ = IEEE80211_IS_CHAN_HT40(ni->ni_chan) ?
|
||||||
IEEE80211_A_HT_TXCHWIDTH_2040 :
|
IEEE80211_A_HT_TXCHWIDTH_2040 :
|
||||||
IEEE80211_A_HT_TXCHWIDTH_20;
|
IEEE80211_A_HT_TXCHWIDTH_20;
|
||||||
m->m_pkthdr.len = m->m_len = frm - mtod(m, uint8_t *);
|
m->m_pkthdr.len = m->m_len = frm - mtod(m, uint8_t *);
|
||||||
@@ -2807,7 +2809,7 @@ ieee80211_add_htcap_body(uint8_t *frm, struct ieee80211_node *ni)
|
|||||||
frm++;
|
frm++;
|
||||||
|
|
||||||
/* pre-zero remainder of ie */
|
/* pre-zero remainder of ie */
|
||||||
memset(frm, 0, sizeof(struct ieee80211_ie_htcap) -
|
memset(frm, 0, sizeof(struct ieee80211_ie_htcap) -
|
||||||
__offsetof(struct ieee80211_ie_htcap, hc_mcsset));
|
__offsetof(struct ieee80211_ie_htcap, hc_mcsset));
|
||||||
|
|
||||||
/* supported MCS set */
|
/* supported MCS set */
|
||||||
|
|||||||
@@ -1,31 +1,31 @@
|
|||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2009 The FreeBSD Foundation
|
* Copyright (c) 2009 The FreeBSD Foundation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* This software was developed by Rui Paulo under sponsorship from the
|
* This software was developed by Rui Paulo under sponsorship from the
|
||||||
* FreeBSD Foundation.
|
* FreeBSD Foundation.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
* are met:
|
* are met:
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
__FBSDID("$FreeBSD: releng/11.1/sys/net80211/ieee80211_hwmp.c 300232 2016-05-19 21:08:33Z avos $");
|
__FBSDID("$FreeBSD: releng/11.1/sys/net80211/ieee80211_hwmp.c 300232 2016-05-19 21:08:33Z avos $");
|
||||||
@@ -245,7 +245,9 @@ ieee80211_hwmp_init(void)
|
|||||||
*/
|
*/
|
||||||
ieee80211_mesh_register_proto_path(&mesh_proto_hwmp);
|
ieee80211_mesh_register_proto_path(&mesh_proto_hwmp);
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
SYSINIT(wlan_hwmp, SI_SUB_DRIVERS, SI_ORDER_SECOND, ieee80211_hwmp_init, NULL);
|
SYSINIT(wlan_hwmp, SI_SUB_DRIVERS, SI_ORDER_SECOND, ieee80211_hwmp_init, NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
hwmp_vattach(struct ieee80211vap *vap)
|
hwmp_vattach(struct ieee80211vap *vap)
|
||||||
@@ -274,7 +276,7 @@ hwmp_vdetach(struct ieee80211vap *vap)
|
|||||||
callout_drain(&hs->hs_roottimer);
|
callout_drain(&hs->hs_roottimer);
|
||||||
IEEE80211_FREE(vap->iv_hwmp, M_80211_VAP);
|
IEEE80211_FREE(vap->iv_hwmp, M_80211_VAP);
|
||||||
vap->iv_hwmp = NULL;
|
vap->iv_hwmp = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
hwmp_newstate(struct ieee80211vap *vap, enum ieee80211_state ostate, int arg)
|
hwmp_newstate(struct ieee80211vap *vap, enum ieee80211_state ostate, int arg)
|
||||||
@@ -440,7 +442,7 @@ hwmp_recv_action_meshpath(struct ieee80211_node *ni,
|
|||||||
preq->preq_lifetime = le32dec(iefrm_t); iefrm_t += 4;
|
preq->preq_lifetime = le32dec(iefrm_t); iefrm_t += 4;
|
||||||
preq->preq_metric = le32dec(iefrm_t); iefrm_t += 4;
|
preq->preq_metric = le32dec(iefrm_t); iefrm_t += 4;
|
||||||
preq->preq_tcount = *iefrm_t++;
|
preq->preq_tcount = *iefrm_t++;
|
||||||
|
|
||||||
for (i = 0; i < preq->preq_tcount; i++) {
|
for (i = 0; i < preq->preq_tcount; i++) {
|
||||||
preq->preq_targets[i].target_flags = *iefrm_t++;
|
preq->preq_targets[i].target_flags = *iefrm_t++;
|
||||||
IEEE80211_ADDR_COPY(
|
IEEE80211_ADDR_COPY(
|
||||||
@@ -975,7 +977,7 @@ hwmp_recv_preq(struct ieee80211vap *vap, struct ieee80211_node *ni,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Acceptance criteria: if unicast addressed
|
* Acceptance criteria: if unicast addressed
|
||||||
* AND no valid forwarding for Target of PREQ, discard this PREQ.
|
* AND no valid forwarding for Target of PREQ, discard this PREQ.
|
||||||
*/
|
*/
|
||||||
if(rttarg != NULL)
|
if(rttarg != NULL)
|
||||||
|
|||||||
@@ -1,31 +1,31 @@
|
|||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2009 The FreeBSD Foundation
|
* Copyright (c) 2009 The FreeBSD Foundation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* This software was developed by Rui Paulo under sponsorship from the
|
* This software was developed by Rui Paulo under sponsorship from the
|
||||||
* FreeBSD Foundation.
|
* FreeBSD Foundation.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
* are met:
|
* are met:
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
__FBSDID("$FreeBSD: releng/11.1/sys/net80211/ieee80211_mesh.c 300232 2016-05-19 21:08:33Z avos $");
|
__FBSDID("$FreeBSD: releng/11.1/sys/net80211/ieee80211_mesh.c 300232 2016-05-19 21:08:33Z avos $");
|
||||||
@@ -40,8 +40,8 @@ __FBSDID("$FreeBSD: releng/11.1/sys/net80211/ieee80211_mesh.c 300232 2016-05-19
|
|||||||
#include "opt_wlan.h"
|
#include "opt_wlan.h"
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
#include <sys/mbuf.h>
|
#include <sys/mbuf.h>
|
||||||
#include <sys/malloc.h>
|
#include <sys/malloc.h>
|
||||||
#include <sys/kernel.h>
|
#include <sys/kernel.h>
|
||||||
|
|
||||||
@@ -600,7 +600,9 @@ ieee80211_mesh_init(void)
|
|||||||
ieee80211_mesh_register_proto_metric(&mesh_metric_airtime);
|
ieee80211_mesh_register_proto_metric(&mesh_metric_airtime);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
SYSINIT(wlan_mesh, SI_SUB_DRIVERS, SI_ORDER_FIRST, ieee80211_mesh_init, NULL);
|
SYSINIT(wlan_mesh, SI_SUB_DRIVERS, SI_ORDER_FIRST, ieee80211_mesh_init, NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
ieee80211_mesh_attach(struct ieee80211com *ic)
|
ieee80211_mesh_attach(struct ieee80211com *ic)
|
||||||
@@ -944,7 +946,7 @@ static void
|
|||||||
mesh_checkid(void *arg, struct ieee80211_node *ni)
|
mesh_checkid(void *arg, struct ieee80211_node *ni)
|
||||||
{
|
{
|
||||||
uint16_t *r = arg;
|
uint16_t *r = arg;
|
||||||
|
|
||||||
if (*r == ni->ni_mllid)
|
if (*r == ni->ni_mllid)
|
||||||
*(uint16_t *)arg = 0;
|
*(uint16_t *)arg = 0;
|
||||||
}
|
}
|
||||||
@@ -1788,7 +1790,7 @@ mesh_input(struct ieee80211_node *ni, struct mbuf *m,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
#ifdef IEEE80211_DEBUG
|
#ifdef IEEE80211_DEBUG
|
||||||
if ((ieee80211_msg_debug(vap) &&
|
if ((ieee80211_msg_debug(vap) &&
|
||||||
(vap->iv_ic->ic_flags & IEEE80211_F_SCAN)) ||
|
(vap->iv_ic->ic_flags & IEEE80211_F_SCAN)) ||
|
||||||
ieee80211_msg_dumppkts(vap)) {
|
ieee80211_msg_dumppkts(vap)) {
|
||||||
if_printf(ifp, "received %s from %s rssi %d\n",
|
if_printf(ifp, "received %s from %s rssi %d\n",
|
||||||
@@ -2183,7 +2185,7 @@ mesh_parse_meshpeering_action(struct ieee80211_node *ni,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Close frames are accepted if meshid is the same.
|
* Close frames are accepted if meshid is the same.
|
||||||
* Verify the other two types.
|
* Verify the other two types.
|
||||||
@@ -2228,7 +2230,7 @@ mesh_parse_meshpeering_action(struct ieee80211_node *ni,
|
|||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (const struct ieee80211_meshpeer_ie *) mp;
|
return (const struct ieee80211_meshpeer_ie *) mp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2507,7 +2509,7 @@ mesh_recv_action_meshlmetric(struct ieee80211_node *ni,
|
|||||||
(const struct ieee80211_meshlmetric_ie *)
|
(const struct ieee80211_meshlmetric_ie *)
|
||||||
(frm+2); /* action + code */
|
(frm+2); /* action + code */
|
||||||
struct ieee80211_meshlmetric_ie lm_rep;
|
struct ieee80211_meshlmetric_ie lm_rep;
|
||||||
|
|
||||||
if (ie->lm_flags & IEEE80211_MESH_LMETRIC_FLAGS_REQ) {
|
if (ie->lm_flags & IEEE80211_MESH_LMETRIC_FLAGS_REQ) {
|
||||||
lm_rep.lm_flags = 0;
|
lm_rep.lm_flags = 0;
|
||||||
lm_rep.lm_metric = mesh_airtime_calc(ni);
|
lm_rep.lm_metric = mesh_airtime_calc(ni);
|
||||||
@@ -3002,7 +3004,7 @@ static void
|
|||||||
mesh_peer_timeout_backoff(struct ieee80211_node *ni)
|
mesh_peer_timeout_backoff(struct ieee80211_node *ni)
|
||||||
{
|
{
|
||||||
uint32_t r;
|
uint32_t r;
|
||||||
|
|
||||||
r = arc4random();
|
r = arc4random();
|
||||||
ni->ni_mltval += r % ni->ni_mltval;
|
ni->ni_mltval += r % ni->ni_mltval;
|
||||||
callout_reset(&ni->ni_mltimer, ni->ni_mltval, mesh_peer_timeout_cb,
|
callout_reset(&ni->ni_mltimer, ni->ni_mltval, mesh_peer_timeout_cb,
|
||||||
@@ -3036,7 +3038,7 @@ mesh_peer_timeout_cb(void *arg)
|
|||||||
IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_MESH,
|
IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_MESH,
|
||||||
ni, "mesh link timeout, state %d, retry counter %d",
|
ni, "mesh link timeout, state %d, retry counter %d",
|
||||||
ni->ni_mlstate, ni->ni_mlrcnt);
|
ni->ni_mlstate, ni->ni_mlrcnt);
|
||||||
|
|
||||||
switch (ni->ni_mlstate) {
|
switch (ni->ni_mlstate) {
|
||||||
case IEEE80211_NODE_MESH_IDLE:
|
case IEEE80211_NODE_MESH_IDLE:
|
||||||
case IEEE80211_NODE_MESH_ESTABLISHED:
|
case IEEE80211_NODE_MESH_ESTABLISHED:
|
||||||
|
|||||||
@@ -367,7 +367,9 @@ ieee80211_phy_init(void)
|
|||||||
ieee80211_setup_ratetable(ratetables[i]);
|
ieee80211_setup_ratetable(ratetables[i]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
SYSINIT(wlan_phy, SI_SUB_DRIVERS, SI_ORDER_FIRST, ieee80211_phy_init, NULL);
|
SYSINIT(wlan_phy, SI_SUB_DRIVERS, SI_ORDER_FIRST, ieee80211_phy_init, NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
const struct ieee80211_rate_table *
|
const struct ieee80211_rate_table *
|
||||||
ieee80211_get_ratetable(struct ieee80211_channel *c)
|
ieee80211_get_ratetable(struct ieee80211_channel *c)
|
||||||
|
|||||||
@@ -369,7 +369,7 @@ ieee80211_proto_vattach(struct ieee80211vap *vap)
|
|||||||
} else {
|
} else {
|
||||||
vap->iv_txparms[i].mgmtrate =
|
vap->iv_txparms[i].mgmtrate =
|
||||||
rs->rs_rates[0] & IEEE80211_RATE_VAL;
|
rs->rs_rates[0] & IEEE80211_RATE_VAL;
|
||||||
vap->iv_txparms[i].mcastrate =
|
vap->iv_txparms[i].mcastrate =
|
||||||
rs->rs_rates[0] & IEEE80211_RATE_VAL;
|
rs->rs_rates[0] & IEEE80211_RATE_VAL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -454,7 +454,9 @@ ieee80211_auth_setup(void)
|
|||||||
ieee80211_authenticator_register(IEEE80211_AUTH_SHARED, &auth_internal);
|
ieee80211_authenticator_register(IEEE80211_AUTH_SHARED, &auth_internal);
|
||||||
ieee80211_authenticator_register(IEEE80211_AUTH_AUTO, &auth_internal);
|
ieee80211_authenticator_register(IEEE80211_AUTH_AUTO, &auth_internal);
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
SYSINIT(wlan_auth, SI_SUB_DRIVERS, SI_ORDER_FIRST, ieee80211_auth_setup, NULL);
|
SYSINIT(wlan_auth, SI_SUB_DRIVERS, SI_ORDER_FIRST, ieee80211_auth_setup, NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
const struct ieee80211_authenticator *
|
const struct ieee80211_authenticator *
|
||||||
ieee80211_authenticator_get(int auth)
|
ieee80211_authenticator_get(int auth)
|
||||||
@@ -581,7 +583,7 @@ ieee80211_dump_pkt(struct ieee80211com *ic,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (IEEE80211_QOS_HAS_SEQ(wh)) {
|
if (IEEE80211_QOS_HAS_SEQ(wh)) {
|
||||||
const struct ieee80211_qosframe *qwh =
|
const struct ieee80211_qosframe *qwh =
|
||||||
(const struct ieee80211_qosframe *)buf;
|
(const struct ieee80211_qosframe *)buf;
|
||||||
printf(" QoS [TID %u%s]", qwh->i_qos[0] & IEEE80211_QOS_TID,
|
printf(" QoS [TID %u%s]", qwh->i_qos[0] & IEEE80211_QOS_TID,
|
||||||
qwh->i_qos[0] & IEEE80211_QOS_ACKPOLICY ? " ACM" : "");
|
qwh->i_qos[0] & IEEE80211_QOS_ACKPOLICY ? " ACM" : "");
|
||||||
@@ -997,8 +999,8 @@ static void
|
|||||||
_setifsparams(struct wmeParams *wmep, const paramType *phy)
|
_setifsparams(struct wmeParams *wmep, const paramType *phy)
|
||||||
{
|
{
|
||||||
wmep->wmep_aifsn = phy->aifsn;
|
wmep->wmep_aifsn = phy->aifsn;
|
||||||
wmep->wmep_logcwmin = phy->logcwmin;
|
wmep->wmep_logcwmin = phy->logcwmin;
|
||||||
wmep->wmep_logcwmax = phy->logcwmax;
|
wmep->wmep_logcwmax = phy->logcwmax;
|
||||||
wmep->wmep_txopLimit = phy->txopLimit;
|
wmep->wmep_txopLimit = phy->txopLimit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1075,7 +1077,7 @@ ieee80211_wme_initparams_locked(struct ieee80211vap *vap)
|
|||||||
setwmeparams(vap, "chan", i, wmep, pPhyParam);
|
setwmeparams(vap, "chan", i, wmep, pPhyParam);
|
||||||
} else {
|
} else {
|
||||||
setwmeparams(vap, "chan", i, wmep, pBssPhyParam);
|
setwmeparams(vap, "chan", i, wmep, pBssPhyParam);
|
||||||
}
|
}
|
||||||
wmep = &wme->wme_wmeBssChanParams.cap_wmeParams[i];
|
wmep = &wme->wme_wmeBssChanParams.cap_wmeParams[i];
|
||||||
setwmeparams(vap, "bss ", i, wmep, pBssPhyParam);
|
setwmeparams(vap, "bss ", i, wmep, pBssPhyParam);
|
||||||
}
|
}
|
||||||
@@ -1201,7 +1203,7 @@ ieee80211_wme_updateparams_locked(struct ieee80211vap *vap)
|
|||||||
/* XXX WDS? */
|
/* XXX WDS? */
|
||||||
|
|
||||||
/* XXX MBSS? */
|
/* XXX MBSS? */
|
||||||
|
|
||||||
if (do_aggrmode) {
|
if (do_aggrmode) {
|
||||||
chanp = &wme->wme_chanParams.cap_wmeParams[WME_AC_BE];
|
chanp = &wme->wme_chanParams.cap_wmeParams[WME_AC_BE];
|
||||||
bssp = &wme->wme_bssChanParams.cap_wmeParams[WME_AC_BE];
|
bssp = &wme->wme_bssChanParams.cap_wmeParams[WME_AC_BE];
|
||||||
@@ -1213,7 +1215,7 @@ ieee80211_wme_updateparams_locked(struct ieee80211vap *vap)
|
|||||||
aggrParam[mode].logcwmax;
|
aggrParam[mode].logcwmax;
|
||||||
chanp->wmep_txopLimit = bssp->wmep_txopLimit =
|
chanp->wmep_txopLimit = bssp->wmep_txopLimit =
|
||||||
(vap->iv_flags & IEEE80211_F_BURST) ?
|
(vap->iv_flags & IEEE80211_F_BURST) ?
|
||||||
aggrParam[mode].txopLimit : 0;
|
aggrParam[mode].txopLimit : 0;
|
||||||
IEEE80211_DPRINTF(vap, IEEE80211_MSG_WME,
|
IEEE80211_DPRINTF(vap, IEEE80211_MSG_WME,
|
||||||
"update %s (chan+bss) [acm %u aifsn %u logcwmin %u "
|
"update %s (chan+bss) [acm %u aifsn %u logcwmin %u "
|
||||||
"logcwmax %u txop %u]\n", ieee80211_wme_acnames[WME_AC_BE],
|
"logcwmax %u txop %u]\n", ieee80211_wme_acnames[WME_AC_BE],
|
||||||
@@ -1467,7 +1469,7 @@ ieee80211_start_locked(struct ieee80211vap *vap)
|
|||||||
* we should be able to apply any new state/parameters
|
* we should be able to apply any new state/parameters
|
||||||
* simply by re-associating. Otherwise we need to
|
* simply by re-associating. Otherwise we need to
|
||||||
* re-scan to select an appropriate ap.
|
* re-scan to select an appropriate ap.
|
||||||
*/
|
*/
|
||||||
if (vap->iv_state >= IEEE80211_S_RUN)
|
if (vap->iv_state >= IEEE80211_S_RUN)
|
||||||
ieee80211_new_state_locked(vap,
|
ieee80211_new_state_locked(vap,
|
||||||
IEEE80211_S_ASSOC, 1);
|
IEEE80211_S_ASSOC, 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user