From a0e6f88b153877ba1149235cddff52a65d1f94cc Mon Sep 17 00:00:00 2001 From: "Selvaraj, Sridhar" Date: Mon, 29 May 2017 18:38:52 +0530 Subject: [PATCH] qcacmn: Add support to pass lca_disallow_config_params to fw Add LCA[Last Connected AP] AP disallow params to roam_scan_filter_params structure. Change-Id: Id7a47bdc40d08b356483114b71981df352386172 CRs-Fixed: 2054195 --- wmi/inc/wmi_unified_param.h | 12 ++++++++++++ wmi/src/wmi_unified_tlv.c | 21 +++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index af5e192d45..8d5371fdc8 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -3168,6 +3168,14 @@ struct ssid_hotlist_param { * @ssid_allowed_list: Whitelist SSID's * @bssid_favored: Favorable BSSID's * @bssid_favored_factor: RSSI to be added to this BSSID to prefer it + * @lca_disallow_config_present: LCA [Last Connected AP] disallow config present + * @disallow_duration: How long LCA AP will be disallowed before it + * can be a roaming candidate again, in seconds + * @rssi_channel_penalization:How much RSSI will be penalized if candidate(s) + * are found in the same channel as disallowed AP's, + * in units of db + * @num_disallowed_aps: How many APs the target should maintain in its + * LCA list * * This structure holds all the key parameters related to * initial connection and roaming connections. @@ -3184,6 +3192,10 @@ struct roam_scan_filter_params { struct mac_ssid ssid_allowed_list[MAX_SSID_ALLOWED_LIST]; struct qdf_mac_addr bssid_favored[MAX_BSSID_FAVORED]; uint8_t bssid_favored_factor[MAX_BSSID_FAVORED]; + uint8_t lca_disallow_config_present; + uint32_t disallow_duration; + uint32_t rssi_channel_penalization; + uint32_t num_disallowed_aps; }; /** diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 0c71599267..6f2a6841c4 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -5882,6 +5882,7 @@ static QDF_STATUS send_roam_scan_filter_cmd_tlv(wmi_unified_t wmi_handle, wmi_mac_addr *bssid_dst_ptr = NULL; wmi_ssid *ssid_ptr = NULL; uint32_t *bssid_preferred_factor_ptr = NULL; + wmi_roam_lca_disallow_config_tlv_param *blist_param; len = sizeof(wmi_roam_filter_fixed_param); len += WMI_TLV_HDR_SIZE; @@ -5957,6 +5958,26 @@ static QDF_STATUS send_roam_scan_filter_cmd_tlv(wmi_unified_t wmi_handle, buf_ptr += WMI_TLV_HDR_SIZE + (roam_req->num_bssid_preferred_list * sizeof(uint32_t)); + if (roam_req->lca_disallow_config_present) { + WMITLV_SET_HDR(buf_ptr, + WMITLV_TAG_ARRAY_STRUC, + sizeof(wmi_roam_lca_disallow_config_tlv_param)); + buf_ptr += WMI_TLV_HDR_SIZE; + blist_param = + (wmi_roam_lca_disallow_config_tlv_param *) buf_ptr; + WMITLV_SET_HDR(&blist_param->tlv_header, + WMITLV_TAG_STRUC_wmi_roam_lca_disallow_config_tlv_param, + WMITLV_GET_STRUCT_TLVLEN( + wmi_roam_lca_disallow_config_tlv_param)); + + blist_param->disallow_duration = roam_req->disallow_duration; + blist_param->rssi_channel_penalization = + roam_req->rssi_channel_penalization; + blist_param->num_disallowed_aps = roam_req->num_disallowed_aps; + blist_param->disallow_lca_enable_source_bitmap = 0x1; + buf_ptr += (sizeof(wmi_roam_lca_disallow_config_tlv_param)); + } + status = wmi_unified_cmd_send(wmi_handle, buf, len, WMI_ROAM_FILTER_CMDID); if (QDF_IS_STATUS_ERROR(status)) {