Discussion:
Linux-wlan-ng and xen
Gee, David
2006-06-13 08:07:15 UTC
Permalink
Hi,

I'm running Fedora Core 5, and I have a Netgear MA111 prism2_usb device,
which has been working quite happily up to now. Last night I tried using the
Xen virtualisation engine as I wanted to play around with it. However, it
seems as soon as I start the xend (Xen daemon) service, my wlan0 connection
dies. The /proc/net/p80211/wlan0 entry disappears, and for some reason a
/proc/net/p80211/wlan1 entry appears in its place. However, wlan1 will not
start, and restarting the wlan service has no effect. Neither does removing
and reinserting the wireless adapter. The only way to get the network back
up is to reboot the entire box.

I'm running kernel-2.6.16-1.2133_FC5xen0, with linux-wlan-ng 0.2.3, with the
udev patch necessary to make it work on FC5.

Has anyone else observed this behaviour with Xen? Any pointers as to how I
might resolve this?

Regards,
David
Richard Kennedy
2006-06-14 20:18:54 UTC
Permalink
Post by Gee, David
Hi,
I'm running Fedora Core 5, and I have a Netgear MA111 prism2_usb
device, which has been working quite happily up to now. Last night I
tried using the Xen virtualisation engine as I wanted to play around
with it. However, it seems as soon as I start the xend (Xen daemon)
service, my wlan0 connection dies. The /proc/net/p80211/wlan0 entry
disappears, and for some reason a /proc/net/p80211/wlan1 entry appears
in its place. However, wlan1 will not start, and restarting the wlan
service has no effect. Neither does removing and reinserting the
wireless adapter. The only way to get the network back up is to reboot
the entire box.
I'm running kernel-2.6.16-1.2133_FC5xen0, with linux-wlan-ng 0.2.3,
with the udev patch necessary to make it work on FC5.
Has anyone else observed this behaviour with Xen? Any pointers as to
how I might resolve this?
Regards,
David
Hi David,

I've not run Xen, so can't help you there, but are you using the usb
device reference counting patch I posted a while ago ?

My machine would hang on the resume after a suspend, and the patch fixed
it. I'm guessing that as your device changes number 0 -> 1, that it's
not getting cleaned up properly and may be the same sort of issue.

Is the wlan module getting unloaded properly when you start Xen? Are you
seeing anything useful/unusual in the log ?

BTW -- my wlan device doesn't work immediately after a resume , but the
laptop restarts and I can sometimes unload /reload the wlan device to
get it back. So it's not a full solution but might help a bit :)

Cheers
Richard
Gee, David
2006-07-12 19:02:04 UTC
Permalink
Just a quick follow-up regarding my experiences using xen and
linux-wlan-ng together. A month after I originally posted, I have now
got linux-wlan-ng and xen to play nicely together. I haven't made any
configuration changes, and the only major software change is that I am
now using the Fedora stock 2.6.17 kernel instead of the 2.6.16 that (I
think) I was using when I originally posted about this.

Hope this helps someone - it's useful to know the problem wasn't with
linux-wlan-ng at any rate.

Regards
David
Richard,
The patch doesn't have any detrimental effect - at least, the
suspend/resume problems you describe haven't affected my machine, and
I've even noticed that the interface seems to get an IP address after
resume which it wasn't doing before. Unfortunately, it doesn't solve the
problem I was having with xen - it (or something at least) is still
getting confused about whether it's a wlan0 or a wlan1. The config is
all set up for a wlan0, but when I start xen, the interface dies and
when I reload it, it reloads with wlan1 in /proc/net/p80211, rather than
wlan0, so nothing much works after that. I'm wondering if there's
anything in my xen setup I can fiddle with - it does all sorts of weird
things, setting up a network bridge and virtual interfaces left right
and centre so I wonder if fiddling with some of that will help.
Regards
David
Post by Richard Kennedy
Richard,
Thanks for your thoughts. Where can I get hold of this patch from? Is
there an SVN or CVS repo with all the patches in - I'm already running
the FC5 udev patch, now there's this reference counting one too - it
would be nice if I could download a 'clean' copy from somewhere. I
haven't had time to do much in-depth diagnosis of the problem yet.
Unloading and reloading it didn't work, even if I stopped the xen
service, something somewhere was getting well and truly broken. Since
you mention resume I'll bring up something else odd I've noticed - for
some reason after a resume, my card (a Netgear MA111 USB thingy)
doesnn't pick up and IP address and I have to do an ifdown and ifup to
get it to pick up an address. Any ideas?
Regards
David
David,
Here's the patch. I posted it to to wlan-dev list some time ago, but it
didn't generate much interest. So, I don't think anyone else has tried
it -- you may want to proceed with caution :).
I'll be very interested to know if you try this and what effect ( if
any) it has.
Patches just get posted to the wlan-dev list, and Solomon includes them
in his SVN repos -- if he likes them!
I don't know what's happening with suspend/resume, it doesn't work for
me at all. Without the attached patch my laptop hangs on resume -- with
it the wlan card doesn't start up again but everything else is OK.
However, I had the same thing with dhcp-ing a ip address on boot - so I
added a delay into the wlan-udev script and that solved it. I'm guessing
that it's just a sequence/ timing issue somewhere. I'm not sure where
you could put a delay into the resume cycle -- but if you can find
somewhere it may help.
My card is built in to the laptop so never gets removed -- and I find
that if the module get unloaded without being disabled first, it hangs
and will never accept usb commands (messages in the log), until it's had
a full power cycle. Maybe your seeing something similar ?
I would like to get the driver to send the disable message to the card
on module unload and see if that helps. but I haven't 1) found the right
place in the code to put it and 2) found the time to do much with it :)
Cheers
Richard
------------------------------------------------------------------------
Index: src/prism2/driver/hfa384x_usb.c
===================================================================
--- src/prism2/driver/hfa384x_usb.c (revision 1772)
+++ src/prism2/driver/hfa384x_usb.c (working copy)
@@ -686,7 +686,13 @@
DBFENTER;
memset(hw, 0, sizeof(hfa384x_t));
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16))
+ // ref count the usb device
+ hw->usb = usb_get_dev(usb);
+#else
hw->usb = usb;
+#endif
/* set up the endpoints */
hw->endp_in = usb_rcvbulkpipe(usb, 1);
@@ -784,7 +790,12 @@
/* Now to clean out the auth queue */
while ( (skb = skb_dequeue(&hw->authq)) ) {
dev_kfree_skb(skb);
- }
+ }
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16))
+ // release ref count on usb device
+ usb_put_dev(hw->usb);
+#endif
DBFEXIT;
}
------------------------------------------------------------------------
_______________________________________________
Linux-wlan-user mailing list
http://lists.linux-wlan.com/mailman/listinfo/linux-wlan-user
Loading...