소스 검색

qcacld-3.0: Don't set SURVEY_INFO_NOISE_DBM when noise floor is zero

Currently host is sending noise floor as 0, even if channel info
event is not received from FW. This is stopping user space derive
noise floor information from other parameters like bandwidth.

To address this, do not set SURVEY_INFO_NOISE_DBM flag if the
noise floor is 0.

Change-Id: Icffdde6bce762c750200b4f1eefd17818780150e
CRs-Fixed: 2949905
Bapiraju Alla 4 년 전
부모
커밋
30ecff7940
1개의 변경된 파일8개의 추가작업 그리고 2개의 파일을 삭제
  1. 8 2
      core/hdd/src/wlan_hdd_stats.c

+ 8 - 2
core/hdd/src/wlan_hdd_stats.c

@@ -5752,7 +5752,10 @@ static bool wlan_fill_survey_result(struct survey_info *survey, int opfreq,
 
 	survey->channel = channels;
 	survey->noise = chan_info->noise_floor;
-	survey->filled = SURVEY_INFO_NOISE_DBM;
+	survey->filled = 0;
+
+	if (chan_info->noise_floor)
+		survey->filled |= SURVEY_INFO_NOISE_DBM;
 
 	if (opfreq == chan_info->freq)
 		survey->filled |= SURVEY_INFO_IN_USE;
@@ -5783,7 +5786,10 @@ static bool wlan_fill_survey_result(struct survey_info *survey, int opfreq,
 
 	survey->channel = channels;
 	survey->noise = chan_info->noise_floor;
-	survey->filled = SURVEY_INFO_NOISE_DBM;
+	survey->filled = 0;
+
+	if (chan_info->noise_floor)
+		survey->filled |= SURVEY_INFO_NOISE_DBM;
 
 	if (opfreq == chan_info->freq)
 		survey->filled |= SURVEY_INFO_IN_USE;