[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-wlan-devel
Subject:    [lwlan-devel] [PATCH] for wlan-ng and shared scripts
From:       Joshua Weage <weage98 () yahoo ! com>
Date:       2004-04-28 18:36:57
Message-ID: 20040428183657.17542.qmail () web40411 ! mail ! yahoo ! com
[Download RAW message or body]

Here are two patches for your consideration:

-- BEGIN PATCH --
*** wlan-ng     2004-02-13 13:45:58.000000000 -0500
--- /etc/pcmcia/wlan-ng 2004-04-28 14:17:20.008242872 -0400
***************
*** 55,60 ****
--- 55,63 ----
      exit 1
  }

+ # Set PCMCIA so PCI specific setup is skipped in wlan/shared
+ export PCMCIA=true
+
  if [ "$3" = "debug" ]; then set -x ; fi

  # Note: this 'shared' comes with the WLAN package


-- END PATCH --

This patch adds the environment variable PCMCIA to the
/etc/pcmcia/wlan-ng script.  It is used in the next patch:

-- BEGIN PATCH --
*** shared      2004-02-13 13:47:37.000000000 -0500
--- /etc/wlan/shared    2004-04-28 14:04:29.626358720 -0400
***************
*** 112,118 ****
        #=======ENABLE IFSTATE=============================
        # Bring the device into its operable state

!       $MODPROBE $1

        # First, make sure the driver is loaded....
        if ! ifconfig $1 > /dev/null 2>&1 ; then
--- 112,121 ----
        #=======ENABLE IFSTATE=============================
        # Bring the device into its operable state

!         # PCMCIA device modules are already loaded
!         if [ "x$PCMCIA" = "x" ]; then
!         $MODPROBE $1
!         fi

        # First, make sure the driver is loaded....
        if ! ifconfig $1 > /dev/null 2>&1 ; then
***************
*** 127,136 ****
        # a firmware load, or could use an optional one.

        nsdname=`wlan_nsdname $1`
!       if ! ${nsdname}_fwload $1 ; then
!               ${ECHO} "Firmware failed to load for device $1"
!               return 1
!       fi

        # Enable the interface
        result=`$WLANCTL $1 lnxreq_ifstate ifstate=enable`
--- 130,142 ----
        # a firmware load, or could use an optional one.

        nsdname=`wlan_nsdname $1`
!
!         if is_true $WLAN_FIRMWARE; then
!         if ! ${nsdname}_fwload $1 ; then
!           ${ECHO} "Firmware failed to load for device $1"
!           return 1
!         fi
!         fi

        # Enable the interface
        result=`$WLANCTL $1 lnxreq_ifstate ifstate=enable`
-- END PATCH --

This patch is for /etc/wlan/shared.  If the device is a PCMCIA device,
it doesn't attempt to load the device module as that has already been
done by cardmgr.  This also gets rid of an error message for PCMCIA
users who haven't added an alias for the wlan device into modules.conf.
 In addition, the patch adds another config variable WLAN_FIRMWARE
which must be set to true before the script will attempt to load new
firmware.

In my opinion, the wlan-ng setup scripts should not attempt to load
firmware without the end user enabling this functionality.  It also
removes error messages for those users who don't have new firmwares.

Josh

=====



	
		
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 
_______________________________________________
Linux-wlan-devel mailing list
Linux-wlan-devel@lists.linux-wlan.com
http://lists.linux-wlan.com/mailman/listinfo/linux-wlan-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic