diff --git a/os_if/linux/scan/src/wlan_cfg80211_scan.c b/os_if/linux/scan/src/wlan_cfg80211_scan.c index a0c421851b..66f95bde7f 100644 --- a/os_if/linux/scan/src/wlan_cfg80211_scan.c +++ b/os_if/linux/scan/src/wlan_cfg80211_scan.c @@ -38,6 +38,13 @@ #include #endif +static const +struct nla_policy scan_policy[QCA_WLAN_VENDOR_ATTR_SCAN_MAX + 1] = { + [QCA_WLAN_VENDOR_ATTR_SCAN_FLAGS] = {.type = NLA_U32}, + [QCA_WLAN_VENDOR_ATTR_SCAN_TX_NO_CCK_RATE] = {.type = NLA_FLAG}, + [QCA_WLAN_VENDOR_ATTR_SCAN_COOKIE] = {.type = NLA_U64}, +}; + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)) static uint32_t hdd_config_sched_scan_start_delay( struct cfg80211_sched_scan_request *request) @@ -1330,7 +1337,7 @@ int wlan_vendor_abort_scan(struct wlan_objmgr_pdev *pdev, pdev_id = wlan_objmgr_pdev_get_pdev_id(pdev); if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_SCAN_MAX, data, - data_len, NULL)) { + data_len, scan_policy)) { cfg80211_err("Invalid ATTR"); return ret; } diff --git a/target_if/init_deinit/src/service_ready_event_handler.c b/target_if/init_deinit/src/service_ready_event_handler.c index b416054a9a..dabbf6a7e3 100644 --- a/target_if/init_deinit/src/service_ready_event_handler.c +++ b/target_if/init_deinit/src/service_ready_event_handler.c @@ -298,6 +298,7 @@ int init_deinit_service_ext_ready_event_handler(ol_scn_t scn_handle, if (err_code) goto free_param_and_exit; + psoc->total_mac_phy = 0; err_code = populate_hw_mode_capability(wmi_handle, event, &psoc->total_mac_phy, diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 6a357c46f3..af5e192d45 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -1795,7 +1795,7 @@ struct mobility_domain_info { #define WMI_HOST_ROAM_OFFLOAD_NUM_MCS_SET (16) /* This TLV will be filled only in case roam offload - * for wpa2-psk/okc/ese/11r is enabled */ + * for wpa2-psk/pmkid/ese/11r is enabled */ typedef struct { /* * TLV tag and len; tag equals @@ -1838,7 +1838,8 @@ typedef struct { * @rokh_id: r0kh id * @roam_key_mgmt_offload_enabled: roam offload flag * @auth_mode: authentication mode - * @okc_enabled: enable opportunistic key caching + * @fw_okc: use OKC in firmware + * @fw_pmksa_cache: use PMKSA cache in firmware * @is_ese_assoc: flag to determine ese assoc * @mdid: mobility domain info * @roam_offload_params: roam offload tlv params @@ -1861,7 +1862,8 @@ struct roam_offload_scan_params { uint8_t rokh_id[WMI_ROAM_R0KH_ID_MAX_LEN]; uint8_t roam_key_mgmt_offload_enabled; int auth_mode; - bool okc_enabled; + bool fw_okc; + bool fw_pmksa_cache; #endif bool is_ese_assoc; struct mobility_domain_info mdid; diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 2ed9347070..55bf1e54ea 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -5437,15 +5437,26 @@ static QDF_STATUS send_roam_scan_offload_mode_cmd_tlv(wmi_unified_t wmi_handle, buf_ptr += WMI_TLV_HDR_SIZE; roam_offload_11i = (wmi_roam_11i_offload_tlv_param *) buf_ptr; + if (roam_req->roam_key_mgmt_offload_enabled && - roam_req->okc_enabled) { + roam_req->fw_okc) { WMI_SET_ROAM_OFFLOAD_OKC_ENABLED (roam_offload_11i->flags); - WMI_LOGE("LFR3:OKC Enabled"); + WMI_LOGE("LFR3:OKC enabled"); } else { WMI_SET_ROAM_OFFLOAD_OKC_DISABLED (roam_offload_11i->flags); - WMI_LOGE("LFR3:OKC Disabled"); + WMI_LOGE("LFR3:OKC disabled"); + } + if (roam_req->roam_key_mgmt_offload_enabled && + roam_req->fw_pmksa_cache) { + WMI_SET_ROAM_OFFLOAD_PMK_CACHE_ENABLED + (roam_offload_11i->flags); + WMI_LOGE("LFR3:PMKSA caching enabled"); + } else { + WMI_SET_ROAM_OFFLOAD_PMK_CACHE_DISABLED + (roam_offload_11i->flags); + WMI_LOGE("LFR3:PMKSA caching disabled"); } qdf_mem_copy(roam_offload_11i->pmk,