diff options
author | sam <sam@FreeBSD.org> | 2009-03-18 19:28:17 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2009-03-18 19:28:17 +0000 |
commit | 8bfd160665d6b36b087de434348dc376113ec6a6 (patch) | |
tree | 8452969c7e6a5966840de839c95bbc46ce5c5321 /sys/net80211/ieee80211_tdma.h | |
parent | 9f91fe4f6bb519a3c35b1c93fd0afdddd7817f59 (diff) | |
download | FreeBSD-src-8bfd160665d6b36b087de434348dc376113ec6a6.zip FreeBSD-src-8bfd160665d6b36b087de434348dc376113ec6a6.tar.gz |
Minor cleanups of tdma protocol handling:
o break out version-related code to simplify rev'ing the protocol
o add parameter validation macros so checks that appear multiple places
are consistent (and easy to change)
o add protocol version check when looking for a scan candidate
o improve scan debug output format
o rewrite beacon update handling to calculate a bitmask of changed values
and pass that down through the driver callback so drivers can optimize work
o do slot bounds check before use when parsing received beacons
Diffstat (limited to 'sys/net80211/ieee80211_tdma.h')
-rw-r--r-- | sys/net80211/ieee80211_tdma.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_tdma.h b/sys/net80211/ieee80211_tdma.h index c5ac3a2..d6e45a5 100644 --- a/sys/net80211/ieee80211_tdma.h +++ b/sys/net80211/ieee80211_tdma.h @@ -33,11 +33,11 @@ */ struct ieee80211_tdma_state { u_int tdma_slotlen; /* bss slot length (us) */ + uint8_t tdma_version; /* protocol version to use */ uint8_t tdma_slotcnt; /* bss slot count */ uint8_t tdma_bintval; /* beacon interval (slots) */ uint8_t tdma_slot; /* station slot # */ uint8_t tdma_inuse[1]; /* mask of slots in use */ -#define IEEE80211_TDMA_MAXSLOTS 8 void *tdma_peer; /* peer station cookie */ uint8_t tdma_active[1]; /* mask of active slots */ int tdma_count; /* active/inuse countdown */ @@ -49,6 +49,11 @@ struct ieee80211_tdma_state { struct mbuf *, int, int, int, uint32_t); void (*tdma_opdetach)(struct ieee80211vap *); }; + +#define TDMA_UPDATE_SLOT 0x0001 /* tdma_slot changed */ +#define TDMA_UPDATE_SLOTCNT 0x0002 /* tdma_slotcnt changed */ +#define TDMA_UPDATE_SLOTLEN 0x0004 /* tdma_slotlen changed */ +#define TDMA_UPDATE_BINTVAL 0x0008 /* tdma_bintval changed */ void ieee80211_tdma_vattach(struct ieee80211vap *); |