mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
qcacld-3.0: Add new INI to separate scan policy for rest of world users
Currently host drops an AP from scan list if host country is set to US and AP country is non-US. This implementation violates our standard regulatory scan policy. To address this issue, introduce a new INI to differentiate between our standard regulatory policy with others. Change-Id: Ie6bd2d1925048aef427136b34d00d361955f40b2 CRs-Fixed: 3377242
This commit is contained in:
parent
db7294ed01
commit
40cea3db7e
7 changed files with 125 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 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
|
||||
|
|
@ -382,6 +382,28 @@ mlme_init_lpass_support_cfg(struct wlan_objmgr_psoc *psoc,
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BAND_6GHZ
|
||||
/**
|
||||
* mlme_init_standard_6ghz_conn_policy() - initialize standard 6GHz
|
||||
* policy connection flag
|
||||
* @psoc: Pointer to PSOC
|
||||
* @gen: pointer to generic CFG items
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void mlme_init_standard_6ghz_conn_policy(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_mlme_generic *gen)
|
||||
{
|
||||
gen->std_6ghz_conn_policy =
|
||||
cfg_get(psoc, CFG_6GHZ_STANDARD_CONNECTION_POLICY);
|
||||
}
|
||||
#else
|
||||
static void mlme_init_standard_6ghz_conn_policy(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_mlme_generic *gen)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* mlme_init_mgmt_hw_tx_retry_count_cfg() - initialize mgmt hw tx retry count
|
||||
* @psoc: Pointer to PSOC
|
||||
|
|
@ -490,6 +512,7 @@ static void mlme_init_generic_cfg(struct wlan_objmgr_psoc *psoc,
|
|||
cfg_get(psoc, CFG_MONITOR_MODE_CONCURRENCY);
|
||||
gen->tx_retry_multiplier = cfg_get(psoc, CFG_TX_RETRY_MULTIPLIER);
|
||||
mlme_init_mgmt_hw_tx_retry_count_cfg(psoc, gen);
|
||||
mlme_init_standard_6ghz_conn_policy(psoc, gen);
|
||||
}
|
||||
|
||||
static void mlme_init_edca_ani_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 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
|
||||
|
|
@ -167,6 +167,29 @@ enum monitor_mode_concurrency {
|
|||
1, \
|
||||
"rf test mode Enable Flag")
|
||||
|
||||
#ifdef CONFIG_BAND_6GHZ
|
||||
/*
|
||||
* standard_6ghz_connection_policy - Enable 6 GHz standard connection policy
|
||||
* @Min: 0
|
||||
* @Max: 1
|
||||
* @Default: 1
|
||||
*
|
||||
* This ini is used to set standard 6 GHz policies where STA will be
|
||||
* allowed to scan and connect to any 6 GHz AP.
|
||||
*
|
||||
* Related: None
|
||||
*
|
||||
* Supported Feature: STA
|
||||
*/
|
||||
#define CFG_6GHZ_STANDARD_CONNECTION_POLICY CFG_INI_BOOL( \
|
||||
"standard_6ghz_connection_policy", \
|
||||
1, \
|
||||
"6ghz standard 6 GHZ connection policy")
|
||||
#define CFG_6GHZ_STD_CONN_POLICY CFG(CFG_6GHZ_STANDARD_CONNECTION_POLICY)
|
||||
#else
|
||||
#define CFG_6GHZ_STD_CONN_POLICY
|
||||
#endif
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* BandCapability - Preferred band (0: 2.4G, 5G, and 6G,
|
||||
|
|
@ -949,5 +972,6 @@ enum monitor_mode_concurrency {
|
|||
CFG(CFG_WLS_6GHZ_CAPABLE) \
|
||||
CFG(CFG_MONITOR_MODE_CONCURRENCY)\
|
||||
CFG(CFG_TX_RETRY_MULTIPLIER) \
|
||||
CFG(CFG_MGMT_FRAME_HW_TX_RETRY_COUNT)
|
||||
CFG(CFG_MGMT_FRAME_HW_TX_RETRY_COUNT) \
|
||||
CFG_6GHZ_STD_CONN_POLICY
|
||||
#endif /* __CFG_MLME_GENERIC_H */
|
||||
|
|
|
|||
|
|
@ -2194,6 +2194,29 @@ wlan_mlme_get_sta_miracast_mcc_rest_time(struct wlan_objmgr_psoc *psoc,
|
|||
QDF_STATUS
|
||||
wlan_mlme_get_sap_mcc_chnl_avoid(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *value);
|
||||
|
||||
#ifdef CONFIG_BAND_6GHZ
|
||||
/**
|
||||
* wlan_mlme_is_standard_6ghz_conn_policy_enabled() - Get the 6 GHz standard
|
||||
* connection policy flag
|
||||
* @psoc: psoc context
|
||||
* @value: Enable/Disable value ptr.
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
wlan_mlme_is_standard_6ghz_conn_policy_enabled(struct wlan_objmgr_psoc *psoc,
|
||||
bool *value);
|
||||
#else
|
||||
static inline QDF_STATUS
|
||||
wlan_mlme_is_standard_6ghz_conn_policy_enabled(struct wlan_objmgr_psoc *psoc,
|
||||
bool *value)
|
||||
{
|
||||
*value = false;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* wlan_mlme_get_mcc_bcast_prob_resp() - Get broadcast probe rsp in MCC
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 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
|
||||
|
|
@ -1252,6 +1252,7 @@ enum mlme_cfg_frame_type {
|
|||
* @ocv_support: FW supports OCV or not
|
||||
* @tx_retry_multiplier: TX xretry extension parameter
|
||||
* @mgmt_hw_tx_retry_count: MGMT HW tx retry count for frames
|
||||
* @std_6ghz_conn_policy: 6GHz standard connection policy
|
||||
*/
|
||||
struct wlan_mlme_generic {
|
||||
uint32_t band_capability;
|
||||
|
|
@ -1298,6 +1299,9 @@ struct wlan_mlme_generic {
|
|||
bool ocv_support;
|
||||
uint32_t tx_retry_multiplier;
|
||||
uint8_t mgmt_hw_tx_retry_count[CFG_FRAME_TYPE_MAX];
|
||||
#ifdef CONFIG_BAND_6GHZ
|
||||
bool std_6ghz_conn_policy;
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 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
|
||||
|
|
@ -2694,6 +2694,23 @@ ucfg_mlme_set_rf_test_mode_enabled(struct wlan_objmgr_psoc *psoc, bool value)
|
|||
return wlan_mlme_set_rf_test_mode_enabled(psoc, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_mlme_is_standard_6ghz_conn_policy_enabled() - Get 6ghz standard
|
||||
* connection policy flag
|
||||
* @psoc: pointer to psoc object
|
||||
* @value: pointer to hold the value of flag
|
||||
*
|
||||
* Inline UCFG API to be used by HDD/OSIF callers
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
static inline QDF_STATUS
|
||||
ucfg_mlme_is_standard_6ghz_conn_policy_enabled(struct wlan_objmgr_psoc *psoc,
|
||||
bool *value)
|
||||
{
|
||||
return wlan_mlme_is_standard_6ghz_conn_policy_enabled(psoc, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_opr_rate() - Get operational rate set
|
||||
* @psoc: pointer to vdev object
|
||||
|
|
|
|||
|
|
@ -2775,6 +2775,23 @@ wlan_mlme_set_rf_test_mode_enabled(struct wlan_objmgr_psoc *psoc, bool value)
|
|||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BAND_6GHZ
|
||||
QDF_STATUS
|
||||
wlan_mlme_is_standard_6ghz_conn_policy_enabled(struct wlan_objmgr_psoc *psoc,
|
||||
bool *value)
|
||||
{
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||
if (!mlme_obj)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
*value = mlme_obj->cfg.gen.std_6ghz_conn_policy;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS
|
||||
wlan_mlme_cfg_set_vht_chan_width(struct wlan_objmgr_psoc *psoc, uint8_t value)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -14304,6 +14304,7 @@ static int hdd_features_init(struct hdd_context *hdd_ctx)
|
|||
mac_handle_t mac_handle;
|
||||
bool b_cts2self, is_imps_enabled;
|
||||
bool rf_test_mode;
|
||||
bool std_6ghz_conn_policy;
|
||||
|
||||
hdd_enter();
|
||||
|
||||
|
|
@ -14402,6 +14403,17 @@ static int hdd_features_init(struct hdd_context *hdd_ctx)
|
|||
wlan_cm_set_6ghz_key_mgmt_mask(hdd_ctx->psoc,
|
||||
ALLOWED_KEYMGMT_6G_MASK);
|
||||
}
|
||||
|
||||
status = ucfg_mlme_is_standard_6ghz_conn_policy_enabled(hdd_ctx->psoc,
|
||||
&std_6ghz_conn_policy);
|
||||
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
hdd_err("Get 6ghz standard connection policy failed");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
if (std_6ghz_conn_policy)
|
||||
wlan_cm_set_standard_6ghz_conn_policy(hdd_ctx->psoc, true);
|
||||
|
||||
hdd_thermal_stats_cmd_init(hdd_ctx);
|
||||
sme_set_cal_failure_event_cb(hdd_ctx->mac_handle,
|
||||
hdd_cal_fail_send_event);
|
||||
|
|
|
|||
Loading…
Reference in a new issue