xref: /openbmc/linux/drivers/staging/vt6656/wcmd.h (revision bab97c05)
192b96797SForest Bond /*
292b96797SForest Bond  * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
392b96797SForest Bond  * All rights reserved.
492b96797SForest Bond  *
592b96797SForest Bond  * This program is free software; you can redistribute it and/or modify
692b96797SForest Bond  * it under the terms of the GNU General Public License as published by
792b96797SForest Bond  * the Free Software Foundation; either version 2 of the License, or
892b96797SForest Bond  * (at your option) any later version.
992b96797SForest Bond  *
1092b96797SForest Bond  * This program is distributed in the hope that it will be useful,
1192b96797SForest Bond  * but WITHOUT ANY WARRANTY; without even the implied warranty of
1292b96797SForest Bond  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1392b96797SForest Bond  * GNU General Public License for more details.
1492b96797SForest Bond  *
1592b96797SForest Bond  * You should have received a copy of the GNU General Public License along
1692b96797SForest Bond  * with this program; if not, write to the Free Software Foundation, Inc.,
1792b96797SForest Bond  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
1892b96797SForest Bond  *
1992b96797SForest Bond  * File: wcmd.h
2092b96797SForest Bond  *
2192b96797SForest Bond  * Purpose: Handles the management command interface functions
2292b96797SForest Bond  *
2392b96797SForest Bond  * Author: Lyndon Chen
2492b96797SForest Bond  *
2592b96797SForest Bond  * Date: May 8, 2002
2692b96797SForest Bond  *
2792b96797SForest Bond  */
2892b96797SForest Bond 
2992b96797SForest Bond #ifndef __WCMD_H__
3092b96797SForest Bond #define __WCMD_H__
314fcf9498SAndres More 
324adc5a94SMalcolm Priestley #include "device.h"
3392b96797SForest Bond 
3492b96797SForest Bond #define AUTHENTICATE_TIMEOUT   1000 //ms
3592b96797SForest Bond #define ASSOCIATE_TIMEOUT      1000 //ms
3692b96797SForest Bond 
3780f0d092SMalcolm Priestley /* Command code */
3880f0d092SMalcolm Priestley enum vnt_cmd {
3930816f83SMalcolm Priestley 	WLAN_CMD_INIT_MAC80211,
4092b96797SForest Bond 	WLAN_CMD_SETPOWER,
4192b96797SForest Bond 	WLAN_CMD_TBTT_WAKEUP,
4292b96797SForest Bond 	WLAN_CMD_BECON_SEND,
43bab97c05SMalcolm Priestley 	WLAN_CMD_CHANGE_ANTENNA
4480f0d092SMalcolm Priestley };
4592b96797SForest Bond 
4692b96797SForest Bond #define CMD_Q_SIZE              32
4792b96797SForest Bond 
48ad74e91dSMalcolm Priestley /* Command state */
49ad74e91dSMalcolm Priestley enum vnt_cmd_state {
5030816f83SMalcolm Priestley 	WLAN_CMD_INIT_MAC80211_START,
5192b96797SForest Bond 	WLAN_CMD_SETPOWER_START,
5292b96797SForest Bond 	WLAN_CMD_TBTT_WAKEUP_START,
5392b96797SForest Bond 	WLAN_CMD_BECON_SEND_START,
5492b96797SForest Bond 	WLAN_CMD_CHANGE_ANTENNA_START,
5592b96797SForest Bond 	WLAN_CMD_IDLE
56ad74e91dSMalcolm Priestley };
5792b96797SForest Bond 
5898583c09SMalcolm Priestley struct vnt_private;
5992b96797SForest Bond 
6068cc161eSMalcolm Priestley void vnt_reset_command_timer(struct vnt_private *);
610cbd8d98SAndres More 
6257981a65SMalcolm Priestley int vnt_schedule_command(struct vnt_private *, enum vnt_cmd);
6392b96797SForest Bond 
64592365aeSMalcolm Priestley void vnt_run_command(struct work_struct *work);
6592b96797SForest Bond 
66e7b07d1dSAndres More #endif /* __WCMD_H__ */
67