wifi_ioctl.h revision e2cf88ac9d753a00c17aa235f6afdc76574fe3a6
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Macro and date structures defined for 802.11 wifi config tool.
*/
#ifndef __WIFI_IOCTL_H
#define __WIFI_IOCTL_H
#ifdef __cplusplus
extern "C" {
#endif
#define MAX_KEY_LENGTH 26
/* one more for '\0' */
#define MAX_CHANNEL_NUM 99
#define MAX_RSSI 15
#define MAX_NWEPKEYS 4
#define NET_802_11 80211
#define MAX_BUF_LEN 65536
#define MAX_SCAN_SUPPORT_RATES 8
/*
* ioctls
*/
#define WLAN_IOCTL_BASE 0x1000
/*
* parameters
*/
#define WL_PARAMETERS_BASE 0x2000
/*
* commands
*/
#define WL_COMMAND_BASE 0x3000
/*
* domains
*/
/* --USA */
#define WL_DOMAIN_BASE 0x4000
/* --Canada */
/* --Most of Europe */
/* --Spain */
/* --France */
/* --Japan */
/*
* power mode
*/
#define WL_PM_AM 0x0
#define WL_PM_MPS 0x1
#define WL_PM_FAST 0x2
#define WL_PM_USER 0x3
/*
* rates
*/
#define WL_RATE_BASIC_SET 0x80
#define WL_RATE_1M 2
#define WL_RATE_2M 4
#define WL_RATE_5_5M 11
#define WL_RATE_6M 12
#define WL_RATE_9M 18
#define WL_RATE_11M 22
#define WL_RATE_12M 24
#define WL_RATE_18M 36
#define WL_RATE_22M 44
#define WL_RATE_24M 48
#define WL_RATE_33M 66
#define WL_RATE_36M 72
#define WL_RATE_48M 96
#define WL_RATE_54M 108
/*
* wep operations
*/
#define WL_WEP_OPERATION_BASE 0x6000
#define WL_NOENCRYPTION 0x0
#define WL_ENC_WEP 0x1
#define WL_ENC_WPA 0x2
#define WL_OPENSYSTEM 0x1
#define WL_SHAREDKEY 0x2
/*
* linkstatus
*/
#define WL_CONNECTED 0x0
#define WL_NOTCONNECTED 0x1
/*
* prives
*/
#define WL_PRIV_BASE 0x7000
/*
* return values
*/
#define WL_SUCCESS 0x0
#define WL_NOTSUPPORTED EINVAL
#define WL_LACK_FEATURE ENOTSUP
#define WL_HW_ERROR EIO
#define WL_ACCESS_DENIED EACCES
#define WL_RETURN_BASE 0x7000
/*
* other values
*/
#define WL_OTHER_BASE 0x8000
#define WL_BSS_BSS 1
#define WL_BSS_IBSS 3
#define WL_BSS_ANY 2
/*
* field_offset
*/
/*
* type definationes
*/
typedef boolean_t wl_create_ibss_t;
typedef char wl_bssid_t[6];
typedef struct wl_essid {
char wl_essid_essid[34];
typedef struct wl_nodename {
char wl_nodename_name[34];
typedef struct wl_phy_supported {
typedef struct wl_fhss {
} wl_fhss_t;
typedef struct wl_dsss {
} wl_dsss_t;
typedef struct wl_ofdm {
} wl_ofdm_t;
typedef struct wl_erp {
} wl_erp_t;
typedef union wl_phy_conf {
typedef uint32_t wl_domain_t;
typedef struct wl_ps_mode {
} wl_ps_mode_t;
typedef uint32_t wl_linkstatus_t;
typedef uint32_t wl_tx_pwer_t;
typedef uint32_t wl_rssi_threshold_t;
typedef uint32_t wl_bss_type_t;
typedef uint32_t wl_authmode_t;
typedef uint32_t wl_encryption_t;
typedef uint32_t wl_wep_key_id_t;
typedef boolean_t wl_radio_t;
typedef uint32_t wl_rts_threshold_t;
typedef uint32_t wl_short_retry_t;
typedef uint32_t wl_long_retry_t;
typedef uint32_t wl_beacon_period_t;
typedef uint32_t wl_tx_lifetime_t;
typedef uint32_t wl_rx_lifetime_t;
typedef uint32_t wl_frag_threshold_t;
typedef char wl_vendor_t[128];
typedef char wl_product_t[128];
typedef uint32_t wl_num_ants_t;
typedef uint32_t wl_rx_antenna_t;
typedef uint32_t wl_tx_antenna_t;
typedef struct wl_rates {
char wl_rates_rates[1];
} wl_rates_t;
typedef struct wl_ess_conf {
char wl_ess_conf_reserved[2];
union {
} wl_phy_conf;
typedef struct wl_ess_list {
typedef struct wl_wep_key {
char wl_wep_key[MAX_KEY_LENGTH];
} wl_wep_key_t;
typedef struct wep_mapping {
char wl_wep_map_mac_addr[6];
char wl_wep_map_reserved[2];
typedef struct wl_priv_param {
char wl_priv_name[8];
char wl_priv_value[1];
typedef struct wl_dev_depend {
typedef struct wlan_ver {
} wlan_ver_t;
typedef struct wldp {
} wldp_t;
#ifdef __cplusplus
}
#endif
#endif /* __WIFI_IOCTL_H */