2 * Command structure for wl command line utility
4 * Copyright 2002, Broadcom Corporation
7 * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom Corporation;
8 * the contents of this file may not be disclosed to third parties, copied or
9 * duplicated in any form, in whole or in part, without the prior written
10 * permission of Broadcom Corporation.
12 * $Id: wlu_cmd.h,v 1.6 2007-02-02 19:30:07 Exp $
18 typedef struct cmd cmd_t
;
19 typedef int (cmd_func_t
)(void *wl
, cmd_t
*cmd
, char **argv
);
21 /* generic command line argument handler */
30 /* list of command line arguments */
31 extern cmd_t wl_cmds
[];
32 extern cmd_t wl_varcmd
;
34 /* per-port ioctl handlers */
35 extern int wl_get(void *wl
, int cmd
, void *buf
, int len
);
36 extern int wl_set(void *wl
, int cmd
, void *buf
, int len
);
39 * Flags for command categories. A command may belong to
40 * multiple categories. These are used in bitmaps, so be careful
41 * to keep the macro value (2 ^ n) and the array indexes (n)
56 #define CMD_BOARD 0x800
57 #define CMD_ADMIN 0x1000
58 #define CMD_DEV 0x2000
59 #define CMD_DEP 0x4000
60 #define CMD_UNCAT 0x8000
62 #define CMD_ALL 0xffff
64 /* Initializer for category string array */
66 #define CMD_CATEGORY_STRINGS_INIT { \
85 extern const char *wl_cmd_category_strings
[];
86 extern const int wl_cmd_category_count
;
88 /* Initializer for category description strings array */
89 #define CMD_CATEGORY_DESC_INIT { \
90 "PHY and radio; speed, band, etc", \
91 "Channel; subclass of phy", \
92 "Rate; subclass of phy, a/b/g", \
93 "Power; subclass of phy", \
94 "MAC; Media access", \
95 "Management, association, IE, etc", \
96 "Security; subclass of mgmt", \
97 "WME; media extensions", \
98 "Monitoring device (counters, etc)", \
99 "AP subclass of mgmt", \
100 "STA subclass of mgmt", \
102 "Administration; software, UI, diags", \
103 "Device; low level control", \
105 "Uncategorized so far", \
108 extern const char *wl_cmd_category_desc
[];
112 * IO variable information
116 /* Supplemental IO variable info structure */
117 typedef const struct wlu_iov_info_s
{
119 uint32 cat
; /* Category flags; same as command categories */
120 uint32 flags
; /* See below */
121 int dflt
; /* Only for integers; see flags */
122 const char *desc
; /* Description */
125 /* Flags for wlu_iov_info_t */
126 #define WLU_IOVI_READ_ONLY 0x1 /* Known to be read only */
127 #define WLU_IOVI_WRITE_ONLY 0x2 /* Known to be write only */
128 #define WLU_IOVI_BCM_INTERNAL 0x4 /* Known to be BCM internal */
129 #define WLU_IOVI_DEFAULT_VALID 0x8 /* Default value in structure is valid */
131 extern wlu_iov_info_t wlu_iov_info
[];
132 extern int wlu_iov_info_count
;
134 #define WLU_IOV_BLOCK_LEN 10
136 #define WLU_MOD_NAME_MAX 16
137 #define WLU_MOD_NAME_BYTES 16
139 #endif /* _wlu_cmd_h_ */