Browse Source

qcacld-3.0: Update CC in beacon of SAP

Currently when CC change but restart SAP is not needed, no beacon
or probe response template is updated to FW and the CC IE in beacon
is not updated. Need to update accordingly.

Change-Id: I588fdf6f9dd69c9c01058ba17a4282d732ed74be
CRs-Fixed: 2818650
Min Liu 4 years ago
parent
commit
71012023aa
3 changed files with 22 additions and 0 deletions
  1. 9 0
      core/sme/inc/csr_api.h
  2. 1 0
      core/sme/src/common/sme_api.c
  3. 12 0
      core/sme/src/csr/csr_api_scan.c

+ 9 - 0
core/sme/inc/csr_api.h

@@ -1450,4 +1450,13 @@ enum reg_phymode csr_convert_to_reg_phy_mode(eCsrPhyMode csr_phy_mode,
  */
 eCsrPhyMode csr_convert_from_reg_phy_mode(enum reg_phymode phymode);
 
+/*
+ * csr_update_beacon() - CSR API to update beacon template
+ * @mac: mac context
+ *
+ * This API is used to update beacon template to FW
+ *
+ * Return: None
+ */
+void csr_update_beacon(struct mac_context *mac);
 #endif

+ 1 - 0
core/sme/src/common/sme_api.c

@@ -5368,6 +5368,7 @@ sme_handle_generic_change_country_code(struct mac_context *mac_ctx,
 
 	/* reset info based on new cc, and we are done */
 	csr_apply_channel_power_info_wrapper(mac_ctx);
+	csr_update_beacon(mac_ctx);
 
 	csr_scan_filter_results(mac_ctx);
 

+ 12 - 0
core/sme/src/csr/csr_api_scan.c

@@ -2771,3 +2771,15 @@ QDF_STATUS csr_scan_filter_results(struct mac_context *mac_ctx)
 	wlan_objmgr_pdev_release_ref(pdev, WLAN_LEGACY_MAC_ID);
 	return QDF_STATUS_SUCCESS;
 }
+
+void csr_update_beacon(struct mac_context *mac)
+{
+	struct scheduler_msg msg = { 0 };
+	QDF_STATUS status;
+
+	msg.type = SIR_LIM_UPDATE_BEACON;
+	status = scheduler_post_message(QDF_MODULE_ID_SME, QDF_MODULE_ID_PE,
+					QDF_MODULE_ID_PE, &msg);
+	if (status != QDF_STATUS_SUCCESS)
+		sme_err("scheduler_post_message failed, status = %u", status);
+}