qcacmn: Add vdev-mlme caps MASK for restrict_offchannel
Adds new vdev-mlme caps mask WLAN_VDEV_C_RESTRICT_OFFCHAN for tracking restrict offchannel setting. When this bit is set any operations which can cause the AP/GO to leave the operating channel are avoided. Also reads vdev-mlme caps:WLAN_VDEV_C_RESTRICT_OFFCHAN in function policy_mgr_is_dnsc_set() to determine if Do_Not_Switch_Channel is enabled. Moves declaration of policy_mgr_is_dnsc_set() to wlan_policy_mgr_api.h so that it can be used outside of policy manager. Change-Id: I53013af5f4c72917f862630e63333951ec75ce8c CRs-Fixed: 2050999
This commit is contained in:
@@ -210,6 +210,8 @@
|
|||||||
#define WLAN_VDEV_C_WME_TKIPMIC 0x00000080
|
#define WLAN_VDEV_C_WME_TKIPMIC 0x00000080
|
||||||
/* CAPABILITY: bg scanning */
|
/* CAPABILITY: bg scanning */
|
||||||
#define WLAN_VDEV_C_BGSCAN 0x00000100
|
#define WLAN_VDEV_C_BGSCAN 0x00000100
|
||||||
|
/* CAPABILITY: Restrict offchannel */
|
||||||
|
#define WLAN_VDEV_C_RESTRICT_OFFCHAN 0x00000200
|
||||||
|
|
||||||
/* Invalid VDEV identifier */
|
/* Invalid VDEV identifier */
|
||||||
#define WLAN_INVALID_VDEV_ID 255
|
#define WLAN_INVALID_VDEV_ID 255
|
||||||
|
@@ -1895,4 +1895,15 @@ QDF_STATUS policy_mgr_is_chan_ok_for_dnbs(struct wlan_objmgr_psoc *psoc,
|
|||||||
*/
|
*/
|
||||||
uint32_t policy_mgr_get_hw_dbs_nss(struct wlan_objmgr_psoc *psoc,
|
uint32_t policy_mgr_get_hw_dbs_nss(struct wlan_objmgr_psoc *psoc,
|
||||||
struct dbs_nss *nss_dbs);
|
struct dbs_nss *nss_dbs);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* policy_mgr_is_dnsc_set - Check if user has set
|
||||||
|
* "Do_Not_Switch_Channel" for the vdev passed
|
||||||
|
* @vdev: vdev pointer
|
||||||
|
*
|
||||||
|
* Get "Do_Not_Switch_Channel" setting for the vdev passed.
|
||||||
|
*
|
||||||
|
* Return: true for success, else false
|
||||||
|
*/
|
||||||
|
bool policy_mgr_is_dnsc_set(struct wlan_objmgr_vdev *vdev);
|
||||||
#endif /* __WLAN_POLICY_MGR_API_H */
|
#endif /* __WLAN_POLICY_MGR_API_H */
|
||||||
|
@@ -2408,10 +2408,23 @@ bool policy_mgr_is_hw_mode_change_after_vdev_up(struct wlan_objmgr_psoc *psoc)
|
|||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool policy_mgr_vdev_mlme_is_dnsc_set(struct wlan_objmgr_vdev *vdev)
|
bool policy_mgr_is_dnsc_set(struct wlan_objmgr_vdev *vdev)
|
||||||
{
|
{
|
||||||
/* TODO : Check Dont_Switch_Channel status from vdev mlme caps*/
|
bool roffchan;
|
||||||
return false;
|
|
||||||
|
if (!vdev) {
|
||||||
|
policy_mgr_err("Invalid parameter");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
wlan_vdev_obj_lock(vdev);
|
||||||
|
roffchan = wlan_vdev_mlme_cap_get(vdev, WLAN_VDEV_C_RESTRICT_OFFCHAN);
|
||||||
|
wlan_vdev_obj_unlock(vdev);
|
||||||
|
|
||||||
|
policy_mgr_debug("Restrict offchannel:%s",
|
||||||
|
roffchan ? "set" : "clear");
|
||||||
|
|
||||||
|
return roffchan;
|
||||||
}
|
}
|
||||||
|
|
||||||
QDF_STATUS policy_mgr_is_chan_ok_for_dnbs(struct wlan_objmgr_psoc *psoc,
|
QDF_STATUS policy_mgr_is_chan_ok_for_dnbs(struct wlan_objmgr_psoc *psoc,
|
||||||
@@ -2456,7 +2469,7 @@ QDF_STATUS policy_mgr_is_chan_ok_for_dnbs(struct wlan_objmgr_psoc *psoc,
|
|||||||
* return true.
|
* return true.
|
||||||
*/
|
*/
|
||||||
/* TODO: To be enhanced for SBS */
|
/* TODO: To be enhanced for SBS */
|
||||||
if (policy_mgr_vdev_mlme_is_dnsc_set(vdev)) {
|
if (policy_mgr_is_dnsc_set(vdev)) {
|
||||||
if (operating_channel == channel)
|
if (operating_channel == channel)
|
||||||
*ok = true;
|
*ok = true;
|
||||||
else if (WLAN_REG_IS_SAME_BAND_CHANNELS(operating_channel,
|
else if (WLAN_REG_IS_SAME_BAND_CHANNELS(operating_channel,
|
||||||
|
@@ -414,16 +414,4 @@ bool policy_mgr_get_sap_conn_info(struct wlan_objmgr_psoc *psoc,
|
|||||||
bool policy_mgr_get_mode_specific_conn_info(struct wlan_objmgr_psoc *psoc,
|
bool policy_mgr_get_mode_specific_conn_info(struct wlan_objmgr_psoc *psoc,
|
||||||
uint8_t *channel, uint8_t *vdev_id,
|
uint8_t *channel, uint8_t *vdev_id,
|
||||||
enum policy_mgr_con_mode mode);
|
enum policy_mgr_con_mode mode);
|
||||||
|
|
||||||
/**
|
|
||||||
* policy_mgr_vdev_mlme_is_dnsc_set - Check if user has set
|
|
||||||
* "Do_Not_Switch_Channel" for this vdev
|
|
||||||
* @vdev: vdev pointer
|
|
||||||
*
|
|
||||||
* Get "Do_Not_Switch_Channel" setting for this vdev
|
|
||||||
*
|
|
||||||
* Return: true for success, else false
|
|
||||||
*/
|
|
||||||
bool policy_mgr_vdev_mlme_is_dnsc_set(struct wlan_objmgr_vdev *vdev);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user