Skip to content
This repository has been archived by the owner on Nov 14, 2021. It is now read-only.

Commit

Permalink
qcacld-3.0: Partially rollback LA.UM.9.12.r1-12000-SMxx50.0 merge [1/2]
Browse files Browse the repository at this point in the history
This reverts the following commits:

00df58a ("qcacld-3.0: Enable/Disable SRD support for vdev")
c286d5c ("qcacld-3.0: Send nan enabled/disabled flag of SRD channels to fw")
cb6a0b3 ("qcacld-3.0: Add ini support to enable NAN on indoor channels")

Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
  • Loading branch information
0ctobot committed Sep 3, 2021
1 parent a65e60b commit 3a433cf
Show file tree
Hide file tree
Showing 20 changed files with 62 additions and 311 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include "wlan_nan_api.h"
#include "nan_ucfg_api.h"
#include "sap_api.h"
#include "wlan_mlme_api.h"

enum policy_mgr_conc_next_action (*policy_mgr_get_current_pref_hw_mode_ptr)
(struct wlan_objmgr_psoc *psoc);
Expand Down Expand Up @@ -1941,22 +1940,6 @@ QDF_STATUS policy_mgr_valid_sap_conc_channel_check(
uint32_t temp_ch_freq = 0;
struct policy_mgr_psoc_priv_obj *pm_ctx;
bool sta_sap_scc_on_dfs_chan;
struct wlan_objmgr_vdev *vdev;
enum QDF_OPMODE vdev_opmode;
bool enable_srd_channel;

vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, sap_vdev_id,
WLAN_POLICY_MGR_ID);
if (!vdev) {
policy_mgr_err("vdev is NULL");
return QDF_STATUS_E_INVAL;
}

vdev_opmode = wlan_vdev_mlme_get_opmode(vdev);
wlan_objmgr_vdev_release_ref(vdev, WLAN_POLICY_MGR_ID);

wlan_mlme_get_srd_master_mode_for_vdev(psoc, vdev_opmode,
&enable_srd_channel);

pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
Expand Down Expand Up @@ -1998,7 +1981,8 @@ QDF_STATUS policy_mgr_valid_sap_conc_channel_check(
ch_freq) ||
!(policy_mgr_sta_sap_scc_on_lte_coex_chan(psoc) ||
policy_mgr_is_safe_channel(psoc, ch_freq)) ||
(!enable_srd_channel &&
(!wlan_reg_is_etsi13_srd_chan_allowed_master_mode(
pm_ctx->pdev) &&
wlan_reg_is_etsi13_srd_chan_for_freq(pm_ctx->pdev,
ch_freq))) {
if (wlan_reg_is_dfs_for_freq(pm_ctx->pdev, ch_freq) &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2116,6 +2116,7 @@ QDF_STATUS policy_mgr_get_channel_list(struct wlan_objmgr_psoc *psoc,
uint32_t sbs_num_channels = 0;
uint32_t chan_index_24 = 0, chan_index_5 = 0, chan_index_6 = 0;
bool skip_dfs_channel = false;
bool is_etsi13_srd_chan_allowed_in_mas_mode = true;
uint32_t i = 0, j = 0;
struct policy_mgr_psoc_priv_obj *pm_ctx;
bool sta_sap_scc_on_dfs_chan;
Expand Down Expand Up @@ -2179,6 +2180,9 @@ QDF_STATUS policy_mgr_get_channel_list(struct wlan_objmgr_psoc *psoc,
policy_mgr_debug("skip DFS ch from pcl for SAP/Go");
skip_dfs_channel = true;
}
is_etsi13_srd_chan_allowed_in_mas_mode =
wlan_reg_is_etsi13_srd_chan_allowed_master_mode(pm_ctx->
pdev);
}

/* Let's divide the list in 2.4 & 5 Ghz lists */
Expand All @@ -2191,6 +2195,11 @@ QDF_STATUS policy_mgr_get_channel_list(struct wlan_objmgr_psoc *psoc,
channel_list[i]))
continue;

if (!is_etsi13_srd_chan_allowed_in_mas_mode &&
wlan_reg_is_etsi13_srd_chan_for_freq(
pm_ctx->pdev, channel_list[i]))
continue;

channel_list_5[chan_index_5++] = channel_list[i];
} else if (wlan_reg_is_6ghz_chan_freq(channel_list[i])) {
/* Add to 5G list untill 6G conc support is enabled */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,12 +545,18 @@ policy_mgr_modify_pcl_based_on_srd(struct wlan_objmgr_psoc *psoc,
uint32_t pcl_list[NUM_CHANNELS];
uint8_t weight_list[NUM_CHANNELS];
struct policy_mgr_psoc_priv_obj *pm_ctx;
bool is_etsi13_srd_chan_allowed_in_mas_mode = true;

pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
policy_mgr_err("Invalid Context");
return QDF_STATUS_E_FAILURE;
}
is_etsi13_srd_chan_allowed_in_mas_mode =
wlan_reg_is_etsi13_srd_chan_allowed_master_mode(pm_ctx->pdev);

if (is_etsi13_srd_chan_allowed_in_mas_mode)
return QDF_STATUS_SUCCESS;

if (*pcl_len_org > NUM_CHANNELS) {
policy_mgr_err("Invalid PCL List Length %d", *pcl_len_org);
Expand Down Expand Up @@ -583,7 +589,6 @@ static QDF_STATUS policy_mgr_pcl_modification_for_sap(
bool nol_modified_pcl = false;
bool dfs_modified_pcl = false;
bool modified_final_pcl = false;
bool srd_chan_enabled;

if (policy_mgr_is_sap_mandatory_channel_set(psoc)) {
status = policy_mgr_modify_sap_pcl_based_on_mandatory_channel(
Expand Down Expand Up @@ -612,18 +617,12 @@ static QDF_STATUS policy_mgr_pcl_modification_for_sap(
}
dfs_modified_pcl = true;

wlan_mlme_get_srd_master_mode_for_vdev(psoc, QDF_SAP_MODE,
&srd_chan_enabled);

if (!srd_chan_enabled) {
status = policy_mgr_modify_pcl_based_on_srd
(psoc, pcl_channels, pcl_weight, len);
if (QDF_IS_STATUS_ERROR(status)) {
policy_mgr_err("Failed to modify SRD in pcl for SAP");
return status;
}
status = policy_mgr_modify_pcl_based_on_srd
(psoc, pcl_channels, pcl_weight, len);
if (QDF_IS_STATUS_ERROR(status)) {
policy_mgr_err("failed to get srd modified pcl for SAP");
return status;
}

modified_final_pcl = true;
policy_mgr_debug(" %d %d %d %d",
mandatory_modified_pcl,
Expand All @@ -641,7 +640,6 @@ static QDF_STATUS policy_mgr_pcl_modification_for_p2p_go(
{
QDF_STATUS status = QDF_STATUS_E_FAILURE;
struct policy_mgr_psoc_priv_obj *pm_ctx;
bool srd_chan_enabled;

pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
Expand All @@ -656,18 +654,12 @@ static QDF_STATUS policy_mgr_pcl_modification_for_p2p_go(
return status;
}

wlan_mlme_get_srd_master_mode_for_vdev(psoc, QDF_P2P_GO_MODE,
&srd_chan_enabled);

if (!srd_chan_enabled) {
status = policy_mgr_modify_pcl_based_on_srd
(psoc, pcl_channels, pcl_weight, len);
if (QDF_IS_STATUS_ERROR(status)) {
policy_mgr_err("Failed to modify SRD in pcl for GO");
return status;
}
status = policy_mgr_modify_pcl_based_on_srd
(psoc, pcl_channels, pcl_weight, len);
if (QDF_IS_STATUS_ERROR(status)) {
policy_mgr_err("failed to get srd modified pcl for P2P-GO");
return status;
}

policy_mgr_dump_channel_list(*len, pcl_channels, pcl_weight);

return QDF_STATUS_SUCCESS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2337,8 +2337,8 @@ static void mlme_init_reg_cfg(struct wlan_objmgr_psoc *psoc,
struct wlan_objmgr_pdev *pdev = NULL;

reg->self_gen_frm_pwr = cfg_get(psoc, CFG_SELF_GEN_FRM_PWR);
reg->etsi_srd_chan_in_master_mode =
cfg_get(psoc, CFG_ETSI_SRD_CHAN_IN_MASTER_MODE);
reg->etsi13_srd_chan_in_master_mode =
cfg_get(psoc, CFG_ETSI13_SRD_CHAN_IN_MASTER_MODE);
reg->restart_beaconing_on_ch_avoid =
cfg_get(psoc, CFG_RESTART_BEACONING_ON_CH_AVOID);
reg->indoor_channel_support = cfg_get(psoc, CFG_INDOOR_CHANNEL_SUPPORT);
Expand All @@ -2359,9 +2359,6 @@ static void mlme_init_reg_cfg(struct wlan_objmgr_psoc *psoc,
&valid_channel_list_num);
reg->valid_channel_list_num = (uint8_t)valid_channel_list_num;

reg->enable_nan_on_indoor_channels =
cfg_get(psoc, CFG_INDOOR_CHANNEL_SUPPORT_FOR_NAN);

pdev = wlan_objmgr_get_pdev_by_id(psoc, 0, WLAN_MLME_NB_ID);
if (!pdev) {
mlme_legacy_err("null pdev");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,14 @@

/*
* <ini>
* etsi_srd_chan_in_master_mode - Enable/disable ETSI SRD channels in
* etsi13_srd_chan_in_master_mode - Enable/disable ETSI SRD channels in
* master mode PCL and ACS functionality
* @Min: 0
* @Max: 0xFF
* @Default: 6
* @Max: 1
* @Default: 0
*
* etsi_srd_chan_in_master_mode is to enable/disable ETSI SRD channels in
* etsi13_srd_chan_in_master_mode is to enable/disable ETSI SRD channels in
* master mode PCL and ACS functionality
* Bit map for enabling the SRD mode in various modes are as follows:-
* BIT 0:- Enable/Disable SRD channels for SAP.
* BIT 1:- Enable/Disable SRD channels for P2P-GO.
* BIT 2:- Enable/Disable SRD channels for NAN.
* Rest of the bits are currently reserved for future SRD channel support for
* other vdevs.
*
* Related: None
*
Expand All @@ -96,37 +90,11 @@
*
* </ini>
*/
#define CFG_ETSI_SRD_CHAN_IN_MASTER_MODE CFG_INI_UINT( \
#define CFG_ETSI13_SRD_CHAN_IN_MASTER_MODE CFG_INI_BOOL( \
"etsi13_srd_chan_in_master_mode", \
0, \
0xff, \
6, \
CFG_VALUE_OR_DEFAULT, \
"enable/disable ETSI SRD channels in master mode")

/*
* <ini>
* enable_nan_indoor_channel - Enable Indoor channels for NAN
* @Min: 0
* @Max: 1
* @Default: 0
*
* This ini is used to support to indoor channels for NAN interface
* Customer can config this item to enable/disable NAN in indoor channel
*
* Related: None
*
* Supported Feature: NAN
*
* Usage: External
*
* </ini>
*/
#define CFG_INDOOR_CHANNEL_SUPPORT_FOR_NAN CFG_INI_BOOL( \
"enable_nan_indoor_channel", \
0, \
"enable/disable indoor channels for NAN")

#ifdef SAP_AVOID_ACS_FREQ_LIST
#define SAP_AVOID_ACS_FREQ_LIST_DEFAULT ""

Expand Down Expand Up @@ -356,8 +324,7 @@
CFG(CFG_SELF_GEN_FRM_PWR) \
CFG(CFG_ENABLE_PENDING_CHAN_LIST_REQ) \
CFG(CFG_ENABLE_11D_IN_WORLD_MODE) \
CFG(CFG_ETSI_SRD_CHAN_IN_MASTER_MODE) \
CFG(CFG_INDOOR_CHANNEL_SUPPORT_FOR_NAN) \
CFG(CFG_ETSI13_SRD_CHAN_IN_MASTER_MODE) \
CFG(CFG_RESTART_BEACONING_ON_CH_AVOID) \
CFG(CFG_INDOOR_CHANNEL_SUPPORT) \
CFG(CFG_SCAN_11D_INTERVAL) \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1913,30 +1913,6 @@ QDF_STATUS wlan_mlme_get_vht_tx_mcs_2x2(struct wlan_objmgr_psoc *psoc,
QDF_STATUS
wlan_mlme_get_vht20_mcs9(struct wlan_objmgr_psoc *psoc, bool *value);

/**
* wlan_mlme_get_srd_master_mode_for_vdev - Get SRD master mode for vdev
* @psoc: pointer to psoc object
* @vdev_opmode: vdev operating mode
* @value: pointer to the value which will be filled for the caller
*
* Return: QDF Status
*/
QDF_STATUS
wlan_mlme_get_srd_master_mode_for_vdev(struct wlan_objmgr_psoc *psoc,
enum QDF_OPMODE vdev_opmode,
bool *value);

/**
* wlan_mlme_get_indoor_support_for_nan - Get indoor channel support for NAN
* @psoc: pointer to psoc object
* @value: pointer to the value which will be filled for the caller
*
* Return: QDF Status
*/
QDF_STATUS
wlan_mlme_get_indoor_support_for_nan(struct wlan_objmgr_psoc *psoc,
bool *value);

/**
* wlan_mlme_get_vht_enable2x2() - Enables/disables VHT Tx/Rx MCS values for 2x2
* @psoc: psoc context
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2223,23 +2223,11 @@ struct wlan_mlme_mwc {
};
#endif

/**
* enum mlme_reg_srd_master_modes - Bitmap of SRD master modes supported
* @MLME_SRD_MASTER_MODE_SAP: SRD master mode for SAP
* @MLME_SRD_MASTER_MODE_P2P_GO: SRD master mode for P2P-GO
* @MLME_SRD_MASTER_MODE_NAN: SRD master mode for NAN
*/
enum mlme_reg_srd_master_modes {
MLME_SRD_MASTER_MODE_SAP = 1,
MLME_SRD_MASTER_MODE_P2P_GO = 2,
MLME_SRD_MASTER_MODE_NAN = 4,
};

/**
* struct wlan_mlme_reg - REG related configs
* @self_gen_frm_pwr: self-generated frame power in tx chain mask
* for CCK rates
* @etsi_srd_chan_in_master_mode: etsi srd chan in master mode
* @etsi13_srd_chan_in_master_mode: etsi13 srd chan in master mode
* @restart_beaconing_on_ch_avoid: restart beaconing on ch avoid
* @indoor_channel_support: indoor channel support
* @scan_11d_interval: scan 11d interval
Expand All @@ -2255,11 +2243,10 @@ enum mlme_reg_srd_master_modes {
* @enable_pending_chan_list_req: enables/disables scan channel
* list command to FW till the current scan is complete.
* @retain_nol_across_regdmn_update: Retain the NOL list across the regdomain.
* @enable_nan_on_indoor_channels: Enable nan on Indoor channels
*/
struct wlan_mlme_reg {
uint32_t self_gen_frm_pwr;
uint8_t etsi_srd_chan_in_master_mode;
bool etsi13_srd_chan_in_master_mode;
enum restart_beaconing_on_ch_avoid_rule
restart_beaconing_on_ch_avoid;
bool indoor_channel_support;
Expand All @@ -2276,7 +2263,6 @@ struct wlan_mlme_reg {
bool ignore_fw_reg_offload_ind;
bool enable_pending_chan_list_req;
bool retain_nol_across_regdmn_update;
bool enable_nan_on_indoor_channels;
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3766,29 +3766,16 @@ ucfg_mlme_get_mws_coex_scc_channel_avoid_delay(struct wlan_objmgr_psoc *psoc,
#endif

/**
* ucfg_mlme_get_etsi_srd_chan_in_master_mode - get etsi srd chan
* ucfg_mlme_get_etsi13_srd_chan_in_master_mode - get etsi13 srd chan
* in master mode
* @psoc: pointer to psoc object
* @value: pointer to the value which will be filled for the caller
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_get_etsi_srd_chan_in_master_mode(struct wlan_objmgr_psoc *psoc,
uint8_t *value);

/**
* ucfg_mlme_get_srd_master_mode_for_vdev() - Get SRD master mode for vdev
* @psoc: pointer to psoc object
* @vdev_opmode: vdev opmode
* @value: pointer to the value which will be filled for the caller
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_get_srd_master_mode_for_vdev(struct wlan_objmgr_psoc *psoc,
enum QDF_OPMODE vdev_opmode,
bool *value);
ucfg_mlme_get_etsi13_srd_chan_in_master_mode(struct wlan_objmgr_psoc *psoc,
bool *value);

#ifdef SAP_AVOID_ACS_FREQ_LIST
/**
Expand Down

0 comments on commit 3a433cf

Please sign in to comment.