RE: Re: [lwlan-devel] Linux-wlan-ng and xen
"Gee, David" <[email protected]> Tue, 20 Jun 2006 09:21:04 +0100
| Newsgroups | gmane.linux.linux-wlan.user |
|---|---|
| Message-ID | <!&!AAAAAAAAAAAuAAAAAAAAAKMVwzaH+vZFiuU+4oT9Td4BAOjzC44nDKxDvcyb4CZqxfoAAAAAyHAAABAAAAA+BDJgDhPAQaASOFyVLrjCAQAAAAA=@allpowerfuldave.com> |
Solomon, Attached is the udev patch which Richard produced. Both he and I run it successfully on FC5. Should there be any difference between a 'suspend' and a 'hibernate' (i.e. suspend-to-RAM and suspend-to-disk)? Regards, David -----Original Message----- From: Solomon Peachy [mailto:[email protected]] Sent: 19 June 2006 22:37 To: Richard Kennedy Cc: Gee, David; [email protected] Subject: Re: [lwlan-user] Re: [lwlan-devel] Linux-wlan-ng and xen On Sat, Jun 17, 2006 at 10:47:26AM +0100, Richard Kennedy wrote: > > 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 Can someone bounce me a copy of the current udev patch? > 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. Rather than being in the "create/destroy" functions, the refcounting should be in the probe/remove functions. And it also needs to handle errors on registration. This particular API call was there before 2.6.16, and it is also not used by most of the in-kernel USB drivers. So I'm honestly not sure when it's actually of use. > 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 :) The prism_usb's hardware is rather finiky, to stay the least.. but essentially, on a suspend, the hardware goes away but the driver does not. The driver needs to reset itself by basically going into ifstate_disable state. That said, in the case of USB I believe the device should be disconnecting itself from the bus, so the driver stack should go down and come back up cleanly. That's the theory, anyway.. - Solomon -- Solomon Peachy [email protected] AbsoluteValue Systems http://www.linux-wlan.com 721-D North Drive +1 (321) 259-0737 (office) Melbourne, FL 32934 +1 (321) 259-0286 (fax) _______________________________________________ Linux-wlan-user mailing list [email protected] http://lists.linux-wlan.com/mailman/listinfo/linux-wlan-user
udev.patch
(application/octet-stream, 3 KB)
Index: etc/udev/rules.d/40-prism2.rules
===================================================================
--- etc/udev/rules.d/40-prism2.rules (revision 0)
+++ etc/udev/rules.d/40-prism2.rules (revision 0)
@@ -0,0 +1 @@
+ACTION=="add",BUS=="usb",DRIVER=="prism2_usb" ,RUN+="/etc/wlan/wlan-udev.sh %k"
Property changes on: etc/udev/rules.d/40-prism2.rules
___________________________________________________________________
Name: svn:executable
+ *
Index: etc/wlan/shared
===================================================================
--- etc/wlan/shared (revision 1770)
+++ etc/wlan/shared (working copy)
@@ -49,12 +49,14 @@
ECHO=echo
fi
+if [ ! -n "$WLAN_UDEV" ] ; then
if [ -x /sbin/modprobe ] ; then
MODPROBE=/sbin/modprobe
else
${ECHO} "/sbin/modprobe not found."
exit 1
fi
+fi
if [ -x /sbin/wlanctl-ng ] ; then
WLANCTL=/sbin/wlanctl-ng
@@ -71,6 +73,7 @@
# exit 1
#fi
+if [ ! -n "$WLAN_UDEV" ] ; then
if [ -f /proc/sys/kernel/hotplug -a \
-x `cat /proc/sys/kernel/hotplug` -a \
-f /etc/hotplug/wlan.agent ] ; then
@@ -78,6 +81,7 @@
else
HAS_HOTPLUG=n
fi
+fi
# Source the wlan configuration
if [ -f /etc/wlan/wlan.conf ] ; then
@@ -122,6 +126,9 @@
#=======ENABLE IFSTATE=============================
# Bring the device into its operable state
+ # if running under udev module must be loaded to get here so skip checks
+ if [ ! -n "$WLAN_UDEV" ] ; then
+
$MODPROBE $1
# First, make sure the driver is loaded....
@@ -132,7 +139,7 @@
${ECHO} "the appropriate aliase(s)."
return 1
fi
-
+ fi
# Call the nsd script's fwload function, in case the card needs
# a firmware load, or could use an optional one.
Index: etc/wlan/wlan-udev.sh
===================================================================
--- etc/wlan/wlan-udev.sh (revision 0)
+++ etc/wlan/wlan-udev.sh (revision 0)
@@ -0,0 +1,25 @@
+#! /bin/bash
+
+
+# script to start prism2 wlan for fedora FC5 udev
+#udev rule
+#ACTION=="add",BUS=="usb",DRIVER=="prism2_usb",RUN+="/etc/wlan/wlan-udev.sh %k"
+
+
+
+DEVICE=$1
+WLAN_UDEV=1
+
+. /etc/wlan/shared
+
+wlan_bring_it_up $DEVICE $WLAN_WEXT
+if [ $? = 0 ] ; then
+ echo $DEVICE start OK
+ #allow time during boot to let other things start
+ sleep 5
+ /sbin/ifup $DEVICE
+else
+ echo $DEVICE failed to come up! >&2
+ exit 1
+fi
+
Property changes on: etc/wlan/wlan-udev.sh
___________________________________________________________________
Name: svn:executable
+ *
Index: etc/wlan/Makefile
===================================================================
--- etc/wlan/Makefile (revision 1770)
+++ etc/wlan/Makefile (working copy)
@@ -55,7 +55,7 @@
if [ ! -f $(TARGET_ROOT_ON_HOST)/etc/wlan/wlan.conf ] ; then \
cp wlan.conf $(TARGET_ROOT_ON_HOST)/etc/wlan/wlan.conf ; \
fi
- cp shared wlancfg-DEFAULT \
+ cp shared wlancfg-DEFAULT wlan-udev.sh \
$(TARGET_ROOT_ON_HOST)/etc/wlan
chmod 700 $(TARGET_ROOT_ON_HOST)/etc/wlan/wlancfg-*
echo FIRMWARE_DIR=$(FIRMWARE_DIR) >> $(TARGET_ROOT_ON_HOST)/etc/wlan/shared