svn commit: r191623 - projects/mesh11s/sys/net80211
Rui Paulo
rpaulo at FreeBSD.org
Tue Apr 28 11:35:23 UTC 2009
Author: rpaulo
Date: Tue Apr 28 11:35:22 2009
New Revision: 191623
URL: http://svn.freebsd.org/changeset/base/191623
Log:
* Forgot to add Mesh Conf IE to probe responses.
* Add TIM to Mesh beacons by reusing hostap code. (Mesh TIM is equal as the
non-mesh version. The IE may differ in the future if ANA allocates a new
one, but for now use one we already have.)
Sponsored by: The FreeBSD Foundation
Modified:
projects/mesh11s/sys/net80211/ieee80211_mesh.h
projects/mesh11s/sys/net80211/ieee80211_output.c
Modified: projects/mesh11s/sys/net80211/ieee80211_mesh.h
==============================================================================
--- projects/mesh11s/sys/net80211/ieee80211_mesh.h Tue Apr 28 11:30:18 2009 (r191622)
+++ projects/mesh11s/sys/net80211/ieee80211_mesh.h Tue Apr 28 11:35:22 2009 (r191623)
@@ -128,16 +128,8 @@ struct ieee80211_meshcsa_ie {
uint8_t csa_count;
} __packed;
-/* XXXRP: this is equal to the non mesh version. Should we simplify ? */
/* Mesh TIM */
-struct ieee80211_meshtim_ie {
- uint8_t tim_ie; /* IEEE80211_ELEMID_MESHTIM */
- uint8_t tim_len;
- uint8_t tim_count; /* DTIM count */
- uint8_t tim_period; /* DTIM period */
- uint8_t tim_bitctl; /* bitmap control */
- uint8_t tim_bitmap[1]; /* variable-length bitmap */
-} __packed;
+/* Equal to the non Mesh version */
/* Mesh Awake Window */
struct ieee80211_meshawakew_ie {
Modified: projects/mesh11s/sys/net80211/ieee80211_output.c
==============================================================================
--- projects/mesh11s/sys/net80211/ieee80211_output.c Tue Apr 28 11:30:18 2009 (r191622)
+++ projects/mesh11s/sys/net80211/ieee80211_output.c Tue Apr 28 11:35:22 2009 (r191623)
@@ -2150,7 +2150,7 @@ ieee80211_alloc_proberesp(struct ieee802
frm = add_appie(frm, vap->iv_appie_proberesp);
if (vap->iv_opmode == IEEE80211_M_MBSS) {
frm = ieee80211_add_meshid(frm, vap);
- /* frm = ieee80211_add_mesconf(frm, vap); */
+ frm = ieee80211_add_mesconf(frm, vap);
}
m->m_pkthdr.len = m->m_len = frm - mtod(m, uint8_t *);
@@ -2382,7 +2382,9 @@ ieee80211_beacon_construct(struct mbuf *
*frm++ = 2;
*frm++ = 0; *frm++ = 0; /* TODO: ATIM window */
bo->bo_tim_len = 0;
- } else if (vap->iv_opmode == IEEE80211_M_HOSTAP) {
+ } else if (vap->iv_opmode == IEEE80211_M_HOSTAP ||
+ vap->iv_opmode == IEEE80211_M_MBSS) {
+ /* TIM IE is the same for Mesh and Hostap */
struct ieee80211_tim_ie *tie = (struct ieee80211_tim_ie *) frm;
tie->tim_ie = IEEE80211_ELEMID_TIM;
@@ -2455,14 +2457,6 @@ ieee80211_beacon_construct(struct mbuf *
if (vap->iv_opmode == IEEE80211_M_MBSS) {
frm = ieee80211_add_meshid(frm, vap);
frm = ieee80211_add_meshconf(frm, vap);
- /* struct ieee80211_tim_ie *tie = (struct ieee80211_tim_ie *) frm;
- tie->tim_ie = IEEE80211_ELEMID_TIM;
- tie->tim_len = 4; * length *
- tie->tim_count = 0; * DTIM count *
- tie->tim_period = vap->iv_dtim_period; * DTIM period *
- tie->tim_bitctl = 0; * bitmap control *
- tie->tim_bitmap[0] = 0; * Partial Virtual Bitmap *
- frm += sizeof(struct ieee80211_tim_ie); */
}
bo->bo_tim_trailer_len = frm - bo->bo_tim_trailer;
bo->bo_csa_trailer_len = frm - bo->bo_csa;
More information about the svn-src-projects
mailing list