diff --git a/components/target_if/connection_mgr/inc/target_if_cm_roam_offload.h b/components/target_if/connection_mgr/inc/target_if_cm_roam_offload.h new file mode 100644 index 0000000000..53532ac41c --- /dev/null +++ b/components/target_if/connection_mgr/inc/target_if_cm_roam_offload.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2020, The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/** + * DOC: This file contains definitions for target_if roaming offload. + */ + +#include "wlan_cm_roam_public_srtuct.h" + +/** + * target_if_cm_roam_register_tx_ops - Target IF API to register roam + * related tx op. + * @tx_ops: Pointer to tx ops fp struct + * + * Return: QDF_STATUS + */ +QDF_STATUS +target_if_cm_roam_register_tx_ops(struct wlan_cm_roam_tx_ops *tx_ops); 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 new file mode 100644 index 0000000000..1c84612c42 --- /dev/null +++ b/components/target_if/connection_mgr/src/target_if_cm_roam_offload.c @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2020, The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/** + * DOC: This file contains definitions for target_if roaming offload. + */ + +#include "qdf_types.h" +#include "target_if_cm_roam_offload.h" +#include "target_if.h" +#include "wmi_unified_sta_api.h" +#include "wlan_mlme_dbg.h" + +static struct wmi_unified +*target_if_cm_roam_get_wmi_handle_from_vdev(struct wlan_objmgr_vdev *vdev) +{ + struct wlan_objmgr_pdev *pdev; + struct wmi_unified *wmi_handle; + + pdev = wlan_vdev_get_pdev(vdev); + if (!pdev) { + target_if_err("PDEV is NULL"); + return NULL; + } + + wmi_handle = get_wmi_unified_hdl_from_pdev(pdev); + if (!wmi_handle) { + target_if_err("wmi_handle is null"); + return NULL; + } + + return wmi_handle; +} + +static QDF_STATUS +target_if_cm_roam_send_vdev_set_pcl_cmd(struct wlan_objmgr_vdev *vdev, + struct set_pcl_req *req) +{ + wmi_unified_t wmi_handle; + struct set_pcl_cmd_params params; + + wmi_handle = target_if_cm_roam_get_wmi_handle_from_vdev(vdev); + if (!wmi_handle) + return QDF_STATUS_E_FAILURE; + + params.weights = &req->chan_weights; + params.vdev_id = req->vdev_id; + + return wmi_unified_vdev_set_pcl_cmd(wmi_handle, ¶ms); +} + +QDF_STATUS target_if_cm_roam_register_tx_ops(struct wlan_cm_roam_tx_ops *tx_ops) +{ + if (!tx_ops) { + target_if_err("target if tx ops is NULL!"); + return QDF_STATUS_E_INVAL; + } + + tx_ops->send_vdev_set_pcl_cmd = target_if_cm_roam_send_vdev_set_pcl_cmd; + + return QDF_STATUS_SUCCESS; +} 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 new file mode 100644 index 0000000000..2042b6b10f --- /dev/null +++ b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_api.h @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2020, The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * DOC: wlan_cm_roam_api.h + * + * Implementation for the Common Roaming interfaces. + */ + +#include "wlan_mlme_dbg.h" +#include "wlan_cm_roam_public_srtuct.h" +#include "wlan_mlme_main.h" +#include "wlan_mlme_api.h" + +#ifdef WLAN_FEATURE_ROAM_OFFLOAD +/** + * wlan_cm_roam_activate_pcl_per_vdev - Set the PCL command to be sent per + * vdev instead of pdev. + * @psoc: PSOC pointer + * @vdev_id: VDEV id + * @pcl_per_vdev: Activate vdev PCL type. 1- VDEV PCL, 0- PDEV PCL + * + * pcl_per_vdev will be set when: + * STA + STA is connected in DBS mode and roaming init is done on + * the 2nd STA. + * + * pcl_per_vdev will be false when only 1 sta connection exists or + * when 2nd sta gets disconnected + * + * Return: None + */ +void wlan_cm_roam_activate_pcl_per_vdev(struct wlan_objmgr_psoc *psoc, + uint8_t vdev_id, + bool pcl_per_vdev); + +/** + * wlan_cm_roam_is_pcl_per_vdev_active - API to know if the pcl command needs to be + * sent per vdev or not + * @psoc: PSOC pointer + * @vdev_id: VDEV id + * + * Return: PCL level + */ +bool wlan_cm_roam_is_pcl_per_vdev_active(struct wlan_objmgr_psoc *psoc, + uint8_t vdev_id); +#else +static inline +void wlan_cm_roam_activate_pcl_per_vdev(struct wlan_objmgr_psoc *psoc, + uint8_t vdev_id, + bool pcl_per_vdev) +{} + +static inline +bool wlan_cm_roam_is_pcl_per_vdev_active(struct wlan_objmgr_psoc *psoc, + uint8_t vdev_id) +{ + return false; +} +#endif diff --git a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_srtuct.h b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_srtuct.h new file mode 100644 index 0000000000..22087482eb --- /dev/null +++ b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_srtuct.h @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2020, The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/** + * DOC: This file contains definitions for MLME roaming offload. + */ + +#ifndef CM_ROAM_PUBLIC_STRUCT_H__ +#define CM_ROAM_PUBLIC_STRUCT_H__ + +#include "wlan_policy_mgr_public_struct.h" +#include "wlan_objmgr_cmn.h" +#include "reg_services_public_struct.h" + +#if defined(WLAN_FEATURE_HOST_ROAM) || defined(WLAN_FEATURE_ROAM_OFFLOAD) +/** + * enum wlan_cm_rso_control_requestor - Driver disabled roaming requestor that + * will request the roam module to disable roaming based on the mlme operation + * @RSO_INVALID_REQUESTOR: invalid requestor + * @RSO_START_BSS: disable roaming temporarily due to start bss + * @RSO_CHANNEL_SWITCH: disable roaming due to STA channel switch + * @RSO_CONNECT_START: disable roaming temporarily due to connect + * @RSO_SAP_CHANNEL_CHANGE: disable roaming due to SAP channel change + * @RSO_NDP_CON_ON_NDI: disable roaming due to NDP connection on NDI + * @RSO_SET_PCL: Disable roaming to set pcl to firmware + */ +enum wlan_cm_rso_control_requestor { + RSO_INVALID_REQUESTOR, + RSO_START_BSS = BIT(0), + RSO_CHANNEL_SWITCH = BIT(1), + RSO_CONNECT_START = BIT(2), + RSO_SAP_CHANNEL_CHANGE = BIT(3), + RSO_NDP_CON_ON_NDI = BIT(4), + RSO_SET_PCL = BIT(5), +}; +#endif + +/** + * struct set_pcl_req - Request message to set the PCL + * @vdev_id: Vdev id + * @band_mask: Supported band mask + * @chan_weights: PCL channel weights + */ +struct set_pcl_req { + uint8_t vdev_id; + uint32_t band_mask; + struct wmi_pcl_chan_weights chan_weights; +}; + +/** + * wlan_cm_roam_tx_ops - structure of tx function pointers for + * roaming related commands + * @send_vdev_set_pcl_cmd: TX ops function pointer to send set vdev PCL + * command + */ +struct wlan_cm_roam_tx_ops { + QDF_STATUS (*send_vdev_set_pcl_cmd) (struct wlan_objmgr_vdev *vdev, + struct set_pcl_req *req); +}; + +/** + * struct wlan_cm_roam - Connection manager roam configs, state and roam + * data related structure + * @reassoc_resp_frame: Pointer to reassoc frame received in roam synch + * indication + * @reassoc_resp_frame_len: reassoc frame len received in roam synch indication + * @pcl_vdev_cmd_active: Flag to check if vdev level pcl command needs to be + * sent or PDEV level PCL command needs to be sent + */ +struct wlan_cm_roam { + uint8_t *reassoc_resp_frame; + uint16_t reassoc_resp_frame_len; + bool pcl_vdev_cmd_active; +}; +#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 new file mode 100644 index 0000000000..93deb4d797 --- /dev/null +++ b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_tgt_if_tx_api.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2020, The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/** + * DOC: wlan_cm_tgt_if_tx_api.h + * + * This file contains connection manager tx ops related functions + */ +#include "wlan_cm_roam_public_srtuct.h" + +#define GET_CM_ROAM_TX_OPS_FROM_VDEV(vdev) \ + (wlan_vdev_mlme_get_ext_hdl(vdev)->cm_roam_tx_ops) + +#ifdef WLAN_FEATURE_ROAM_OFFLOAD +/** + * wlan_cm_roam_send_set_vdev_pcl - Send vdev set pcl command to firmware + * @psoc: PSOC pointer + * @pcl_req: Set pcl request structure pointer + * + * Return: QDF_STATUS + */ +QDF_STATUS +wlan_cm_roam_send_set_vdev_pcl(struct wlan_objmgr_psoc *psoc, + struct set_pcl_req *pcl_req); +#else +static inline QDF_STATUS +wlan_cm_roam_send_set_vdev_pcl(struct wlan_objmgr_psoc *psoc, + struct set_pcl_req *pcl_req) +{ + return QDF_STATUS_E_FAILURE; +} +#endif 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 new file mode 100644 index 0000000000..5b334f1850 --- /dev/null +++ b/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2020, The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * DOC: wlan_cm_roam_api.c + * + * Implementation for the Common Roaming interfaces. + */ + +#include "wlan_cm_roam_api.h" +#include "wlan_vdev_mlme_api.h" +#include "wlan_mlme_main.h" +#include "wlan_policy_mgr_api.h" + +#ifdef WLAN_FEATURE_ROAM_OFFLOAD +void wlan_cm_roam_activate_pcl_per_vdev(struct wlan_objmgr_psoc *psoc, + uint8_t vdev_id, bool pcl_per_vdev) +{ + struct wlan_objmgr_vdev *vdev; + struct mlme_legacy_priv *mlme_priv; + + vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id, + WLAN_MLME_NB_ID); + if (!vdev) { + mlme_err("vdev object is NULL"); + return; + } + + mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev); + if (!mlme_priv) { + mlme_err("vdev legacy private object is NULL"); + wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID); + return; + } + + wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID); + + /* value - true (vdev pcl) false - pdev pcl */ + mlme_priv->cm_roam.pcl_vdev_cmd_active = pcl_per_vdev; + mlme_legacy_debug("CM_ROAM: SET PCL cmd level - [%s]", + pcl_per_vdev ? "VDEV" : "PDEV"); +} + +bool wlan_cm_roam_is_pcl_per_vdev_active(struct wlan_objmgr_psoc *psoc, + uint8_t vdev_id) +{ + struct wlan_objmgr_vdev *vdev; + struct mlme_legacy_priv *mlme_priv; + + vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id, + WLAN_MLME_NB_ID); + if (!vdev) { + mlme_err("vdev object is NULL"); + return false; + } + + mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev); + if (!mlme_priv) { + mlme_err("vdev legacy private object is NULL"); + wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID); + return false; + } + + wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID); + + return mlme_priv->cm_roam.pcl_vdev_cmd_active; +} +#endif 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 new file mode 100644 index 0000000000..2e1bc2e860 --- /dev/null +++ b/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c @@ -0,0 +1,126 @@ +/* + * Copyright (c) 2020, The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * DOC: wlan_cm_tgt_if_tx_api.c + * + * Implementation for the Common Roaming interfaces. + */ + +#include "wlan_objmgr_psoc_obj.h" +#include "wlan_policy_mgr_api.h" +#include "wlan_mlme_ucfg_api.h" +#include "wlan_reg_services_api.h" +#include "wlan_cm_tgt_if_tx_api.h" +#include "wlan_mlme_public_struct.h" +#include "wma.h" + +#ifdef WLAN_FEATURE_ROAM_OFFLOAD +QDF_STATUS +wlan_cm_roam_send_set_vdev_pcl(struct wlan_objmgr_psoc *psoc, + struct set_pcl_req *pcl_req) +{ + struct wlan_cm_roam_tx_ops roam_tx_ops; + struct saved_channels *freq_list; + struct wlan_objmgr_vdev *vdev; + struct wmi_pcl_chan_weights *weights; + QDF_STATUS status = QDF_STATUS_E_FAILURE; + uint8_t band_capability; + uint16_t i; + + /* + * If vdev_id is WLAN_UMAC_VDEV_ID_MAX, then PDEV pcl command + * needs to be sent + */ + if (pcl_req && pcl_req->vdev_id == WLAN_UMAC_VDEV_ID_MAX) + return QDF_STATUS_E_FAILURE; + + status = ucfg_mlme_get_band_capability(psoc, &band_capability); + if (QDF_IS_STATUS_ERROR(status)) + return QDF_STATUS_E_FAILURE; + + vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, pcl_req->vdev_id, + WLAN_MLME_SB_ID); + if (!vdev) { + mlme_err("vdev object is NULL"); + status = QDF_STATUS_E_FAILURE; + return status; + } + + roam_tx_ops = GET_CM_ROAM_TX_OPS_FROM_VDEV(vdev); + if (!roam_tx_ops.send_vdev_set_pcl_cmd) { + mlme_err("send_vdev_set_pcl_cmd is NULL"); + status = QDF_STATUS_E_FAILURE; + goto end; + } + + freq_list = qdf_mem_malloc(sizeof(*freq_list)); + if (!freq_list) { + status = QDF_STATUS_E_FAILURE; + goto end; + } + + mlme_roam_fill_saved_channels(psoc, freq_list->freq, + &freq_list->num_channels); + + weights = &pcl_req->chan_weights; + for (i = 0; i < freq_list->num_channels; i++) + weights->saved_chan_list[i] = freq_list->freq[i]; + + weights->saved_num_chan = freq_list->num_channels; + status = policy_mgr_get_valid_chan_weights( + psoc, (struct policy_mgr_pcl_chan_weights *)weights); + + qdf_mem_free(freq_list); + + for (i = 0; i < chan_weights->saved_num_chan; i++) { + weights->weighed_valid_list[i] = + wma_map_pcl_weights(weights->weighed_valid_list[i]); + + /* Dont allow roaming on 2G when 5G_ONLY configured */ + if ((band_capability == BAND_5G || + pcl_req->band_mask == BIT(REG_BAND_5G)) && + WLAN_REG_IS_24GHZ_CH_FREQ(weights->saved_chan_list[i])) + weights->weighed_valid_list[i] = + WEIGHT_OF_DISALLOWED_CHANNELS; + + if ((band_capability == BAND_2G || + pcl_req->band_mask == BIT(REG_BAND_2G)) && + !WLAN_REG_IS_24GHZ_CH_FREQ(weights->saved_chan_list[i])) + weights->weighed_valid_list[i] = + WEIGHT_OF_DISALLOWED_CHANNELS; + } + + if (QDF_IS_STATUS_ERROR(status)) { + mlme_err("Error in creating weighed pcl"); + goto end; + } + + mlme_debug("LFR3: Dump Vdev PCL weights"); + policy_mgr_dump_channel_list(weights->saved_num_chan, + weights->saved_chan_list, + weights->weighed_valid_list); + + status = roam_tx_ops.send_vdev_set_pcl_cmd(vdev, pcl_req); + if (QDF_IS_STATUS_ERROR(status)) + mlme_err("set vdev PCL failed"); + +end: + wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_SB_ID); + + return status; +} +#endif diff --git a/components/wmi/inc/wmi_unified_roam_api.h b/components/wmi/inc/wmi_unified_roam_api.h index ff86ef743f..6e03c361d8 100644 --- a/components/wmi/inc/wmi_unified_roam_api.h +++ b/components/wmi/inc/wmi_unified_roam_api.h @@ -1,20 +1,19 @@ /* - * Copyright (c) 2013-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2020, The Linux Foundation. All rights reserved. * - * Permission to use, copy, modify, and/or distribute this software for - * any purpose with or without fee is hereby granted, provided that the - * above copyright notice and this permission notice appear in all - * copies. + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE - * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ + /** * DOC: Implement API's specific to ROAMING component. */ diff --git a/components/wmi/inc/wmi_unified_roam_param.h b/components/wmi/inc/wmi_unified_roam_param.h index e1615cbf9e..c2c74f872a 100644 --- a/components/wmi/inc/wmi_unified_roam_param.h +++ b/components/wmi/inc/wmi_unified_roam_param.h @@ -1,19 +1,17 @@ /* - * Copyright (c) 2013-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2020, The Linux Foundation. All rights reserved. * - * Permission to use, copy, modify, and/or distribute this software for - * any purpose with or without fee is hereby granted, provided that the - * above copyright notice and this permission notice appear in all - * copies. + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE - * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /* diff --git a/components/wmi/src/wmi_unified_roam_api.c b/components/wmi/src/wmi_unified_roam_api.c index e7e5fe67e6..dfdc4e58d7 100644 --- a/components/wmi/src/wmi_unified_roam_api.c +++ b/components/wmi/src/wmi_unified_roam_api.c @@ -1,19 +1,17 @@ /* - * Copyright (c) 2013-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2020, The Linux Foundation. All rights reserved. * - * Permission to use, copy, modify, and/or distribute this software for - * any purpose with or without fee is hereby granted, provided that the - * above copyright notice and this permission notice appear in all - * copies. + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE - * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include diff --git a/components/wmi/src/wmi_unified_roam_tlv.c b/components/wmi/src/wmi_unified_roam_tlv.c index 5042d3154c..7e60b52e70 100644 --- a/components/wmi/src/wmi_unified_roam_tlv.c +++ b/components/wmi/src/wmi_unified_roam_tlv.c @@ -1,20 +1,19 @@ /* - * Copyright (c) 2013-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2020, The Linux Foundation. All rights reserved. * - * Permission to use, copy, modify, and/or distribute this software for - * any purpose with or without fee is hereby granted, provided that the - * above copyright notice and this permission notice appear in all - * copies. + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE - * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ + /** * DOC: Implement API's specific to roaming component. */