diff options
author | sam <sam@FreeBSD.org> | 2007-09-17 19:07:24 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2007-09-17 19:07:24 +0000 |
commit | d2e6b6eac7970920eccfe2d65f03d9ca3c6542ae (patch) | |
tree | dd53d98ae592f4e1d6caa3458fddec6956ad9dd5 /sys/net80211/ieee80211_proto.h | |
parent | b6c4c36f72b670e2821f1e630182572a7b96337c (diff) | |
download | FreeBSD-src-d2e6b6eac7970920eccfe2d65f03d9ca3c6542ae.zip FreeBSD-src-d2e6b6eac7970920eccfe2d65f03d9ca3c6542ae.tar.gz |
Update beacon handling to sync w/ vap code base:
o add driver callback to handle notification of beacon changes;
this is required for devices that manage beacon frames themselves
(devices must override the default handler which does nothing)
o move beacon update-related flags from ieee80211com to the beacon
offsets storage (or handle however a driver wants)
o expand beacon offsets structure with members needed for 11h/dfs
and appie's
o change calling convention for ieee80211_beacon_alloc and
ieee80211_beacon_update
o add overlapping bss support for 11g; requires driver to pass
beacon frames from overlapping bss up to net80211 which is not
presently done by any driver
o move HT beacon contents update to a routine in the HT code area
Reviewed by: avatar, thompsa, sephe
Approved by: re (blanket wireless)
Diffstat (limited to 'sys/net80211/ieee80211_proto.h')
-rw-r--r-- | sys/net80211/ieee80211_proto.h | 42 |
1 files changed, 35 insertions, 7 deletions
diff --git a/sys/net80211/ieee80211_proto.h b/sys/net80211/ieee80211_proto.h index 1a2926a..41ed3ba 100644 --- a/sys/net80211/ieee80211_proto.h +++ b/sys/net80211/ieee80211_proto.h @@ -246,20 +246,48 @@ extern const char *ieee80211_wme_acnames[]; * can update the frame later w/ minimal overhead. */ struct ieee80211_beacon_offsets { + uint8_t bo_flags[4]; /* update/state flags */ uint16_t *bo_caps; /* capabilities */ + uint8_t *bo_cfp; /* start of CFParms element */ uint8_t *bo_tim; /* start of atim/dtim */ uint8_t *bo_wme; /* start of WME parameters */ - uint8_t *bo_trailer; /* start of fixed-size trailer */ + uint8_t *bo_tim_trailer;/* start of fixed-size trailer */ uint16_t bo_tim_len; /* atim/dtim length in bytes */ - uint16_t bo_trailer_len; /* trailer length in bytes */ + uint16_t bo_tim_trailer_len;/* tim trailer length in bytes */ uint8_t *bo_erp; /* start of ERP element */ uint8_t *bo_htinfo; /* start of HT info element */ + uint8_t *bo_appie; /* start of AppIE element */ + uint16_t bo_appie_len; /* AppIE length in bytes */ + uint16_t bo_csa_trailer_len;; + uint8_t *bo_csa; /* start of CSA element */ }; -struct mbuf *ieee80211_beacon_alloc(struct ieee80211com *, - struct ieee80211_node *, struct ieee80211_beacon_offsets *); -int ieee80211_beacon_update(struct ieee80211com *, - struct ieee80211_node *, struct ieee80211_beacon_offsets *, - struct mbuf *, int broadcast); +struct mbuf *ieee80211_beacon_alloc(struct ieee80211_node *, + struct ieee80211_beacon_offsets *); + +/* + * Beacon frame updates are signaled through calls to ic_update_beacon + * with one of the IEEE80211_BEACON_* tokens defined below. For devices + * that construct beacon frames on the host this can trigger a rebuild + * or defer the processing. For devices that offload beacon frame + * handling this callback can be used to signal a rebuild. The bo_flags + * array in the ieee80211_beacon_offsets structure is intended to record + * deferred processing requirements; ieee80211_beacon_update uses the + * state to optimize work. Since this structure is owned by the driver + * and not visible to the 802.11 layer drivers must supply an ic_update_beacon + * callback that marks the flag bits and schedules (as necessary) an update. + */ +enum { + IEEE80211_BEACON_CAPS = 0, /* capabilities */ + IEEE80211_BEACON_TIM = 1, /* DTIM/ATIM */ + IEEE80211_BEACON_WME = 2, + IEEE80211_BEACON_ERP = 3, /* Extended Rate Phy */ + IEEE80211_BEACON_HTINFO = 4, /* HT Information */ + IEEE80211_BEACON_APPIE = 5, /* Application IE's */ + IEEE80211_BEACON_CFP = 6, /* CFParms */ + IEEE80211_BEACON_CSA = 7, /* Channel Switch Announcement */ +}; +int ieee80211_beacon_update(struct ieee80211_node *, + struct ieee80211_beacon_offsets *, struct mbuf *, int mcast); /* * Notification methods called from the 802.11 state machine. |