qcacmn: Print an error message when Agile spectral frequency is 0
When agile spectral frequency is 0 and user tries to start agile spectral scan, 'A parameter is not initialized' message is thrown from user space but that message is not enough to identify that agile spectral frequency is not initialized. To address this, print an error message from driver when Agile spectral frequency is 0. CRs-Fixed: 2921000 Change-Id: Ibbb144a57774ad274b31015c7a04aa6097daf09f
This commit is contained in:

committed by
snandini

parent
0e7182e1ca
commit
ec05e79403
@@ -4833,11 +4833,16 @@ target_if_start_spectral_scan(struct wlan_objmgr_pdev *pdev,
|
|||||||
op_ch_width = ch_width[SPECTRAL_SCAN_MODE_NORMAL];
|
op_ch_width = ch_width[SPECTRAL_SCAN_MODE_NORMAL];
|
||||||
agile_ch_width = ch_width[SPECTRAL_SCAN_MODE_AGILE];
|
agile_ch_width = ch_width[SPECTRAL_SCAN_MODE_AGILE];
|
||||||
|
|
||||||
if (!spectral->params[smode].ss_frequency.cfreq1 ||
|
if (!spectral->params[smode].ss_frequency.cfreq1) {
|
||||||
(agile_ch_width == CH_WIDTH_80P80MHZ &&
|
|
||||||
!spectral->params[smode].ss_frequency.cfreq2)) {
|
|
||||||
*err = SPECTRAL_SCAN_ERR_PARAM_NOT_INITIALIZED;
|
*err = SPECTRAL_SCAN_ERR_PARAM_NOT_INITIALIZED;
|
||||||
qdf_spin_unlock(&spectral->spectral_lock);
|
qdf_spin_unlock(&spectral->spectral_lock);
|
||||||
|
spectral_err("Agile Spectral cfreq1 is 0");
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
} else if (agile_ch_width == CH_WIDTH_80P80MHZ &&
|
||||||
|
!spectral->params[smode].ss_frequency.cfreq2) {
|
||||||
|
*err = SPECTRAL_SCAN_ERR_PARAM_NOT_INITIALIZED;
|
||||||
|
qdf_spin_unlock(&spectral->spectral_lock);
|
||||||
|
spectral_err("Agile Spectral cfreq2 is 0");
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user