• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Command structure for dhd command line utility, copied from wl utility
3  *
4  * Copyright (C) 1999-2013, Broadcom Corporation
5  *
6  * Permission to use, copy, modify, and/or distribute this software for any
7  * purpose with or without fee is hereby granted, provided that the above
8  * copyright notice and this permission notice appear in all copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
13  * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
15  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
16  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17  *
18  * $Id: dhdu_cmd.h 241182 2011-02-17 21:50:03Z $
19  */
20 
21 #ifndef _dhdu_cmd_h_
22 #define _dhdu_cmd_h_
23 
24 typedef struct cmd cmd_t;
25 typedef int (cmd_func_t)(void *dhd, cmd_t *cmd, char **argv);
26 
27 /* generic command line argument handler */
28 struct cmd {
29 	char *name;
30 	cmd_func_t *func;
31 	int get;
32 	int set;
33 	char *help;
34 };
35 
36 /* list of command line arguments */
37 extern cmd_t dhd_cmds[];
38 extern cmd_t dhd_varcmd;
39 
40 /* Special set cmds to do download via dev node interface if present */
41 #define	DHD_DLDN_ST		0x400
42 #define	DHD_DLDN_WRITE		(DHD_DLDN_ST + 1)
43 #define	DHD_DLDN_END		(DHD_DLDN_ST + 2)
44 
45 /* per-port ioctl handlers */
46 extern int dhd_get(void *dhd, int cmd, void *buf, int len);
47 extern int dhd_set(void *dhd, int cmd, void *buf, int len);
48 
49 #endif /* _dhdu_cmd_h_ */
50