diff options
Diffstat (limited to 'bcmdhd/dhdutil/dhdu_cmd.h')
-rw-r--r-- | bcmdhd/dhdutil/dhdu_cmd.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/bcmdhd/dhdutil/dhdu_cmd.h b/bcmdhd/dhdutil/dhdu_cmd.h new file mode 100644 index 0000000..571f8b9 --- /dev/null +++ b/bcmdhd/dhdutil/dhdu_cmd.h @@ -0,0 +1,49 @@ +/* + * Command structure for dhd command line utility. + * + * Copyright (C) 1999-2011, Broadcom Corporation + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $Id: dhdu_cmd.h,v 1.6 2008-06-05 00:36:42 Exp $ + */ + +#ifndef _dhdu_cmd_h_ +#define _dhdu_cmd_h_ + +typedef struct cmd cmd_t; +typedef int (cmd_func_t)(void *dhd, cmd_t *cmd, char **argv); + +/* generic command line argument handler */ +struct cmd { + char *name; + cmd_func_t *func; + int get; + int set; + char *help; +}; + +/* list of command line arguments */ +extern cmd_t dhd_cmds[]; +extern cmd_t dhd_varcmd; + +/* Special set cmds to do download via dev node interface if present */ +#define DHD_DLDN_ST 0x400 +#define DHD_DLDN_WRITE (DHD_DLDN_ST + 1) +#define DHD_DLDN_END (DHD_DLDN_ST + 2) + +/* per-port ioctl handlers */ +extern int dhd_get(void *dhd, int cmd, void *buf, int len); +extern int dhd_set(void *dhd, int cmd, void *buf, int len); + +#endif /* _dhdu_cmd_h_ */ |