qcacld-3.0: fix compilation errors for HL target

For HL target, CONFIG_HL_SUPPORT is enabled, which
cause sevaral compilation errors.
1. Couldn't find the definition of adf_xxx APIs.
   Replace adf_xxx APIs with qdf_xxx APIs.

2. ol_tx_msdu_id_storage() return a wrong value,
   implementation and definition mismatch.
   Correct the return value to: pointer to tx desc_id.

3. Some of CONFIG_HL_SUPPORT/FEATURE_WLAN_TDLS feature
   related code are not embraced by the macro properly.
   Embrace the code with right macro for each feature.

Change-Id: Ibf09fd78f85327200dede8c32bc215208e54b798
CRs-Fixed: 2004340
This commit is contained in:
Yu Wang
2017-02-08 18:48:24 +08:00
committed by qcabuildsw
parent 56d7d7439f
commit 053d3e7009
5 changed files with 15 additions and 15 deletions

View File

@@ -1304,12 +1304,12 @@ htt_rx_offload_msdu_pop_hl(htt_pdev_handle pdev,
qdf_nbuf_t *head_buf,
qdf_nbuf_t *tail_buf)
{
adf_nbuf_t buf;
qdf_nbuf_t buf;
u_int32_t *msdu_hdr, msdu_len;
int ret = 0;
*head_buf = *tail_buf = buf = offload_deliver_msg;
msdu_hdr = (u_int32_t *)adf_nbuf_data(buf);
msdu_hdr = (u_int32_t *)qdf_nbuf_data(buf);
/* First dword */
/* Second dword */
@@ -1323,15 +1323,15 @@ htt_rx_offload_msdu_pop_hl(htt_pdev_handle pdev,
*tid = HTT_RX_OFFLOAD_DELIVER_IND_MSDU_TID_GET(*msdu_hdr);
*fw_desc = HTT_RX_OFFLOAD_DELIVER_IND_MSDU_DESC_GET(*msdu_hdr);
adf_nbuf_pull_head(buf, HTT_RX_OFFLOAD_DELIVER_IND_MSDU_HDR_BYTES \
qdf_nbuf_pull_head(buf, HTT_RX_OFFLOAD_DELIVER_IND_MSDU_HDR_BYTES \
+ HTT_RX_OFFLOAD_DELIVER_IND_HDR_BYTES);
if (msdu_len <= adf_nbuf_len(buf)) {
adf_nbuf_set_pktlen(buf, msdu_len);
if (msdu_len <= qdf_nbuf_len(buf)) {
qdf_nbuf_set_pktlen(buf, msdu_len);
} else {
adf_os_print("%s: drop frame with invalid msdu len %d %d\n",
__FUNCTION__, msdu_len, (int)adf_nbuf_len(buf));
adf_nbuf_free(offload_deliver_msg);
qdf_print("%s: drop frame with invalid msdu len %d %d\n",
__FUNCTION__, msdu_len, (int)qdf_nbuf_len(buf));
qdf_nbuf_free(offload_deliver_msg);
ret = -1;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
* Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -42,7 +42,7 @@
#ifdef CONFIG_HL_SUPPORT
static inline uint16_t *ol_tx_msdu_id_storage(qdf_nbuf_t msdu)
{
return QDF_NBUF_CB_TX_DESC_ID(msdu);
return (uint16_t *) (&QDF_NBUF_CB_TX_DESC_ID(msdu));
}
#else

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -392,9 +392,7 @@ ol_tx_classify(
struct ol_tx_frms_queue_t *txq = NULL;
A_UINT8 *dest_addr;
A_UINT8 tid;
#if defined(CONFIG_HL_SUPPORT) && defined(FEATURE_WLAN_TDLS)
u_int8_t peer_id;
#endif
TX_SCHED_DEBUG_PRINT("Enter %s\n", __func__);
dest_addr = ol_tx_dest_addr_find(pdev, tx_nbuf);

View File

@@ -498,6 +498,7 @@ ol_tx_delay_compute(struct ol_txrx_pdev_t *pdev,
#endif /* !QCA_TX_STD_PATH_ONLY */
#endif /* QCA_TX_SINGLE_COMPLETIONS */
#if !defined(CONFIG_HL_SUPPORT)
void ol_tx_discard_target_frms(ol_txrx_pdev_handle pdev)
{
int i = 0;
@@ -521,6 +522,7 @@ void ol_tx_discard_target_frms(ol_txrx_pdev_handle pdev)
}
}
}
#endif
void ol_tx_credit_completion_handler(ol_txrx_pdev_handle pdev, int credits)
{

View File

@@ -104,7 +104,7 @@ ol_txrx_set_wmm_param(void *data_pdev,
extern void ol_txrx_get_pn_info(void *ppeer, uint8_t **last_pn_valid,
uint64_t **last_pn, uint32_t **rmf_pn_replays);
#ifdef CONFIG_HL_SUPPORT
#if defined(CONFIG_HL_SUPPORT) && defined(FEATURE_WLAN_TDLS)
/**
* ol_txrx_copy_mac_addr_raw() - copy raw mac addr
@@ -5344,7 +5344,7 @@ static struct cdp_peer_ops ol_ops_peer = {
ol_txrx_update_ibss_add_peer_num_of_vdev,
.remove_peers_for_vdev = ol_txrx_remove_peers_for_vdev,
.remove_peers_for_vdev_no_lock = ol_txrx_remove_peers_for_vdev_no_lock,
#ifdef CONFIG_HL_SUPPORT
#if defined(CONFIG_HL_SUPPORT) && defined(FEATURE_WLAN_TDLS)
.copy_mac_addr_raw = ol_txrx_copy_mac_addr_raw,
.add_last_real_peer = ol_txrx_add_last_real_peer,
.is_vdev_restore_last_peer = is_vdev_restore_last_peer,