qcacmn: Add reg API to check for enable channel state

Add new reg API to check if frequency is active (non-passive) 
or not from the secondary channel list.
The API checks the channel state against CHANNEL_STATE_ENABLE.

Change-Id: If41850563e680659ea815f09207ec0b854a2f040
CRs-Fixed: 3136785
Tento commit je obsažen v:
Deeksha Gupta
2022-02-24 11:45:51 +05:30
odevzdal Madan Koyyalamudi
rodič 00f035dcde
revize 8944151a4b
4 změnil soubory, kde provedl 41 přidání a 0 odebrání

Zobrazit soubor

@@ -5863,6 +5863,17 @@ bool reg_is_disable_in_secondary_list_for_freq(struct wlan_objmgr_pdev *pdev,
return ch_state == CHANNEL_STATE_DISABLE;
}
bool reg_is_enable_in_secondary_list_for_freq(struct wlan_objmgr_pdev *pdev,
qdf_freq_t freq)
{
enum channel_state ch_state;
ch_state = reg_get_channel_state_from_secondary_list_for_freq(pdev,
freq);
return ch_state == CHANNEL_STATE_ENABLE;
}
#endif
bool reg_is_passive_for_freq(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq)

Zobrazit soubor

@@ -1249,6 +1249,17 @@ bool reg_is_disable_for_pwrmode(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq,
*/
bool reg_is_disable_in_secondary_list_for_freq(struct wlan_objmgr_pdev *pdev,
qdf_freq_t freq);
/**
* reg_is_enable_in_secondary_list_for_freq() - Check if the given channel
* frequency is in enable state
* @pdev: Pointer to pdev
* @freq: Channel frequency
*
* Return: True if channel state is enabled, else false
*/
bool reg_is_enable_in_secondary_list_for_freq(struct wlan_objmgr_pdev *pdev,
qdf_freq_t freq);
#endif
/**

Zobrazit soubor

@@ -1594,6 +1594,18 @@ bool wlan_reg_is_disable_in_secondary_list_for_freq(
struct wlan_objmgr_pdev *pdev,
qdf_freq_t freq);
/**
* wlan_reg_is_enable_in_secondary_list_for_freq() - Checks in the secondary
* channel list to see if chan state is enabled
* @pdev: pdev ptr
* @freq: Channel center frequency
*
* Return: true or false
*/
bool wlan_reg_is_enable_in_secondary_list_for_freq(
struct wlan_objmgr_pdev *pdev,
qdf_freq_t freq);
/**
* wlan_reg_is_dfs_in_secondary_list_for_freq() - hecks the channel state for
* DFS from the secondary channel list

Zobrazit soubor

@@ -1078,6 +1078,13 @@ bool wlan_reg_is_disable_in_secondary_list_for_freq(
return reg_is_disable_in_secondary_list_for_freq(pdev, freq);
}
bool wlan_reg_is_enable_in_secondary_list_for_freq(
struct wlan_objmgr_pdev *pdev,
qdf_freq_t freq)
{
return reg_is_enable_in_secondary_list_for_freq(pdev, freq);
}
bool wlan_reg_is_dfs_in_secondary_list_for_freq(struct wlan_objmgr_pdev *pdev,
qdf_freq_t freq)
{