nl80211-vnd-intel.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. /*
  3. * Copyright (C) 2012-2014, 2018-2021 Intel Corporation
  4. * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
  5. * Copyright (C) 2016-2017 Intel Deutschland GmbH
  6. */
  7. #ifndef __VENDOR_CMD_INTEL_H__
  8. #define __VENDOR_CMD_INTEL_H__
  9. #define INTEL_OUI 0x001735
  10. /**
  11. * enum iwl_mvm_vendor_cmd - supported vendor commands
  12. * @IWL_MVM_VENDOR_CMD_GET_CSME_CONN_INFO: reports CSME connection info.
  13. * @IWL_MVM_VENDOR_CMD_HOST_GET_OWNERSHIP: asks for ownership on the device.
  14. * This is useful when the CSME firmware owns the device and the kernel
  15. * wants to use it. In case the CSME firmware has no connection active the
  16. * kernel will manage on its own to get ownership of the device.
  17. * When the CSME firmware has an active connection, the user space
  18. * involvement is required. The kernel will assert the RFKILL signal with
  19. * the "device not owned" reason so that nobody can touch the device. Then
  20. * the user space can run the following flow to be able to get connected
  21. * to the very same AP the CSME firmware is currently connected to:
  22. *
  23. * 1) The user space (NetworkManager) boots and sees that the device is
  24. * in RFKILL because the host doesn't own the device
  25. * 2) The user space asks the kernel what AP the CSME firmware is
  26. * connected to (with %IWL_MVM_VENDOR_CMD_GET_CSME_CONN_INFO)
  27. * 3) The user space checks if it has a profile that matches the reply
  28. * from the CSME firmware
  29. * 4) The user space installs a network to the wpa_supplicant with a
  30. * specific BSSID and a specific frequency
  31. * 5) The user space prevents any type of full scan
  32. * 6) The user space asks iwlmei to request ownership on the device (with
  33. * this command)
  34. * 7) iwlmei requests ownership from the CSME firmware
  35. * 8) The CSME firmware grants ownership
  36. * 9) iwlmei tells iwlwifi to lift the RFKILL
  37. * 10) RFKILL OFF is reported to user space
  38. * 11) The host boots the device, loads the firwmare, and connects to a
  39. * specific BSSID without scanning including IP as fast as it can
  40. * 12) The host reports to the CSME firmware that there is a connection
  41. * 13) The TCP connection is preserved and the host has connectivity
  42. *
  43. * @IWL_MVM_VENDOR_CMD_ROAMING_FORBIDDEN_EVENT: notifies if roaming is allowed.
  44. * It contains a &IWL_MVM_VENDOR_ATTR_ROAMING_FORBIDDEN and a
  45. * &IWL_MVM_VENDOR_ATTR_VIF_ADDR attributes.
  46. */
  47. enum iwl_mvm_vendor_cmd {
  48. IWL_MVM_VENDOR_CMD_GET_CSME_CONN_INFO = 0x2d,
  49. IWL_MVM_VENDOR_CMD_HOST_GET_OWNERSHIP = 0x30,
  50. IWL_MVM_VENDOR_CMD_ROAMING_FORBIDDEN_EVENT = 0x32,
  51. };
  52. enum iwl_vendor_auth_akm_mode {
  53. IWL_VENDOR_AUTH_OPEN,
  54. IWL_VENDOR_AUTH_RSNA = 0x6,
  55. IWL_VENDOR_AUTH_RSNA_PSK,
  56. IWL_VENDOR_AUTH_SAE = 0x9,
  57. IWL_VENDOR_AUTH_MAX,
  58. };
  59. /**
  60. * enum iwl_mvm_vendor_attr - attributes used in vendor commands
  61. * @__IWL_MVM_VENDOR_ATTR_INVALID: attribute 0 is invalid
  62. * @IWL_MVM_VENDOR_ATTR_VIF_ADDR: interface MAC address
  63. * @IWL_MVM_VENDOR_ATTR_ADDR: MAC address
  64. * @IWL_MVM_VENDOR_ATTR_SSID: SSID (binary attribute, 0..32 octets)
  65. * @IWL_MVM_VENDOR_ATTR_STA_CIPHER: the cipher to use for the station with the
  66. * mac address specified in &IWL_MVM_VENDOR_ATTR_ADDR.
  67. * @IWL_MVM_VENDOR_ATTR_ROAMING_FORBIDDEN: u8 attribute. Indicates whether
  68. * roaming is forbidden or not. Value 1 means roaming is forbidden,
  69. * 0 mean roaming is allowed.
  70. * @IWL_MVM_VENDOR_ATTR_AUTH_MODE: u32 attribute. Authentication mode type
  71. * as specified in &enum iwl_vendor_auth_akm_mode.
  72. * @IWL_MVM_VENDOR_ATTR_CHANNEL_NUM: u8 attribute. Contains channel number.
  73. * @IWL_MVM_VENDOR_ATTR_BAND: u8 attribute.
  74. * 0 for 2.4 GHz band, 1 for 5.2GHz band and 2 for 6GHz band.
  75. * @IWL_MVM_VENDOR_ATTR_COLLOC_CHANNEL: u32 attribute. Channel number of
  76. * collocated AP. Relevant for 6GHz AP info.
  77. * @IWL_MVM_VENDOR_ATTR_COLLOC_ADDR: MAC address of a collocated AP.
  78. * Relevant for 6GHz AP info.
  79. *
  80. * @NUM_IWL_MVM_VENDOR_ATTR: number of vendor attributes
  81. * @MAX_IWL_MVM_VENDOR_ATTR: highest vendor attribute number
  82. */
  83. enum iwl_mvm_vendor_attr {
  84. __IWL_MVM_VENDOR_ATTR_INVALID = 0x00,
  85. IWL_MVM_VENDOR_ATTR_VIF_ADDR = 0x02,
  86. IWL_MVM_VENDOR_ATTR_ADDR = 0x0a,
  87. IWL_MVM_VENDOR_ATTR_SSID = 0x3d,
  88. IWL_MVM_VENDOR_ATTR_STA_CIPHER = 0x51,
  89. IWL_MVM_VENDOR_ATTR_ROAMING_FORBIDDEN = 0x64,
  90. IWL_MVM_VENDOR_ATTR_AUTH_MODE = 0x65,
  91. IWL_MVM_VENDOR_ATTR_CHANNEL_NUM = 0x66,
  92. IWL_MVM_VENDOR_ATTR_BAND = 0x69,
  93. IWL_MVM_VENDOR_ATTR_COLLOC_CHANNEL = 0x70,
  94. IWL_MVM_VENDOR_ATTR_COLLOC_ADDR = 0x71,
  95. NUM_IWL_MVM_VENDOR_ATTR,
  96. MAX_IWL_MVM_VENDOR_ATTR = NUM_IWL_MVM_VENDOR_ATTR - 1,
  97. };
  98. #endif /* __VENDOR_CMD_INTEL_H__ */