mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
[net80211] add in ToA/ToD based location mbuf tags for some experimenting.
This commit is contained in:
parent
90d3a30a16
commit
c028fb5098
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=305638
|
@ -529,6 +529,42 @@ ieee80211_get_rx_params(struct mbuf *m, struct ieee80211_rx_stats *rxs)
|
|||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Add TOA parameters to the given mbuf.
|
||||
*/
|
||||
int
|
||||
ieee80211_add_toa_params(struct mbuf *m, const struct ieee80211_toa_params *p)
|
||||
{
|
||||
struct m_tag *mtag;
|
||||
struct ieee80211_toa_params *rp;
|
||||
|
||||
mtag = m_tag_alloc(MTAG_ABI_NET80211, NET80211_TAG_TOA_PARAMS,
|
||||
sizeof(struct ieee80211_toa_params), M_NOWAIT);
|
||||
if (mtag == NULL)
|
||||
return (0);
|
||||
|
||||
rp = (struct ieee80211_toa_params *)(mtag + 1);
|
||||
memcpy(rp, p, sizeof(*rp));
|
||||
m_tag_prepend(m, mtag);
|
||||
return (1);
|
||||
}
|
||||
|
||||
int
|
||||
ieee80211_get_toa_params(struct mbuf *m, struct ieee80211_toa_params *p)
|
||||
{
|
||||
struct m_tag *mtag;
|
||||
struct ieee80211_toa_params *rp;
|
||||
|
||||
mtag = m_tag_locate(m, MTAG_ABI_NET80211, NET80211_TAG_TOA_PARAMS,
|
||||
NULL);
|
||||
if (mtag == NULL)
|
||||
return (0);
|
||||
rp = (struct ieee80211_toa_params *)(mtag + 1);
|
||||
if (p != NULL)
|
||||
memcpy(p, rp, sizeof(*p));
|
||||
return (1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Transmit a frame to the parent interface.
|
||||
*/
|
||||
|
|
|
@ -331,6 +331,8 @@ void ieee80211_process_callback(struct ieee80211_node *, struct mbuf *, int);
|
|||
|
||||
#define NET80211_TAG_RECV_PARAMS 2
|
||||
|
||||
#define NET80211_TAG_TOA_PARAMS 3
|
||||
|
||||
struct ieee80211com;
|
||||
int ieee80211_parent_xmitpkt(struct ieee80211com *, struct mbuf *);
|
||||
int ieee80211_vap_xmitpkt(struct ieee80211vap *, struct mbuf *);
|
||||
|
@ -656,6 +658,14 @@ 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);
|
||||
|
||||
struct ieee80211_toa_params {
|
||||
int request_id;
|
||||
};
|
||||
int ieee80211_add_toa_params(struct mbuf *m,
|
||||
const struct ieee80211_toa_params *p);
|
||||
int ieee80211_get_toa_params(struct mbuf *m,
|
||||
struct ieee80211_toa_params *p);
|
||||
#endif /* _KERNEL */
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue