wmi_host.h 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. //------------------------------------------------------------------------------
  2. // <copyright file="wmi_host.h" company="Atheros">
  3. // Copyright (c) 2004-2008 Atheros Corporation. All rights reserved.
  4. //
  5. // This program is free software; you can redistribute it and/or modify
  6. // it under the terms of the GNU General Public License version 2 as
  7. // published by the Free Software Foundation;
  8. //
  9. // Software distributed under the License is distributed on an "AS
  10. // IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  11. // implied. See the License for the specific language governing
  12. // rights and limitations under the License.
  13. //
  14. //
  15. //------------------------------------------------------------------------------
  16. //==============================================================================
  17. // This file contains local definitios for the wmi host module.
  18. //
  19. // Author(s): ="Atheros"
  20. //==============================================================================
  21. #ifndef _WMI_HOST_H_
  22. #define _WMI_HOST_H_
  23. #include "roaming.h"
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. struct wmi_stats {
  28. A_UINT32 cmd_len_err;
  29. A_UINT32 cmd_id_err;
  30. };
  31. #define SSID_IE_LEN_INDEX 13
  32. /* Host side link management data structures */
  33. #define SIGNAL_QUALITY_THRESHOLD_LEVELS 6
  34. #define SIGNAL_QUALITY_UPPER_THRESHOLD_LEVELS SIGNAL_QUALITY_THRESHOLD_LEVELS
  35. #define SIGNAL_QUALITY_LOWER_THRESHOLD_LEVELS SIGNAL_QUALITY_THRESHOLD_LEVELS
  36. typedef struct sq_threshold_params_s {
  37. A_INT16 upper_threshold[SIGNAL_QUALITY_UPPER_THRESHOLD_LEVELS];
  38. A_INT16 lower_threshold[SIGNAL_QUALITY_LOWER_THRESHOLD_LEVELS];
  39. A_UINT32 upper_threshold_valid_count;
  40. A_UINT32 lower_threshold_valid_count;
  41. A_UINT32 polling_interval;
  42. A_UINT8 weight;
  43. A_UINT8 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.
  44. A_UINT8 last_rssi_poll_event; //Not sure if it belongs to host or target
  45. } SQ_THRESHOLD_PARAMS;
  46. struct wmi_t {
  47. A_BOOL wmi_ready;
  48. A_BOOL wmi_numQoSStream;
  49. A_UINT16 wmi_streamExistsForAC[WMM_NUM_AC];
  50. A_UINT8 wmi_fatPipeExists;
  51. void *wmi_devt;
  52. struct wmi_stats wmi_stats;
  53. struct ieee80211_node_table wmi_scan_table;
  54. A_UINT8 wmi_bssid[ATH_MAC_LEN];
  55. A_UINT8 wmi_powerMode;
  56. A_UINT8 wmi_phyMode;
  57. A_UINT8 wmi_keepaliveInterval;
  58. A_MUTEX_T wmi_lock;
  59. HTC_ENDPOINT_ID wmi_endpoint_id;
  60. SQ_THRESHOLD_PARAMS wmi_SqThresholdParams[SIGNAL_QUALITY_METRICS_NUM_MAX];
  61. CRYPTO_TYPE wmi_pair_crypto_type;
  62. CRYPTO_TYPE wmi_grp_crypto_type;
  63. A_BOOL wmi_is_wmm_enabled;
  64. A_UINT8 wmi_traffic_class;
  65. };
  66. #define LOCK_WMI(w) A_MUTEX_LOCK(&(w)->wmi_lock);
  67. #define UNLOCK_WMI(w) A_MUTEX_UNLOCK(&(w)->wmi_lock);
  68. #ifdef __cplusplus
  69. }
  70. #endif
  71. #endif /* _WMI_HOST_H_ */