mac80211: implement RANN processing and forwarding
Subsystems (2)
PATCH v4 11/20 mac80211: implement RANN processing and forwarding
Process the RANN (Root Annoucement) Frame and try to find the HWMP root station by sending a PREQ.
Signed-off-by Rui Paulo <[email protected]>
Signed-off-by Javier Cardona <[email protected]>
Reviewed-by Andrey Yurovsky <[email protected]>
Tested-by Brian Cavagnolo <[email protected]>
--- include/linux/ieee80211.h | 15 ++++++++ net/mac80211/ieee80211_i.h | 1 + net/mac80211/mesh_hwmp.c | 79 +++++++++++++++++++++++++++++++++++++++---- net/mac80211/util.c | 4 ++ 4 files changed, 91 insertions(+), 8 deletions(-)
include/linux/ieee80211.h +15 -0
@@ -554,6 +554,20 @@ struct ieee80211_tim_ie {u8 virtual_map[1 ]; } __attribute__ ((packed)); +/** +* struct ieee80211_rann_ie +* +* This structure refers to "Root Announcement information element" +*/ +struct ieee80211_rann_ie { +u8 rann_flags; +u8 rann_hopcount; +u8 rann_ttl; +u8 rann_addr[6 ]; +u32 rann_seq; +u32 rann_metric; +} __attribute__ ((packed)); +#define WLAN_SA_QUERY_TR_ID_LEN 2struct ieee80211_mgmt {
@@ -1070,6 +1084,7 @@ enum ieee80211_eid {WLAN_EID_PREQ =68 ,WLAN_EID_PREP =69 ,WLAN_EID_PERR =70 , +WLAN_EID_RANN =49 ,/* compatible with FreeBSD */ /* 802.11h */ WLAN_EID_PWR_CONSTRAINT =32 , WLAN_EID_PWR_CAPABILITY = 33,
net/mac80211/ieee80211_i.h +1 -0
@@ -799,6 +799,7 @@ struct ieee802_11_elems {u8 *preq;u8 *prep;u8 *perr; +struct ieee80211_rann_ie *rann;u8 *ch_switch_elem;u8 *country_elem;u8 *pwr_constr_elem;
net/mac80211/mesh_hwmp.c +71 -8
127 lines not on this page · raw message
net/mac80211/util.c +4 -0
@@ -685,6 +685,10 @@ u32 ieee802_11_parse_elems_crc(u8 *start, size_t len, elems->perr = pos; elems->perr_len = elen;break ; +case WLAN_EID_RANN : +if (elen >=sizeof (struct ieee80211_rann_ie )) + elems->rann = (void *)pos; +break ;case WLAN_EID_CHANNEL_SWITCH : elems->ch_switch_elem = pos; elems->ch_switch_elem_len = elen;
Signature · 1 line
1.5.6.5