[Prism54-users] FYI: Master Mode / Ad-hoc mode broken

Bjørn Mork bjorn@mork.no
Tue, 02 Dec 2003 09:38:15 +0100


--=-=-=
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

"Luis R. Rodriguez" <mcgrof@studorgs.rutgers.edu> writes:

> While finally doing some tests for Master Mode I noticed Master mode can
> only be enabled if you
>
> ifconfig eth1 up
> iwconfig eth1 mode Master essid haha commit
> ifconfig eth1 down
> ifconfig eth1 up
>
> Maybe this will work for Ad-Hoc as well. This is obviously a bug and I
> will work on it now.

I've never had to do that.  This was sufficient with a 2003-11-30 CVS
checkout (and also earlier versions):

     modprobe prism54
     ifconfig eth1 up
     iwconfig eth1 mode master essid haha

But that might me due to the attached patch, which I'm still using
(previously posted in -devel).


Bj=F8rn


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline; filename=reset-freq.patch

Index: ksrc/isl_ioctl.c
===================================================================
RCS file: /var/lib/cvs/prism54-ng/ksrc/isl_ioctl.c,v
retrieving revision 1.68
diff -u -r1.68 isl_ioctl.c
--- ksrc/isl_ioctl.c	30 Nov 2003 17:53:31 -0000	1.68
+++ ksrc/isl_ioctl.c	2 Dec 2003 04:39:54 -0000
@@ -674,6 +674,16 @@
 	priv->mib.config = cardconfig;
 	priv->mib.mlmeautolevel = mlmeautolevel;
 
+	if (*uwrq == IW_MODE_MASTER) {
+		/* reset the channel/frequency */
+		if (priv->mib.frequency)
+			MGT_SET_REQUEST_U32(priv, DOT11_OID_FREQUENCY,
+					    priv->mib.frequency);
+		else     /* frequency == 0 -> use channel value */
+			MGT_SET_REQUEST_U32(priv, DOT11_OID_CHANNEL, 
+					    priv->mib.channel);
+	}
+
 	/* We need to reset the ssid for non-master modes, and also
 	 *  the 802.11d conformance. Don't do it if we are in master or
 	 *  monitor mode.

--=-=-=--