qcacld-3.0: Add INI support for best candidate algo and RSSI scoring

1) Currently all the parameter to decide best candidate are chosen
   as by default.
   Add INI support for those parameters to change values on basis
   of performance.
2) At the time of calculating best candidate score, rssi consider
   bucket size, good rssi, bad rssi, good rssi percentage from total
   rssi percentage, bad rssi percentage from total percentage.
   Configure these all params from ini.

Change-Id: I808a40486473fcbb161c12fbd369b3b846beb8c2
CRs-Fixed: 2121735
This commit is contained in:
Himanshu Agarwal
2017-09-28 11:54:37 +05:30
committato da Nandini Suresh
parent 37794ae6dd
commit 8bcec57472
8 ha cambiato i file con 1616 aggiunte e 50 eliminazioni

Vedi File

@@ -3099,6 +3099,93 @@ struct roam_ext_params {
uint32_t bg_scan_client_bitmap;
};
/**
* struct sir_weight_config - weight params to
* calculate best candidate
* @rssi_weightage: RSSI weightage
* @ht_caps_weightage: HT caps weightage
* @vht_caps_weightage: VHT caps weightage
* @he_caps_weightage: HE caps weightage
* @chan_width_weightage: Channel width weightage
* @chan_band_weightage: Channel band weightage
* @nss_weightage: NSS weightage
* @beamforming_cap_weightage: Beamforming caps weightage
* @pcl_weightage: PCL weightage
* @channel_congestion_weightage: channel congestion weightage
* @oce_wan_weightage: OCE WAN metrics weightage
*/
struct sir_weight_config {
uint8_t rssi_weightage;
uint8_t ht_caps_weightage;
uint8_t vht_caps_weightage;
uint8_t he_caps_weightage;
uint8_t chan_width_weightage;
uint8_t chan_band_weightage;
uint8_t nss_weightage;
uint8_t beamforming_cap_weightage;
uint8_t pcl_weightage;
uint8_t channel_congestion_weightage;
uint8_t oce_wan_weightage;
};
struct sir_rssi_cfg_score {
uint32_t best_rssi_threshold;
uint32_t good_rssi_threshold;
uint32_t bad_rssi_threshold;
uint32_t good_rssi_pcnt;
uint32_t bad_rssi_pcnt;
uint32_t good_rssi_bucket_size;
uint32_t bad_rssi_bucket_size;
uint32_t rssi_pref_5g_rssi_thresh;
};
/**
* struct sir_per_slot_scoring - define % score for differents slots for a
* scoring param.
* num_slot: number of slots in which the param will be divided.
* Max 15. index 0 is used for 'not_present. Num_slot will
* equally divide 100. e.g, if num_slot = 4 slot 0 = 0-25%, slot
* 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
* score_pcnt3_to_0: Conatins score percentage for slot 0-3
* BITS 0-7 :- the scoring pcnt when not present
* BITS 8-15 :- SLOT_1
* BITS 16-23 :- SLOT_2
* BITS 24-31 :- SLOT_3
* score_pcnt7_to_4: Conatins score percentage for slot 4-7
* BITS 0-7 :- SLOT_4
* BITS 8-15 :- SLOT_5
* BITS 16-23 :- SLOT_6
* BITS 24-31 :- SLOT_7
* score_pcnt11_to_8: Conatins score percentage for slot 8-11
* BITS 0-7 :- SLOT_8
* BITS 8-15 :- SLOT_9
* BITS 16-23 :- SLOT_10
* BITS 24-31 :- SLOT_11
* score_pcnt15_to_12: Conatins score percentage for slot 12-15
* BITS 0-7 :- SLOT_12
* BITS 8-15 :- SLOT_13
* BITS 16-23 :- SLOT_14
* BITS 24-31 :- SLOT_15
*/
struct sir_per_slot_scoring {
uint32_t num_slot;
uint32_t score_pcnt3_to_0;
uint32_t score_pcnt7_to_4;
uint32_t score_pcnt11_to_8;
uint32_t score_pcnt15_to_12;
};
struct sir_score_config {
bool enable_scoring_for_roam;
struct sir_weight_config weight_cfg;
struct sir_rssi_cfg_score rssi_score;
struct sir_per_slot_scoring esp_qbss_scoring;
struct sir_per_slot_scoring oce_wan_scoring;
uint32_t bandwidth_weight_per_index;
uint32_t nss_weight_per_index;
uint32_t band_weight_per_index;
};
/**
* struct pmkid_mode_bits - Bit flags for PMKID usage in RSN IE
* @fw_okc: Opportunistic key caching enable in firmware
@@ -3203,6 +3290,7 @@ typedef struct sSirRoamOffloadScanReq {
enum wmi_dwelltime_adaptive_mode roamscan_adaptive_dwell_mode;
tSirAddie assoc_ie;
struct lca_disallow_config_params lca_config_params;
struct scoring_param score_params;
} tSirRoamOffloadScanReq, *tpSirRoamOffloadScanReq;
typedef struct sSirRoamOffloadScanRsp {