-Index: madwifi-ng-r2420-20070602/ath/if_ath.c
+Index: madwifi-ng-r2568-20070710/ath/if_ath.c
===================================================================
---- madwifi-ng-r2420-20070602.orig/ath/if_ath.c 2007-06-04 13:21:55.390556024 +0200
-+++ madwifi-ng-r2420-20070602/ath/if_ath.c 2007-06-04 13:21:55.808492488 +0200
-@@ -4394,16 +4394,31 @@
+--- madwifi-ng-r2568-20070710.orig/ath/if_ath.c 2007-07-23 01:48:41.230329754 +0200
++++ madwifi-ng-r2568-20070710/ath/if_ath.c 2007-07-23 01:48:41.758359843 +0200
+@@ -4426,16 +4426,31 @@
struct ieee80211com *ic = &sc->sc_ic;
struct ath_hal *ah = sc->sc_ah;
struct ieee80211_node *ni;
/* XXX conditionalize multi-bss support? */
if (ic->ic_opmode == IEEE80211_M_HOSTAP) {
/*
-@@ -4417,20 +4432,61 @@
+@@ -4449,20 +4464,61 @@
if (sc->sc_stagbeacons)
intval /= ATH_BCBUF; /* for staggered beacons */
if ((sc->sc_nostabeacons) &&
int dtimperiod, dtimcount;
int cfpperiod, cfpcount;
-@@ -4446,13 +4502,13 @@
+@@ -4478,13 +4534,13 @@
dtimcount = 0; /* XXX? */
cfpperiod = 1; /* NB: no PCF support yet */
cfpcount = 0;
do {
nexttbtt += intval;
if (--dtimcount < 0) {
-@@ -4460,7 +4516,7 @@
+@@ -4492,7 +4548,7 @@
if (--cfpcount < 0)
cfpcount = cfpperiod - 1;
}
#undef FUDGE
memset(&bs, 0, sizeof(bs));
bs.bs_intval = intval;
-@@ -4512,7 +4568,7 @@
+@@ -4544,7 +4600,7 @@
DPRINTF(sc, ATH_DEBUG_BEACON,
"%s: tsf %llu tsf:tu %u intval %u nexttbtt %u dtim %u nextdtim %u bmiss %u sleep %u cfp:period %u maxdur %u next %u timoffset %u\n",
__func__,
bs.bs_intval,
bs.bs_nexttbtt,
bs.bs_dtimperiod,
-@@ -4531,7 +4587,7 @@
+@@ -4566,7 +4622,7 @@
ath_hal_intrset(ah, sc->sc_imask);
} else {
ath_hal_intrset(ah, 0);
intval |= HAL_BEACON_RESET_TSF;
if (ic->ic_opmode == IEEE80211_M_IBSS) {
/*
-@@ -4568,8 +4624,40 @@
+@@ -4603,8 +4659,40 @@
if (ic->ic_opmode == IEEE80211_M_IBSS && sc->sc_hasveol)
ath_beacon_start_adhoc(sc, vap);
}