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: 3113213
Esse commit está contido em:
Deeksha Gupta
2022-01-05 18:12:28 +05:30
commit de Madan Koyyalamudi
commit 5a5a3deb12
3 arquivos alterados com 38 adições e 19 exclusões

Ver arquivo

@@ -1265,6 +1265,8 @@ static void cm_update_score_params(struct wlan_objmgr_psoc *psoc,
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 =
@@ -1294,11 +1296,11 @@ static void cm_update_score_params(struct wlan_objmgr_psoc *psoc,
score_config->band_weight_per_index;
req_score_params->nss_index_score =
score_config->nss_weight_per_index[0];
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;
req_score_params->roam_score_delta =
roam_score_params->roam_score_delta;
req_score_params->roam_trigger_bitmap =

Ver arquivo

@@ -809,6 +809,14 @@ struct ap_profile {
* @oce_wan_scoring: OCE WAN metrics percentage information
* @eht_caps_weightage: EHT caps weightage out of total score in %
* @mlo_weightage: MLO weightage out of total score in %
* @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;
@@ -840,6 +848,8 @@ struct scoring_param {
uint8_t eht_caps_weightage;
uint8_t mlo_weightage;
#endif
int32_t security_weightage;
uint32_t security_index_score;
};
/**

Ver arquivo

@@ -4323,6 +4323,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 =
@@ -4339,32 +4341,37 @@ 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;
send_update_mlo_roam_params(score_param, ap_profile);
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",
score_param->disable_bitmap, score_param->rssi_weightage_pcnt,
score_param->ht_weightage_pcnt,
score_param->vht_weightage_pcnt,
score_param->he_weightage_pcnt, score_param->bw_weightage_pcnt,
score_param->band_weightage_pcnt,
score_param->nss_weightage_pcnt,
score_param->esp_qbss_weightage_pcnt,
score_param->beamforming_weightage_pcnt,
score_param->pcl_weightage_pcnt,
score_param->oce_wan_weightage_pcnt,
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);
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,
score_param->he_weightage_pcnt,
score_param->bw_weightage_pcnt,
score_param->band_weightage_pcnt,
score_param->nss_weightage_pcnt,
score_param->esp_qbss_weightage_pcnt,
score_param->beamforming_weightage_pcnt,
score_param->pcl_weightage_pcnt,
score_param->oce_wan_weightage_pcnt,
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->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;