linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: "Lukáš Turek" <8an@praha12.net>
Cc: Luis Rodriguez <Luis.Rodriguez@Atheros.com>,
	"linville@tuxdriver.com" <linville@tuxdriver.com>,
	"johannes@sipsolutions.net" <johannes@sipsolutions.net>,
	"ath5k-devel@lists.ath5k.org" <ath5k-devel@lists.ath5k.org>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [ath5k-devel] [PATCH 5/5] ath5k: Implement mac80211 callback set_coverage_class
Date: Tue, 15 Dec 2009 14:07:56 -0800	[thread overview]
Message-ID: <20091215220756.GD2067@tux> (raw)
In-Reply-To: <200912152235.01490.8an@praha12.net>

On Tue, Dec 15, 2009 at 01:35:01PM -0800, Lukáš Turek wrote:
> On 15.12.2009 19:50 you wrote:
> > Can you move this last line setting the sc->ah->ah_coverage_class
> > to ath5k_hw_set_coverage_class() instead?
> ath5k_hw_set_coverage_class() is also called after interface reset:
> ath5k_hw_set_coverage_class(ah, ah->ah_coverage_class);
> 
> So it would be quite strange if it set the value again...
> But I see your point, and don't see a better solution.

What I meant was not for you to pass the ah->ah_coverage_class to
ath5k_hw_set_coverage_class() but instead to pass the value obtained
from mac80211 and let ath5k_hw_set_coverage_class() itself set it on
ah.

> > Also -- if an ath_hw_set_coverage_class(common, coverage_class) can be
> > defined on drivers/net/wireless/ath/hw.c along with:
> >
> > ath_hw_set_slot_time(common, slot_time),
> > ath_hw_set_ack_timeout(common, ack_timeout);
> > ath_hw_set_cts_timeout(common, cts_timeout);
>
> Unfortunately the functions are really hardware specific, they write a 
> register that even differs between chip versions, and also depend on chip 
> clock rate.

Thanks for checking, I just wanted to elaborate as to how we can share code
and to because of that it seems like a good idea to remain consistant and
treat settings ah-> variables in hw code alone.

The less we muck with ah-> settings on base.c for ath5k the more well kept
and separated the actual hw code is. This really will only serve purpose
to later merge mow hw code between ath9k/ath5k. How much we end up sharing
remains to be seen, I don't mind the current split we have but if we do
see something obviously common it makes sense to just stuff it in when we
get a chance to ath.

> It would be possible to move ath_hw_set_coverage_class() to ath to share the 
> calculation, but that would require exporting six functions from the modules.
> 
> > Wonder if ar9170 can support setting these too.
>
> It seems it supports setting slot time, but I don't see a register with ACK 
> timeout, which is required too.

Thanks for checking, I was lazy, and just curious. Reason for asking was if
it could use at least caching the coverage class a hardware parameter we
can stuff it into ath_common just as we do with the bssid_mask and stuff.
Even if its just shared between ath5k and ath9k its still worth stashing it
there if both will use it.

Since tuning cts timeout, ack timouet and slot time may not be an operation
which we do that often it would still not be so bad to just stuff a generic
helper for ath5k/ath9k into ath which will handle the different hw revisions
itself.

  Luis

  reply	other threads:[~2009-12-15 22:07 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-15 17:56 [PATCH 0/5] Setting coverage class (and ACK timeout and slot time), take two Lukáš Turek
2009-12-15 17:56 ` [PATCH 1/5] nl80211: Add new WIPHY attribute COVERAGE_CLASS Lukáš Turek
2009-12-15 19:00   ` [ath5k-devel] " Luis R. Rodriguez
2009-12-15 19:02     ` Luis R. Rodriguez
2009-12-15 21:07       ` Lukáš Turek
2009-12-15 21:44         ` Luis R. Rodriguez
2009-12-16  8:03       ` Holger Schurig
2009-12-15 20:56     ` Lukáš Turek
2009-12-15 21:58       ` Luis R. Rodriguez
2009-12-15 22:48         ` Felix Fietkau
2009-12-15 22:52         ` Lukáš Turek
2009-12-16  8:30           ` Luis R. Rodriguez
2009-12-18 16:33             ` Lukáš Turek
2009-12-18 17:20               ` Luis R. Rodriguez
2009-12-15 17:56 ` [PATCH 2/5] mac80211: Add new callback set_coverage_class Lukáš Turek
2009-12-15 18:07   ` Johannes Berg
2009-12-15 18:11   ` [ath5k-devel] " Luis R. Rodriguez
2009-12-15 21:23     ` Lukáš Turek
2009-12-15 21:25     ` Johannes Berg
2009-12-15 17:56 ` [PATCH 3/5] ath5k: Fix functions for getting/setting slot time Lukáš Turek
2009-12-15 17:56 ` [PATCH 4/5] ath5k: Reimplement clock rate to usec conversion Lukáš Turek
2009-12-21 10:26   ` [ath5k-devel] " 海藻敬之
2009-12-21 12:38     ` Lukáš Turek
     [not found]       ` <4B301FE9.2020702@thinktube.com>
2009-12-22 16:08         ` Lukáš Turek
     [not found]     ` <4B2F50DD.60701@thinktube.com>
2009-12-21 12:40       ` Lukáš Turek
2009-12-21 15:08         ` Bob Copeland
2009-12-21 15:28           ` Lukáš Turek
2009-12-22  3:28             ` Bob Copeland
2009-12-15 17:56 ` [PATCH 5/5] ath5k: Implement mac80211 callback set_coverage_class Lukáš Turek
2009-12-15 18:50   ` [ath5k-devel] " Luis R. Rodriguez
2009-12-15 19:01     ` Luis R. Rodriguez
2009-12-15 21:35     ` Lukáš Turek
2009-12-15 22:07       ` Luis R. Rodriguez [this message]
2009-12-15 17:56 ` [PATCH] iw: Add support for NL80211_ATTR_WIPHY_COVERAGE_CLASS Lukáš Turek

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=20091215220756.GD2067@tux \
    --to=lrodriguez@atheros.com \
    --cc=8an@praha12.net \
    --cc=Luis.Rodriguez@Atheros.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).