From: Felix Fietkau <nbd@openwrt.org>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] ATH9K does not transmit beacons in AD-HOC mode
Date: Sat, 26 Jun 2010 12:51:08 +0200 [thread overview]
Message-ID: <4C25DB9C.3070407@openwrt.org> (raw)
In-Reply-To: <B3005982-45A1-49FF-B775-42D9075DB8B4@sabanciuniv.edu>
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
next prev parent reply other threads:[~2010-06-26 10:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-25 9:07 [ath9k-devel] ATH9K does not transmit beacons in AD-HOC mode Alphan Ulusoy
2010-06-25 12:43 ` Felix Fietkau
2010-06-26 6:47 ` Alphan Ulusoy
2010-06-26 10:51 ` Felix Fietkau [this message]
2010-06-26 11:12 ` Alphan Ulusoy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C25DB9C.3070407@openwrt.org \
--to=nbd@openwrt.org \
--cc=ath9k-devel@lists.ath9k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.