diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h index c508b5cbe513..5f93d21992aa 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h @@ -1725,6 +1725,8 @@ struct fw_scan_channels { * @roam_ho_delay_config: Roam HO delay value * @exclude_rm_partial_scan_freq: Exclude the channels in roam full scan that * are already scanned as part of partial scan. + * @roam_full_scan_6ghz_on_disc: Include the 6 GHz channels in roam full scan + * only on prior discovery of any 6 GHz support in the environment. */ struct wlan_mlme_lfr_cfg { bool mawc_roam_enabled; @@ -1845,6 +1847,7 @@ struct wlan_mlme_lfr_cfg { bool enable_ft_over_ds; uint16_t roam_ho_delay_config; uint8_t exclude_rm_partial_scan_freq; + uint8_t roam_full_scan_6ghz_on_disc; }; /** diff --git a/components/target_if/connection_mgr/src/target_if_cm_roam_offload.c b/components/target_if/connection_mgr/src/target_if_cm_roam_offload.c index a88bb4fbe845..4020d3f9ef8e 100644 --- a/components/target_if/connection_mgr/src/target_if_cm_roam_offload.c +++ b/components/target_if/connection_mgr/src/target_if_cm_roam_offload.c @@ -197,6 +197,40 @@ target_if_cm_exclude_rm_partial_scan_freq(struct wlan_objmgr_vdev *vdev, return status; } +/** + * target_if_cm_roam_full_scan_6ghz_on_disc() - Indicate to FW whether to + * include the 6 GHz channels in roam full scan only on prior discovery of any + * 6 GHz support in the environment or by default. + * @vdev: vdev object + * @roam_full_scan_6ghz_on_disc: Include the 6 GHz channels in roam full scan: + * 1 - Include only on prior discovery of any 6 GHz support in the environment + * 0 - Include all the supported 6 GHz channels by default + * + * Return: QDF_STATUS + */ +static QDF_STATUS +target_if_cm_roam_full_scan_6ghz_on_disc(struct wlan_objmgr_vdev *vdev, + uint8_t roam_full_scan_6ghz_on_disc) +{ + QDF_STATUS status = QDF_STATUS_E_FAILURE; + uint8_t vdev_id; + wmi_unified_t wmi_handle; + + wmi_handle = target_if_cm_roam_get_wmi_handle_from_vdev(vdev); + if (!wmi_handle) + return status; + + vdev_id = wlan_vdev_get_id(vdev); + status = target_if_roam_set_param(wmi_handle, vdev_id, + WMI_ROAM_PARAM_ROAM_CONTROL_FULL_SCAN_6GHZ_PSC_ONLY_WITH_RNR, + roam_full_scan_6ghz_on_disc); + + if (QDF_IS_STATUS_ERROR(status)) + target_if_err("Failed to set WMI_ROAM_PARAM_ROAM_CONTROL_FULL_SCAN_6GHZ_PSC_ONLY_WITH_RNR"); + + return status; +} + static void target_if_cm_roam_register_lfr3_ops(struct wlan_cm_roam_tx_ops *tx_ops) { @@ -205,6 +239,8 @@ target_if_cm_roam_register_lfr3_ops(struct wlan_cm_roam_tx_ops *tx_ops) tx_ops->send_roam_ho_delay_config = target_if_cm_roam_ho_delay_config; tx_ops->send_exclude_rm_partial_scan_freq = target_if_cm_exclude_rm_partial_scan_freq; + tx_ops->send_roam_full_scan_6ghz_on_disc = + target_if_cm_roam_full_scan_6ghz_on_disc; } #else static inline void @@ -231,6 +267,13 @@ target_if_cm_exclude_rm_partial_scan_freq(struct wlan_objmgr_vdev *vdev, { return QDF_STATUS_E_NOSUPPORT; } + +static QDF_STATUS +target_if_cm_roam_full_scan_6ghz_on_disc(struct wlan_objmgr_vdev *vdev, + uint8_t roam_full_scan_6ghz_on_disc) +{ + return QDF_STATUS_E_NOSUPPORT; +} #endif /** @@ -1124,6 +1167,10 @@ target_if_cm_roam_send_start(struct wlan_objmgr_vdev *vdev, if (req->wlan_exclude_rm_partial_scan_freq) target_if_cm_exclude_rm_partial_scan_freq( vdev, req->wlan_exclude_rm_partial_scan_freq); + + if (req->wlan_roam_full_scan_6ghz_on_disc) + target_if_cm_roam_full_scan_6ghz_on_disc( + vdev, req->wlan_roam_full_scan_6ghz_on_disc); /* add other wmi commands */ end: return status; @@ -1355,6 +1402,10 @@ target_if_cm_roam_send_update_config(struct wlan_objmgr_vdev *vdev, if (req->wlan_exclude_rm_partial_scan_freq) target_if_cm_exclude_rm_partial_scan_freq( vdev, req->wlan_exclude_rm_partial_scan_freq); + + if (req->wlan_roam_full_scan_6ghz_on_disc) + target_if_cm_roam_full_scan_6ghz_on_disc( + vdev, req->wlan_roam_full_scan_6ghz_on_disc); } end: return status; diff --git a/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c b/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c index 72909b9aaa07..be6b0d6ba4bb 100644 --- a/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c +++ b/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c @@ -302,6 +302,21 @@ cm_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc, return status; } + +QDF_STATUS cm_roam_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc, + uint8_t vdev_id, + uint8_t param_value) +{ + QDF_STATUS status; + + wlan_cm_roam_set_full_scan_6ghz_on_disc(psoc, param_value); + status = wlan_cm_tgt_send_roam_full_scan_6ghz_on_disc(psoc, vdev_id, + param_value); + if (QDF_IS_STATUS_ERROR(status)) + mlme_debug("fail to send 6 GHz channels inclusion in full scan"); + + return status; +} #else static inline void cm_roam_reason_vsie(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id, @@ -562,6 +577,9 @@ cm_roam_start_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id, start_req->wlan_exclude_rm_partial_scan_freq = wlan_cm_get_exclude_rm_partial_scan_freq(psoc); + start_req->wlan_roam_full_scan_6ghz_on_disc = + wlan_cm_roam_get_full_scan_6ghz_on_disc(psoc); + status = wlan_cm_tgt_send_roam_start_req(psoc, vdev_id, start_req); if (QDF_IS_STATUS_ERROR(status)) mlme_debug("fail to send roam start"); @@ -617,6 +635,9 @@ cm_roam_update_config_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id, update_req->wlan_exclude_rm_partial_scan_freq = wlan_cm_get_exclude_rm_partial_scan_freq(psoc); + update_req->wlan_roam_full_scan_6ghz_on_disc = + wlan_cm_roam_get_full_scan_6ghz_on_disc(psoc); + status = wlan_cm_tgt_send_roam_update_req(psoc, vdev_id, update_req); if (QDF_IS_STATUS_ERROR(status)) mlme_debug("fail to send update config"); diff --git a/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.h b/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.h index e081514670e2..5ae40f27e891 100644 --- a/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.h +++ b/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.h @@ -142,6 +142,20 @@ cm_roam_send_ho_delay_config(struct wlan_objmgr_psoc *psoc, QDF_STATUS cm_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id, uint8_t param_value); + +/** + * cm_roam_full_scan_6ghz_on_disc() - Include the 6 GHz channels in roam full + * scan only on prior discovery of any 6 GHz support in the environment + * @psoc: PSOC pointer + * @vdev_id: vdev id + * @param_value: Include the 6 GHz channels in roam full scan: + * 1 - Include only on prior discovery of any 6 GHz support in the environment + * 0 - Include all the supported 6 GHz channels by default + * + * Return: QDF_STATUS + */ +QDF_STATUS cm_roam_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc, + uint8_t vdev_id, uint8_t param_value); #else static inline QDF_STATUS cm_roam_send_rt_stats_config(struct wlan_objmgr_psoc *psoc, @@ -163,6 +177,13 @@ cm_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc, { return QDF_STATUS_E_NOSUPPORT; } + +static inline +QDF_STATUS cm_roam_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc, + uint8_t vdev_id, uint8_t param_value) +{ + return QDF_STATUS_E_NOSUPPORT; +} #endif /** diff --git a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_api.h b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_api.h index 517f4dcf2cae..6cdd5965714b 100644 --- a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_api.h +++ b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_api.h @@ -183,6 +183,33 @@ wlan_cm_set_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc, uint8_t wlan_cm_get_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc); +/** + * wlan_cm_roam_set_full_scan_6ghz_on_disc() - set value to include the 6 GHz + * channels in roam full scan only on prior discovery of any 6 GHz support in + * the environment. + * @psoc: PSOC pointer + * @roam_full_scan_6ghz_on_disc: Include the 6 GHz channels in roam full scan: + * 1 - Include only on prior discovery of any 6 GHz support in the environment + * 0 - Include all the supported 6 GHz channels by default + * + * Return: none + */ +void +wlan_cm_roam_set_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc, + uint8_t roam_full_scan_6ghz_on_disc); + +/** + * wlan_cm_roam_get_full_scan_6ghz_on_disc() - Get value to include the 6 GHz + * channels in roam full scan only on prior discovery of any 6 GHz support in + * the environment. + * @psoc: PSOC pointer + * + * Return: + * 1 - Include only on prior discovery of any 6 GHz support in the environment + * 0 - Include all the supported 6 GHz channels by default + */ +uint8_t wlan_cm_roam_get_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc); + #else static inline QDF_STATUS wlan_cm_enable_roaming_on_connected_sta(struct wlan_objmgr_pdev *pdev, @@ -793,5 +820,11 @@ wlan_cm_get_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc) { return 0; } + +static inline uint8_t +wlan_cm_roam_get_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc) +{ + return 0; +} #endif /* FEATURE_ROAM_OFFLOAD */ #endif /* WLAN_CM_ROAM_API_H__ */ diff --git a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h index ec2f04962c95..4139be7f2e56 100644 --- a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h +++ b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h @@ -1171,6 +1171,8 @@ enum roam_rt_stats_params { * @wlan_roam_ho_delay_config: roam HO delay value * @wlan_exclude_rm_partial_scan_freq: Include/exclude the channels in roam full * scan that are already scanned as part of partial scan. + * @wlan_roam_full_scan_6ghz_on_disc: Include the 6 GHz channels in roam full + * scan only on prior discovery of any 6 GHz support in the environment. */ struct wlan_roam_start_config { struct wlan_roam_offload_scan_rssi_params rssi_params; @@ -1192,6 +1194,7 @@ struct wlan_roam_start_config { uint8_t wlan_roam_rt_stats_config; uint16_t wlan_roam_ho_delay_config; uint8_t wlan_exclude_rm_partial_scan_freq; + uint8_t wlan_roam_full_scan_6ghz_on_disc; /* other wmi cmd structures */ }; @@ -1240,6 +1243,8 @@ struct wlan_roam_stop_config { * @wlan_roam_ho_delay_config: roam HO delay value * @wlan_exclude_rm_partial_scan_freq: Include/exclude the channels in roam full * scan that are already scanned as part of partial scan. + * @wlan_roam_full_scan_6ghz_on_disc: Include the 6 GHz channels in roam full + * scan only on prior discovery of any 6 GHz support in the environment. */ struct wlan_roam_update_config { struct wlan_roam_beacon_miss_cnt beacon_miss_cnt; @@ -1256,6 +1261,7 @@ struct wlan_roam_update_config { uint8_t wlan_roam_rt_stats_config; uint16_t wlan_roam_ho_delay_config; uint8_t wlan_exclude_rm_partial_scan_freq; + uint8_t wlan_roam_full_scan_6ghz_on_disc; }; #if defined(WLAN_FEATURE_HOST_ROAM) || defined(WLAN_FEATURE_ROAM_OFFLOAD) @@ -1384,6 +1390,8 @@ struct set_pcl_req { * @send_roam_ho_delay_config: Send roam Hand-off delay value to FW * @send_exclude_rm_partial_scan_freq: Include/exclude the channels in roam full * scan that are already scanned as part of partial scan. + * @send_roam_full_scan_6ghz_on_disc: Include the 6 GHz channels in roam full + * scan only on prior discovery of any 6 GHz support in the environment. */ struct wlan_cm_roam_tx_ops { QDF_STATUS (*send_vdev_set_pcl_cmd)(struct wlan_objmgr_vdev *vdev, @@ -1417,6 +1425,9 @@ struct wlan_cm_roam_tx_ops { QDF_STATUS (*send_exclude_rm_partial_scan_freq)( struct wlan_objmgr_vdev *vdev, uint8_t value); + QDF_STATUS (*send_roam_full_scan_6ghz_on_disc)( + struct wlan_objmgr_vdev *vdev, + uint8_t value); #endif }; diff --git a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_ucfg_api.h b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_ucfg_api.h index 73f4f8667110..b4ec5f2543dd 100644 --- a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_ucfg_api.h +++ b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_ucfg_api.h @@ -212,6 +212,21 @@ ucfg_cm_roam_send_ho_delay_config(struct wlan_objmgr_pdev *pdev, QDF_STATUS ucfg_cm_exclude_rm_partial_scan_freq(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id, uint8_t param_value); + +/** + * ucfg_cm_roam_full_scan_6ghz_on_disc() - Include the 6 GHz channels in roam + * full scan only on prior discovery of any 6 GHz support in the environment. + * @pdev: Pointer to pdev + * @vdev_id: vdev id + * @param_value: Include the 6 GHz channels in roam full scan: + * 1 - Include only on prior discovery of any 6 GHz support in the environment + * 0 - Include all the supported 6 GHz channels by default + * + * Return: QDF_STATUS + */ +QDF_STATUS ucfg_cm_roam_full_scan_6ghz_on_disc(struct wlan_objmgr_pdev *pdev, + uint8_t vdev_id, + uint8_t param_value); #else static inline QDF_STATUS ucfg_cm_update_roam_scan_scheme_bitmap(struct wlan_objmgr_psoc *psoc, @@ -255,4 +270,11 @@ ucfg_cm_exclude_rm_partial_scan_freq(struct wlan_objmgr_pdev *pdev, { return QDF_STATUS_SUCCESS; } + +static inline QDF_STATUS +ucfg_cm_roam_full_scan_6ghz_on_disc(struct wlan_objmgr_pdev *pdev, + uint8_t vdev_id, uint8_t param_value) +{ + return QDF_STATUS_SUCCESS; +} #endif diff --git a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_tgt_if_tx_api.h b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_tgt_if_tx_api.h index be9a1b4454ff..05486e85645a 100644 --- a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_tgt_if_tx_api.h +++ b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_tgt_if_tx_api.h @@ -76,6 +76,23 @@ QDF_STATUS wlan_cm_tgt_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id, uint8_t exclude_rm_partial_scan_freq); + +/** + * wlan_cm_tgt_send_roam_full_scan_6ghz_on_disc() - Include the 6 GHz channels + * in roam full scan only on prior discovery of any 6 GHz support in the + * environment. + * @psoc: PSOC pointer + * @roam_inc_6ghz_if_disc: Include the 6 GHz channels in roam full scan: + * 1 - Include only on prior discovery of any 6 GHz support in the environment + * 0 - Include all the supported 6 GHz channels by default + * + * Return: QDF_STATUS + */ +QDF_STATUS +wlan_cm_tgt_send_roam_full_scan_6ghz_on_disc( + struct wlan_objmgr_psoc *psoc, + uint8_t vdev_id, + uint8_t roam_full_scan_6ghz_on_disc); #else static inline QDF_STATUS wlan_cm_roam_send_set_vdev_pcl(struct wlan_objmgr_psoc *psoc, @@ -105,6 +122,15 @@ wlan_cm_tgt_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc, { return QDF_STATUS_E_FAILURE; } + +static inline QDF_STATUS +wlan_cm_tgt_send_roam_full_scan_6ghz_on_disc( + struct wlan_objmgr_psoc *psoc, + uint8_t vdev_id, + uint8_t roam_full_scan_6ghz_on_disc) +{ + return QDF_STATUS_E_FAILURE; +} #endif /* WLAN_FEATURE_ROAM_OFFLOAD */ #if defined(WLAN_FEATURE_HOST_ROAM) || defined(WLAN_FEATURE_ROAM_OFFLOAD) diff --git a/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c b/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c index cc66dc58c572..001520f6a8df 100644 --- a/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c +++ b/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c @@ -944,4 +944,31 @@ wlan_cm_get_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc) return mlme_obj->cfg.lfr.exclude_rm_partial_scan_freq; } + +void +wlan_cm_roam_set_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc, + uint8_t roam_full_scan_6ghz_on_disc) +{ + struct wlan_mlme_psoc_ext_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_ext_obj(psoc); + if (!mlme_obj) + return; + + mlme_obj->cfg.lfr.roam_full_scan_6ghz_on_disc = + roam_full_scan_6ghz_on_disc; +} + +uint8_t wlan_cm_roam_get_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc) +{ + struct wlan_mlme_psoc_ext_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_ext_obj(psoc); + if (!mlme_obj) { + mlme_legacy_err("Failed to get MLME Obj"); + return 0; + } + + return mlme_obj->cfg.lfr.roam_full_scan_6ghz_on_disc; +} #endif diff --git a/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_ucfg_api.c b/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_ucfg_api.c index 3183e8a437d4..bfbd2e756301 100644 --- a/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_ucfg_api.c +++ b/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_ucfg_api.c @@ -156,4 +156,13 @@ ucfg_cm_exclude_rm_partial_scan_freq(struct wlan_objmgr_pdev *pdev, return cm_exclude_rm_partial_scan_freq(psoc, vdev_id, param_value); } + +QDF_STATUS ucfg_cm_roam_full_scan_6ghz_on_disc(struct wlan_objmgr_pdev *pdev, + uint8_t vdev_id, + uint8_t param_value) +{ + struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev); + + return cm_roam_full_scan_6ghz_on_disc(psoc, vdev_id, param_value); +} #endif /* WLAN_FEATURE_ROAM_OFFLOAD */ diff --git a/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c b/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c index 924de0d686f1..f69e416f59a0 100644 --- a/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c +++ b/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c @@ -266,6 +266,39 @@ wlan_cm_tgt_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc, return status; } + +QDF_STATUS wlan_cm_tgt_send_roam_full_scan_6ghz_on_disc( + struct wlan_objmgr_psoc *psoc, + uint8_t vdev_id, + uint8_t roam_full_scan_6ghz_on_disc) +{ + QDF_STATUS status; + struct wlan_cm_roam_tx_ops *roam_tx_ops; + struct wlan_objmgr_vdev *vdev; + + vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id, + WLAN_MLME_NB_ID); + if (!vdev) + return QDF_STATUS_E_INVAL; + + roam_tx_ops = wlan_cm_roam_get_tx_ops_from_vdev(vdev); + if (!roam_tx_ops || !roam_tx_ops->send_roam_full_scan_6ghz_on_disc) { + mlme_err("vdev %d send_roam_full_scan_6ghz_on_disc is NULL", + vdev_id); + wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID); + return QDF_STATUS_E_INVAL; + } + + status = roam_tx_ops->send_roam_full_scan_6ghz_on_disc( + vdev, roam_full_scan_6ghz_on_disc); + if (QDF_IS_STATUS_ERROR(status)) + mlme_debug("vdev %d fail to send inclusion of 6 GHz channels", + vdev_id); + + wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID); + + return status; +} #endif #if defined(WLAN_FEATURE_HOST_ROAM) || defined(WLAN_FEATURE_ROAM_OFFLOAD) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 511d6e6a1c26..bc93b02a6359 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -4648,6 +4648,8 @@ roam_control_policy[QCA_ATTR_ROAM_CONTROL_MAX + 1] = { [QCA_ATTR_ROAM_CONTROL_HO_DELAY_FOR_RX] = {.type = NLA_U16}, [QCA_ATTR_ROAM_CONTROL_FULL_SCAN_NO_REUSE_PARTIAL_SCAN_FREQ] = { .type = NLA_U8}, + [QCA_ATTR_ROAM_CONTROL_FULL_SCAN_6GHZ_ONLY_ON_PRIOR_DISCOVERY] = { + .type = NLA_U8}, }; /** @@ -5047,6 +5049,11 @@ hdd_send_roam_scan_period_to_sme(struct hdd_context *hdd_ctx, #define INCLUDE_ROAM_PARTIAL_SCAN_FREQ 0 #define EXCLUDE_ROAM_PARTIAL_SCAN_FREQ 1 +/* Include the supported 6 GHz PSC channels in full scan by default */ +#define INCLUDE_6GHZ_IN_FULL_SCAN_BY_DEF 0 +/* Include the 6 GHz channels in roam full scan only on prior discovery */ +#define INCLUDE_6GHZ_IN_FULL_SCAN_IF_DISC 1 + /** * hdd_set_roam_with_control_config() - Set roam control configuration * @hdd_ctx: HDD context @@ -5275,6 +5282,25 @@ hdd_set_roam_with_control_config(struct hdd_context *hdd_ctx, hdd_err("Fail to exclude roam partial scan channels"); } + attr = tb2[QCA_ATTR_ROAM_CONTROL_FULL_SCAN_6GHZ_ONLY_ON_PRIOR_DISCOVERY]; + if (attr) { + value = nla_get_u8(attr); + if (value < INCLUDE_6GHZ_IN_FULL_SCAN_BY_DEF || + value > INCLUDE_6GHZ_IN_FULL_SCAN_IF_DISC) { + hdd_err("Invalid value %d to decide inclusion of 6 GHz channels", + value); + return -EINVAL; + } + + hdd_debug("Include 6 GHz channels in roam full scan by %s", + value ? "prior discovery" : "default"); + + status = ucfg_cm_roam_full_scan_6ghz_on_disc(hdd_ctx->pdev, + vdev_id, value); + if (QDF_IS_STATUS_ERROR(status)) + hdd_err("Fail to decide inclusion of 6 GHz channels"); + } + return qdf_status_to_os_return(status); }