Netdev List
 help / color / mirror / Atom feed
From: Karol Lewandowski <kl@jasmine.eu.org>
To: Jiri Benc <jbenc@suse.cz>
Cc: netdev@vger.kernel.org
Subject: Re: [DSCAPE] rate_control needs some form of reference counting
Date: Tue, 1 Aug 2006 17:16:32 +0200	[thread overview]
Message-ID: <20060801151632.GA1754@riddly.domek.prywatny> (raw)
In-Reply-To: <20060801161023.1e66d844@griffin.suse.cz>

On Tue, Aug 01, 2006 at 04:10:23PM +0200, Jiri Benc wrote:
> On Sat, 29 Jul 2006 23:56:45 +0200, Karol Lewandowski wrote:

> The fix is not easy. In fact, it's as hard as to fix it by implementing
> a feature that allows to use different rate control algorithm for each
> device. Given the fact the problem doesn't occur in normal conditions,
> it's a low priority for me (unless there is a volunteer to fix it). It
> needs to be fixed before d80211 is merged, though (sigh).

I volunteer to provide this simple fix:

--- ieee80211.c.orig	2006-08-01 16:24:41.000000000 +0200
+++ ieee80211.c	2006-08-01 16:53:01.000000000 +0200
@@ -4462,7 +4462,8 @@
 	if (result < 0)
 		goto fail_if_sysfs;
 
-	if (rate_control_initialize(local) < 0) {
+	result = rate_control_initialize(local);
+	if (result < 0) {
 		printk(KERN_DEBUG "%s: Failed to initialize rate control "
 		       "algorithm\n", dev->name);
 		goto fail_rate;


Without that ieee80211_register_hw was returning value from previous
check:

>>>	result = ieee80211_sysfs_add_netdevice(dev);
	rtnl_unlock();
	if (result < 0)
		goto fail_if_sysfs;

	if (rate_control_initialize(local) < 0) {
		printk(KERN_DEBUG "%s: Failed to initialize rate control "
		       "algorithm\n", dev->name);
		goto fail_rate;
	}


This fixes that oops.  Problem remains, though.  I suppose that oops
would happen anyway if someone would do:

  # modprobe rate_control   # loads 80211
  # modprobe rt2500pci

(Driver needs to initialize cleanly here, mine has some (different)
problem so I'm just guessing here...)

 # rmmod rate_control

<oops here>, I think.
 

> I suppose you don't have automatic loading of modules enabled, right?

Yes, I've disabled it.

-- 
This signature intentionally says nothing.

  reply	other threads:[~2006-08-01 15:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-29 21:56 [DSCAPE] rate_control needs some form of reference counting Karol Lewandowski
2006-08-01 14:10 ` Jiri Benc
2006-08-01 15:16   ` Karol Lewandowski [this message]
2006-08-01 16:04     ` Jiri Benc

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=20060801151632.GA1754@riddly.domek.prywatny \
    --to=kl@jasmine.eu.org \
    --cc=jbenc@suse.cz \
    --cc=netdev@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