Forest Bond | 92b9679 | 2009-06-13 07:38:31 -0400 | [diff] [blame] | 1 | /* |
| 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 | * |
Forest Bond | 92b9679 | 2009-06-13 07:38:31 -0400 | [diff] [blame] | 15 | * |
| 16 | * File: wcmd.h |
| 17 | * |
| 18 | * Purpose: Handles the management command interface functions |
| 19 | * |
| 20 | * Author: Lyndon Chen |
| 21 | * |
| 22 | * Date: May 8, 2002 |
| 23 | * |
| 24 | */ |
| 25 | |
| 26 | #ifndef __WCMD_H__ |
| 27 | #define __WCMD_H__ |
Andres More | 4fcf949 | 2013-02-25 20:32:55 -0500 | [diff] [blame] | 28 | |
Malcolm Priestley | 4adc5a9 | 2014-06-25 21:19:57 +0100 | [diff] [blame] | 29 | #include "device.h" |
Forest Bond | 92b9679 | 2009-06-13 07:38:31 -0400 | [diff] [blame] | 30 | |
Malcolm Priestley | 80f0d09 | 2014-07-13 10:42:41 +0100 | [diff] [blame] | 31 | /* Command code */ |
| 32 | enum vnt_cmd { |
| 33 | WLAN_CMD_INIT_MAC80211, |
| 34 | WLAN_CMD_SETPOWER, |
| 35 | WLAN_CMD_TBTT_WAKEUP, |
| 36 | WLAN_CMD_BECON_SEND, |
Malcolm Priestley | bab97c0 | 2014-07-20 15:33:29 +0100 | [diff] [blame] | 37 | WLAN_CMD_CHANGE_ANTENNA |
Malcolm Priestley | 80f0d09 | 2014-07-13 10:42:41 +0100 | [diff] [blame] | 38 | }; |
Forest Bond | 92b9679 | 2009-06-13 07:38:31 -0400 | [diff] [blame] | 39 | |
| 40 | #define CMD_Q_SIZE 32 |
| 41 | |
Malcolm Priestley | ad74e91 | 2014-07-13 10:42:42 +0100 | [diff] [blame] | 42 | /* Command state */ |
| 43 | enum vnt_cmd_state { |
| 44 | WLAN_CMD_INIT_MAC80211_START, |
| 45 | WLAN_CMD_SETPOWER_START, |
| 46 | WLAN_CMD_TBTT_WAKEUP_START, |
| 47 | WLAN_CMD_BECON_SEND_START, |
| 48 | WLAN_CMD_CHANGE_ANTENNA_START, |
Malcolm Priestley | ad74e91 | 2014-07-13 10:42:42 +0100 | [diff] [blame] | 49 | WLAN_CMD_IDLE |
| 50 | }; |
Forest Bond | 92b9679 | 2009-06-13 07:38:31 -0400 | [diff] [blame] | 51 | |
Malcolm Priestley | 98583c0 | 2012-12-10 22:01:23 +0000 | [diff] [blame] | 52 | struct vnt_private; |
Forest Bond | 92b9679 | 2009-06-13 07:38:31 -0400 | [diff] [blame] | 53 | |
Malcolm Priestley | 68cc161 | 2014-07-13 10:42:51 +0100 | [diff] [blame] | 54 | void vnt_reset_command_timer(struct vnt_private *); |
Forest Bond | 92b9679 | 2009-06-13 07:38:31 -0400 | [diff] [blame] | 55 | |
Malcolm Priestley | 57981a6 | 2014-07-13 10:42:50 +0100 | [diff] [blame] | 56 | int vnt_schedule_command(struct vnt_private *, enum vnt_cmd); |
Andres More | 0cbd8d9 | 2010-05-06 20:34:29 -0300 | [diff] [blame] | 57 | |
Malcolm Priestley | 592365ae4a | 2014-07-13 10:42:49 +0100 | [diff] [blame] | 58 | void vnt_run_command(struct work_struct *work); |
Forest Bond | 92b9679 | 2009-06-13 07:38:31 -0400 | [diff] [blame] | 59 | |
Andres More | e7b07d1 | 2010-05-01 19:12:26 -0300 | [diff] [blame] | 60 | #endif /* __WCMD_H__ */ |