qcacld-3.0: Refactor VDEV opmode config during create

Refactor the hdd_vdev_create() API to move device mode
based VDEV config to a new API.
The new API calls required configuration functions
based on the device mode.

Change-Id: I54c5412577b70d92652cb16fcfb10e4d69e6f6fd
CRs-Fixed: 3445149
This commit is contained in:
Vinod Kumar Pirla
2022-09-19 18:38:28 +05:30
committed by Madan Koyyalamudi
parent 7ff7bac480
commit 528031916a
6 changed files with 132 additions and 105 deletions

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. 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
@@ -764,9 +764,7 @@ QDF_STATUS ucfg_fwol_configure_global_params(struct wlan_objmgr_psoc *psoc,
/**
* ucfg_fwol_configure_vdev_params - API to configure vdev specific params
* @psoc: pointer to psoc object
* @pdev: pointer to pdev object
* @device_mode: device mode
* @vdev_id: vdev ID
* @vdev: pointer to vdev object
*
* Used to configure per vdev firmware params based on device mode. This is
* invoked from hdd during vdev creation.
@@ -774,9 +772,7 @@ QDF_STATUS ucfg_fwol_configure_global_params(struct wlan_objmgr_psoc *psoc,
* Return: QDF Status
*/
QDF_STATUS ucfg_fwol_configure_vdev_params(struct wlan_objmgr_psoc *psoc,
struct wlan_objmgr_pdev *pdev,
enum QDF_OPMODE device_mode,
uint8_t vdev_id);
struct wlan_objmgr_vdev *vdev);
#else
static inline QDF_STATUS ucfg_fwol_psoc_open(struct wlan_objmgr_psoc *psoc)
{
@@ -1088,8 +1084,7 @@ ucfg_fwol_configure_global_params(struct wlan_objmgr_psoc *psoc,
static inline QDF_STATUS
ucfg_fwol_configure_vdev_params(struct wlan_objmgr_psoc *psoc,
struct wlan_objmgr_pdev *pdev,
enum QDF_OPMODE device_mode, uint8_t vdev_id)
struct wlan_objmgr_vdev *vdev)
{
return QDF_STATUS_E_FAILURE;
}

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. 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
@@ -1227,25 +1227,27 @@ QDF_STATUS ucfg_fwol_configure_global_params(struct wlan_objmgr_psoc *psoc,
}
QDF_STATUS ucfg_fwol_configure_vdev_params(struct wlan_objmgr_psoc *psoc,
struct wlan_objmgr_pdev *pdev,
enum QDF_OPMODE device_mode,
uint8_t vdev_id)
struct wlan_objmgr_vdev *vdev)
{
QDF_STATUS status = QDF_STATUS_SUCCESS;
uint32_t value;
QDF_STATUS status;
uint8_t vdev_id = wlan_vdev_get_id(vdev);
if (device_mode == QDF_SAP_MODE) {
switch (wlan_vdev_mlme_get_opmode(vdev)) {
case QDF_SAP_MODE:
status = ucfg_fwol_get_sap_sho(psoc, &value);
if (QDF_IS_STATUS_ERROR(status))
return status;
break;
status = fwol_set_sap_sho(psoc, vdev_id, value);
if (QDF_IS_STATUS_ERROR(status))
return status;
break;
status = fwol_set_sap_wds_config(psoc, vdev_id);
if (QDF_IS_STATUS_ERROR(status))
return status;
break;
default:
status = QDF_STATUS_SUCCESS;
break;
}
return status;