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_adhoc.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_adhoc.c')
-rw-r--r-- | sys/net80211/ieee80211_adhoc.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_adhoc.c b/sys/net80211/ieee80211_adhoc.c index b8a5f7f..7e64964 100644 --- a/sys/net80211/ieee80211_adhoc.c +++ b/sys/net80211/ieee80211_adhoc.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2007-2009 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -57,6 +57,9 @@ __FBSDID("$FreeBSD$"); #include <net80211/ieee80211_var.h> #include <net80211/ieee80211_adhoc.h> #include <net80211/ieee80211_input.h> +#ifdef IEEE80211_SUPPORT_TDMA +#include <net80211/ieee80211_tdma.h> +#endif #define IEEE80211_RATE2MBS(r) (((r) & IEEE80211_RATE_VAL) / 2) @@ -96,6 +99,15 @@ adhoc_vattach(struct ieee80211vap *vap) else vap->iv_recv_mgmt = ahdemo_recv_mgmt; vap->iv_opdetach = adhoc_vdetach; +#ifdef IEEE80211_SUPPORT_TDMA + /* + * Throw control to tdma support. Note we do this + * after setting up our callbacks so it can piggyback + * on top of us. + */ + if (vap->iv_caps & IEEE80211_C_TDMA) + ieee80211_tdma_vattach(vap); +#endif } /* @@ -355,6 +367,19 @@ adhoc_input(struct ieee80211_node *ni, struct mbuf *m, ni == vap->iv_bss && !IEEE80211_ADDR_EQ(wh->i_addr2, ni->ni_macaddr)) { /* + * Beware of frames that come in too early; we + * can receive broadcast frames and creating sta + * entries will blow up because there is no bss + * channel yet. + */ + if (vap->iv_state != IEEE80211_S_RUN) { + IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT, + wh, "data", "not in RUN state (%s)", + ieee80211_state_name[vap->iv_state]); + vap->iv_stats.is_rx_badstate++; + goto err; + } + /* * Fake up a node for this newly * discovered member of the IBSS. */ |