wmi_unified_ap_params.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * Copyright (c) 2020, The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. /* This file has WIN specific WMI structures and macros. */
  17. #ifndef _WMI_UNIFIED_AP_PARAMS_H_
  18. #define _WMI_UNIFIED_AP_PARAMS_H_
  19. /* Country code string length*/
  20. #define COUNTRY_CODE_LEN 2
  21. /* Civic information size in bytes */
  22. #define CIVIC_INFO_LEN 256
  23. /**
  24. * wmi_wifi_pos_lcr_info - LCR info structure
  25. * @pdev_id: host pdev id
  26. * @req_id: LCR request id
  27. * @civic_len: Civic info length
  28. * @country_code: Country code string
  29. * @civic_info: Civic info
  30. */
  31. struct wmi_wifi_pos_lcr_info {
  32. uint32_t pdev_id;
  33. uint16_t req_id;
  34. uint32_t civic_len;
  35. uint8_t country_code[COUNTRY_CODE_LEN];
  36. uint8_t civic_info[CIVIC_INFO_LEN];
  37. };
  38. /**
  39. * lci_motion_pattern - LCI motion pattern
  40. * @LCI_MOTION_NOT_EXPECTED: Not expected to change location
  41. * @LCI_MOTION_EXPECTED: Expected to change location
  42. * @LCI_MOTION_UNKNOWN: Movement pattern unknown
  43. */
  44. enum wifi_pos_motion_pattern {
  45. wifi_pos_MOTION_NOT_EXPECTED = 0,
  46. wifi_pos_MOTION_EXPECTED = 1,
  47. wifi_pos_MOTION_UNKNOWN = 2
  48. };
  49. /**
  50. * wifi_pos_lci_info - LCI info structure
  51. * @pdev_id: host pdev_id
  52. * @req_id: LCI request id
  53. * @latitude: Latitude value
  54. * @longitude: Longitude value
  55. * @altitude: Altitude value
  56. * @latitude_unc: Latitude uncertainty value
  57. * @longitude_unc: Longitude uncertainty value
  58. * @altitude_unc: Altitude uncertainty value
  59. * @motion_pattern: Motion pattern
  60. * @floor: Floor value
  61. * @height_above_floor: Height above floor
  62. * @height_unc: Height uncertainty value
  63. * @usage_rules: Usage rules
  64. */
  65. struct wifi_pos_lci_info {
  66. uint32_t pdev_id;
  67. uint16_t req_id;
  68. int64_t latitude;
  69. int64_t longitude;
  70. int32_t altitude;
  71. uint8_t latitude_unc;
  72. uint8_t longitude_unc;
  73. uint8_t altitude_unc;
  74. enum wifi_pos_motion_pattern motion_pattern;
  75. int32_t floor;
  76. int32_t height_above_floor;
  77. int32_t height_unc;
  78. uint32_t usage_rules;
  79. };
  80. #endif