blob: 936f171a6b1976d9f498a5fa2d459edba6c4a05e [file] [log] [blame]
Forest Bond5449c682009-04-25 10:30:44 -04001/*
2 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
3 * All rights reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
Forest Bond5449c682009-04-25 10:30:44 -040019 * File: power.h
20 *
Uwe Kleine-König658ce9d2009-07-23 08:33:56 +020021 * Purpose: Handles 802.11 power management functions
Forest Bond5449c682009-04-25 10:30:44 -040022 *
23 * Author: Lyndon Chen
24 *
25 * Date: July 17, 2002
26 *
27 */
28
29#ifndef __POWER_H__
30#define __POWER_H__
31
Forest Bond5449c682009-04-25 10:30:44 -040032#define C_PWBT 1000 // micro sec. power up before TBTT
33#define PS_FAST_INTERVAL 1 // Fast power saving listen interval
34#define PS_MAX_INTERVAL 4 // MAX power saving listen interval
35
Charles Clément7b6a0012010-08-01 17:15:50 +020036bool
Forest Bond5449c682009-04-25 10:30:44 -040037PSbConsiderPowerDown(
Joe Perches474f0f82013-03-18 10:44:58 -070038 void *hDeviceContext,
39 bool bCheckRxDMA,
40 bool bCheckCountToWakeUp
41);
Forest Bond5449c682009-04-25 10:30:44 -040042
Charles Clément6b35b7b2010-05-07 12:30:19 -070043void
Forest Bond5449c682009-04-25 10:30:44 -040044PSvDisablePowerSaving(
Joe Perches474f0f82013-03-18 10:44:58 -070045 void *hDeviceContext
46);
Forest Bond5449c682009-04-25 10:30:44 -040047
Charles Clément6b35b7b2010-05-07 12:30:19 -070048void
Forest Bond5449c682009-04-25 10:30:44 -040049PSvEnablePowerSaving(
Joe Perches474f0f82013-03-18 10:44:58 -070050 void *hDeviceContext,
51 unsigned short wListenInterval
52);
Forest Bond5449c682009-04-25 10:30:44 -040053
Charles Clément6b35b7b2010-05-07 12:30:19 -070054void
Forest Bond5449c682009-04-25 10:30:44 -040055PSvSendPSPOLL(
Joe Perches474f0f82013-03-18 10:44:58 -070056 void *hDeviceContext
57);
Forest Bond5449c682009-04-25 10:30:44 -040058
Charles Clément7b6a0012010-08-01 17:15:50 +020059bool
Forest Bond5449c682009-04-25 10:30:44 -040060PSbSendNullPacket(
Joe Perches474f0f82013-03-18 10:44:58 -070061 void *hDeviceContext
62);
Forest Bond5449c682009-04-25 10:30:44 -040063
Charles Clément7b6a0012010-08-01 17:15:50 +020064bool
Forest Bond5449c682009-04-25 10:30:44 -040065PSbIsNextTBTTWakeUp(
Joe Perches474f0f82013-03-18 10:44:58 -070066 void *hDeviceContext
67);
Forest Bond5449c682009-04-25 10:30:44 -040068
69#endif //__POWER_H__