qcacmn: Clamp the FFT bin values before filling SAMP message
Each FFT bin value is represented as an 8 bit integer in SAMP message. But depending on the configuration, the FFT bin value reported by HW might exceed 8 bits. Clamp the FFT bin value between the min and max value which can be represented by 8 bits. For linear mode, min and max FFT bin value which can be represented by 8 bit is 0 and U8_MAX respectively. For dBm mode, min and max FFT bin value which can be represented by 8 bit is S8_MIN and S8_MAX respectively. CRs-Fixed: 3056458 Change-Id: I9ec75f781a130d3ed0d0d9393975fd5874961ce0
这个提交包含在:
@@ -117,6 +117,16 @@ enum spectral_report_mode {
|
||||
SPECTRAL_REPORT_MODE_MAX,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum spectral_pwr_format: Spectral FFT bin pwr format
|
||||
* @SPECTRAL_PWR_FORMAT_LINEAR: Linear mode
|
||||
* @SPECTRAL_PWR_FORMAT_DBM: dBm mode
|
||||
*/
|
||||
enum spectral_pwr_format {
|
||||
SPECTRAL_PWR_FORMAT_LINEAR = 0,
|
||||
SPECTRAL_PWR_FORMAT_DBM = 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum spectral_scan_priority: Spectral scan priority
|
||||
* @SPECTRAL_SCAN_PRIORITY_LOW: Low priority Spectral scan
|
||||
|
在新工单中引用
屏蔽一个用户