浏览代码

qcacld-3.0: Add support for new regulatory files

Regulatory component is getting updated to reduce the
code size based on different regulatory features. In this
process new regulatory files are getting added and some
of the files are getting removed.

To compile the newly added files update the required changes
in driver Kbuild file.

Some of the functins which are not supposed to be invoked from
outside the component directly, replace those function calls
with the appropriate wrapper functions.

Change-Id: I31a25268250b99f4f156c4f149966213746d999e
CRs-Fixed: 2373780
Ashish Kumar Dhanotiya 6 年之前
父节点
当前提交
ea1f72ed24

+ 3 - 2
cmn_services/policy_mgr/src/wlan_policy_mgr_action.c

@@ -1489,8 +1489,9 @@ QDF_STATUS policy_mgr_valid_sap_conc_channel_check(
 		    wlan_reg_is_passive_or_disable_ch(pm_ctx->pdev, channel) ||
 		    !(policy_mgr_sta_sap_scc_on_lte_coex_chan(psoc) ||
 		      policy_mgr_is_safe_channel(psoc, channel)) ||
-		    (!reg_is_etsi13_srd_chan_allowed_master_mode(pm_ctx->pdev)
-		    && reg_is_etsi13_srd_chan(pm_ctx->pdev, channel))) {
+		    (!wlan_reg_is_etsi13_srd_chan_allowed_master_mode(
+								pm_ctx->pdev) &&
+		     wlan_reg_is_etsi13_srd_chan(pm_ctx->pdev, channel))) {
 			if (wlan_reg_is_dfs_ch(pm_ctx->pdev, channel) &&
 			    sta_sap_scc_on_dfs_chan) {
 				policy_mgr_debug("STA SAP SCC is allowed on DFS channel");

+ 14 - 14
cmn_services/policy_mgr/src/wlan_policy_mgr_core.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 The Linux Foundation. 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
@@ -1844,8 +1844,8 @@ void policy_mgr_set_weight_of_dfs_passive_channels_to_zero(
 	policy_mgr_debug("Set weight of DFS/passive channels to 0");
 
 	for (i = 0; i < orig_channel_count; i++) {
-		channel_state = reg_get_channel_state(pm_ctx->pdev,
-				pcl_channels[i]);
+		channel_state = wlan_reg_get_channel_state(pm_ctx->pdev,
+							   pcl_channels[i]);
 		if ((channel_state == CHANNEL_STATE_DISABLE) ||
 				(channel_state == CHANNEL_STATE_INVALID))
 			/* Set weight of inactive channels to 0 */
@@ -2789,14 +2789,14 @@ enum policy_mgr_conc_next_action
 	 */
 	switch (num_connections) {
 	case 1:
-		band1 = reg_chan_to_band(pm_conc_connection_list[0].chan);
+		band1 = wlan_reg_chan_to_band(pm_conc_connection_list[0].chan);
 		if (band1 == BAND_2G)
 			return PM_DBS;
 		else
 			return PM_NOP;
 	case 2:
-		band1 = reg_chan_to_band(pm_conc_connection_list[0].chan);
-		band2 = reg_chan_to_band(pm_conc_connection_list[1].chan);
+		band1 = wlan_reg_chan_to_band(pm_conc_connection_list[0].chan);
+		band2 = wlan_reg_chan_to_band(pm_conc_connection_list[1].chan);
 		if ((band1 == BAND_2G) ||
 			(band2 == BAND_2G)) {
 			if (!hw_mode.dbs_cap)
@@ -2821,9 +2821,9 @@ enum policy_mgr_conc_next_action
 		} else
 			return PM_NOP;
 	case 3:
-		band1 = reg_chan_to_band(pm_conc_connection_list[0].chan);
-		band2 = reg_chan_to_band(pm_conc_connection_list[1].chan);
-		band3 = reg_chan_to_band(pm_conc_connection_list[2].chan);
+		band1 = wlan_reg_chan_to_band(pm_conc_connection_list[0].chan);
+		band2 = wlan_reg_chan_to_band(pm_conc_connection_list[1].chan);
+		band3 = wlan_reg_chan_to_band(pm_conc_connection_list[2].chan);
 		if ((band1 == BAND_2G) ||
 			(band2 == BAND_2G) ||
 			(band3 == BAND_2G)) {
@@ -2912,8 +2912,8 @@ enum policy_mgr_conc_next_action
 		next_action = PM_NOP;
 		break;
 	case 2:
-		band1 = reg_chan_to_band(pm_conc_connection_list[0].chan);
-		band2 = reg_chan_to_band(pm_conc_connection_list[1].chan);
+		band1 = wlan_reg_chan_to_band(pm_conc_connection_list[0].chan);
+		band2 = wlan_reg_chan_to_band(pm_conc_connection_list[1].chan);
 		if ((band1 == band2) && (hw_mode.dbs_cap))
 			next_action = PM_SINGLE_MAC_UPGRADE;
 		else if ((band1 != band2) && (!hw_mode.dbs_cap))
@@ -2924,9 +2924,9 @@ enum policy_mgr_conc_next_action
 		break;
 
 	case 3:
-		band1 = reg_chan_to_band(pm_conc_connection_list[0].chan);
-		band2 = reg_chan_to_band(pm_conc_connection_list[1].chan);
-		band3 = reg_chan_to_band(pm_conc_connection_list[2].chan);
+		band1 = wlan_reg_chan_to_band(pm_conc_connection_list[0].chan);
+		band2 = wlan_reg_chan_to_band(pm_conc_connection_list[1].chan);
+		band3 = wlan_reg_chan_to_band(pm_conc_connection_list[2].chan);
 		if (((band1 == band2) && (band2 == band3)) &&
 				(hw_mode.dbs_cap)) {
 			next_action = PM_SINGLE_MAC_UPGRADE;

+ 4 - 4
cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 The Linux Foundation. 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
@@ -3351,11 +3351,11 @@ void policy_mgr_trim_acs_channel_list(struct wlan_objmgr_psoc *psoc,
 				org_ch_list[i];
 		}
 	} else if (band_mask == 2) {
-		if ((reg_get_channel_state(pm_ctx->pdev, ch_5g) ==
+		if ((wlan_reg_get_channel_state(pm_ctx->pdev, ch_5g) ==
 			CHANNEL_STATE_DFS) &&
 		      policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(psoc))
 			ch_list[ch_list_count++] = ch_5g;
-		else if (!(reg_get_channel_state(pm_ctx->pdev, ch_5g) ==
+		else if (!(wlan_reg_get_channel_state(pm_ctx->pdev, ch_5g) ==
 			CHANNEL_STATE_DFS))
 			ch_list[ch_list_count++] = ch_5g;
 		for (i = 0; i < *org_ch_list_count; i++) {
@@ -3530,7 +3530,7 @@ bool policy_mgr_is_valid_for_channel_switch(struct wlan_objmgr_psoc *psoc,
 	sap_count = policy_mgr_mode_specific_connection_count(psoc,
 							      PM_SAP_MODE,
 							      NULL);
-	state = reg_get_channel_state(pm_ctx->pdev, channel);
+	state = wlan_reg_get_channel_state(pm_ctx->pdev, channel);
 
 	policy_mgr_debug("sta_sap_scc_on_dfs_chan %u, sap_count %u, channel %u, state %u",
 			 sta_sap_scc_on_dfs_chan, sap_count, channel, state);

+ 7 - 1
tdls/core/src/wlan_tdls_cmds_process.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2019 The Linux Foundation. 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
@@ -21,6 +21,12 @@
  *
  * TDLS north bound commands implementation
  */
+#include <qdf_types.h>
+#include <qdf_status.h>
+#include <wlan_cmn.h>
+#include <reg_services_public_struct.h>
+#include <wlan_objmgr_psoc_obj.h>
+#include <wlan_objmgr_pdev_obj.h>
 #include <wlan_reg_services_api.h>
 #include <wlan_serialization_api.h>
 #include "wlan_tdls_main.h"