Ticket #227: madwifi-ng-led.diff
| File madwifi-ng-led.diff, 2.0 kB (added by svens@gmx.de, 3 years ago) |
|---|
-
ath/if_ath.c
old new 1813 1816 goto done; 1814 1817 } 1815 1818 1819 if (sc->sc_softled) 1820 ath_hal_gpioCfgOutput(ah, sc->sc_ledpin); 1816 1821 /* 1817 1822 * This is needed only to setup initial state 1818 1823 * but it's best done after a reset. … … 1902 1907 ath_hal_intrset(ah, 0); 1903 1908 if (sc->sc_softled) { 1904 1909 del_timer(&sc->sc_ledtimer); 1905 ath_hal_gpioset(ah, sc->sc_ledpin, 1); 1910 ath_hal_gpioset(ah, sc->sc_ledpin, !sc->sc_ledon); 1911 sc->sc_blinking=0; 1912 sc->sc_ledstate=1; 1906 1913 } 1907 1914 } 1908 1915 ath_draintxq(sc); … … 1913 1920 sc->sc_rxlink = NULL; 1914 1921 ath_beacon_free(sc); /* XXX needed? */ 1915 1922 } 1923 if (sc->sc_softled) 1924 ath_hal_gpioset(ah, sc->sc_ledpin, !sc->sc_ledon); 1925 1916 1926 return 0; 1917 1927 } 1918 1928 … … 1988 1998 if (ath_startrecv(sc) != 0) /* restart recv */ 1989 1999 printk("%s: %s: unable to start recv logic\n", 1990 2000 dev->name, __func__); 2001 if (sc->sc_softled) 2002 ath_hal_gpioCfgOutput(ah, sc->sc_ledpin); 2003 1991 2004 /* 1992 2005 * We may be doing a reset in response to an ioctl 1993 2006 * that changes the channel so update any state that … … 7452 7465 ath_get_hal_status_desc(status), status); 7453 7466 return EIO; 7454 7467 } 7468 7469 if (sc->sc_softled) 7470 ath_hal_gpioCfgOutput(ah, sc->sc_ledpin); 7471 7455 7472 sc->sc_curchan = hchan; 7456 7473 ath_update_txpow(sc); /* update tx power state */ 7457 7474 … … 8964 8981 case ATH_SOFTLED: 8965 8982 if (val != sc->sc_softled) { 8966 8983 if (val) 8967 ath_hal_gpioCfgOutput(ah, 8968 sc->sc_ledpin); 8969 ath_hal_gpioset(ah, sc->sc_ledpin,!val); 8984 ath_hal_gpioCfgOutput(ah, sc->sc_ledpin); 8985 ath_hal_gpioset(ah, sc->sc_ledpin,!sc->sc_ledon); 8970 8986 sc->sc_softled = val; 8971 8987 } 8972 8988 break;
