Browse Source

Patches from Debian, via Victor Seva:

* 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
origin
solomon 17 years ago
parent
commit
b4ac1c80f3
  1. 4
      CHANGES
  2. 31
      etc/wlan/shared
  3. 93
      man/prism2dl.1
  4. 6
      src/prism2/driver/prism2_cs.c

4
CHANGES

@ -41,6 +41,10 @@
* Intersil Corporation as part of PRISM(R) chipset product development.
*
* --------------------------------------------------------------------
- Patches from Debian (via Victor Seva)
- Fix bugs in /etc/wlan/shared, including a security hole
- Fix build on 2.4.27 kernel
- Added man page for prism2dl
- Generate a WEXT Event when we gain/lose association.
- Make prism2_defer query ssid and bssid, as IBSS mode has this change.
- Clean up prism2_defer_timer a bit.

31
etc/wlan/shared

@ -63,12 +63,13 @@ else
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 @@ fi
# 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 @@ wlan_set_ssid_schemefile ()
# 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_restore_schemefile ()
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

93
man/prism2dl.1

@ -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.

6
src/prism2/driver/prism2_cs.c

@ -22,6 +22,11 @@ static u_int prism2_ignorevcc=0; /* Boolean, if set, we
* says.
*/
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11) )
#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);
@ -30,6 +35,7 @@ module_param_array(irq_list, int, NULL, 0444);
#endif
module_param( irq_mask, int, 0644);
#endif
#endif
static dev_link_t *dev_list = NULL; /* head of instance list */

Loading…
Cancel
Save