1 //------------------------------------------------------------------------------
2 // <copyright file="wmi_host.h" company="Atheros">
3 // Copyright (c) 2004-2010 Atheros Corporation. All rights reserved.
6 // Permission to use, copy, modify, and/or distribute this software for any
7 // purpose with or without fee is hereby granted, provided that the above
8 // copyright notice and this permission notice appear in all copies.
10 // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 //------------------------------------------------------------------------------
20 //==============================================================================
21 // This file contains local definitios for the wmi host module.
23 // Author(s): ="Atheros"
24 //==============================================================================
38 #define SSID_IE_LEN_INDEX 13
40 /* Host side link management data structures */
41 #define SIGNAL_QUALITY_THRESHOLD_LEVELS 6
42 #define SIGNAL_QUALITY_UPPER_THRESHOLD_LEVELS SIGNAL_QUALITY_THRESHOLD_LEVELS
43 #define SIGNAL_QUALITY_LOWER_THRESHOLD_LEVELS SIGNAL_QUALITY_THRESHOLD_LEVELS
44 typedef struct sq_threshold_params_s {
45 A_INT16 upper_threshold[SIGNAL_QUALITY_UPPER_THRESHOLD_LEVELS];
46 A_INT16 lower_threshold[SIGNAL_QUALITY_LOWER_THRESHOLD_LEVELS];
47 A_UINT32 upper_threshold_valid_count;
48 A_UINT32 lower_threshold_valid_count;
49 A_UINT32 polling_interval;
51 u8 last_rssi; //normally you would expect this to be bss specific but we keep only one instance because its only valid when the device is in a connected state. Not sure if it belongs to host or target.
52 u8 last_rssi_poll_event; //Not sure if it belongs to host or target
53 } SQ_THRESHOLD_PARAMS;
56 * These constants are used with A_WLAN_BAND_SET.
58 #define A_BAND_24GHZ 0
64 bool wmi_numQoSStream;
65 u16 wmi_streamExistsForAC[WMM_NUM_AC];
68 struct wmi_stats wmi_stats;
69 struct ieee80211_node_table wmi_scan_table;
70 u8 wmi_bssid[ATH_MAC_LEN];
73 u8 wmi_keepaliveInterval;
79 HTC_ENDPOINT_ID wmi_endpoint_id;
80 SQ_THRESHOLD_PARAMS wmi_SqThresholdParams[SIGNAL_QUALITY_METRICS_NUM_MAX];
81 CRYPTO_TYPE wmi_pair_crypto_type;
82 CRYPTO_TYPE wmi_grp_crypto_type;
83 bool wmi_is_wmm_enabled;
84 u8 wmi_ht_allowed[A_NUM_BANDS];
89 #define INIT_WMI_LOCK(w) A_CSECT_INIT(&(w)->wmi_lock)
90 #define LOCK_WMI(w) A_CSECT_ENTER(&(w)->wmi_lock);
91 #define UNLOCK_WMI(w) A_CSECT_LEAVE(&(w)->wmi_lock);
92 #define DELETE_WMI_LOCK(w) A_CSECT_DELETE(&(w)->wmi_lock);
94 #define LOCK_WMI(w) A_MUTEX_LOCK(&(w)->wmi_lock);
95 #define UNLOCK_WMI(w) A_MUTEX_UNLOCK(&(w)->wmi_lock);
102 #endif /* _WMI_HOST_H_ */