linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ian <ischram@telenet.be>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: wireless <linux-wireless@vger.kernel.org>
Subject: Re: letting drivers choose their preferred rate scale
Date: Sat, 25 Aug 2007 14:15:19 +0200	[thread overview]
Message-ID: <46D01D57.6060806@telenet.be> (raw)
In-Reply-To: <1188028962.9529.13.camel@johannes.berg>


Johannes Berg wrote:
> 
> There were a few specific remarks about the patch

I reread the discussion carefully and can't find any specific
comments on the patch which for clarity I will reproduce below.


>, e.g. that the default
> shouldn't change as soon as a driver loads another rate control
> algorithm etc. 

The "default" rate scaling algorithm, is currently just the "first registered",
and as long as there is already an algorithm loaded, the driver can
"load" as many as it wants and wont change this. The patch doesn't touch
that logic.

> Once those are addressed I see no problems with merging
> such a patch.
> 
> johannes

ian

The patch in question:

Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
---
include/net/mac80211.h   |    4 ++++
net/mac80211/ieee80211.c |   10 +++++++---
2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index ef9b613..f9ad839 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -533,6 +533,10 @@ struct ieee80211_hw {
    /* Number of available hardware TX queues for data packets.
     * WMM requires at least four queues. */
    int queues;
+
+    /* Preferred rate control algorithm. Leave as NULL for stack
+     * to select algorithm */
+    char *preferred_rate_control;
};

static inline void SET_IEEE80211_DEV(struct ieee80211_hw *hw, struct device *dev)
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
index 873ccb0..6dcc002 100644
--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -4875,10 +4875,14 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)

    ieee80211_debugfs_add_netdev(IEEE80211_DEV_TO_SUB_IF(local->mdev));

-    result = ieee80211_init_rate_ctrl_alg(local, NULL);
+    result = ieee80211_init_rate_ctrl_alg(local,
+                          hw->preferred_rate_control);
+
    if (result < 0) {
-        printk(KERN_DEBUG "%s: Failed to initialize rate control "
-		"algorithm\n", local->mdev->name);
+	printk(KERN_DEBUG "%s: Failed to initialize %s rate control "
+               "algorithm\n", local->mdev->name,
+		hw->preferred_rate_control ?
+ 		hw->preferred_rate_control : "default");
        goto fail_rate;
    }

  reply	other threads:[~2007-08-25 12:15 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 [this message]
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
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=46D01D57.6060806@telenet.be \
    --to=ischram@telenet.be \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.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 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).