qcacld-3.0: fix CFI failure by abstracting the callback
Abstract the callback hdd_softap_ipa_start_xmit by hdd_softap_ipa_start_xmit, to match the return type of wlan_ipa_softap_xmit pointer, to fix a CFI failure. Change-Id: If1cb1a80801558d5c7831ec89ad5281b0bbe36f3
This commit is contained in:

committed by
nshrivas

szülő
371b0c88e4
commit
78f7f09a57
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2013-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
|
||||
@@ -478,7 +478,8 @@ void wlan_ipa_uc_rt_debug_init(struct wlan_ipa_priv *ipa_ctx);
|
||||
* Return: None
|
||||
*/
|
||||
static inline
|
||||
void wlan_ipa_reg_sap_xmit_cb(struct wlan_ipa_priv *ipa_ctx, void *cb)
|
||||
void wlan_ipa_reg_sap_xmit_cb(struct wlan_ipa_priv *ipa_ctx,
|
||||
wlan_ipa_softap_xmit cb)
|
||||
{
|
||||
ipa_ctx->softap_xmit = cb;
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2018-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
|
||||
@@ -243,7 +243,8 @@ void ipa_uc_stat_query(struct wlan_objmgr_pdev *pdev,
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void ipa_reg_sap_xmit_cb(struct wlan_objmgr_pdev *pdev, void *cb);
|
||||
void ipa_reg_sap_xmit_cb(struct wlan_objmgr_pdev *pdev,
|
||||
wlan_ipa_softap_xmit cb);
|
||||
|
||||
/**
|
||||
* ipa_reg_send_to_nw_cb() - Register cb to send IPA Rx packet to network
|
||||
@@ -429,5 +430,9 @@ void ipa_component_config_update(struct wlan_objmgr_psoc *psoc);
|
||||
*/
|
||||
|
||||
uint32_t ipa_get_tx_buf_count(void);
|
||||
|
||||
#else /* Not IPA_OFFLOAD */
|
||||
typedef QDF_STATUS (*wlan_ipa_softap_xmit)(qdf_nbuf_t nbuf, qdf_netdev_t dev);
|
||||
|
||||
#endif /* IPA_OFFLOAD */
|
||||
#endif /* end of _WLAN_IPA_MAIN_H_ */
|
||||
|
@@ -566,7 +566,7 @@ struct wlan_ipa_tx_desc {
|
||||
qdf_ipa_rx_data_t *ipa_tx_desc_ptr;
|
||||
};
|
||||
|
||||
typedef int (*wlan_ipa_softap_xmit)(qdf_nbuf_t skb, qdf_netdev_t dev);
|
||||
typedef QDF_STATUS (*wlan_ipa_softap_xmit)(qdf_nbuf_t nbuf, qdf_netdev_t dev);
|
||||
typedef void (*wlan_ipa_send_to_nw)(qdf_nbuf_t skb, qdf_netdev_t dev);
|
||||
|
||||
/* IPA private context structure definition */
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2018-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
|
||||
@@ -282,7 +282,7 @@ void ipa_uc_stat_query(struct wlan_objmgr_pdev *pdev,
|
||||
return wlan_ipa_uc_stat_query(ipa_obj, ipa_tx_diff, ipa_rx_diff);
|
||||
}
|
||||
|
||||
void ipa_reg_sap_xmit_cb(struct wlan_objmgr_pdev *pdev, void *cb)
|
||||
void ipa_reg_sap_xmit_cb(struct wlan_objmgr_pdev *pdev, wlan_ipa_softap_xmit cb)
|
||||
{
|
||||
struct wlan_ipa_priv *ipa_obj;
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2018-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
|
||||
@@ -151,7 +151,8 @@ void ucfg_ipa_uc_stat_query(struct wlan_objmgr_pdev *pdev,
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void ucfg_ipa_reg_sap_xmit_cb(struct wlan_objmgr_pdev *pdev, void *cb);
|
||||
void ucfg_ipa_reg_sap_xmit_cb(struct wlan_objmgr_pdev *pdev,
|
||||
wlan_ipa_softap_xmit cb);
|
||||
|
||||
/**
|
||||
* ucfg_ipa_reg_send_to_nw_cb() - Register cb to send IPA Rx packet to network
|
||||
@@ -416,7 +417,8 @@ void ucfg_ipa_uc_stat_query(struct wlan_objmgr_pdev *pdev,
|
||||
}
|
||||
|
||||
static inline
|
||||
void ucfg_ipa_reg_sap_xmit_cb(struct wlan_objmgr_pdev *pdev, void *cb)
|
||||
void ucfg_ipa_reg_sap_xmit_cb(struct wlan_objmgr_pdev *pdev,
|
||||
wlan_ipa_softap_xmit cb)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2018-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
|
||||
@@ -89,7 +89,8 @@ void ucfg_ipa_uc_stat_query(struct wlan_objmgr_pdev *pdev,
|
||||
return ipa_uc_stat_query(pdev, ipa_tx_diff, ipa_rx_diff);
|
||||
}
|
||||
|
||||
void ucfg_ipa_reg_sap_xmit_cb(struct wlan_objmgr_pdev *pdev, void *cb)
|
||||
void ucfg_ipa_reg_sap_xmit_cb(struct wlan_objmgr_pdev *pdev,
|
||||
wlan_ipa_softap_xmit cb)
|
||||
{
|
||||
return ipa_reg_sap_xmit_cb(pdev, cb);
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2014-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
|
||||
@@ -42,6 +42,18 @@
|
||||
netdev_tx_t hdd_softap_hard_start_xmit(struct sk_buff *skb,
|
||||
struct net_device *dev);
|
||||
|
||||
/**
|
||||
* hdd_softap_ipa_start_xmit() - Transmit a frame, request from IPA
|
||||
* @nbuf: pointer to buffer/packet
|
||||
* @dev: pointer to net_device structure
|
||||
*
|
||||
* Function registered as a xmit callback in SAP mode,
|
||||
* called by IPA if any packet needs to be transmitted.
|
||||
*
|
||||
* Return: Status of the transmission
|
||||
*/
|
||||
QDF_STATUS hdd_softap_ipa_start_xmit(qdf_nbuf_t nbuf, qdf_netdev_t dev);
|
||||
|
||||
/**
|
||||
* hdd_softap_tx_timeout() - TX timeout handler
|
||||
* @dev: pointer to network device
|
||||
|
@@ -1824,7 +1824,7 @@ int hdd_update_tgt_cfg(hdd_handle_t hdd_handle, struct wma_tgt_cfg *cfg)
|
||||
ucfg_ipa_set_txrx_handle(hdd_ctx->psoc,
|
||||
cds_get_context(QDF_MODULE_ID_TXRX));
|
||||
ucfg_ipa_reg_sap_xmit_cb(hdd_ctx->pdev,
|
||||
hdd_softap_hard_start_xmit);
|
||||
hdd_softap_ipa_start_xmit);
|
||||
ucfg_ipa_reg_send_to_nw_cb(hdd_ctx->pdev,
|
||||
hdd_ipa_send_skb_to_network);
|
||||
|
||||
|
@@ -663,6 +663,16 @@ netdev_tx_t hdd_softap_hard_start_xmit(struct sk_buff *skb,
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
QDF_STATUS hdd_softap_ipa_start_xmit(qdf_nbuf_t nbuf, qdf_netdev_t dev)
|
||||
{
|
||||
if (NETDEV_TX_OK == hdd_softap_hard_start_xmit(
|
||||
(struct sk_buff *)nbuf,
|
||||
(struct net_device *)dev))
|
||||
return QDF_STATUS_SUCCESS;
|
||||
else
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
static void __hdd_softap_tx_timeout(struct net_device *dev)
|
||||
{
|
||||
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
|
||||
|
Reference in New Issue
Block a user