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

Commit 2c466dce authored by Jyoti Kumari's avatar Jyoti Kumari Committed by Madan Koyyalamudi
Browse files

qcacld-3.0: Add ini support for SAE-PK roam score

SAE Public Key (SAE-PK) authentication is an extension of SAE.
Host adds support for SAE-PK APs roam score which host uses to
select AP for initial connection and roaming.

User configures SAE-PK APs weightage using INI
"sae_pk_ap_weightage".

Change-Id: Icf32f409870dfcf1cd27cd9f0765ef8f060c3130
CRs-Fixed: 3059691
parent abf96398
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1811,6 +1811,8 @@ static void mlme_init_scoring_cfg(struct wlan_objmgr_psoc *psoc,
		cfg_get(psoc, CFG_SCORING_CHAN_CONGESTION_WEIGHTAGE);
	scoring_cfg->weight_cfg.oce_wan_weightage =
		cfg_get(psoc, CFG_SCORING_OCE_WAN_WEIGHTAGE);
	scoring_cfg->weight_cfg.sae_pk_ap_weightage =
		cfg_get(psoc, CFG_SAE_PK_AP_WEIGHTAGE);

	total_weight =  scoring_cfg->weight_cfg.rssi_weightage +
			scoring_cfg->weight_cfg.ht_caps_weightage +
@@ -1822,7 +1824,8 @@ static void mlme_init_scoring_cfg(struct wlan_objmgr_psoc *psoc,
			scoring_cfg->weight_cfg.beamforming_cap_weightage +
			scoring_cfg->weight_cfg.pcl_weightage +
			scoring_cfg->weight_cfg.channel_congestion_weightage +
			scoring_cfg->weight_cfg.oce_wan_weightage;
			scoring_cfg->weight_cfg.oce_wan_weightage +
			scoring_cfg->weight_cfg.sae_pk_ap_weightage;

	/*
	 * If configured weights are greater than max weight,
@@ -1848,6 +1851,8 @@ static void mlme_init_scoring_cfg(struct wlan_objmgr_psoc *psoc,
		scoring_cfg->weight_cfg.channel_congestion_weightage =
						CHANNEL_CONGESTION_WEIGHTAGE;
		scoring_cfg->weight_cfg.oce_wan_weightage = OCE_WAN_WEIGHTAGE;
		scoring_cfg->weight_cfg.sae_pk_ap_weightage =
						SAE_PK_AP_WEIGHTAGE;
	}

	scoring_cfg->rssi_score.best_rssi_threshold =
+31 −0
Original line number Diff line number Diff line
@@ -321,6 +321,36 @@
	CFG_VALUE_OR_DEFAULT, \
	"OCE WAN Weightage")

/*
 *
 * sae_pk_ap_weightage - update scoring param based on SAE PK ap weightage
 * @Min: 0
 * @Max: 10
 * @Default: 3
 *
 * This ini is used to calculate SAE PK ap weightage in roam score. SAE Public
 * Key (SAE-PK) authentication is an extension of SAE that is intended for use
 * cases where authentication is based on a password that might be
 * distributed to or obtained by a potential adversary. With SAE-PK, the AP in
 * an infrastructure network is additionally authenticated based on a static
 * public/private key pair. This ini is also used for WFA certification.
 *
 * Related: None
 *
 * Supported Feature: STA
 *
 * Usage: External
 *
 * </ini>
 */
#define CFG_SAE_PK_AP_WEIGHTAGE CFG_INI_UINT( \
	"sae_pk_ap_weightage", \
	0, \
	10, \
	PLATFORM_VALUE(3, 0), \
	CFG_VALUE_OR_DEFAULT,\
	"SAE-PK AP weightage")

/*
 * <ini>
 * best_rssi_threshold - Best Rssi for score calculation
@@ -1294,6 +1324,7 @@
	CFG(CFG_SCORING_PCL_WEIGHTAGE) \
	CFG(CFG_SCORING_CHAN_CONGESTION_WEIGHTAGE) \
	CFG(CFG_SCORING_OCE_WAN_WEIGHTAGE) \
	CFG(CFG_SAE_PK_AP_WEIGHTAGE) \
	CFG(CFG_SCORING_BEST_RSSI_THRESHOLD) \
	CFG(CFG_SCORING_GOOD_RSSI_THRESHOLD) \
	CFG(CFG_SCORING_BAD_RSSI_THRESHOLD) \
+2 −0
Original line number Diff line number Diff line
@@ -1859,6 +1859,7 @@ struct wlan_mlme_wmm_params {
 * @pcl_weightage: PCL weightage
 * @channel_congestion_weightage: channel congestion weightage
 * @oce_wan_weightage: OCE WAN metrics weightage
 * @sae_pk_ap_weightage: SAE-PK AP weigtage
 */
struct  wlan_mlme_weight_config {
	uint8_t rssi_weightage;
@@ -1872,6 +1873,7 @@ struct wlan_mlme_weight_config {
	uint8_t pcl_weightage;
	uint8_t channel_congestion_weightage;
	uint8_t oce_wan_weightage;
	uint8_t sae_pk_ap_weightage;
};

/**