From: Felix Fietkau <nbd@openwrt.org>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [PATCH] ath9k: Further fix for mesh beaconing
Date: Tue, 24 May 2011 15:19:14 +0200 [thread overview]
Message-ID: <4DDBB052.6030200@openwrt.org> (raw)
In-Reply-To: <1306240937-19011-1-git-send-email-fabricedeyber@agilemesh.com>
On 2011-05-24 2:42 PM, Fabrice Deyber wrote:
> This fix ensure the timers to be set at beacon interval boundaries. Without
> this change timers can be set improperly resulting in the absence of beacons.
>
> Signed-off-by: Fabrice Deyber<fabricedeyber@agilemesh.com>
> ---
> drivers/net/wireless/ath/ath9k/beacon.c | 15 +++------------
> 1 files changed, 3 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
> index d4d8cec..34675ae 100644
> --- a/drivers/net/wireless/ath/ath9k/beacon.c
> +++ b/drivers/net/wireless/ath/ath9k/beacon.c
> @@ -656,19 +656,10 @@ static void ath_beacon_config_adhoc(struct ath_softc *sc,
>
> ath9k_reset_beacon_status(sc);
>
> - tsf = ath9k_hw_gettsf32(ah) + TU_TO_USEC(FUDGE);
> intval = TU_TO_USEC(conf->beacon_interval& ATH9K_BEACON_PERIOD);
> -
> - if (!sc->beacon.bc_tstamp)
> - nexttbtt = tsf + intval;
> - else {
> - if (tsf> sc->beacon.bc_tstamp)
> - delta = (tsf - sc->beacon.bc_tstamp);
> - else
> - delta = (tsf + 1 + (~0U - sc->beacon.bc_tstamp));
> - nexttbtt = tsf + intval - (delta % intval);
> - }
> -
> + tsf = roundup(ath9k_hw_gettsf32(ah) + TU_TO_USEC(FUDGE), intval);
> + nexttbtt = tsf + intval;
There's some whitespace damage here, please fix the indentation.
- Felix
WARNING: multiple messages have this Message-ID (diff)
From: Felix Fietkau <nbd@openwrt.org>
To: Fabrice Deyber <fabricedeyber@agilemesh.com>
Cc: linville@tuxdriver.com, devel@lists.open80211s.org,
ath9k-devel@lists.ath9k.org, linux-wireless@vger.kernel.org,
lrodriguez@atheros.com
Subject: Re: [PATCH] ath9k: Further fix for mesh beaconing
Date: Tue, 24 May 2011 15:19:14 +0200 [thread overview]
Message-ID: <4DDBB052.6030200@openwrt.org> (raw)
In-Reply-To: <1306240937-19011-1-git-send-email-fabricedeyber@agilemesh.com>
On 2011-05-24 2:42 PM, Fabrice Deyber wrote:
> This fix ensure the timers to be set at beacon interval boundaries. Without
> this change timers can be set improperly resulting in the absence of beacons.
>
> Signed-off-by: Fabrice Deyber<fabricedeyber@agilemesh.com>
> ---
> drivers/net/wireless/ath/ath9k/beacon.c | 15 +++------------
> 1 files changed, 3 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
> index d4d8cec..34675ae 100644
> --- a/drivers/net/wireless/ath/ath9k/beacon.c
> +++ b/drivers/net/wireless/ath/ath9k/beacon.c
> @@ -656,19 +656,10 @@ static void ath_beacon_config_adhoc(struct ath_softc *sc,
>
> ath9k_reset_beacon_status(sc);
>
> - tsf = ath9k_hw_gettsf32(ah) + TU_TO_USEC(FUDGE);
> intval = TU_TO_USEC(conf->beacon_interval& ATH9K_BEACON_PERIOD);
> -
> - if (!sc->beacon.bc_tstamp)
> - nexttbtt = tsf + intval;
> - else {
> - if (tsf> sc->beacon.bc_tstamp)
> - delta = (tsf - sc->beacon.bc_tstamp);
> - else
> - delta = (tsf + 1 + (~0U - sc->beacon.bc_tstamp));
> - nexttbtt = tsf + intval - (delta % intval);
> - }
> -
> + tsf = roundup(ath9k_hw_gettsf32(ah) + TU_TO_USEC(FUDGE), intval);
> + nexttbtt = tsf + intval;
There's some whitespace damage here, please fix the indentation.
- Felix
next prev parent reply other threads:[~2011-05-24 13:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-24 12:42 [ath9k-devel] [PATCH] ath9k: Further fix for mesh beaconing Fabrice Deyber
2011-05-24 12:42 ` Fabrice Deyber
2011-05-24 13:19 ` Felix Fietkau [this message]
2011-05-24 13:19 ` Felix Fietkau
-- strict thread matches above, loose matches on Subject: below --
2011-05-24 13:44 [ath9k-devel] " Fabrice Deyber
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=4DDBB052.6030200@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.