diff options
Diffstat (limited to 'sys/net80211/ieee80211_output.c')
-rw-r--r-- | sys/net80211/ieee80211_output.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index 2f10232..f589aa9 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2001 Atsushi Onoe - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -47,6 +47,9 @@ __FBSDID("$FreeBSD$"); #include <net80211/ieee80211_var.h> #include <net80211/ieee80211_regdomain.h> +#ifdef IEEE80211_SUPPORT_TDMA +#include <net80211/ieee80211_tdma.h> +#endif #include <net80211/ieee80211_wds.h> #ifdef INET @@ -2500,6 +2503,7 @@ ieee80211_beacon_construct(struct mbuf *m, uint8_t *frm, * [tlv] WME parameters * [tlv] Vendor OUI HT capabilities (optional) * [tlv] Vendor OUI HT information (optional) + * [tlv] TDMA parameters (optional) * [tlv] application data (optional) */ @@ -2589,6 +2593,12 @@ ieee80211_beacon_construct(struct mbuf *m, uint8_t *frm, frm = ieee80211_add_htcap_vendor(frm, ni); frm = ieee80211_add_htinfo_vendor(frm, ni); } +#ifdef IEEE80211_SUPPORT_TDMA + if (vap->iv_caps & IEEE80211_C_TDMA) { + bo->bo_tdma = frm; + frm = ieee80211_add_tdma(frm, vap); + } +#endif if (vap->iv_appie_beacon != NULL) { bo->bo_appie = frm; bo->bo_appie_len = vap->iv_appie_beacon->ie_len; @@ -2637,6 +2647,7 @@ ieee80211_beacon_alloc(struct ieee80211_node *ni, * XXX Vendor-specific OIDs (e.g. Atheros) * [tlv] WPA parameters * [tlv] WME parameters + * [tlv] TDMA parameters (optional) * [tlv] application data (optional) * NB: we allocate the max space required for the TIM bitmap. * XXX how big is this? @@ -2661,6 +2672,10 @@ ieee80211_beacon_alloc(struct ieee80211_node *ni, + 4+2*sizeof(struct ieee80211_ie_htinfo)/* HT info */ + (vap->iv_caps & IEEE80211_C_WME ? /* WME */ sizeof(struct ieee80211_wme_param) : 0) +#ifdef IEEE80211_SUPPORT_TDMA + + (vap->iv_caps & IEEE80211_C_TDMA ? /* TDMA */ + sizeof(struct ieee80211_tdma_param) : 0) +#endif + IEEE80211_MAX_APPIE ; m = ieee80211_getmgtframe(&frm, @@ -2779,7 +2794,14 @@ ieee80211_beacon_update(struct ieee80211_node *ni, ieee80211_ht_update_beacon(vap, bo); clrbit(bo->bo_flags, IEEE80211_BEACON_HTINFO); } - +#ifdef IEEE80211_SUPPORT_TDMA + if (vap->iv_caps & IEEE80211_C_TDMA) { + /* + * NB: the beacon is potentially updated every TBTT. + */ + ieee80211_tdma_update_beacon(vap, bo); + } +#endif if (vap->iv_opmode == IEEE80211_M_HOSTAP) { /* NB: no IBSS support*/ struct ieee80211_tim_ie *tie = (struct ieee80211_tim_ie *) bo->bo_tim; |