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

Commit b278abc3 authored by Surya Prakash Sivaraj's avatar Surya Prakash Sivaraj
Browse files

qcacmn: Change best candidate weight from 100 to 200

With new scoring parameters, host calculates candidate
scores equal to the best candidate score, and connects
with best candidate, without considering the bssid hint
from userspace.

Increase the max limit of the best candidate from 10000
to 20000, to keep score of preferred candidate at the top

Change-Id: Ia2da3821b4b13dd741e9b778c80d000cb512fd63
CRs-Fixed: 3084042
parent c17a49bd
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
/*
 * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2021 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
@@ -117,10 +118,10 @@ void scm_validate_scoring_config(struct scoring_config *score_cfg)
		       score_cfg->weight_cfg.channel_congestion_weightage +
		       score_cfg->weight_cfg.oce_wan_weightage;

	if (total_weight > BEST_CANDIDATE_MAX_WEIGHT) {
	if (total_weight > MAX_BSS_SCORE) {

		scm_err("total weight is greater than %d fallback to default values",
			BEST_CANDIDATE_MAX_WEIGHT);
			MAX_BSS_SCORE);

		score_cfg->weight_cfg.rssi_weightage = RSSI_WEIGHTAGE;
		score_cfg->weight_cfg.ht_caps_weightage =
+2 −3
Original line number Diff line number Diff line
/*
 * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2021 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
@@ -34,8 +35,6 @@
	(((const uint8_t *)(addr))[QDF_MAC_ADDR_SIZE - 1] % SCAN_HASH_SIZE)

#define SCM_PCL_RSSI_THRESHOLD -75
#define BEST_CANDIDATE_MAX_BSS_SCORE 10000

#define ADJACENT_CHANNEL_RSSI_THRESHOLD -80

/**
+5 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2021 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
@@ -70,10 +71,13 @@ typedef uint32_t wlan_scan_id;
#define CHANNEL_CONGESTION_WEIGHTAGE 5
#define OCE_WAN_WEIGHTAGE 0
#define BEST_CANDIDATE_MAX_WEIGHT 100
#define MAX_BSS_SCORE 200
#define MAX_INDEX_SCORE 100
#define MAX_INDEX_PER_INI 4
#define SAE_PK_AP_WEIGHTAGE 3

#define BEST_CANDIDATE_MAX_BSS_SCORE (MAX_BSS_SCORE * 100)

#define WLAN_GET_BITS(_val, _index, _num_bits) \
	(((_val) >> (_index)) & ((1 << (_num_bits)) - 1))