[libiwinfo] introduce country() and countrylist() (ISO3166 to driver code mapping)
[project/luci.git] / contrib / package / iwinfo / src / include / broadcom.h
1 /*
2 * Custom OID/ioctl definitions for
3 * Broadcom 802.11abg Networking Device Driver
4 *
5 * Definitions subject to change without notice.
6 *
7 * Copyright 2006, Broadcom Corporation
8 * All Rights Reserved.
9 *
10 * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
11 * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
12 * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
13 * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
14 *
15 */
16
17 #ifndef _BROADCOM_H
18 #define _BROADCOM_H
19
20 #define WL_MCSSET_LEN 16
21 #define WL_MAX_STA_COUNT 32
22
23 #define WL_BSS_RSSI_OFFSET 82
24 #define WL_BSS_NOISE_OFFSET 84
25
26 #define WLC_IOCTL_MAGIC 0x14e46c77
27 #define WLC_IOCTL_MAXLEN 8192
28
29 #define WLC_CNTRY_BUF_SZ 4
30
31 #define WLC_GET_MAGIC 0
32 #define WLC_GET_RATE 12
33 #define WLC_GET_INFRA 19
34 #define WLC_GET_AUTH 21
35 #define WLC_GET_BSSID 23
36 #define WLC_GET_SSID 25
37 #define WLC_GET_CHANNEL 29
38 #define WLC_GET_PASSIVE 48
39 #define WLC_GET_COUNTRY 83
40 #define WLC_GET_REVINFO 98
41 #define WLC_GET_AP 117
42 #define WLC_GET_RSSI 127
43 #define WLC_GET_WSEC 133
44 #define WLC_GET_PHY_NOISE 135
45 #define WLC_GET_BSS_INFO 136
46 #define WLC_GET_ASSOCLIST 159
47 #define WLC_GET_WPA_AUTH 164
48 //#define WLC_GET_CHANNELS_IN_COUNTRY 260
49 #define WLC_GET_COUNTRY_LIST 261
50 #define WLC_GET_VAR 262
51
52
53 struct wl_ether_addr {
54 uint8_t octet[6];
55 };
56
57 struct wl_maclist {
58 uint count;
59 struct wl_ether_addr ea[1];
60 };
61
62 typedef struct wl_sta_rssi {
63 int rssi;
64 char mac[6];
65 uint16_t foo;
66 } wl_sta_rssi_t;
67
68 typedef struct wlc_ssid {
69 uint32_t ssid_len;
70 unsigned char ssid[32];
71 } wlc_ssid_t;
72
73 /* Linux network driver ioctl encoding */
74 typedef struct wl_ioctl {
75 uint32_t cmd; /* common ioctl definition */
76 void *buf; /* pointer to user buffer */
77 uint32_t len; /* length of user buffer */
78 uint8_t set; /* get or set request (optional) */
79 uint32_t used; /* bytes read or written (optional) */
80 uint32_t needed; /* bytes needed (optional) */
81 } wl_ioctl_t;
82
83 /* Revision info */
84 typedef struct wlc_rev_info {
85 uint vendorid; /* PCI vendor id */
86 uint deviceid; /* device id of chip */
87 uint radiorev; /* radio revision */
88 uint chiprev; /* chip revision */
89 uint corerev; /* core revision */
90 uint boardid; /* board identifier (usu. PCI sub-device id) */
91 uint boardvendor; /* board vendor (usu. PCI sub-vendor id) */
92 uint boardrev; /* board revision */
93 uint driverrev; /* driver version */
94 uint ucoderev; /* microcode version */
95 uint bus; /* bus type */
96 uint chipnum; /* chip number */
97 } wlc_rev_info_t;
98
99 typedef struct wl_country_list {
100 uint32_t buflen;
101 uint32_t band_set;
102 uint32_t band;
103 uint32_t count;
104 char country_abbrev[1];
105 } wl_country_list_t;
106
107
108 #endif