mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
qcacmn: Return 0 if fail to covert channel/frequency
It is easier to just compare return value of reg_freq_to_chan/ reg_chan_to_freq with 0 to check whether the channel is valid. Change-Id: I4124cc090d31687774d8d71fee4efc822e0a6b38 CRs-Fixed: 2496010
This commit is contained in:
parent
7b0e27336e
commit
1f79c8fbe0
2 changed files with 4 additions and 4 deletions
|
|
@ -1318,7 +1318,7 @@ uint32_t reg_freq_to_chan(struct wlan_objmgr_pdev *pdev,
|
|||
|
||||
if (!IS_VALID_PDEV_REG_OBJ(pdev_priv_obj)) {
|
||||
reg_err("reg pdev priv obj is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
chan_list = pdev_priv_obj->cur_chan_list;
|
||||
|
|
@ -1343,7 +1343,7 @@ uint32_t reg_chan_to_freq(struct wlan_objmgr_pdev *pdev,
|
|||
|
||||
if (!IS_VALID_PDEV_REG_OBJ(pdev_priv_obj)) {
|
||||
reg_err("reg pdev priv obj is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
chan_list = pdev_priv_obj->cur_chan_list;
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ bool reg_is_dfs_ch(struct wlan_objmgr_pdev *pdev, uint32_t chan);
|
|||
* @pdev: Pointer to pdev
|
||||
* @freq: Channel frequency
|
||||
*
|
||||
* Return: Channel number
|
||||
* Return: Channel number if success, otherwise 0
|
||||
*/
|
||||
uint32_t reg_freq_to_chan(struct wlan_objmgr_pdev *pdev, uint32_t freq);
|
||||
|
||||
|
|
@ -250,7 +250,7 @@ uint32_t reg_freq_to_chan(struct wlan_objmgr_pdev *pdev, uint32_t freq);
|
|||
* @pdev: Pointer to pdev
|
||||
* @chan_num: Channel number
|
||||
*
|
||||
* Return: Channel frequency
|
||||
* Return: Channel frequency if success, otherwise 0
|
||||
*/
|
||||
uint32_t reg_chan_to_freq(struct wlan_objmgr_pdev *pdev, uint32_t chan_num);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue