Ver Fonte

qcacld-3.0: Use new enum to check the max percentage for the score

Use new enum to check the max percentage for the score.

Change-Id: I7a040f7604a426d659e732c2853fbacc2b6a5a35
CRs-Fixed: 2673982
Abhishek Singh há 5 anos atrás
pai
commit
758eff24ba

+ 2 - 2
components/mlme/core/src/wlan_mlme_main.c

@@ -1733,9 +1733,9 @@ mlme_limit_max_per_index_score(uint32_t per_index_score)
 
 	for (i = 0; i < MAX_INDEX_PER_INI; i++) {
 		score = WLAN_GET_SCORE_PERCENTAGE(per_index_score, i);
-		if (score > MAX_INDEX_SCORE)
+		if (score > MAX_PCT_SCORE)
 			WLAN_SET_SCORE_PERCENTAGE(per_index_score,
-				MAX_INDEX_SCORE, i);
+				MAX_PCT_SCORE, i);
 	}
 
 	return per_index_score;

+ 0 - 10
core/hdd/inc/wlan_hdd_main.h

@@ -3789,16 +3789,6 @@ void hdd_dp_trace_init(struct hdd_config *config) {}
  */
 void hdd_set_rx_mode_rps(bool enable);
 
-/**
- * hdd_limit_max_per_index_score() -check if per index score doesn't exceed 100%
- * (0x64). If it exceed make it 100%
- *
- * @per_index_score: per_index_score as input
- *
- * Return: per_index_score within the max limit
- */
-uint32_t hdd_limit_max_per_index_score(uint32_t per_index_score);
-
 /**
  * hdd_update_score_config - API to update candidate scoring related params
  * configuration parameters

+ 0 - 14
core/hdd/src/wlan_hdd_main.c

@@ -16133,20 +16133,6 @@ void hdd_update_ie_whitelist_attr(struct probe_req_whitelist_attr *ie_whitelist,
 		ie_whitelist->voui[i] = whitelist.probe_req_voui[i];
 }
 
-uint32_t hdd_limit_max_per_index_score(uint32_t per_index_score)
-{
-	uint8_t i, score;
-
-	for (i = 0; i < MAX_INDEX_PER_INI; i++) {
-		score = WLAN_GET_SCORE_PERCENTAGE(per_index_score, i);
-		if (score > MAX_INDEX_SCORE)
-			WLAN_SET_SCORE_PERCENTAGE(per_index_score,
-				MAX_INDEX_SCORE, i);
-	}
-
-	return per_index_score;
-}
-
 QDF_STATUS hdd_update_score_config(
 	struct scoring_config *score_config, struct hdd_context *hdd_ctx)
 {