summaryrefslogtreecommitdiffstats
path: root/sys/dev/ath
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2009-03-18 19:28:17 +0000
committersam <sam@FreeBSD.org>2009-03-18 19:28:17 +0000
commit8bfd160665d6b36b087de434348dc376113ec6a6 (patch)
tree8452969c7e6a5966840de839c95bbc46ce5c5321 /sys/dev/ath
parent9f91fe4f6bb519a3c35b1c93fd0afdddd7817f59 (diff)
downloadFreeBSD-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/dev/ath')
-rw-r--r--sys/dev/ath/if_ath.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index 3a401fe..7a59520 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -225,7 +225,7 @@ static void ath_tdma_bintvalsetup(struct ath_softc *sc,
const struct ieee80211_tdma_state *tdma);
static void ath_tdma_config(struct ath_softc *sc, struct ieee80211vap *vap);
static void ath_tdma_update(struct ieee80211_node *ni,
- const struct ieee80211_tdma_param *tdma);
+ const struct ieee80211_tdma_param *tdma, int);
static void ath_tdma_beacon_send(struct ath_softc *sc,
struct ieee80211vap *vap);
@@ -7477,7 +7477,7 @@ ath_tdma_config(struct ath_softc *sc, struct ieee80211vap *vap)
*/
static void
ath_tdma_update(struct ieee80211_node *ni,
- const struct ieee80211_tdma_param *tdma)
+ const struct ieee80211_tdma_param *tdma, int changed)
{
#define TSF_TO_TU(_h,_l) \
((((u_int32_t)(_h)) << 22) | (((u_int32_t)(_l)) >> 10))
@@ -7498,7 +7498,7 @@ ath_tdma_update(struct ieee80211_node *ni,
/*
* Check for and adopt configuration changes.
*/
- if (isset(ATH_VAP(vap)->av_boff.bo_flags, IEEE80211_BEACON_TDMA)) {
+ if (changed != 0) {
const struct ieee80211_tdma_state *ts = vap->iv_tdma;
ath_tdma_bintvalsetup(sc, ts);
OpenPOWER on IntegriCloud