[Linux-wlan-ng-devel] patches from Debian
Victor Seva
linuxmaniac at torreviejawireless.org
Sun Feb 5 14:45:00 UTC 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi we are working on 0.2.4+svn20060128-2 and we wish to share our patches with upstream's authors.
* etc/wlan/shared ( SRC_etc_wlan_shared.dpatch )
+ there is a call to wland, nonexistent now
- debian stuff ( loop if there are shared.*.dpkg* files )
+ a root security hole ( using /var/run/linux-wlan-ng instead /tmp )
* src/prism2/driver/prism2_cs.c ( SRC_src_prism2_driver_prism2_cs_c.dpatch )
+ changes for 2.4.27 kernel
* man/prism2dl.1 ( DOC_man_prism2dl_1.dpatch )
+ Created a minimal man file in order to Debian's rules, all executable must have a man page
I think the other changes are Debian only.
Thanks
- --
Victor Seva
linuxmaniac en torreviejawireless.org
http://www.torreviejawireless.org
http://linuxmaniac.homeip.net
jabber: linuxmaniac en jabber.torreviejawireless.org
PGP Key ID: 0xDD12F253
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFD5g9sS/DSSd0S8lMRAto2AJ9uJsMMXCCehXRCqIOqvGNvqhV+5wCfaXNq
uLaOEwtY9oJy38ewj50/QEg=
=biij
-----END PGP SIGNATURE-----
------------ próxima parte ------------
#! /bin/sh /usr/share/dpatch/dpatch-run
## SRC_etc_wlan_shared.dpatch by Victor Seva <linuxmaniac en torreviejawireless.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Remove call to wland.
## DP: Check for shared.dpkg files.
## DP: Remove use of /tmp we use /var/run instead.
@DPATCH@
diff -urNad trunk~/etc/wlan/shared trunk/etc/wlan/shared
--- trunk~/etc/wlan/shared 2006-02-04 10:39:59.000000000 +0100
+++ trunk/etc/wlan/shared 2006-02-04 10:42:40.000000000 +0100
@@ -63,12 +63,13 @@
exit 1
fi
-if [ -x /sbin/wland ] ; then
- WLAND=/sbin/wland
-else
- ${ECHO} "/sbin/wland not found."
- exit 1
-fi
+# linux-wlan-ng > 0.2.4 there is no wland
+#if [ -x /sbin/wland ] ; then
+# WLAND=/sbin/wland
+#else
+# ${ECHO} "/sbin/wland not found."
+# exit 1
+#fi
if [ -f /proc/sys/kernel/hotplug -a \
-x `cat /proc/sys/kernel/hotplug` -a \
@@ -89,9 +90,15 @@
# Source NSD specific functions
# nsd_fwload
# nsd_mibset
-for i in /etc/wlan/shared.* ; do
- . $i
-done
+# Debian mod. If there is shared.dpkg-old we get a endless loop
+if [ "`ls /etc/wlan/shared.* 2>/dev/null`" ]; then
+ for i in `find /etc/wlan -name 'shared.*' -and -not -name '*.dpkg*'` ; do
+ . $i
+ done
+else
+ ${ECHO} "/etc/wlan/shared.* not found."
+ exit 0
+fi
is_true ()
{
@@ -574,9 +581,9 @@
# Collect the current scheme name and save the file
if [ -r $WLAN_SCHEMEFILE ] ; then
WLAN_SCHEME=`cat $WLAN_SCHEMEFILE`
- cp $WLAN_SCHEMEFILE /tmp/wlan_scheme_`date +"%T"`.tmp
+ cp $WLAN_SCHEMEFILE /var/run/wlan_scheme_`date +"%T"`.tmp
else
- touch /tmp/wlan_scheme_`date +"%T"`.tmp
+ touch /var/run/wlan_scheme_`date +"%T"`.tmp
fi
@@ -604,7 +611,7 @@
WLAN_SCHEMEFILE="/var/run/pcmcia-scheme"
fi
- TMPFILE=`ls /tmp/wlan_scheme*.tmp | tail -n 1`
+ TMPFILE=`ls /var/run/wlan_scheme*.tmp | tail -n 1`
if [ -r $TMPFILE ] ; then
cat $TMPFILE > $WLAN_SCHEMEFILE
------------ próxima parte ------------
#! /bin/sh /usr/share/dpatch/dpatch-run
## SRC_src_prism2_driver_prism2_cs_c.dpatch by <Victor Seva <linuxmaniac en torreviejawireless.org>>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Changes for old 2.4.27 kernel.
@DPATCH@
diff -urNad linux-wlan-ng-0.2.2+dfsg~/src/prism2/driver/prism2_cs.c linux-wlan-ng-0.2.2+dfsg/src/prism2/driver/prism2_cs.c
--- linux-wlan-ng-0.2.2+dfsg~/src/prism2/driver/prism2_cs.c 2005-10-20 22:02:13.000000000 +0200
+++ linux-wlan-ng-0.2.2+dfsg/src/prism2/driver/prism2_cs.c 2005-10-20 22:06:19.000000000 +0200
@@ -22,7 +22,12 @@
* says.
*/
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11) )
-#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,8))
+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,27))
+MODULE_PARM( irq_mask, "i");
+MODULE_PARM( irq_list, "1-4i");
+MODULE_PARM( prism2_ignorevcc, "i");
+#else
+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,8))
static int numlist = 4;
module_param_array(irq_list, int, numlist, 0444);
#else
@@ -30,6 +35,7 @@
#endif
module_param( irq_mask, int, 0644);
#endif
+#endif
static dev_link_t *dev_list = NULL; /* head of instance list */
------------ próxima parte ------------
#! /bin/sh /usr/share/dpatch/dpatch-run
## DOC_man_prism2dl_1.dpatch by Victor Seva <linuxmaniac en torreviejawireless.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Creates the prism2dl manpage.
@DPATCH@
diff -urNad --exclude=CVS --exclude=.svn ./man/prism2dl.1 /tmp/dpep-work.20byvp/linux-wlan-ng-0.2.2/man/prism2dl.1
--- ./man/prism2dl.1 1970-01-01 01:00:00.000000000 +0100
+++ /tmp/dpep-work.20byvp/linux-wlan-ng-0.2.2/man/prism2dl.1 2005-09-18 16:16:56.000000000 +0200
@@ -0,0 +1,93 @@
+.TH PRISM2DL 8
+.SH NAME
+prism2dl \- 802.11 frame dump utility
+.SH SYNOPSIS
+.B prism2dl [OPTIONS] devname
+.SH DESCRIPTION
+.B prism2dl
+User utility for downloading prism2 images
+.SH OPTIONS
+.TP
+.B -s (status)
+Show CIS, PDA from card and exit
+.TP
+.B -v (verbose)
+Show more status info during operation
+.TP
+.B -V (Version)
+Show version and exit
+.TP
+.B -n (nowrite)
+Do all processing, including card PDA read but do not write to card
+.TP
+.B -d (debug)
+Do all processing, excluding card PDA read but do not write to card. A valid
+interface name is _not_ required for this mode.
+.TP
+.B -g (generate)
+Show the PDA in a format readable by this program. Useful for saving the
+existing from a card.
+.SH IMAGEFILE OPTIONS
+.TP
+.B -r <file> (ram)
+Load SREC file to card RAM. This option may be specified multiple times.
+If the value is "stdin", the file will be read from stdin and the option
+may only be specified once.
+.TP
+.B -f <file> (flash)
+Load SREC file to card FLASH. This option may be specified multiple times.
+If the value is "stdin", the file will be read from stdin and the option
+may only be specified once.
+.SH PDA OPTIONS
+.TP
+.B -a <file> (addpdr)
+Add the PDRs from file to the PDA from card. This option may be specified
+multiple times.
+.TP
+.B -p <file> (pda)
+Replace the card PDA with the contents of file.
+.TP
+.B -m <haddr> (macaddr)
+Overwrite the MAC address PDR with the given value.
+<addr> ::= xx:xx:xx:xx:xx:xx, where xx is a two digit hex number.
+.TP
+.B -S <str> (Sernum)
+Overwrite the serial number PDR with the given string. String must be <= 12
+characters, any extra will be truncated.
+.TP
+.B -l <adrr> (padloc)
+PDA location in card memory. Commonly values:
+ HFA3841 ==> 0x003f0000
+ HFA3842 ==> 0x007f0000
+.TP
+.B devname
+Linux device name (e.g. eth0, wlan0)
+.SH EXAMPLES
+Review card status:
+ prism2dl -s wlan0
+
+Load a new PDA:
+ prism2dl -p pdafile.txt wlan0
+ or
+ prism2dl -p pdafile.txt -a pda1.txt -a pda2.txt wlan0
+
+ Note that the f/w images will most likely contain bogus plug info after
+ rewriting the PDA by itself. It is generally recommended to reload the
+ primage and secondary images at the same time as modifying the PDA.
+
+Load a FLASH image _and_ PDA:
+ prism2dl -p pdafile.txt -f CIS.hex -f primary.hex -f secondary.hex wlan0
+
+Load a RAM image:
+ prism2dl -a pda1.txt -r tertiary.hex
+
+Note: PDA records are additive starting with the records from the card
+ OR the records from the -p specified file. -a specified file(s)
+ overwrite, append, or remove records one at a time. If multiple
+ files are specified using the -a option, the files are processed
+ from left to right. This implies that a record removed from the
+ current working PDA may then be added again by a record that
+ appears after the "remove" record in the file set.
+.P
+.SH AUTHOR
+This minimal man page was written by Victor Seva.
More information about the Linux-wlan-ng-devel
mailing list