diff options
author | sam <sam@FreeBSD.org> | 2009-01-08 17:12:47 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2009-01-08 17:12:47 +0000 |
commit | 98ad45c3d3f257c3649d4e198723267231203184 (patch) | |
tree | 6038542738398db4d8d4a8e36ed50ac642a506ac /sys/net80211/ieee80211_output.c | |
parent | 6f4df3b74deeeb200dfc7f23a8344f50eb34942c (diff) | |
download | FreeBSD-src-98ad45c3d3f257c3649d4e198723267231203184.zip FreeBSD-src-98ad45c3d3f257c3649d4e198723267231203184.tar.gz |
TDMA support for long distance point-to-point links using ath devices:
o add net80211 support for a tdma vap that is built on top of the
existing adhoc-demo support
o add tdma scheduling of frame transmission to the ath driver; it's
conceivable other devices might be capable of this too in which case
they can make use of the 802.11 protocol additions etc.
o add minor bits to user tools that need to know: ifconfig to setup and
configure, new statistics in athstats, and new debug mask bits
While the architecture can support >2 slots in a TDMA BSS the current
design is intended (and tested) for only 2 slots.
Sponsored by: Intel
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; |