mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-22 11:17:19 +00:00
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>
This commit is contained in:
parent
132c449079
commit
70bd9518f1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=276150
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user