freebsd_wlan: Update Haiku-specific code.
Now that we use SYSINIT for the "module" code instead of manually maintaining lists, we have to make the static library slightly differently. See inline comment.
This commit is contained in:
@@ -13,12 +13,17 @@ Includes [ FGristFiles kernel_c++_structs.h ]
|
|||||||
|
|
||||||
SubDirCcFlags [ FDefines _KERNEL=1 FBSD_DRIVER=1 ]
|
SubDirCcFlags [ FDefines _KERNEL=1 FBSD_DRIVER=1 ]
|
||||||
-Wno-format -Wno-unused -Wno-uninitialized ;
|
-Wno-format -Wno-unused -Wno-uninitialized ;
|
||||||
SubDirC++Flags [ FDefines _KERNEL=1 FBSD_DRIVER=1 ]
|
SubDirC++Flags [ FDefines _KERNEL=1 FBSD_DRIVER=1 ] ;
|
||||||
-Wno-format -Wno-unused -Wno-uninitialized ;
|
|
||||||
|
|
||||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) .. crypto rijndael ] ;
|
SEARCH_SOURCE += [ FDirName $(SUBDIR) .. crypto rijndael ] ;
|
||||||
|
|
||||||
KernelStaticLibrary freebsd_wlan.a :
|
# The reason we use a KernelMergeObject followed by KernelStaticLibrary
|
||||||
|
# instead of KernelStaticLibrary directly is to force all objects,
|
||||||
|
# not just the ones the driver links against, to be linked into
|
||||||
|
# the final binary. Otherwise, certain objects which export no symbols
|
||||||
|
# save SYSINIT() would not be linked at all, and in order for this
|
||||||
|
# module to function properly, they must be.
|
||||||
|
KernelMergeObject freebsd_wlan.o :
|
||||||
ieee80211.c
|
ieee80211.c
|
||||||
ieee80211_action.c
|
ieee80211_action.c
|
||||||
ieee80211_adhoc.c
|
ieee80211_adhoc.c
|
||||||
@@ -50,7 +55,9 @@ KernelStaticLibrary freebsd_wlan.a :
|
|||||||
ieee80211_scan_sta.c
|
ieee80211_scan_sta.c
|
||||||
ieee80211_scan_sw.c
|
ieee80211_scan_sw.c
|
||||||
ieee80211_sta.c
|
ieee80211_sta.c
|
||||||
|
ieee80211_vht.c
|
||||||
ieee80211_wds.c
|
ieee80211_wds.c
|
||||||
|
ieee80211_xauth.c
|
||||||
|
|
||||||
# Rijndael (aka AES) cryptographic support for crypto_ccmp
|
# Rijndael (aka AES) cryptographic support for crypto_ccmp
|
||||||
rijndael-alg-fst.c
|
rijndael-alg-fst.c
|
||||||
@@ -62,5 +69,6 @@ KernelStaticLibrary freebsd_wlan.a :
|
|||||||
# NOT SUPPORTED YET ieee80211_mesh.c
|
# NOT SUPPORTED YET ieee80211_mesh.c
|
||||||
# NOT SUPPORTED YET ieee80211_superg.c
|
# NOT SUPPORTED YET ieee80211_superg.c
|
||||||
# NOT SUPPORTED YET ieee80211_tdma.c
|
# NOT SUPPORTED YET ieee80211_tdma.c
|
||||||
ieee80211_xauth.c
|
|
||||||
;
|
;
|
||||||
|
KernelStaticLibraryObjects freebsd_wlan.a :
|
||||||
|
freebsd_wlan.o ;
|
||||||
|
|||||||
@@ -96,11 +96,6 @@ get_ifnet(device_t device, int& i)
|
|||||||
status_t
|
status_t
|
||||||
init_wlan_stack(void)
|
init_wlan_stack(void)
|
||||||
{
|
{
|
||||||
mtx_init(&ic_list_mtx, "ieee80211com list", NULL, MTX_DEF);
|
|
||||||
ieee80211_phy_init();
|
|
||||||
ieee80211_auth_setup();
|
|
||||||
ieee80211_ht_init();
|
|
||||||
|
|
||||||
get_module(NET_NOTIFICATIONS_MODULE_NAME,
|
get_module(NET_NOTIFICATIONS_MODULE_NAME,
|
||||||
(module_info**)&sNotificationModule);
|
(module_info**)&sNotificationModule);
|
||||||
|
|
||||||
@@ -111,8 +106,6 @@ init_wlan_stack(void)
|
|||||||
void
|
void
|
||||||
uninit_wlan_stack(void)
|
uninit_wlan_stack(void)
|
||||||
{
|
{
|
||||||
mtx_destroy(&ic_list_mtx);
|
|
||||||
|
|
||||||
if (sNotificationModule != NULL)
|
if (sNotificationModule != NULL)
|
||||||
put_module(NET_NOTIFICATIONS_MODULE_NAME);
|
put_module(NET_NOTIFICATIONS_MODULE_NAME);
|
||||||
}
|
}
|
||||||
@@ -220,7 +213,7 @@ wlan_control(void* cookie, uint32 op, void* arg, size_t length)
|
|||||||
else if (request.i_type == IEEE80211_IOC_HAIKU_COMPAT_WLAN_DOWN)
|
else if (request.i_type == IEEE80211_IOC_HAIKU_COMPAT_WLAN_DOWN)
|
||||||
return wlan_close(cookie);
|
return wlan_close(cookie);
|
||||||
|
|
||||||
TRACE("wlan_control: %ld, %d\n", op, request.i_type);
|
TRACE("wlan_control: %" B_PRIu32 ", %d\n", op, request.i_type);
|
||||||
status_t status = ifp->if_ioctl(ifp, op, (caddr_t)&request);
|
status_t status = ifp->if_ioctl(ifp, op, (caddr_t)&request);
|
||||||
if (status != B_OK)
|
if (status != B_OK)
|
||||||
return status;
|
return status;
|
||||||
@@ -257,18 +250,28 @@ get_random_bytes(void* p, size_t n)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
struct mbuf*
|
struct mbuf *
|
||||||
ieee80211_getmgtframe(uint8_t** frm, int headroom, int pktlen)
|
ieee80211_getmgtframe(uint8_t **frm, int headroom, int pktlen)
|
||||||
{
|
{
|
||||||
struct mbuf* m;
|
struct mbuf *m;
|
||||||
u_int len;
|
u_int len;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* NB: we know the mbuf routines will align the data area
|
||||||
|
* so we don't need to do anything special.
|
||||||
|
*/
|
||||||
len = roundup2(headroom + pktlen, 4);
|
len = roundup2(headroom + pktlen, 4);
|
||||||
KASSERT(len <= MCLBYTES, ("802.11 mgt frame too large: %u", len));
|
KASSERT(len <= MCLBYTES, ("802.11 mgt frame too large: %u", len));
|
||||||
if (len < MINCLSIZE) {
|
if (len < MINCLSIZE) {
|
||||||
m = m_gethdr(M_NOWAIT, MT_DATA);
|
m = m_gethdr(M_NOWAIT, MT_DATA);
|
||||||
|
/*
|
||||||
|
* Align the data in case additional headers are added.
|
||||||
|
* This should only happen when a WEP header is added
|
||||||
|
* which only happens for shared key authentication mgt
|
||||||
|
* frames which all fit in MHLEN.
|
||||||
|
*/
|
||||||
if (m != NULL)
|
if (m != NULL)
|
||||||
MH_ALIGN(m, len);
|
M_ALIGN(m, len);
|
||||||
} else {
|
} else {
|
||||||
m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
|
m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
|
||||||
if (m != NULL)
|
if (m != NULL)
|
||||||
@@ -498,6 +501,21 @@ ieee80211_get_rx_params(struct mbuf *m, struct ieee80211_rx_stats *rxs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const struct ieee80211_rx_stats *
|
||||||
|
ieee80211_get_rx_params_ptr(struct mbuf *m)
|
||||||
|
{
|
||||||
|
struct m_tag *mtag;
|
||||||
|
struct ieee80211_rx_params *rx;
|
||||||
|
|
||||||
|
mtag = m_tag_locate(m, MTAG_ABI_NET80211, NET80211_TAG_RECV_PARAMS,
|
||||||
|
NULL);
|
||||||
|
if (mtag == NULL)
|
||||||
|
return (NULL);
|
||||||
|
rx = (struct ieee80211_rx_params *)(mtag + 1);
|
||||||
|
return (&rx->params);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Transmit a frame to the parent interface.
|
* Transmit a frame to the parent interface.
|
||||||
*/
|
*/
|
||||||
@@ -580,7 +598,9 @@ ieee80211_vap_destroy(struct ieee80211vap* vap)
|
|||||||
void
|
void
|
||||||
ieee80211_load_module(const char* modname)
|
ieee80211_load_module(const char* modname)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
dprintf("%s not implemented, yet: modname %s\n", __func__, modname);
|
dprintf("%s not implemented, yet: modname %s\n", __func__, modname);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -590,11 +610,11 @@ ieee80211_notify_node_join(struct ieee80211_node* ni, int newassoc)
|
|||||||
struct ieee80211vap* vap = ni->ni_vap;
|
struct ieee80211vap* vap = ni->ni_vap;
|
||||||
struct ifnet* ifp = vap->iv_ifp;
|
struct ifnet* ifp = vap->iv_ifp;
|
||||||
|
|
||||||
|
TRACE("%s\n", __FUNCTION__);
|
||||||
|
|
||||||
if (ni == vap->iv_bss)
|
if (ni == vap->iv_bss)
|
||||||
if_link_state_change(ifp, LINK_STATE_UP);
|
if_link_state_change(ifp, LINK_STATE_UP);
|
||||||
|
|
||||||
TRACE("%s\n", __FUNCTION__);
|
|
||||||
|
|
||||||
if (sNotificationModule != NULL) {
|
if (sNotificationModule != NULL) {
|
||||||
char messageBuffer[512];
|
char messageBuffer[512];
|
||||||
KMessage message;
|
KMessage message;
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009, Colin Günther, [email protected]. All rights reserved.
|
||||||
|
* Copyright 2018, Haiku, Inc. All rights reserved.
|
||||||
|
* Distributed under the terms of the MIT License.
|
||||||
|
*/
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2003-2008 Sam Leffler, Errno Consulting
|
* Copyright (c) 2003-2008 Sam Leffler, Errno Consulting
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@@ -21,8 +26,6 @@
|
|||||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
|
||||||
* $FreeBSD$
|
|
||||||
*/
|
*/
|
||||||
#ifndef _FBSD_COMPAT_NET80211_IEEE80211_HAIKU_H_
|
#ifndef _FBSD_COMPAT_NET80211_IEEE80211_HAIKU_H_
|
||||||
#define _FBSD_COMPAT_NET80211_IEEE80211_HAIKU_H_
|
#define _FBSD_COMPAT_NET80211_IEEE80211_HAIKU_H_
|
||||||
@@ -46,20 +49,6 @@ extern "C" {
|
|||||||
#include <sys/taskqueue.h>
|
#include <sys/taskqueue.h>
|
||||||
|
|
||||||
|
|
||||||
#define IEEE80211_CRYPTO_MODULE(name, version) \
|
|
||||||
void \
|
|
||||||
ieee80211_crypto_##name##_load() { \
|
|
||||||
ieee80211_crypto_register(&name); \
|
|
||||||
} \
|
|
||||||
\
|
|
||||||
\
|
|
||||||
void \
|
|
||||||
ieee80211_crypto_##name##_unload() \
|
|
||||||
{ \
|
|
||||||
ieee80211_crypto_unregister(&name); \
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Common state locking definitions.
|
* Common state locking definitions.
|
||||||
*/
|
*/
|
||||||
@@ -276,9 +265,11 @@ void ieee80211_vap_destroy(struct ieee80211vap *);
|
|||||||
(((_ifp)->if_flags & IFF_UP) && \
|
(((_ifp)->if_flags & IFF_UP) && \
|
||||||
((_ifp)->if_drv_flags & IFF_DRV_RUNNING))
|
((_ifp)->if_drv_flags & IFF_DRV_RUNNING))
|
||||||
|
|
||||||
|
/* XXX TODO: cap these at 1, as hz may not be 1000 */
|
||||||
#define msecs_to_ticks(ms) (((ms)*hz)/1000)
|
#define msecs_to_ticks(ms) (((ms)*hz)/1000)
|
||||||
#define ticks_to_msecs(t) (1000*(t) / hz)
|
#define ticks_to_msecs(t) (1000*(t) / hz)
|
||||||
#define ticks_to_secs(t) ((t) / hz)
|
#define ticks_to_secs(t) ((t) / hz)
|
||||||
|
|
||||||
#define ieee80211_time_after(a,b) ((long)(b) - (long)(a) < 0)
|
#define ieee80211_time_after(a,b) ((long)(b) - (long)(a) < 0)
|
||||||
#define ieee80211_time_before(a,b) ieee80211_time_after(b,a)
|
#define ieee80211_time_before(a,b) ieee80211_time_after(b,a)
|
||||||
#define ieee80211_time_after_eq(a,b) ((long)(a) - (long)(b) >= 0)
|
#define ieee80211_time_after_eq(a,b) ((long)(a) - (long)(b) >= 0)
|
||||||
@@ -291,15 +282,16 @@ struct mbuf *ieee80211_getmgtframe(uint8_t **frm, int headroom, int pktlen);
|
|||||||
#define M_EAPOL M_PROTO3 /* PAE/EAPOL frame */
|
#define M_EAPOL M_PROTO3 /* PAE/EAPOL frame */
|
||||||
#define M_PWR_SAV M_PROTO4 /* bypass PS handling */
|
#define M_PWR_SAV M_PROTO4 /* bypass PS handling */
|
||||||
#define M_MORE_DATA M_PROTO5 /* more data frames to follow */
|
#define M_MORE_DATA M_PROTO5 /* more data frames to follow */
|
||||||
#define M_FF M_PROTO6 /* fast frame */
|
#define M_FF M_PROTO6 /* fast frame / A-MSDU */
|
||||||
#define M_TXCB M_PROTO7 /* do tx complete callback */
|
#define M_TXCB M_PROTO7 /* do tx complete callback */
|
||||||
#define M_AMPDU_MPDU M_PROTO8 /* ok for A-MPDU aggregation */
|
#define M_AMPDU_MPDU M_PROTO8 /* ok for A-MPDU aggregation */
|
||||||
#define M_FRAG M_PROTO9 /* frame fragmentation */
|
#define M_FRAG M_PROTO9 /* frame fragmentation */
|
||||||
#define M_FIRSTFRAG M_PROTO10 /* first frame fragment */
|
#define M_FIRSTFRAG M_PROTO10 /* first frame fragment */
|
||||||
#define M_LASTFRAG M_PROTO11 /* last frame fragment */
|
#define M_LASTFRAG M_PROTO11 /* last frame fragment */
|
||||||
|
|
||||||
#define M_80211_TX \
|
#define M_80211_TX \
|
||||||
(M_FRAG|M_FIRSTFRAG|M_LASTFRAG|M_ENCAP|M_EAPOL|M_PWR_SAV|\
|
(M_ENCAP|M_EAPOL|M_PWR_SAV|M_MORE_DATA|M_FF|M_TXCB| \
|
||||||
M_MORE_DATA|M_FF|M_TXCB|M_AMPDU_MPDU)
|
M_AMPDU_MPDU|M_FRAG|M_FIRSTFRAG|M_LASTFRAG)
|
||||||
|
|
||||||
/* rx path usage */
|
/* rx path usage */
|
||||||
#define M_AMPDU M_PROTO1 /* A-MPDU subframe */
|
#define M_AMPDU M_PROTO1 /* A-MPDU subframe */
|
||||||
@@ -309,6 +301,15 @@ struct mbuf *ieee80211_getmgtframe(uint8_t **frm, int headroom, int pktlen);
|
|||||||
#endif
|
#endif
|
||||||
#define M_80211_RX (M_AMPDU|M_WEP|M_AMPDU_MPDU)
|
#define M_80211_RX (M_AMPDU|M_WEP|M_AMPDU_MPDU)
|
||||||
|
|
||||||
|
#define IEEE80211_MBUF_TX_FLAG_BITS \
|
||||||
|
M_FLAG_BITS \
|
||||||
|
"\15M_ENCAP\17M_EAPOL\20M_PWR_SAV\21M_MORE_DATA\22M_FF\23M_TXCB" \
|
||||||
|
"\24M_AMPDU_MPDU\25M_FRAG\26M_FIRSTFRAG\27M_LASTFRAG"
|
||||||
|
|
||||||
|
#define IEEE80211_MBUF_RX_FLAG_BITS \
|
||||||
|
M_FLAG_BITS \
|
||||||
|
"\15M_AMPDU\16M_WEP\24M_AMPDU_MPDU"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Store WME access control bits in the vlan tag.
|
* Store WME access control bits in the vlan tag.
|
||||||
* This is safe since it's done after the packet is classified
|
* This is safe since it's done after the packet is classified
|
||||||
@@ -369,55 +370,48 @@ void ieee80211_load_module(const char *);
|
|||||||
* functionality that typically includes policy decisions. This
|
* functionality that typically includes policy decisions. This
|
||||||
* modularity enables extensibility and vendor-supplied functionality.
|
* modularity enables extensibility and vendor-supplied functionality.
|
||||||
*/
|
*/
|
||||||
#define _IEEE80211_POLICY_MODULE(policy, name, version) \
|
#define _IEEE80211_POLICY_MODULE(policy, name, version, load, unload) \
|
||||||
typedef void (*policy##_setup)(int); \
|
static void ieee80211_##policy##_##name##_load() { load; } \
|
||||||
SET_DECLARE(policy##_set, policy##_setup);
|
static void ieee80211_##policy##_##name##_unload() { unload; } \
|
||||||
|
SYSINIT(ieee80211_##policy##_##name, SI_SUB_DRIVERS, SI_ORDER_ANY, \
|
||||||
|
ieee80211_##policy##_##name##_load, NULL); \
|
||||||
|
SYSUNINIT(ieee80211_##policy##_##name, SI_SUB_DRIVERS, SI_ORDER_ANY, \
|
||||||
|
ieee80211_##policy##_##name##_unload, NULL)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Authenticator modules handle 802.1x/WPA authentication.
|
* Authenticator modules handle 802.1x/WPA authentication.
|
||||||
*/
|
*/
|
||||||
#define IEEE80211_AUTH_MODULE(name, version) \
|
#define IEEE80211_AUTH_MODULE(name, version)
|
||||||
_IEEE80211_POLICY_MODULE(auth, name, version)
|
#define IEEE80211_AUTH_ALG(name, alg, v) \
|
||||||
|
_IEEE80211_POLICY_MODULE(auth, alg, v, \
|
||||||
|
ieee80211_authenticator_register(alg, &v), \
|
||||||
|
ieee80211_authenticator_unregister(alg))
|
||||||
|
|
||||||
#define IEEE80211_AUTH_ALG(name, alg, v) \
|
/*
|
||||||
static void \
|
* Crypto modules implement cipher support.
|
||||||
name##_modevent(int type) \
|
*/
|
||||||
{ \
|
#define IEEE80211_CRYPTO_MODULE(name, version) \
|
||||||
if (type == MOD_LOAD) \
|
_IEEE80211_POLICY_MODULE(crypto, name, version, \
|
||||||
ieee80211_authenticator_register(alg, &v); \
|
ieee80211_crypto_register(&name), \
|
||||||
else \
|
ieee80211_crypto_unregister(&name))
|
||||||
ieee80211_authenticator_unregister(alg); \
|
|
||||||
} \
|
|
||||||
TEXT_SET(auth_set, name##_modevent)
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Scanner modules provide scanning policy.
|
* Scanner modules provide scanning policy.
|
||||||
*/
|
*/
|
||||||
#define IEEE80211_SCANNER_MODULE(name, version)
|
#define IEEE80211_SCANNER_MODULE(name, version)
|
||||||
#define IEEE80211_SCANNER_ALG(name, alg, v)
|
#define IEEE80211_SCANNER_ALG(name, alg, v) \
|
||||||
|
_IEEE80211_POLICY_MODULE(scan, alg, v, \
|
||||||
|
ieee80211_scanner_register(alg, &v), \
|
||||||
void ieee80211_scan_sta_init(void);
|
ieee80211_scanner_unregister(alg, &v))
|
||||||
void ieee80211_scan_sta_uninit(void);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Rate control modules provide tx rate control support.
|
* Rate control modules provide tx rate control support.
|
||||||
*/
|
*/
|
||||||
#define IEEE80211_RATECTL_MODULE(alg, version) \
|
#define IEEE80211_RATECTL_MODULE(alg, version)
|
||||||
_IEEE80211_POLICY_MODULE(ratectl, alg, version); \
|
|
||||||
|
|
||||||
#define IEEE80211_RATECTL_ALG(name, alg, v) \
|
#define IEEE80211_RATECTL_ALG(name, alg, v) \
|
||||||
void \
|
_IEEE80211_POLICY_MODULE(ratectl, alg, v, \
|
||||||
ieee80211_ratectl_##name##_load() { \
|
ieee80211_ratectl_register(alg, &v), \
|
||||||
ieee80211_ratectl_register(alg, &v); \
|
ieee80211_ratectl_unregister(alg))
|
||||||
} \
|
|
||||||
\
|
|
||||||
\
|
|
||||||
void \
|
|
||||||
ieee80211_ratectl_##name##_unload() { \
|
|
||||||
ieee80211_ratectl_unregister(alg); \
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
struct ieee80211req;
|
struct ieee80211req;
|
||||||
@@ -468,45 +462,16 @@ struct ieee80211_bpf_params {
|
|||||||
int ieee80211_add_xmit_params(struct mbuf *m, const struct ieee80211_bpf_params *params);
|
int ieee80211_add_xmit_params(struct mbuf *m, const struct ieee80211_bpf_params *params);
|
||||||
int ieee80211_get_xmit_params(struct mbuf *m, struct ieee80211_bpf_params *params);
|
int ieee80211_get_xmit_params(struct mbuf *m, struct ieee80211_bpf_params *params);
|
||||||
|
|
||||||
#define IEEE80211_MAX_CHAINS 3
|
|
||||||
#define IEEE80211_MAX_EVM_PILOTS 6
|
|
||||||
|
|
||||||
struct ieee80211_tx_params {
|
struct ieee80211_tx_params {
|
||||||
struct ieee80211_bpf_params params;
|
struct ieee80211_bpf_params params;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define IEEE80211_R_NF 0x0000001 /* global NF value valid */
|
struct ieee80211_rx_params;
|
||||||
#define IEEE80211_R_RSSI 0x0000002 /* global RSSI value valid */
|
struct ieee80211_rx_stats;
|
||||||
#define IEEE80211_R_C_CHAIN 0x0000004 /* RX chain count valid */
|
|
||||||
#define IEEE80211_R_C_NF 0x0000008 /* per-chain NF value valid */
|
|
||||||
#define IEEE80211_R_C_RSSI 0x0000010 /* per-chain RSSI value valid */
|
|
||||||
#define IEEE80211_R_C_EVM 0x0000020 /* per-chain EVM valid */
|
|
||||||
#define IEEE80211_R_C_HT40 0x0000040 /* RX'ed packet is 40mhz, pilots 4,5 valid */
|
|
||||||
#define IEEE80211_R_FREQ 0x0000080 /* Freq value populated, MHz */
|
|
||||||
#define IEEE80211_R_IEEE 0x0000100 /* IEEE value populated */
|
|
||||||
#define IEEE80211_R_BAND 0x0000200 /* Frequency band populated */
|
|
||||||
|
|
||||||
struct ieee80211_rx_stats {
|
|
||||||
uint32_t r_flags; /* IEEE80211_R_* flags */
|
|
||||||
uint8_t c_chain; /* number of RX chains involved */
|
|
||||||
int16_t c_nf_ctl[IEEE80211_MAX_CHAINS]; /* per-chain NF */
|
|
||||||
int16_t c_nf_ext[IEEE80211_MAX_CHAINS]; /* per-chain NF */
|
|
||||||
int16_t c_rssi_ctl[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */
|
|
||||||
int16_t c_rssi_ext[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */
|
|
||||||
uint8_t nf; /* global NF */
|
|
||||||
uint8_t rssi; /* global RSSI */
|
|
||||||
uint8_t evm[IEEE80211_MAX_CHAINS][IEEE80211_MAX_EVM_PILOTS];
|
|
||||||
/* per-chain, per-pilot EVM values */
|
|
||||||
uint16_t c_freq;
|
|
||||||
uint8_t c_ieee;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ieee80211_rx_params {
|
|
||||||
struct ieee80211_rx_stats params;
|
|
||||||
};
|
|
||||||
|
|
||||||
int ieee80211_add_rx_params(struct mbuf *m, const struct ieee80211_rx_stats *rxs);
|
int ieee80211_add_rx_params(struct mbuf *m, const struct ieee80211_rx_stats *rxs);
|
||||||
int ieee80211_get_rx_params(struct mbuf *m, struct ieee80211_rx_stats *rxs);
|
int ieee80211_get_rx_params(struct mbuf *m, struct ieee80211_rx_stats *rxs);
|
||||||
|
const struct ieee80211_rx_stats * ieee80211_get_rx_params_ptr(struct mbuf *m);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user