wpasupplicant hack. trivilal NM patch
- From: "Gergely Gábor" <elentirmo gilgalad gmail com>
- To: networkmanager-list gnome org
- Subject: wpasupplicant hack. trivilal NM patch
- Date: Sun, 3 Dec 2006 16:59:49 +0100
Wpasupplicant patch to set the channel to channel 1 when switching to
ad-hoc mode. AFAIK when joining a cell, setting the freq/channel does
nothing, and is ignored, but when creting a cell, Intel ipw2200 needs
it. this make the "Create a new wireless network" (or similiarly
named) menu item of the nm-applet usaeble on these cards. I further
patch to NM is also advice, to switch the card to 11Mbps ahen
switching to adhoc (as AFAIK it is the standard maximal rate for
adhoc). Ii is also included, but not tested! (NM doesen't compile on
my on my OS (fc6 ) after a dbus update. will check the cvs-head out
too. when I'll have some time.)
A patch to NM is also included (don't know if this is fixed in the
HEAD). This isa patc to the backend of RedHat.c this changes the
pidfile of mDNSdispatcher to thatof avahi-daemon, as avahi is used in
FC6, and will be usen in the future (it is a fully GPL project,
developing quickly). I have laso changed the signal to SIGHUP as
avahi's manual claims that is needed to restart the daemon.
wpa_spplicant is 0.4.9
NM is 0.6.4
both include distro patches, but hopefully these do not interfere with mine.
Should these be useful to anyone, I'm happy to share. All
advice/feedback is welcome.
Gábor Gergely.
--- wpa_supplicant-0.4.9_orig/driver_wext.c 2006-12-01 19:40:56.000000000 +0100
+++ wpa_supplicant-0.4.9/driver_wext.c 2006-12-02 15:44:34.000000000 +0100
@@ -1786,6 +1786,16 @@
ret = -1;
}
+/* <hack>
+ * add the ipw (and perharps other cards) BSSID/adhoc ?standards? compliance stuff
+ */
+ if (iwr.u.mode == IW_MODE_ADHOC ){
+ /* set frequency to a default freq. */
+ #define AD_HOC_DEFAULT_FREQ 2412
+ wpa_driver_wext_set_freq(drv, AD_HOC_DEFAULT_FREQ );
+ }
+/* </hack> */
+
return ret;
}
--- NetworkManager-0.6.4/src/nm-dbus-nm.c 2006-05-21 19:28:02.000000000 +0200
+++ NetworkManager-0.6.4-gg/src/nm-dbus-nm.c 2006-12-02 16:03:18.000000000 +0100
@@ -385,6 +385,9 @@
new_ap = nm_ap_new ();
nm_ap_set_essid (new_ap, essid);
nm_ap_set_mode (new_ap, IW_MODE_ADHOC);
+/*<hack>*/
+ nm_ap_set_freq (new_ap, 11);
+/*</hack>*/
nm_ap_set_security (new_ap, security);
g_object_unref (G_OBJECT (security));
nm_ap_set_user_created (new_ap, TRUE);
--- NetworkManager-0.6.4-gg/src/backends/NetworkManagerRedHat.c 2006-07-13 18:43:53.000000000 +0200
+++ NetworkManager-0.6.4/src/backends/NetworkManagerRedHat.c 2006-12-03 16:32:39.000000000 +0100
@@ -298,15 +298,15 @@
{
FILE *fp = NULL;
- if ((fp = fopen ("/var/run/mDNSResponder.pid", "rt")))
+ if ((fp = fopen ("/var/run/avahi-daemon/pid", "rt")))
{
int pid;
int res = fscanf (fp, "%d", &pid);
fclose (fp);
if (res == 1)
{
- nm_info ("Restarting mDNSResponder.");
- kill (pid, SIGUSR1);
+ nm_info ("Restarting Avahi-Deamon.");
+ kill (pid, SIGHUP);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]