[net80211] Add a variant on ieee80211_get_rx_params() that returns a pointer.
Be careful when calling this, as the underlying mbuf may change afterwards - common in the RX path.
This commit is contained in:
parent
561da369d7
commit
d24ac5fb28
@ -529,6 +529,21 @@ ieee80211_get_rx_params(struct mbuf *m, struct ieee80211_rx_stats *rxs)
|
||||
return (0);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Add TOA parameters to the given mbuf.
|
||||
*/
|
||||
|
@ -713,6 +713,7 @@ 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);
|
||||
const struct ieee80211_rx_stats * ieee80211_get_rx_params_ptr(struct mbuf *m);
|
||||
|
||||
struct ieee80211_toa_params {
|
||||
int request_id;
|
||||
|
Loading…
Reference in New Issue
Block a user