Date: Tue, 23 Dec 2014 18:48:46 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276150 - head/sys/dev/ath Message-ID: <201412231848.sBNImk61079605@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Tue Dec 23 18:48:45 2014 New Revision: 276150 URL: https://svnweb.freebsd.org/changeset/base/276150 Log: Bump the valid GPIO range for rfkill up from 8 to 16. AR5416 and later NICs have more than 8 (Well, more than 6) GPIO pins. So to support rfkill on these NICs we need to bump this up or the rfkill GPIO pin may get reset to the wrong value. Noticed by: Anthony Jenkins <scoobi_doo@yahoo.com> Modified: head/sys/dev/ath/if_ath_sysctl.c Modified: head/sys/dev/ath/if_ath_sysctl.c ============================================================================== --- head/sys/dev/ath/if_ath_sysctl.c Tue Dec 23 16:33:44 2014 (r276149) +++ head/sys/dev/ath/if_ath_sysctl.c Tue Dec 23 18:48:45 2014 (r276150) @@ -446,7 +446,15 @@ ath_sysctl_rfsilent(SYSCTL_HANDLER_ARGS) return error; if (!ath_hal_setrfsilent(sc->sc_ah, rfsilent)) return EINVAL; - sc->sc_rfsilentpin = rfsilent & 0x1c; + /* + * Earlier chips (< AR5212) have up to 8 GPIO + * pins exposed. + * + * AR5416 and later chips have many more GPIO + * pins (up to 16) so the mask is expanded to + * four bits. + */ + sc->sc_rfsilentpin = rfsilent & 0x3c; sc->sc_rfsilentpol = (rfsilent & 0x2) != 0; return 0; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412231848.sBNImk61079605>