mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
qcacmn: Store DBR pdev objects in psoc
In dynamic HW mode switch feature, DBR pdev object of primary device needs to be re-assigned after HW mode change. Store the DBR objects in psoc for all devs and then use the mapped pdev to retrieve the corresponding DBR object. Change-Id: Ie56bdf9d430a5a3ca7e4e9a872018257d032c908 CRs-Fixed: 2589447
This commit is contained in:
parent
d32c59edb5
commit
b91d7bee26
2 changed files with 18 additions and 4 deletions
|
|
@ -354,6 +354,7 @@ QDF_STATUS target_if_direct_buf_rx_pdev_create_handler(
|
|||
struct wlan_objmgr_pdev *pdev, void *data)
|
||||
{
|
||||
struct direct_buf_rx_pdev_obj *dbr_pdev_obj;
|
||||
struct direct_buf_rx_psoc_obj *dbr_psoc_obj;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
uint8_t num_modules;
|
||||
QDF_STATUS status;
|
||||
|
|
@ -372,13 +373,20 @@ QDF_STATUS target_if_direct_buf_rx_pdev_create_handler(
|
|||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
dbr_psoc_obj =
|
||||
wlan_objmgr_psoc_get_comp_private_obj(psoc,
|
||||
WLAN_TARGET_IF_COMP_DIRECT_BUF_RX);
|
||||
|
||||
if (!dbr_psoc_obj) {
|
||||
direct_buf_rx_err("dir buf rx psoc object is null");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
dbr_pdev_obj = qdf_mem_malloc(sizeof(*dbr_pdev_obj));
|
||||
|
||||
if (!dbr_pdev_obj)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
||||
direct_buf_rx_info("Dbr pdev obj %pK", dbr_pdev_obj);
|
||||
|
||||
status = wlan_objmgr_pdev_component_obj_attach(pdev,
|
||||
WLAN_TARGET_IF_COMP_DIRECT_BUF_RX,
|
||||
dbr_pdev_obj, QDF_STATUS_SUCCESS);
|
||||
|
|
@ -390,9 +398,13 @@ QDF_STATUS target_if_direct_buf_rx_pdev_create_handler(
|
|||
return status;
|
||||
}
|
||||
|
||||
dbr_psoc_obj->dbr_pdev_obj[wlan_objmgr_pdev_get_pdev_id(pdev)] =
|
||||
dbr_pdev_obj;
|
||||
|
||||
num_modules = get_num_dbr_modules_per_pdev(pdev);
|
||||
direct_buf_rx_info("Number of modules = %d pdev %d", num_modules,
|
||||
wlan_objmgr_pdev_get_pdev_id(pdev));
|
||||
direct_buf_rx_info("Number of modules = %d pdev %d DBR pdev obj %pK",
|
||||
num_modules, wlan_objmgr_pdev_get_pdev_id(pdev),
|
||||
dbr_pdev_obj);
|
||||
dbr_pdev_obj->num_modules = num_modules;
|
||||
|
||||
if (!dbr_pdev_obj->num_modules) {
|
||||
|
|
|
|||
|
|
@ -210,10 +210,12 @@ struct direct_buf_rx_pdev_obj {
|
|||
* struct direct_buf_rx_psoc_obj - Direct Buf RX psoc object struct
|
||||
* @hal_soc: Opaque HAL SOC handle
|
||||
* @osdev: QDF os device handle
|
||||
* @dbr_pdev_objs: array of DBR pdev objects
|
||||
*/
|
||||
struct direct_buf_rx_psoc_obj {
|
||||
void *hal_soc;
|
||||
qdf_device_t osdev;
|
||||
struct direct_buf_rx_pdev_obj *dbr_pdev_obj[WLAN_UMAC_MAX_PDEVS];
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue