diff options
author | wpaul <wpaul@FreeBSD.org> | 1999-05-07 03:28:54 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1999-05-07 03:28:54 +0000 |
commit | 7a9444f4dea5e4c72b660c15e5b27916a99f8f27 (patch) | |
tree | 0258f003c62f45b91789a2de933d0432ff45d53d /sys/i386/isa/if_wi.c | |
parent | 83111ed0c6afea9bef4e658dbc5506d174459e34 (diff) | |
download | FreeBSD-src-7a9444f4dea5e4c72b660c15e5b27916a99f8f27.zip FreeBSD-src-7a9444f4dea5e4c72b660c15e5b27916a99f8f27.tar.gz |
Add support to wicontrol(8) and wi(4) for enabling and configuring
power management. This will only work on newer firmware revisions; older
firmware will silently ignore the attempts to turn power management on.
Patches supplied by: Brad Karp <karp@eecs.harvard.edu>
Diffstat (limited to 'sys/i386/isa/if_wi.c')
-rw-r--r-- | sys/i386/isa/if_wi.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sys/i386/isa/if_wi.c b/sys/i386/isa/if_wi.c index 5a4948d..90c2587 100644 --- a/sys/i386/isa/if_wi.c +++ b/sys/i386/isa/if_wi.c @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_wi.c,v 1.52 1999/05/06 16:28:02 wpaul Exp $ + * $Id: if_wi.c,v 1.53 1999/05/07 03:14:21 wpaul Exp $ */ /* @@ -116,7 +116,7 @@ #if !defined(lint) static const char rcsid[] = - "$Id: if_wi.c,v 1.52 1999/05/06 16:28:02 wpaul Exp $"; + "$Id: if_wi.c,v 1.53 1999/05/07 03:14:21 wpaul Exp $"; #endif static struct wi_softc wi_softc[NWI]; @@ -330,6 +330,8 @@ static int wi_attach(isa_dev) sc->wi_tx_rate = WI_DEFAULT_TX_RATE; sc->wi_max_data_len = WI_DEFAULT_DATALEN; sc->wi_create_ibss = WI_DEFAULT_CREATE_IBSS; + sc->wi_pm_enabled = WI_DEFAULT_PM_ENABLED; + sc->wi_max_sleep = WI_DEFAULT_MAX_SLEEP; /* * Read the default channel from the NIC. This may vary @@ -968,6 +970,12 @@ static void wi_setdef(sc, wreq) bzero(sc->wi_ibss_name, sizeof(sc->wi_ibss_name)); bcopy((char *)&wreq->wi_val[1], sc->wi_ibss_name, 30); break; + case WI_RID_PM_ENABLED: + sc->wi_pm_enabled = wreq->wi_val[0]; + break; + case WI_RID_MAX_SLEEP: + sc->wi_max_sleep = wreq->wi_val[0]; + break; default: break; } @@ -1106,6 +1114,12 @@ static void wi_init(xsc) /* Access point density */ WI_SETVAL(WI_RID_SYSTEM_SCALE, sc->wi_ap_density); + /* Power Management Enabled */ + WI_SETVAL(WI_RID_PM_ENABLED, sc->wi_pm_enabled); + + /* Power Managment Max Sleep */ + WI_SETVAL(WI_RID_MAX_SLEEP, sc->wi_max_sleep); + /* Specify the IBSS name */ WI_SETSTR(WI_RID_OWN_SSID, sc->wi_ibss_name); |