From: ian <ischram@telenet.be>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
wireless <linux-wireless@vger.kernel.org>
Subject: Re: letting drivers choose their preferred rate scale
Date: Mon, 03 Sep 2007 02:21:18 +0200 [thread overview]
Message-ID: <46DB537E.8030801@telenet.be> (raw)
In-Reply-To: <20070831180933.GB3352@tuxdriver.com>
John W. Linville wrote:
> On Mon, Aug 27, 2007 at 12:49:09PM +0200, Johannes Berg wrote:
>> On Sat, 2007-08-25 at 14:15 +0200, ian wrote:
>>
>>> I reread the discussion carefully and can't find any specific
>>> comments on the patch which for clarity I will reproduce below.
>> Then I guess I remember wrong and the comment was raised in another
>> thread. The problem we have is that once any rate control algorithm is
>> loaded, it will be default for any future drivers, which is often
>> inappropriate. Hence, it would be great if
>> hw->preferred_rate_control==NULL would indicate "use default" where
>> "default" would be set to "simple" to start with but also changeable.
>> (although the change functionality could just be not usable from
>> userspace for now)
>
> I ACK this approach. Anyone have a patch hacked-up to post?
>
I read up on the code and kernel mechanisms involved and this is
what i came up with
Right now there is no way of knowing what the "default" rc should be
other than that it has a module alias rc80211_default, checking
for this is probably not done, and would be pretty unpractical.
And it wouldn't be settable from userspace in the future either.
We could however replace "simple" with a user settable variable.
(global variable in ieee80211.c like the rate_ctrl_algs and mutex,
with some accessors for a module parameter/debugfs/..?)
we could additionally remove the module_alias from rc80211_simple
I don't know too much of the rest of mac80211 code and conventions,
so feel free to be brutal if this patch makes no sense.
---
Make rc80211_simple the default rate scaling algorithm
Signed-of-by: Ian Schram <ischram@telenet.be>
--- a/net/mac80211/ieee80211_rate.c 2007-09-03 01:26:18.000000000 +0200
+++ b/net/mac80211/ieee80211_rate.c 2007-09-03 01:46:54.000000000 +0200
@@ -62,7 +62,7 @@ ieee80211_try_rate_control_ops_get(const
mutex_lock(&rate_ctrl_mutex);
list_for_each_entry(alg, &rate_ctrl_algs, list) {
- if (!name || !strcmp(alg->ops->name, name))
+ if (!strcmp(alg->ops->name, name))
if (try_module_get(alg->ops->module)) {
ops = alg->ops;
break;
@@ -78,11 +78,12 @@ static struct rate_control_ops *
ieee80211_rate_control_ops_get(const char *name)
{
struct rate_control_ops *ops;
+ const char *try_name = name ? name : "simple";
- ops = ieee80211_try_rate_control_ops_get(name);
+ ops = ieee80211_try_rate_control_ops_get(try_name);
if (!ops) {
- request_module("rc80211_%s", name ? name : "default");
- ops = ieee80211_try_rate_control_ops_get(name);
+ request_module("rc80211_%s", try_name);
+ ops = ieee80211_try_rate_control_ops_get(try_name);
}
return ops;
}
next prev parent reply other threads:[~2007-09-03 0:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-25 2:37 letting drivers choose their preferred rate scale ian
2007-08-25 8:02 ` Johannes Berg
2007-08-25 12:15 ` ian
2007-08-25 14:19 ` Jochen Voss
2007-08-27 10:49 ` Johannes Berg
2007-08-31 18:09 ` John W. Linville
2007-09-03 0:21 ` ian [this message]
2007-09-03 8:20 ` Johannes Berg
2007-09-03 8:38 ` Johannes Berg
2007-09-03 14:06 ` ian
2007-09-13 18:39 ` John W. Linville
2007-09-13 21:42 ` Ian Schram
2007-09-14 12:08 ` Johannes Berg
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=46DB537E.8030801@telenet.be \
--to=ischram@telenet.be \
--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.