[lwlan-devel] enable card automatically
Solomon Peachy
solomon at linux-wlan.com
Wed Jan 30 17:13:36 EST 2008
On Mon, Jan 28, 2008 at 05:34:28PM +0100, Tormod Volden wrote:
> I have always used the wlan_wext_write=1 option, so I don't think it
> is enough. Is this option meant to enable the interface automatically,
> in addition to allow for wext ioctls? Does it work for anyone else
> (without extra wlanctl-ng calls, of course)?
You're correct. I keep forgetting just how old the codebase is.
Basically after the device has been initialzied, we need to issue an
prism2sta_ifstate(hw, P80211ENUM_ifstate_enable) call to kick the
hardware into a running state.
Try the attached patch. It's completely untested but should do the
trick -- if wlan_wext_write is enabled, that is.
- Solomon
--
Solomon Peachy solomon at linux-wlan.com
AbsoluteValue Systems http://www.linux-wlan.com
721-D North Drive +1 (321) 259-0737 (office)
Melbourne, FL 32934 +1 (321) 259-0286 (fax)
-------------- next part --------------
Index: p80211/p80211netdev.c
===================================================================
--- p80211/p80211netdev.c (revision 1841)
+++ p80211/p80211netdev.c (working copy)
@@ -1062,9 +1062,23 @@
}
#endif
+ if (wlan_wext_write) {
+/*
+ // fake out a call to ifstate_enable!
+ p80211msg_lnxreq_ifstate_t msg;
+ memset(&msg, 0, sizeof(msg));
+ msg.msgcode = DIDmsg_lnxreq_ifstate;
+ msg.msglen = sizeof(msg);
+ msg.ifstate.status = P80211ENUM_msgitem_status_data_ok;
+ msg.ifstate.data = P80211ENUM_ifstate_enable;
+
+ p80211req_dorequest(wlandev, &msg);
+*/
+ } else {
#ifdef CONFIG_HOTPLUG
- p80211_run_sbin_hotplug(wlandev, WLAN_HOTPLUG_REGISTER);
+ p80211_run_sbin_hotplug(wlandev, WLAN_HOTPLUG_REGISTER);
#endif
+ }
DBFEXIT;
return 0;
Index: prism2/driver/prism2_plx.c
===================================================================
--- prism2/driver/prism2_plx.c (revision 1840)
+++ prism2/driver/prism2_plx.c (working copy)
@@ -276,8 +276,10 @@
wlandev->msdstate = WLAN_MSD_HWPRESENT;
+ if (wlan_wext_write)
+ prism2sta_ifstate(wlandev, P80211ENUM_ifstate_enable);
+
result = 0;
-
goto done;
failed:
Index: prism2/driver/prism2_cs.c
===================================================================
--- prism2/driver/prism2_cs.c (revision 1840)
+++ prism2/driver/prism2_cs.c (working copy)
@@ -577,6 +577,9 @@
/* And now we're done! */
wlandev->msdstate = WLAN_MSD_HWPRESENT;
+ if (wlan_wext_write)
+ prism2sta_ifstate(wlandev, P80211ENUM_ifstate_enable);
+
goto done;
cs_failed:
Index: prism2/driver/prism2sta.c
===================================================================
--- prism2/driver/prism2sta.c (revision 1840)
+++ prism2/driver/prism2sta.c (working copy)
@@ -2279,8 +2279,8 @@
wlandev = (wlandevice_t *) pci_get_drvdata(pdev);
if (wlandev) {
- prism2sta_ifstate(wlandev, P80211ENUM_ifstate_disable);
p80211_resume(wlandev);
+ prism2sta_ifstate(wlandev, P80211ENUM_ifstate_enable);
}
return 0;
Index: prism2/driver/prism2_usb.c
===================================================================
--- prism2/driver/prism2_usb.c (revision 1840)
+++ prism2/driver/prism2_usb.c (working copy)
@@ -167,6 +167,9 @@
wlandev->msdstate = WLAN_MSD_HWPRESENT;
+ if (wlan_wext_write)
+ prism2sta_ifstate(wlandev, P80211ENUM_ifstate_enable);
+
goto done;
failed:
Index: prism2/driver/prism2_pci.c
===================================================================
--- prism2/driver/prism2_pci.c (revision 1840)
+++ prism2/driver/prism2_pci.c (working copy)
@@ -167,6 +167,9 @@
wlandev->msdstate = WLAN_MSD_HWPRESENT;
+ if (wlan_wext_write)
+ prism2sta_ifstate(wlandev, P80211ENUM_ifstate_enable);
+
result = 0;
goto done;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.linux-wlan.com/pipermail/linux-wlan-devel/attachments/20080130/f1742f57/attachment.bin
More information about the Linux-wlan-devel
mailing list