mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
qcacld-3.0: Add support for security scoring
Add support for security score. On the basis of score, host will select AP for initial connection and roaming. Change-Id: I041a1b0c1456d7f01dd07e9b282996c56755655e CRs-Fixed: 3782215
This commit is contained in:
parent
e3e8d39bc9
commit
2fc57e4e2b
3 changed files with 26 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2024 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 above
|
||||
|
|
@ -261,6 +261,14 @@ struct ap_profile {
|
|||
* @rssi_scoring: RSSI scoring information.
|
||||
* @esp_qbss_scoring: ESP/QBSS scoring percentage information
|
||||
* @oce_wan_scoring: OCE WAN metrics percentage information
|
||||
* @security_weightage: Security(WPA/WPA2/WPA3) weightage out of
|
||||
* total score in %
|
||||
* @security_index_score: Security scoring percentage information.
|
||||
* BITS 0-7 :- It contains scoring percentage of WPA security
|
||||
* BITS 8-15 :- It contains scoring percentage of WPA2 security
|
||||
* BITS 16-23 :- It contains scoring percentage of WPA3 security
|
||||
* BITS 24-31 :- reserved
|
||||
* The value of each index must be 0-100
|
||||
*/
|
||||
struct scoring_param {
|
||||
uint32_t disable_bitmap;
|
||||
|
|
@ -288,6 +296,8 @@ struct scoring_param {
|
|||
struct rssi_config_score rssi_scoring;
|
||||
struct per_slot_score esp_qbss_scoring;
|
||||
struct per_slot_score oce_wan_scoring;
|
||||
int32_t security_weightage;
|
||||
uint32_t security_index_score;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2024 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 above
|
||||
|
|
@ -2564,6 +2564,8 @@ send_roam_scan_offload_ap_profile_cmd_tlv(wmi_unified_t wmi_handle,
|
|||
score_param->bw_weightage_pcnt = ap_profile->param.bw_weightage;
|
||||
score_param->band_weightage_pcnt = ap_profile->param.band_weightage;
|
||||
score_param->nss_weightage_pcnt = ap_profile->param.nss_weightage;
|
||||
score_param->security_weightage_pcnt =
|
||||
ap_profile->param.security_weightage;
|
||||
score_param->esp_qbss_weightage_pcnt =
|
||||
ap_profile->param.esp_qbss_weightage;
|
||||
score_param->beamforming_weightage_pcnt =
|
||||
|
|
@ -2580,7 +2582,7 @@ send_roam_scan_offload_ap_profile_cmd_tlv(wmi_unified_t wmi_handle,
|
|||
score_param->sae_pk_ap_weightage_pcnt =
|
||||
ap_profile->param.sae_pk_ap_weightage;
|
||||
|
||||
wmi_debug("Score params weightage: disable_bitmap %x rssi %d ht %d vht %d he %d BW %d band %d NSS %d ESP %d BF %d PCL %d OCE WAN %d APTX %d roam score algo %d subnet id %d sae-pk %d",
|
||||
wmi_debug("Score params weightage: disable_bitmap %x rssi %d ht %d vht %d he %d BW %d band %d NSS %d ESP %d BF %d PCL %d OCE WAN %d APTX %d roam score algo %d subnet id %d sae-pk %d security %d",
|
||||
score_param->disable_bitmap, score_param->rssi_weightage_pcnt,
|
||||
score_param->ht_weightage_pcnt,
|
||||
score_param->vht_weightage_pcnt,
|
||||
|
|
@ -2594,18 +2596,22 @@ send_roam_scan_offload_ap_profile_cmd_tlv(wmi_unified_t wmi_handle,
|
|||
score_param->oce_ap_tx_pwr_weightage_pcnt,
|
||||
score_param->vendor_roam_score_algorithm_id,
|
||||
score_param->oce_ap_subnet_id_weightage_pcnt,
|
||||
score_param->sae_pk_ap_weightage_pcnt);
|
||||
score_param->sae_pk_ap_weightage_pcnt,
|
||||
score_param->security_weightage_pcnt);
|
||||
|
||||
score_param->bw_scoring.score_pcnt = ap_profile->param.bw_index_score;
|
||||
score_param->band_scoring.score_pcnt =
|
||||
ap_profile->param.band_index_score;
|
||||
score_param->nss_scoring.score_pcnt =
|
||||
ap_profile->param.nss_index_score;
|
||||
score_param->security_scoring.score_pcnt =
|
||||
ap_profile->param.security_index_score;
|
||||
|
||||
wmi_debug("bw_index_score %x band_index_score %x nss_index_score %x",
|
||||
wmi_debug("bw_index_score %x band_index_score %x nss_index_score %x security_index_score %x",
|
||||
score_param->bw_scoring.score_pcnt,
|
||||
score_param->band_scoring.score_pcnt,
|
||||
score_param->nss_scoring.score_pcnt);
|
||||
score_param->nss_scoring.score_pcnt,
|
||||
score_param->security_scoring.score_pcnt);
|
||||
|
||||
score_param->rssi_scoring.best_rssi_threshold =
|
||||
(-1) * ap_profile->param.rssi_scoring.best_rssi_threshold;
|
||||
|
|
|
|||
|
|
@ -17569,6 +17569,8 @@ static void csr_update_score_params(struct mac_context *mac_ctx,
|
|||
req_score_params->bw_weightage = weight_config->chan_width_weightage;
|
||||
req_score_params->band_weightage = weight_config->chan_band_weightage;
|
||||
req_score_params->nss_weightage = weight_config->nss_weightage;
|
||||
req_score_params->security_weightage =
|
||||
weight_config->security_weightage;
|
||||
req_score_params->esp_qbss_weightage =
|
||||
weight_config->channel_congestion_weightage;
|
||||
req_score_params->beamforming_weightage =
|
||||
|
|
@ -17590,6 +17592,8 @@ static void csr_update_score_params(struct mac_context *mac_ctx,
|
|||
req_score_params->nss_index_score =
|
||||
score_config->nss_weight_per_index;
|
||||
|
||||
req_score_params->security_index_score =
|
||||
score_config->security_weight_per_index;
|
||||
req_score_params->vendor_roam_score_algorithm =
|
||||
score_config->vendor_roam_score_algorithm;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue