qcacmn: Replace void * tgt_if_handle with abstract type
Replace void * tgt_if_handle of objmgr psoc/pdev with abstract type handles provided by target interface Change-Id: I9e0ae991776daa0c25c4ad7b4e4dc022441318a3 CRs-Fixed: 2482708
Цей коміт міститься в:
@@ -1528,14 +1528,13 @@ static inline int32_t target_pdev_get_phy_idx
|
||||
static inline struct wmi_unified *GET_WMI_HDL_FROM_PSOC(
|
||||
struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
void *tgt_if_handle;
|
||||
struct target_psoc_info *tgt_if_handle;
|
||||
|
||||
if (psoc) {
|
||||
tgt_if_handle = psoc->tgt_if_handle;
|
||||
|
||||
if (tgt_if_handle)
|
||||
return (target_psoc_get_wmi_hdl(
|
||||
(struct target_psoc_info *)tgt_if_handle));
|
||||
return target_psoc_get_wmi_hdl(tgt_if_handle);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
@@ -1555,7 +1554,7 @@ static inline struct wmi_unified *GET_WMI_HDL_FROM_PSOC(
|
||||
static inline struct wmi_unified *GET_WMI_HDL_FROM_PDEV(
|
||||
struct wlan_objmgr_pdev *pdev)
|
||||
{
|
||||
void *tgt_if_handle;
|
||||
struct target_pdev_info *tgt_if_handle;
|
||||
|
||||
if (pdev) {
|
||||
tgt_if_handle = pdev->tgt_if_handle;
|
||||
|
40
target_if/dispatcher/inc/target_if_pub.h
Звичайний файл
40
target_if/dispatcher/inc/target_if_pub.h
Звичайний файл
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2019 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file contains the structure definitions of target interface
|
||||
* used for the abstraction across various layers.
|
||||
*/
|
||||
|
||||
#ifndef _TARGET_IF_PUB_H_
|
||||
#define _TARGET_IF_PUB_H_
|
||||
|
||||
/**
|
||||
* typedef target_pdev_info_t - Opaque definition of target pdev
|
||||
* information structure
|
||||
*/
|
||||
struct target_pdev_info;
|
||||
typedef struct target_pdev_info target_pdev_info_t;
|
||||
|
||||
/**
|
||||
* typedef target_psoc_info_t - Opaque definition of target psoc
|
||||
* information structure
|
||||
*/
|
||||
struct target_psoc_info;
|
||||
typedef struct target_psoc_info target_psoc_info_t;
|
||||
#endif /* _TARGET_IF_PUB_H_ */
|
@@ -240,7 +240,7 @@ void lmac_set_htc_hdl(struct wlan_objmgr_psoc *psoc,
|
||||
target_if_err("psoc is null");
|
||||
return;
|
||||
}
|
||||
tgt_hdl = (struct target_psoc_info *)wlan_psoc_get_tgt_if_handle(psoc);
|
||||
tgt_hdl = wlan_psoc_get_tgt_if_handle(psoc);
|
||||
if (!tgt_hdl) {
|
||||
target_if_err("target_psoc_info is null");
|
||||
return;
|
||||
|
@@ -55,8 +55,7 @@ static int init_deinit_service_ready_event_handler(ol_scn_t scn_handle,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
tgt_hdl = (struct target_psoc_info *)wlan_psoc_get_tgt_if_handle(
|
||||
psoc);
|
||||
tgt_hdl = wlan_psoc_get_tgt_if_handle(psoc);
|
||||
if (!tgt_hdl) {
|
||||
target_if_err("target_psoc_info is null in service ready ev");
|
||||
return -EINVAL;
|
||||
@@ -208,8 +207,7 @@ static int init_deinit_service_ext_ready_event_handler(ol_scn_t scn_handle,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
tgt_hdl = (struct target_psoc_info *)wlan_psoc_get_tgt_if_handle(
|
||||
psoc);
|
||||
tgt_hdl = wlan_psoc_get_tgt_if_handle(psoc);
|
||||
if (!tgt_hdl) {
|
||||
target_if_err("target_psoc_info is null in service ready ev");
|
||||
return -EINVAL;
|
||||
@@ -332,8 +330,7 @@ static int init_deinit_service_available_handler(ol_scn_t scn_handle,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
tgt_hdl = (struct target_psoc_info *)wlan_psoc_get_tgt_if_handle(
|
||||
psoc);
|
||||
tgt_hdl = wlan_psoc_get_tgt_if_handle(psoc);
|
||||
if (!tgt_hdl) {
|
||||
target_if_err("target_psoc_info is null");
|
||||
return -EINVAL;
|
||||
@@ -382,8 +379,7 @@ static int init_deinit_ready_event_handler(ol_scn_t scn_handle,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
tgt_hdl = (struct target_psoc_info *)wlan_psoc_get_tgt_if_handle(
|
||||
psoc);
|
||||
tgt_hdl = wlan_psoc_get_tgt_if_handle(psoc);
|
||||
if (!tgt_hdl) {
|
||||
target_if_err("target_psoc_info is null");
|
||||
return -EINVAL;
|
||||
@@ -534,8 +530,7 @@ QDF_STATUS init_deinit_register_tgt_psoc_ev_handlers(
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
tgt_hdl = (struct target_psoc_info *)wlan_psoc_get_tgt_if_handle(
|
||||
psoc);
|
||||
tgt_hdl = wlan_psoc_get_tgt_if_handle(psoc);
|
||||
if (!tgt_hdl) {
|
||||
target_if_err("target_psoc_info null in register wmi hadler");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
Посилання в новій задачі
Заблокувати користувача