Changeset 1355

Show
Ignore:
Timestamp:
12/14/05 11:04:53 (3 years ago)
Author:
mrenzmann
Message:

This patch fixes the following softled issues:


  • The GPIO pin isn't set to output mode after HAL reset
  • The LED isn't switched off at module unload
  • If sc_blinking is true, and the card is reset'ed, the LED doesn't
    work any longer


Signed-off-by: Sven Schnelle <svens@gmx.de>

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ath/if_ath.c

    r1349 r1355  
    18141814        } 
    18151815 
     1816        if (sc->sc_softled) 
     1817                ath_hal_gpioCfgOutput(ah, sc->sc_ledpin); 
    18161818        /* 
    18171819         * This is needed only to setup initial state 
     
    19031905                        if (sc->sc_softled) { 
    19041906                                del_timer(&sc->sc_ledtimer); 
    1905                                 ath_hal_gpioset(ah, sc->sc_ledpin, 1); 
     1907                                ath_hal_gpioset(ah, sc->sc_ledpin, !sc->sc_ledon); 
     1908                                sc->sc_blinking=0; 
     1909                                sc->sc_ledstate=1; 
    19061910                        } 
    19071911                } 
     
    19141918                ath_beacon_free(sc);            /* XXX needed? */ 
    19151919        } 
     1920        if (sc->sc_softled) 
     1921                ath_hal_gpioset(ah, sc->sc_ledpin, !sc->sc_ledon); 
     1922         
    19161923        return 0; 
    19171924} 
     
    19891996                printk("%s: %s: unable to start recv logic\n", 
    19901997                        dev->name, __func__); 
     1998        if (sc->sc_softled) 
     1999                ath_hal_gpioCfgOutput(ah, sc->sc_ledpin); 
     2000 
    19912001        /* 
    19922002         * We may be doing a reset in response to an ioctl 
     
    74537463                        return EIO; 
    74547464                } 
     7465 
     7466                if (sc->sc_softled) 
     7467                        ath_hal_gpioCfgOutput(ah, sc->sc_ledpin); 
     7468                 
    74557469                sc->sc_curchan = hchan; 
    74567470                ath_update_txpow(sc);           /* update tx power state */ 
     
    89658979                                if (val != sc->sc_softled) { 
    89668980                                        if (val) 
    8967                                                 ath_hal_gpioCfgOutput(ah, 
    8968                                                         sc->sc_ledpin); 
    8969                                         ath_hal_gpioset(ah, sc->sc_ledpin,!val); 
     8981                                                ath_hal_gpioCfgOutput(ah, sc->sc_ledpin); 
     8982                                        ath_hal_gpioset(ah, sc->sc_ledpin,!sc->sc_ledon); 
    89708983                                        sc->sc_softled = val; 
    89718984                                }