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.
20 /* check this magic number */
21 #define WLC_IOCTL_MAGIC 0x14e46c77
23 /* maximum length buffer required */
24 #define WLC_IOCTL_SMLEN 256
26 #define WLC_IOCTL_VERSION 1
28 #define WLC_GET_MAGIC 0
29 #define WLC_GET_VERSION 1
30 #define WLC_GET_VAR 262 /* get value of named variable */
31 #define WLC_SET_VAR 263 /* set named variable to value */
33 /* Linux network driver ioctl encoding */
34 typedef struct wl_ioctl
{
35 uint cmd
; /* common ioctl definition */
36 void *buf
; /* pointer to user buffer */
37 uint len
; /* length of user buffer */
38 bool set
; /* get or set request (optional) */
39 uint used
; /* bytes read or written (optional) */
40 uint needed
; /* bytes needed (optional) */
45 * Pass a wlioctl request to the specified interface.
46 * @param name interface name
47 * @param cmd WLC_GET_MAGIC <= cmd < WLC_LAST
48 * @param buf buffer for passing in and/or receiving data
49 * @param len length of buf
50 * @return >= 0 if successful or < 0 otherwise
52 extern int wl_ioctl(char *name
, int cmd
, void *buf
, int len
);
55 * Get the MAC (hardware) address of the specified interface.
56 * @param name interface name
57 * @param hwaddr 6-byte buffer for receiving address
58 * @return >= 0 if successful or < 0 otherwise
60 extern int wl_hwaddr(char *name
, unsigned char *hwaddr
);
63 * Probe the specified interface.
64 * @param name interface name
65 * @return >= 0 if a Broadcom wireless device or < 0 otherwise
67 extern int wl_probe(char *name
);
70 * Set/Get named variable.
71 * @param name interface name
72 * @param var variable name
73 * @param val variable value/buffer
74 * @param len variable value/buffer length
75 * @return success == 0, failure != 0
77 extern int wl_set_val(char *name
, char *var
, void *val
, int len
);
78 extern int wl_get_val(char *name
, char *var
, void *val
, int len
);
79 extern int wl_set_int(char *name
, char *var
, int val
);
80 extern int wl_get_int(char *name
, char *var
, int *val
);
82 #endif /* _wlutils_h_ */
This page took 0.043611 seconds and 5 git commands to generate.