Net80211s update: Mesh Gate Announcement and removal of Portal Announcement.
* Renamed IEEE80211_ELEMID_MESHPANN to IEEE80211_ELEMID_MESHGANN according to amendment; * Added IEEE80211_IOC_MESH_GATE that controls whether Mesh Gate Announcement is activated or not; * Renamed all flags from Portal to Gate in HWMP frames; * Removed IEEE80211_ACTION_MESHPANN enum cause its part of the Mesh Action category now as per amendment; * Renamed IEEE80211_MESHFLAGS_PORTAL to IEEE80211_MESHFLAGS_GATE in ieee80211_mesh_state flags; * Modified ieee80211_hwmp.c/ieee80211_mesh.c to use new GATE flags; Approved by: adrian
This commit is contained in:
parent
f02ce81b16
commit
9fc85253aa
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=234892
@ -734,7 +734,7 @@ enum {
|
||||
IEEE80211_ELEMID_MESHAWAKEW = 119,
|
||||
IEEE80211_ELEMID_MESHBEACONT = 120,
|
||||
/* 121-124 MMCAOP not implemented yet */
|
||||
IEEE80211_ELEMID_MESHPANN = 125, /* XXX: is GANN now, not used */
|
||||
IEEE80211_ELEMID_MESHGANN = 125,
|
||||
IEEE80211_ELEMID_MESHRANN = 126,
|
||||
/* 127 Extended Capabilities */
|
||||
/* 128-129 reserved */
|
||||
|
@ -840,9 +840,9 @@ hwmp_rootmode_cb(void *arg)
|
||||
IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, vap->iv_bss,
|
||||
"%s", "send broadcast PREQ");
|
||||
|
||||
preq.preq_flags = 0;
|
||||
if (ms->ms_flags & IEEE80211_MESHFLAGS_PORTAL)
|
||||
preq.preq_flags |= IEEE80211_MESHPREQ_FLAGS_PR;
|
||||
preq.preq_flags = IEEE80211_MESHPREQ_FLAGS_AM;
|
||||
if (ms->ms_flags & IEEE80211_MESHFLAGS_GATE)
|
||||
preq.preq_flags |= IEEE80211_MESHPREQ_FLAGS_GATE;
|
||||
if (hs->hs_rootmode == IEEE80211_HWMP_ROOTMODE_PROACTIVE)
|
||||
preq.preq_flags |= IEEE80211_MESHPREQ_FLAGS_PP;
|
||||
preq.preq_hopcount = 0;
|
||||
@ -882,8 +882,8 @@ hwmp_rootmode_rann_cb(void *arg)
|
||||
"%s", "send broadcast RANN");
|
||||
|
||||
rann.rann_flags = 0;
|
||||
if (ms->ms_flags & IEEE80211_MESHFLAGS_PORTAL)
|
||||
rann.rann_flags |= IEEE80211_MESHRANN_FLAGS_PR;
|
||||
if (ms->ms_flags & IEEE80211_MESHFLAGS_GATE)
|
||||
rann.rann_flags |= IEEE80211_MESHFLAGS_GATE;
|
||||
rann.rann_hopcount = 0;
|
||||
rann.rann_ttl = ms->ms_ttl;
|
||||
IEEE80211_ADDR_COPY(rann.rann_addr, vap->iv_myaddr);
|
||||
|
@ -709,6 +709,7 @@ struct ieee80211req {
|
||||
#define IEEE80211_IOC_MESH_PR_SIG 178 /* mesh sig protocol */
|
||||
#define IEEE80211_IOC_MESH_PR_CC 179 /* mesh congestion protocol */
|
||||
#define IEEE80211_IOC_MESH_PR_AUTH 180 /* mesh auth protocol */
|
||||
#define IEEE80211_IOC_MESH_GATE 181 /* mesh gate XXX: 173? */
|
||||
|
||||
#define IEEE80211_IOC_HWMP_ROOTMODE 190 /* HWMP root mode */
|
||||
#define IEEE80211_IOC_HWMP_MAXHOPS 191 /* number of hops before drop */
|
||||
|
@ -1262,7 +1262,7 @@ mesh_recv_group_data(struct ieee80211vap *vap, struct mbuf *m,
|
||||
* This happens by delivering the packet, and a bridge
|
||||
* will sent it on another port member.
|
||||
*/
|
||||
if (ms->ms_flags & IEEE80211_MESHFLAGS_PORTAL &&
|
||||
if (ms->ms_flags & IEEE80211_MESHFLAGS_GATE &&
|
||||
ms->ms_flags & IEEE80211_MESHFLAGS_FWD)
|
||||
IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_MESH,
|
||||
MC01(mc)->mc_addr4, "%s",
|
||||
@ -2768,8 +2768,8 @@ ieee80211_add_meshconf(uint8_t *frm, struct ieee80211vap *vap)
|
||||
/* NB: set the number of neighbors before the rest */
|
||||
*frm = (ms->ms_neighbors > IEEE80211_MESH_MAX_NEIGHBORS ?
|
||||
IEEE80211_MESH_MAX_NEIGHBORS : ms->ms_neighbors) << 1;
|
||||
if (ms->ms_flags & IEEE80211_MESHFLAGS_PORTAL)
|
||||
*frm |= IEEE80211_MESHCONF_FORM_MP;
|
||||
if (ms->ms_flags & IEEE80211_MESHFLAGS_GATE)
|
||||
*frm |= IEEE80211_MESHCONF_FORM_GATE;
|
||||
frm += 1;
|
||||
caps = 0;
|
||||
if (ms->ms_flags & IEEE80211_MESHFLAGS_AP)
|
||||
@ -2961,6 +2961,9 @@ mesh_ioctl_get80211(struct ieee80211vap *vap, struct ieee80211req *ireq)
|
||||
case IEEE80211_IOC_MESH_FWRD:
|
||||
ireq->i_val = (ms->ms_flags & IEEE80211_MESHFLAGS_FWD) != 0;
|
||||
break;
|
||||
case IEEE80211_IOC_MESH_GATE:
|
||||
ireq->i_val = (ms->ms_flags & IEEE80211_MESHFLAGS_GATE) != 0;
|
||||
break;
|
||||
case IEEE80211_IOC_MESH_TTL:
|
||||
ireq->i_val = ms->ms_ttl;
|
||||
break;
|
||||
@ -3076,6 +3079,12 @@ mesh_ioctl_set80211(struct ieee80211vap *vap, struct ieee80211req *ireq)
|
||||
else
|
||||
ms->ms_flags &= ~IEEE80211_MESHFLAGS_FWD;
|
||||
break;
|
||||
case IEEE80211_IOC_MESH_GATE:
|
||||
if (ireq->i_val)
|
||||
ms->ms_flags |= IEEE80211_MESHFLAGS_GATE;
|
||||
else
|
||||
ms->ms_flags &= ~IEEE80211_MESHFLAGS_GATE;
|
||||
break;
|
||||
case IEEE80211_IOC_MESH_TTL:
|
||||
ms->ms_ttl = (uint8_t) ireq->i_val;
|
||||
break;
|
||||
|
@ -98,7 +98,7 @@ enum {
|
||||
};
|
||||
|
||||
/* Mesh Formation Info */
|
||||
#define IEEE80211_MESHCONF_FORM_MP 0x01 /* Connected to Portal */
|
||||
#define IEEE80211_MESHCONF_FORM_GATE 0x01 /* Connected to Gate */
|
||||
#define IEEE80211_MESHCONF_FORM_NNEIGH_MASK 0x7E /* Number of Neighbours */
|
||||
#define IEEE80211_MESHCONF_FORM_SA 0xF0 /* indicating 802.1X auth */
|
||||
|
||||
@ -193,9 +193,9 @@ struct ieee80211_meshbeacont_ie {
|
||||
} __packed;
|
||||
#endif
|
||||
|
||||
/* Portal (MP) Annoucement */
|
||||
struct ieee80211_meshpann_ie {
|
||||
uint8_t pann_ie; /* IEEE80211_ELEMID_MESHPANN */
|
||||
/* Gate (GANN) Annoucement */
|
||||
struct ieee80211_meshgann_ie {
|
||||
uint8_t pann_ie; /* IEEE80211_ELEMID_MESHGANN */
|
||||
uint8_t pann_len;
|
||||
uint8_t pann_flags;
|
||||
uint8_t pann_hopcount;
|
||||
@ -210,7 +210,7 @@ struct ieee80211_meshrann_ie {
|
||||
uint8_t rann_ie; /* IEEE80211_ELEMID_MESHRANN */
|
||||
uint8_t rann_len;
|
||||
uint8_t rann_flags;
|
||||
#define IEEE80211_MESHRANN_FLAGS_PR 0x01 /* Portal Role */
|
||||
#define IEEE80211_MESHRANN_FLAGS_GATE 0x01 /* Mesh Gate */
|
||||
uint8_t rann_hopcount;
|
||||
uint8_t rann_ttl;
|
||||
uint8_t rann_addr[IEEE80211_ADDR_LEN];
|
||||
@ -229,7 +229,7 @@ struct ieee80211_meshpreq_ie {
|
||||
uint8_t preq_ie; /* IEEE80211_ELEMID_MESHPREQ */
|
||||
uint8_t preq_len;
|
||||
uint8_t preq_flags;
|
||||
#define IEEE80211_MESHPREQ_FLAGS_PR 0x01 /* Portal Role */
|
||||
#define IEEE80211_MESHPREQ_FLAGS_GATE 0x01 /* Mesh Gate */
|
||||
#define IEEE80211_MESHPREQ_FLAGS_AM 0x02 /* 0 = bcast / 1 = ucast */
|
||||
#define IEEE80211_MESHPREQ_FLAGS_PP 0x04 /* Proactive PREP */
|
||||
#define IEEE80211_MESHPREQ_FLAGS_AE 0x40 /* Address Extension */
|
||||
@ -359,14 +359,6 @@ enum {
|
||||
/* 11-255 reserved */
|
||||
};
|
||||
|
||||
/*
|
||||
* Mesh Portal Annoucement Action codes.
|
||||
*/
|
||||
enum {
|
||||
IEEE80211_ACTION_MESHPANN = 0,
|
||||
/* 1-255 reserved */
|
||||
};
|
||||
|
||||
/*
|
||||
* Different mesh control structures based on the AE
|
||||
* (Address Extension) bits.
|
||||
@ -498,7 +490,7 @@ struct ieee80211_mesh_state {
|
||||
uint16_t ms_neighbors;
|
||||
uint8_t ms_ttl; /* mesh ttl set in packets */
|
||||
#define IEEE80211_MESHFLAGS_AP 0x01 /* accept peers */
|
||||
#define IEEE80211_MESHFLAGS_PORTAL 0x02 /* mesh portal role */
|
||||
#define IEEE80211_MESHFLAGS_GATE 0x02 /* mesh gate role */
|
||||
#define IEEE80211_MESHFLAGS_FWD 0x04 /* forward packets */
|
||||
uint8_t ms_flags;
|
||||
struct mtx ms_rt_lock;
|
||||
@ -556,7 +548,7 @@ ieee80211_mesh_isproxyena(struct ieee80211vap *vap)
|
||||
{
|
||||
struct ieee80211_mesh_state *ms = vap->iv_mesh;
|
||||
return (ms->ms_flags &
|
||||
(IEEE80211_MESHFLAGS_AP | IEEE80211_MESHFLAGS_PORTAL)) != 0;
|
||||
(IEEE80211_MESHFLAGS_AP | IEEE80211_MESHFLAGS_GATE)) != 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user