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

Commit 90fe84b4 authored by Gururaj Pandurangi's avatar Gururaj Pandurangi Committed by Madan Koyyalamudi
Browse files

qcacld-3.0: Update caller APIs of get power type for 6G API

Update the caller functions of wlan_reg_get_6g_power_type_for_ctry
to include AP's power type as a factor along with existing ctry
codes to determine STA's power type for 6G.

Change-Id: I8e1c54a5e760b173532fc001790fb76c70120c54
CRs-Fixed: 3087093
parent cf85121c
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -129,9 +130,9 @@ static void lim_extract_he_op(struct pe_session *session,
		session->he_op.oper_info_6g.info.center_freq_seg1;
	session->ap_power_type =
		session->he_op.oper_info_6g.info.reg_info;
	pe_debug("6G op info: ch_wd %d cntr_freq_seg0 %d cntr_freq_seg1 %d",
	pe_debug("6G op info: ch_wd %d cntr_freq_seg0 %d cntr_freq_seg1 %d ap pwr type %d",
		 session->ch_width, session->ch_center_freq_seg0,
		 session->ch_center_freq_seg1);
		 session->ch_center_freq_seg1, session->ap_power_type);

	if (!session->ch_center_freq_seg1)
		return;
@@ -466,11 +467,18 @@ void lim_extract_ap_capability(struct mac_context *mac_ctx, uint8_t *p_ie,
	tDot11fIEVHTCaps *vht_caps;
	uint8_t channel = 0;
	struct mlme_vht_capabilities_info *mlme_vht_cap;
	uint8_t session_id;

	beacon_struct = qdf_mem_malloc(sizeof(tSirProbeRespBeacon));
	if (!beacon_struct)
		return;

	session_id = session->smeSessionId;
	if (session_id >= WLAN_MAX_VDEVS) {
		pe_err("Invalid session_id %d", session_id);
		return;
	}

	*qos_cap = 0;
	*uapsd = 0;
	pe_debug("The IE's being received:");
@@ -698,6 +706,9 @@ void lim_extract_ap_capability(struct mac_context *mac_ctx, uint8_t *p_ie,
		}
	}

	mac_ctx->roam.roamSession[session_id].ap_power_type =
							session->ap_power_type;

	get_ese_version_ie_probe_response(mac_ctx, beacon_struct, session);

	session->country_info_present = false;
+1 −1
Original line number Diff line number Diff line
@@ -764,7 +764,7 @@ static void __sch_beacon_process_for_session(struct mac_context *mac_ctx,
		status = wlan_reg_get_6g_power_type_for_ctry(mac_ctx->psoc,
					bcn->countryInfoParam.countryString,
					programmed_country, &pwr_type_6g,
					&ctry_code_match);
					&ctry_code_match, REG_MAX_AP_TYPE);
		if (QDF_IS_STATUS_ERROR(status))
			return;
	}
+3 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -620,6 +621,8 @@ struct csr_roam_session {
	qdf_mc_timer_t roam_invoke_timer;
	struct csr_timer_info roam_invoke_timer_info;
#endif
	/* AP power type */
	uint8_t ap_power_type;
};

struct csr_roamstruct {
+3 −2
Original line number Diff line number Diff line
@@ -15799,10 +15799,11 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
				sme_debug("Channel is 6G but country IE not present");
			wlan_reg_read_current_country(mac->psoc,
						      programmed_country);
			status = wlan_reg_get_6g_power_type_for_ctry(
			status = wlan_reg_get_6g_power_type_for_ctry(mac->psoc,
					pIes->Country.country,
					programmed_country, &power_type_6g,
					&ctry_code_match);
					&ctry_code_match,
					pSession->ap_power_type);
			if (QDF_IS_STATUS_ERROR(status))
				break;
			csr_join_req->ap_power_type_6g = power_type_6g;