On 2010-06-26 8:47 AM, Alphan Ulusoy wrote:
> Dear Felix,
> 
> Thank you for your reply, as I was going over the code yesterday I've
> changed several parts and also the part your first patch covers.
> However I have also felt that beacon staggering is somewhat
> problematic. I've made a total of 4 changes and ad-hoc beacons work
> now:
> 
> 1) Applied your second patch.
> 
> 2) Disabled beacon staggering by setting ATH_BCBUF (ath9k.h) to 1. I
> believe, this covers your second patch.
Unnecessary, with my patch, as long as the opmode is set to ad-hoc, it
will use a beacon interval that will only leave one beacon slot active
anyway.

> 3) main.c:ath9k_bss_info_changed() calls ath_beacon_alloc() when
> called by mac80211. However, ath_beacon_alloc() honors the
> sc->sc_ah->opmode field for deciding which beacon config function to
> run while ath9k_bss_info_changed() does not update this field from
> vif->type. Thus, I've added the following at line 2051 of
> main.c:ath9k_bss_info_changed(). "ah->opmode = vif->type;"
sc->ah->opmode should have been set by the code that is called when the
interface is brought up, setting it from ath9k_bss_info_changed() is
definitely wrong.

> 4) beacon.c:ath_beacon_config_adhoc() relies on sc->beacon.bc_tstamp
> field to determine the next beacon time. However, during
> initialization I've found this field to be very large in number
> causing the first beacon to suffer a long delay causing problems in
> association. Maybe this field is missing the required initialization
> somewhere? Instead, I've added the following at line 752 of beacon.c
> so that first beacon is sent sooner. "nexttbtt = tsftu + 5*intval;"
It's normal for this to be large, however maybe this needs some range
checking against the local tsf. The intention behind using bc_tstamp is
that the hardware syncs its own TSF against the one from the beacon
automatically.

> After these modifications ad-hoc beacons work just fine, beacon
> tasklet is called appropriately and I did not observe any missed
> beacons. I would like to hear your comments especially regarding
> points 3, 4.
I'd suggest testing a recent version of mac80211/ath9k before taking
another look at any of the changes that you made.

- Felix
_______________________________________________
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

Reply via email to