From 90cd774a321f0ebdf731787889e05bde62abf9cd Mon Sep 17 00:00:00 2001 From: Vignesh Viswanathan Date: Mon, 25 Sep 2017 14:36:38 +0530 Subject: [PATCH] qcacmn: Support FILS roaming Add cmn support for the following: - Update ERP info in RSO Start - Update HLP info in a new command WMI_PDEV_UPDATE_FILS_HLP_PKT_CMDID - Set/Delete PMK cache info with WMI_PDEV_UPDATE_PMK_CACHE_CMDID - Process FILS TLV in Roam Synch Indication and update the FILS info [seq number,PMK, KEK, realm] to Supplicant. Change-Id: I239bf5d6c4455d39181e335dbf73bcade16aee8e CRs-Fixed: 2089128 --- wmi_unified_api.h | 21 +++++++++++ wmi_unified_param.h | 89 +++++++++++++++++++++++++++++++++++++++++++++ wmi_unified_priv.h | 7 ++++ 3 files changed, 117 insertions(+) diff --git a/wmi_unified_api.h b/wmi_unified_api.h index c1128c264c..95aaf098d2 100644 --- a/wmi_unified_api.h +++ b/wmi_unified_api.h @@ -1529,6 +1529,27 @@ QDF_STATUS wmi_unified_dfs_phyerr_offload_dis_cmd(void *wmi_hdl, QDF_STATUS wmi_unified_set_country_cmd_send(void *wmi_hdl, struct set_country *param); +/* + * wmi_unified_set_del_pmkid_cache() - set delete PMKID + * @wmi_hdl: wma handle + * @pmksa: pointer to pmk cache entry + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_set_del_pmkid_cache(void *wmi_hdl, + struct wmi_unified_pmk_cache *pmksa); + +#if defined(WLAN_FEATURE_FILS_SK) +/* + * wmi_unified_roam_send_hlp_cmd() -send HLP command info + * @wmi_hdl: wma handle + * @req_buf: Pointer to HLP params + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_roam_send_hlp_cmd(void *wmi_hdl, + struct hlp_params *req_buf); +#endif #ifdef WMI_INTERFACE_EVENT_LOGGING void wmi_print_cmd_log(wmi_unified_t wmi, uint32_t count, diff --git a/wmi_unified_param.h b/wmi_unified_param.h index 7b6b2e5c10..6ccba61b69 100644 --- a/wmi_unified_param.h +++ b/wmi_unified_param.h @@ -1913,6 +1913,35 @@ typedef struct { uint32_t mcsset[WMI_HOST_ROAM_OFFLOAD_NUM_MCS_SET >> 2]; } roam_offload_param; +#define WMI_FILS_MAX_RRK_LENGTH 64 +#define WMI_FILS_MAX_RIK_LENGTH WMI_FILS_MAX_RRK_LENGTH +#define WMI_FILS_MAX_REALM_LENGTH 256 +#define WMI_FILS_MAX_USERNAME_LENGTH 16 + +/** + * struct roam_fils_params - Roam FILS params + * @username: username + * @username_length: username length + * @next_erp_seq_num: next ERP sequence number + * @rrk: RRK + * @rrk_length: length of @rrk + * @rik: RIK + * @rik_length: length of @rik + * @realm: realm + * @realm_len: length of @realm + */ +struct roam_fils_params { + uint8_t username[WMI_FILS_MAX_USERNAME_LENGTH]; + uint32_t username_length; + uint32_t next_erp_seq_num; + uint8_t rrk[WMI_FILS_MAX_RRK_LENGTH]; + uint32_t rrk_length; + uint8_t rik[WMI_FILS_MAX_RIK_LENGTH]; + uint32_t rik_length; + uint8_t realm[WMI_FILS_MAX_REALM_LENGTH]; + uint32_t realm_len; +}; + /* struct roam_offload_scan_params - structure * containing roaming offload scan parameters * @is_roam_req_valid: flag to tell whether roam req @@ -1937,6 +1966,10 @@ typedef struct { * @is_ese_assoc: flag to determine ese assoc * @mdid: mobility domain info * @roam_offload_params: roam offload tlv params + * @assoc_ie_length: Assoc IE length + * @assoc_ie: Assoc IE buffer + * @add_fils_tlv: add FILS TLV boolean + * @roam_fils_params: roam fils params */ struct roam_offload_scan_params { uint8_t is_roam_req_valid; @@ -1969,6 +2002,10 @@ struct roam_offload_scan_params { #endif uint32_t assoc_ie_length; uint8_t assoc_ie[MAX_ASSOC_IE_LENGTH]; + bool add_fils_tlv; +#ifdef WLAN_FEATURE_FILS_SK + struct roam_fils_params roam_fils_params; +#endif }; /* struct roam_offload_scan_rssi_params - structure containing @@ -3219,6 +3256,11 @@ struct periodic_tx_pattern { uint8_t ucPattern[WMI_PERIODIC_TX_PTRN_MAX_SIZE]; }; +#define WMI_GTK_OFFLOAD_KEK_BYTES 64 +#define WMI_GTK_OFFLOAD_KCK_BYTES 16 +#define WMI_GTK_OFFLOAD_ENABLE 0 +#define WMI_GTK_OFFLOAD_DISABLE 1 + /** * struct flashing_req_params - led flashing parameter * @reqId: request id @@ -3459,6 +3501,53 @@ struct roam_scan_filter_params { struct rssi_disallow_bssid rssi_rejection_ap[MAX_RSSI_AVOID_BSSID_LIST]; }; +#define WMI_MAX_HLP_IE_LEN 2048 +/** + * struct hlp_params - HLP info params + * @vdev_id: vdev id + * @hlp_ie_len: HLP IE length + * @hlp_ie: HLP IE + */ +struct hlp_params { + uint8_t vdev_id; + uint32_t hlp_ie_len; + uint8_t hlp_ie[WMI_MAX_HLP_IE_LEN]; +}; + +#define WMI_UNIFIED_MAX_PMKID_LEN 16 +#define WMI_UNIFIED_MAX_PMK_LEN 64 + +/** + * struct wmi_unified_pmk_cache - used to set del pmkid cache + * @tlv_header: TLV header, TLV tag and len; tag equals WMITLV_TAG_ARRAY_UINT32 + * @pmk_len: PMK len + * for big-endian hosts, manual endian conversion will be needed to keep + * the array values in their original order in spite of the automatic + * byte-swap applied to WMI messages during download + * @pmk: PMK array + * @pmkid_len: PMK ID Len + * @pmkid: PMK ID Array + * @bssid: BSSID + * @ssid: SSID + * @cache_id: PMK Cache ID + * @cat_flag: whether (bssid) or (ssid,cache_id) is valid + * @action_flag: add/delete the entry + */ +struct wmi_unified_pmk_cache { + A_UINT32 tlv_header; + A_UINT32 pmk_len; + A_UINT8 session_id; + A_UINT8 pmk[WMI_UNIFIED_MAX_PMK_LEN]; + A_UINT32 pmkid_len; + A_UINT8 pmkid[WMI_UNIFIED_MAX_PMKID_LEN]; + wmi_host_mac_addr bssid; + struct mac_ssid ssid; + A_UINT32 cache_id; + A_UINT32 cat_flag; + A_UINT32 action_flag; +}; + + /** * struct ssid_hotlist_request_params - set SSID hotlist request struct * @request_id: ID of the request diff --git a/wmi_unified_priv.h b/wmi_unified_priv.h index 4c5ed20775..467d7a1f6a 100644 --- a/wmi_unified_priv.h +++ b/wmi_unified_priv.h @@ -416,6 +416,11 @@ QDF_STATUS (*send_roam_mawc_params_cmd)(wmi_unified_t wmi_handle, QDF_STATUS (*send_roam_scan_filter_cmd)(wmi_unified_t wmi_handle, struct roam_scan_filter_params *roam_req); +#if defined(WLAN_FEATURE_FILS_SK) +QDF_STATUS (*send_roam_scan_hlp_cmd) (wmi_unified_t wmi_handle, + struct hlp_params *params); +#endif + QDF_STATUS (*send_set_passpoint_network_list_cmd)(wmi_unified_t wmi_handle, struct wifi_passpoint_req_param *req); @@ -880,6 +885,8 @@ QDF_STATUS (*send_vdev_spectral_configure_cmd)(wmi_unified_t wmi_handle, QDF_STATUS (*send_vdev_spectral_enable_cmd)(wmi_unified_t wmi_handle, struct vdev_spectral_enable_params *param); +QDF_STATUS (*send_set_del_pmkid_cache_cmd) (wmi_unified_t wmi_handle, + struct wmi_unified_pmk_cache *req_buf); QDF_STATUS (*send_bss_chan_info_request_cmd)(wmi_unified_t wmi_handle, struct bss_chan_info_request_params *param);