Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2313f679 authored by Pragaspathi Thilagaraj's avatar Pragaspathi Thilagaraj Committed by Madan Koyyalamudi
Browse files

qcacld-3.0: Update exteneded capabilities after connection

The extended capabilities IE is sent during vdev create and
this doesn't have the merged extended capabilities from the
userspace. So some of the fields advertised in association
request are not advertised in the re-association request.

Fix the missing fields not set in the extended capabilities IE
by sending the set IE message to LIM after connection is
successful.

Change-Id: I322d057f602e0362f12b362e7818e84cbb056cf4
CRs-Fixed: 2971072
parent fad69f89
Loading
Loading
Loading
Loading
+39 −3
Original line number Diff line number Diff line
@@ -6258,6 +6258,10 @@ static void lim_process_set_ie_req(struct mac_context *mac_ctx, uint32_t *msg_bu
{
	struct send_extcap_ie *msg;
	QDF_STATUS status;
	tDot11fIEExtCap extra_ext_cap = {0};
	struct pe_session *pe_session;
	uint8_t *add_ie = NULL;
	uint16_t add_ie_len, vdev_id;

	if (!msg_buf) {
		pe_err("Buffer is Pointing to NULL");
@@ -6265,10 +6269,42 @@ static void lim_process_set_ie_req(struct mac_context *mac_ctx, uint32_t *msg_bu
	}

	msg = (struct send_extcap_ie *)msg_buf;
	status = lim_send_ext_cap_ie(mac_ctx, msg->session_id, NULL, false);
	if (QDF_STATUS_SUCCESS != status)
		pe_err("Unable to send ExtCap to FW");
	vdev_id = msg->session_id;

	pe_session = pe_find_session_by_vdev_id(mac_ctx, vdev_id);
	if (pe_session) {
		add_ie_len = pe_session->lim_join_req->addIEAssoc.length;
		if (!add_ie_len)
			goto send_ie;

		add_ie = qdf_mem_malloc(add_ie_len);
		if (!add_ie)
			goto send_ie;

		qdf_mem_copy(add_ie,
			     pe_session->lim_join_req->addIEAssoc.addIEdata,
			     add_ie_len);

		status = lim_strip_extcap_update_struct(mac_ctx, add_ie,
							&add_ie_len,
							&extra_ext_cap);
		if (QDF_IS_STATUS_SUCCESS(status)) {
			struct s_ext_cap *p_ext_cap =
				(struct s_ext_cap *)extra_ext_cap.bytes;
			if (p_ext_cap->interworking_service)
				p_ext_cap->qos_map = 1;

			extra_ext_cap.num_bytes =
				lim_compute_ext_cap_ie_length(&extra_ext_cap);
		}
		qdf_mem_free(add_ie);
	}

send_ie:
	status = lim_send_ext_cap_ie(mac_ctx, msg->session_id, &extra_ext_cap,
				     true);
	if (QDF_IS_STATUS_ERROR(status))
		pe_err("Unable to send ExtCap to FW");
}

#ifdef WLAN_FEATURE_11AX_BSS_COLOR
+2 −2
Original line number Diff line number Diff line
@@ -16436,7 +16436,7 @@ static void csr_store_oce_cfg_flags_in_vdev(struct mac_context *mac,
	wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_MAC_ID);
}
static void csr_send_set_ie(uint8_t type, uint8_t sub_type,
void csr_send_set_ie(uint8_t type, uint8_t sub_type,
		     uint8_t vdev_id)
{
	struct send_extcap_ie *msg;
+9 −0
Original line number Diff line number Diff line
@@ -561,6 +561,15 @@ bool csr_is_profile_wapi(struct csr_roam_profile *pProfile);
void csr_get_vdev_type_nss(enum QDF_OPMODE dev_mode, uint8_t *nss_2g,
			   uint8_t *nss_5g);

/**
 * csr_send_set_ie  - Send Set IE request to lim
 * @type: Vdev type
 * @sub_type: Vdev sub type
 * @vdev_id: Vdev id
 *
 * Return: None
 */
void csr_send_set_ie(uint8_t type, uint8_t sub_type, uint8_t vdev_id);
#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR

/* Security */
+21 −0
Original line number Diff line number Diff line
@@ -789,6 +789,27 @@ static void csr_neighbor_roam_info_ctx_init(struct mac_context *mac,
	struct cm_roam_values_copy src_cfg;
	struct csr_roam_session *session = &mac->roam.roamSession[session_id];
	int init_ft_flag = false;
	struct wlan_objmgr_vdev *vdev = NULL;
	struct vdev_mlme_obj *vdev_mlme;

	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac->psoc, session_id,
						    WLAN_LEGACY_SME_ID);
	if (!vdev)
		return;

	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
	if (!vdev_mlme) {
		wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
		QDF_BUG(0);
		return;
	}

	/* update the EXT cap IE with union of driver populated
	 * values and the values sent from userspace
	 */
	csr_send_set_ie(vdev_mlme->mgmt.generic.type,
			vdev_mlme->mgmt.generic.subtype, session_id);
	wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);

	csr_init_occupied_channels_list(mac, session_id);
	csr_neighbor_roam_state_transition(mac,