All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: 8an@praha12.net
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
	Johannes Berg <johannes@sipsolutions.net>,
	ath5k-devel@lists.ath5k.org
Subject: Re: [PATCH 4/4] ath5k: Implement mac80211 callback set_coverage
Date: Sun, 06 Dec 2009 19:34:58 +0100	[thread overview]
Message-ID: <4B1BF952.1000909@openwrt.org> (raw)
In-Reply-To: <200912061826.52394.8an@praha12.net>

Lukáš Turek wrote:
> The callback sets slot time as specified in IEEE 802.11-2007 section
> 17.3.8.6 (for 20MHz channels only for now) and ACK and CTS timeouts
> using calculations taken from Madwifi's athctrl. The values are
> persistent, they are restored after device reset.
> 
> Signed-off-by: Lukas Turek <8an@praha12.net>
> ---
> diff --git a/drivers/net/wireless/ath/ath5k/pcu.c b/drivers/net/wireless/ath/ath5k/pcu.c
> index 64fc1eb..2383e22 100644
> --- a/drivers/net/wireless/ath/ath5k/pcu.c
> +++ b/drivers/net/wireless/ath/ath5k/pcu.c
> @@ -1050,3 +1050,22 @@ int ath5k_hw_set_key_lladdr(struct ath5k_hw *ah, u16 entry, const u8 *mac)
>  	return 0;
>  }
>  
> +/**
> + * ath5k_hw_set_coverage - Set coverage class
> + *
> + * @ah: The &struct ath5k_hw
> + * @coverage_class: IEEE 802.11 coverage class
> + *
> + * Sets slot time, ACK timeout and CTS timeout for given coverage class.
> + */
> +void ath5k_hw_set_coverage(struct ath5k_hw *ah, u8 coverage_class)
> +{
> +	/* Calculations taken from Madwifi's athctrl */
> +	int slot_time = 9 + 3 * coverage_class;
> +	int ack_timeout = slot_time * 2 + 3;
> +	int cts_timeout = ack_timeout;
This part is wrong. The slot time can be either short or long, based on
configuration and PHY type.

- Felix

  reply	other threads:[~2009-12-06 18:35 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-06 17:20 [PATCH 0/4] Setting coverage class (and ACK timeout and slot time) Lukáš Turek
2009-12-06 17:22 ` [PATCH 1/4] nl80211: Add new WIPHY attribute COVERAGE_CLASS Lukáš Turek
2009-12-06 18:01   ` Johannes Berg
2009-12-06 18:45     ` Lukáš Turek
2009-12-06 18:49       ` Johannes Berg
2009-12-06 19:28         ` Lukáš Turek
2009-12-06 19:32           ` Lukáš Turek
2009-12-06 21:59         ` Lukáš Turek
2009-12-07  6:57           ` Johannes Berg
2009-12-06 17:23 ` [PATCH 2/4] mac80211: Add new callback set_coverage Lukáš Turek
2009-12-07 10:59   ` Kalle Valo
2009-12-07 11:04     ` Johannes Berg
2009-12-06 17:24 ` [PATCH 3/4] ath5k: Fix functions for getting/setting slot time Lukáš Turek
2009-12-06 17:26 ` [PATCH 4/4] ath5k: Implement mac80211 callback set_coverage Lukáš Turek
2009-12-06 18:34   ` Felix Fietkau [this message]
2009-12-06 19:00     ` Lukáš Turek
2009-12-06 19:20       ` Felix Fietkau
2009-12-06 20:23         ` Lukáš Turek
2009-12-07  9:48           ` Felix Fietkau
2009-12-09  1:15             ` Lukáš Turek
2009-12-09  1:48               ` Felix Fietkau
2009-12-09 13:12                 ` Lukáš Turek
2009-12-09 13:30                   ` Felix Fietkau
2009-12-09 23:51                     ` Lukáš Turek
2009-12-06 17:29 ` [PATCH] iw: Add support for NL80211_ATTR_WIPHY_COVERAGE_CLASS Lukáš Turek
2009-12-06 21:49   ` Luis R. Rodriguez
2009-12-06 21:52     ` Luis R. Rodriguez

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=4B1BF952.1000909@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=8an@praha12.net \
    --cc=ath5k-devel@lists.ath5k.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /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.