2 * Broadcom wireless network adapter utility functions
4 * Copyright 2004, Broadcom Corporation
7 * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
8 * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
9 * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
10 * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
19 /* check this magic number */
20 #define WLC_IOCTL_MAGIC 0x14e46c77
22 /* maximum length buffer required */
23 #define WLC_IOCTL_SMLEN 256
25 #define WLC_IOCTL_VERSION 1
27 #define WLC_GET_MAGIC 0
28 #define WLC_GET_VERSION 1
29 #define WLC_GET_VAR 262 /* get value of named variable */
30 #define WLC_SET_VAR 263 /* set named variable to value */
32 /* Linux network driver ioctl encoding */
33 typedef struct wl_ioctl
{
34 uint cmd
; /* common ioctl definition */
35 void *buf
; /* pointer to user buffer */
36 uint len
; /* length of user buffer */
37 bool set
; /* get or set request (optional) */
38 uint used
; /* bytes read or written (optional) */
39 uint needed
; /* bytes needed (optional) */
44 * Pass a wlioctl request to the specified interface.
45 * @param name interface name
46 * @param cmd WLC_GET_MAGIC <= cmd < WLC_LAST
47 * @param buf buffer for passing in and/or receiving data
48 * @param len length of buf
49 * @return >= 0 if successful or < 0 otherwise
51 extern int wl_ioctl(char *name
, int cmd
, void *buf
, int len
);
54 * Get the MAC (hardware) address of the specified interface.
55 * @param name interface name
56 * @param hwaddr 6-byte buffer for receiving address
57 * @return >= 0 if successful or < 0 otherwise
59 extern int wl_hwaddr(char *name
, unsigned char *hwaddr
);
62 * Probe the specified interface.
63 * @param name interface name
64 * @return >= 0 if a Broadcom wireless device or < 0 otherwise
66 extern int wl_probe(char *name
);
69 * Set/Get named variable.
70 * @param name interface name
71 * @param var variable name
72 * @param val variable value/buffer
73 * @param len variable value/buffer length
74 * @return success == 0, failure != 0
76 extern int wl_set_val(char *name
, char *var
, void *val
, int len
);
77 extern int wl_get_val(char *name
, char *var
, void *val
, int len
);
78 extern int wl_set_int(char *name
, char *var
, int val
);
79 extern int wl_get_int(char *name
, char *var
, int *val
);
81 #endif /* _wlutils_h_ */
This page took 0.042692 seconds and 5 git commands to generate.