Update mesh code to to D4.0.

This commit is contained in:
Rui Paulo 2010-01-12 22:22:27 +00:00
parent a47698f8d6
commit 651e41a42c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=202178
2 changed files with 8 additions and 5 deletions

View File

@ -2381,6 +2381,7 @@ uint8_t *
ieee80211_add_meshconf(uint8_t *frm, struct ieee80211vap *vap) ieee80211_add_meshconf(uint8_t *frm, struct ieee80211vap *vap)
{ {
const struct ieee80211_mesh_state *ms = vap->iv_mesh; const struct ieee80211_mesh_state *ms = vap->iv_mesh;
uint16_t caps;
KASSERT(vap->iv_opmode == IEEE80211_M_MBSS, ("not a MBSS vap")); KASSERT(vap->iv_opmode == IEEE80211_M_MBSS, ("not a MBSS vap"));
@ -2396,11 +2397,12 @@ ieee80211_add_meshconf(uint8_t *frm, struct ieee80211vap *vap)
if (ms->ms_flags & IEEE80211_MESHFLAGS_PORTAL) if (ms->ms_flags & IEEE80211_MESHFLAGS_PORTAL)
*frm |= IEEE80211_MESHCONF_FORM_MP; *frm |= IEEE80211_MESHCONF_FORM_MP;
frm += 1; frm += 1;
*frm = 0; caps = 0;
if (ms->ms_flags & IEEE80211_MESHFLAGS_AP) if (ms->ms_flags & IEEE80211_MESHFLAGS_AP)
*frm |= IEEE80211_MESHCONF_CAP_AP; caps |= IEEE80211_MESHCONF_CAP_AP;
if (ms->ms_flags & IEEE80211_MESHFLAGS_FWD) if (ms->ms_flags & IEEE80211_MESHFLAGS_FWD)
*frm |= IEEE80211_MESHCONF_CAP_FWRD; caps |= IEEE80211_MESHCONF_CAP_FWRD;
ADDSHORT(frm, caps);
frm += 1; frm += 1;
return frm; return frm;
} }

View File

@ -49,7 +49,7 @@ struct ieee80211_meshconf_ie {
uint8_t conf_syncid; /* Sync. Protocol ID */ uint8_t conf_syncid; /* Sync. Protocol ID */
uint8_t conf_authid; /* Auth. Protocol ID */ uint8_t conf_authid; /* Auth. Protocol ID */
uint8_t conf_form; /* Formation Information */ uint8_t conf_form; /* Formation Information */
uint8_t conf_cap; uint16_t conf_cap;
} __packed; } __packed;
/* Hybrid Wireless Mesh Protocol */ /* Hybrid Wireless Mesh Protocol */
@ -72,7 +72,8 @@ struct ieee80211_meshconf_ie {
#define IEEE80211_MESHCONF_CAP_FWRD 0x08 /* forwarding enabled */ #define IEEE80211_MESHCONF_CAP_FWRD 0x08 /* forwarding enabled */
#define IEEE80211_MESHCONF_CAP_BTR 0x10 /* Beacon Timing Report Enab */ #define IEEE80211_MESHCONF_CAP_BTR 0x10 /* Beacon Timing Report Enab */
#define IEEE80211_MESHCONF_CAP_TBTTA 0x20 /* TBTT Adj. Enabled */ #define IEEE80211_MESHCONF_CAP_TBTTA 0x20 /* TBTT Adj. Enabled */
#define IEEE80211_MESHCONF_CAP_PSL 0x40 /* Power Save Level */ #define IEEE80211_MESHCONF_CAP_TBTT 0x40 /* TBTT Adjusting */
#define IEEE80211_MESHCONF_CAP_PSL 0x80 /* Power Save Level */
/* Mesh Identifier */ /* Mesh Identifier */
struct ieee80211_meshid_ie { struct ieee80211_meshid_ie {