All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ivo van Doorn <ivdoorn@gmail.com>
To: Antonio Marques <froz@icix.org>
Cc: Johannes Berg <johannes@sipsolutions.net>,
	Andrey Yurovsky <andrey@cozybit.com>,
	linux-wireless@vger.kernel.org
Subject: Re: rt2x00 mesh support
Date: Wed, 18 Mar 2009 11:02:21 +0100	[thread overview]
Message-ID: <200903181102.21380.IvDoorn@gmail.com> (raw)
In-Reply-To: <1237331062.5100.9.camel@johannes.local>

[-- Attachment #1: Type: text/plain, Size: 1381 bytes --]

On Wednesday 18 March 2009, Johannes Berg wrote:
> On Wed, 2009-03-18 at 00:01 +0100, Ivo van Doorn wrote:
> 
> > > > This command means that mac80211 uses the start() callback function. This triggers rt2x00 to initialize
> > > > the registers which resets the beacon generation.
> > > 
> > > Strange, that doesn't seem right. If you look at net/mac80211/iface.c,
> > > you'll see it call ->start(), then ->add_interface(), and later
> > > ieee80211_start_mesh(), which calls _if_config() and sets
> > > beacon/beacon_enabled.
> > 
> > ok, I gone through the rt2x00 code a couple of times now to see how this bug can be triggered by rt2x00,
> > But the only other scenario I could find, is when the open() callback for the netdevice structure doesn't end
> > with a call to the config() callback function. But as far as I see it that is happening correctly.
> 
> Maybe log (+dump_stack()) all the relevant calls from mac80211 to the
> driver? That might give us a better idea of what's going on. Also,
> Antonio, make sure you're using the very latest code. I for one need
> sleep now :)

Antonio, could you please use attached patch to add additional debugging to rt2x00.
This will do a dump_stack for all important functions (add_interface, remove_interface, config() and config_interface())

It doesn't matter if this patch is on top of the previous patch or not.

Thanks,

Ivo

[-- Attachment #2: debug.diff --]
[-- Type: text/x-diff, Size: 2346 bytes --]

diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index c41a0b9..a75f54d 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -198,6 +198,9 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw,
 	struct queue_entry *entry = NULL;
 	unsigned int i;
 
+	ERROR(rt2x00dev, "===>\n");
+	dump_stack();
+
 	/*
 	 * Don't allow interfaces to be added
 	 * the device has disappeared.
@@ -293,6 +296,8 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw,
 	 */
 	rt2x00dev->packet_filter = 0;
 
+	ERROR(rt2x00dev, "<===\n");
+
 	return 0;
 }
 EXPORT_SYMBOL_GPL(rt2x00mac_add_interface);
@@ -303,6 +308,9 @@ void rt2x00mac_remove_interface(struct ieee80211_hw *hw,
 	struct rt2x00_dev *rt2x00dev = hw->priv;
 	struct rt2x00_intf *intf = vif_to_intf(conf->vif);
 
+	ERROR(rt2x00dev, "===>\n");
+	dump_stack();
+
 	/*
 	 * Don't allow interfaces to be remove while
 	 * either the device has disappeared or when
@@ -330,6 +338,8 @@ void rt2x00mac_remove_interface(struct ieee80211_hw *hw,
 	 */
 	rt2x00lib_config_intf(rt2x00dev, intf,
 			      NL80211_IFTYPE_UNSPECIFIED, NULL, NULL);
+
+	ERROR(rt2x00dev, "<===\n");
 }
 EXPORT_SYMBOL_GPL(rt2x00mac_remove_interface);
 
@@ -339,6 +349,9 @@ int rt2x00mac_config(struct ieee80211_hw *hw, u32 changed)
 	struct ieee80211_conf *conf = &hw->conf;
 	int status;
 
+	ERROR(rt2x00dev, "===>\n");
+	dump_stack();
+
 	/*
 	 * Mac80211 might be calling this function while we are trying
 	 * to remove the device or perhaps suspending it.
@@ -386,6 +399,8 @@ int rt2x00mac_config(struct ieee80211_hw *hw, u32 changed)
 		rt2x00lib_disable_radio(rt2x00dev);
 	}
 
+	ERROR(rt2x00dev, "<===\n");
+
 	return 0;
 }
 EXPORT_SYMBOL_GPL(rt2x00mac_config);
@@ -399,6 +414,9 @@ int rt2x00mac_config_interface(struct ieee80211_hw *hw,
 	int update_bssid = 0;
 	int status = 0;
 
+	ERROR(rt2x00dev, "===>\n");
+	dump_stack();
+
 	/*
 	 * Mac80211 might be calling this function while we are trying
 	 * to remove the device or perhaps suspending it.
@@ -436,6 +454,9 @@ int rt2x00mac_config_interface(struct ieee80211_hw *hw,
 		status = rt2x00queue_update_beacon(rt2x00dev, vif,
 						   conf->enable_beacon);
 
+	ERROR(rt2x00dev, "<===\n");
+	dump_stack();
+
 	return status;
 }
 EXPORT_SYMBOL_GPL(rt2x00mac_config_interface);

  reply	other threads:[~2009-03-18 10:02 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-23 18:58 rt2x00 mesh support Antonio Marques
2009-01-23 19:02 ` Andrey Yurovsky
2009-01-24 11:40   ` António Marques
2009-03-15 11:54     ` Antonio Marques
2009-03-15 13:45       ` Ivo van Doorn
2009-03-16  1:58         ` Pat Erley
2009-03-16 13:29           ` Antonio Marques
2009-03-16 13:22         ` António Marques
2009-03-16 14:58           ` Ivo van Doorn
2009-03-16 19:12             ` Antonio Marques
2009-03-17  9:31               ` Ivo van Doorn
2009-03-17 14:11                 ` Johannes Berg
2009-03-17 20:10                   ` Johannes Berg
2009-03-17 21:50                     ` Ivo van Doorn
2009-03-17 21:53                       ` Johannes Berg
2009-03-17 22:04                         ` Ivo van Doorn
2009-03-17 22:35                           ` Johannes Berg
2009-03-17 23:01                             ` Ivo van Doorn
2009-03-17 23:04                               ` Johannes Berg
2009-03-18 10:02                                 ` Ivo van Doorn [this message]
2009-03-18 12:26                                   ` Antonio Marques
2009-03-18 12:48                                     ` Ivo van Doorn
2009-03-18 13:12                                       ` Johannes Berg
2009-03-18 13:31                                         ` Ivo van Doorn
2009-03-18 13:36                                           ` Johannes Berg
2009-03-19 21:55                                             ` Antonio Marques
2009-03-17 19:38                 ` Antonio Marques
2009-03-17 22:03                   ` Ivo van Doorn

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=200903181102.21380.IvDoorn@gmail.com \
    --to=ivdoorn@gmail.com \
    --cc=andrey@cozybit.com \
    --cc=froz@icix.org \
    --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 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.