From d653c2a995d8a4827d772a7084c8cdeee5535777 Mon Sep 17 00:00:00 2001 From: Yingying Tang Date: Wed, 22 Feb 2017 21:10:19 +0800 Subject: qcacld-3.0: Add "static" to fix compilation error for HL bus Add "static" before some functions which only be used in 1 file and remove some unused function to resolve compilation error. Change-Id: Id1b1101c3bb04910ad1e3639887f74e44d5b7c36 CRs-Fixed: 2010227 --- core/bmi/src/bmi.c | 3 +- core/bmi/src/i_bmi.h | 14 +--- core/cds/src/cds_concurrency.c | 2 +- core/dp/txrx/ol_tx.c | 2 +- core/dp/txrx/ol_tx_classify.c | 153 +---------------------------------------- core/dp/txrx/ol_tx_queue.c | 4 +- core/dp/txrx/ol_tx_sched.c | 18 ++--- core/wma/src/wma_ocb.c | 19 ++--- 8 files changed, 28 insertions(+), 187 deletions(-) diff --git a/core/bmi/src/bmi.c b/core/bmi/src/bmi.c index 33f5986cca0d..d1039f2e8a61 100644 --- a/core/bmi/src/bmi.c +++ b/core/bmi/src/bmi.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -27,6 +27,7 @@ #include "i_bmi.h" #include "cds_api.h" +#include "hif.h" /* APIs visible to the driver */ diff --git a/core/bmi/src/i_bmi.h b/core/bmi/src/i_bmi.h index 712bf9e30be5..8b476469cddf 100644 --- a/core/bmi/src/i_bmi.h +++ b/core/bmi/src/i_bmi.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -184,16 +184,4 @@ void ramdump_work_handler(void *arg); void fw_indication_work_handler(void *arg); struct ol_config_info *ol_get_ini_handle(struct ol_context *ol_ctx); -#ifdef HIF_SDIO -QDF_STATUS hif_reg_based_get_target_info(struct hif_opaque_softc *hif_ctx, - struct bmi_target_info *targ_info); -#endif -#if defined(HIF_PCI) || defined(SNOC) || defined(HIF_AHB) || defined(HIF_USB) -static inline QDF_STATUS -hif_reg_based_get_target_info(struct hif_opaque_softc *hif_ctx, - struct bmi_target_info *targ_info) -{ - return QDF_STATUS_SUCCESS; -} -#endif #endif diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c index 2832db68836f..c9cfab952af4 100644 --- a/core/cds/src/cds_concurrency.c +++ b/core/cds/src/cds_concurrency.c @@ -7259,7 +7259,7 @@ QDF_STATUS cds_handle_conc_multiport(uint8_t session_id, uint8_t channel) * * Return: None */ -void cds_restart_softap(hdd_adapter_t *pHostapdAdapter) +static void cds_restart_softap(hdd_adapter_t *pHostapdAdapter) { tHddAvoidFreqList hdd_avoid_freq_list; hdd_context_t *hdd_ctx; diff --git a/core/dp/txrx/ol_tx.c b/core/dp/txrx/ol_tx.c index 713dc3ba1400..1fb06e790f8e 100644 --- a/core/dp/txrx/ol_tx.c +++ b/core/dp/txrx/ol_tx.c @@ -49,6 +49,7 @@ /* internal header files relevant only for specific systems (Pronto) */ #include /* OL_TX_ENCAP, etc */ #include +#include #ifdef WLAN_FEATURE_FASTPATH #include /* HIF_DEVICE */ @@ -56,7 +57,6 @@ #include #include /* htc_endpoint */ #include -#include int ce_send_fast(struct CE_handle *copyeng, qdf_nbuf_t msdu, unsigned int transfer_id, uint32_t download_len); diff --git a/core/dp/txrx/ol_tx_classify.c b/core/dp/txrx/ol_tx_classify.c index 16da47658a9c..195c1155187c 100644 --- a/core/dp/txrx/ol_tx_classify.c +++ b/core/dp/txrx/ol_tx_classify.c @@ -367,7 +367,7 @@ struct ol_txrx_peer_t *ol_tx_tdls_peer_find(struct ol_txrx_pdev_t *pdev, } #else -struct ol_txrx_peer_t *ol_tx_tdls_peer_find(struct ol_txrx_pdev_t *pdev, +static struct ol_txrx_peer_t *ol_tx_tdls_peer_find(struct ol_txrx_pdev_t *pdev, struct ol_txrx_vdev_t *vdev, uint8_t *peer_id) { @@ -732,155 +732,4 @@ ol_tx_classify_mgmt( TX_SCHED_DEBUG_PRINT("Leave %s\n", __func__); return txq; } - -A_STATUS -ol_tx_classify_extension( - struct ol_txrx_vdev_t *vdev, - struct ol_tx_desc_t *tx_desc, - qdf_nbuf_t tx_msdu, - struct ol_txrx_msdu_info_t *msdu_info) -{ - A_UINT8 *datap = qdf_nbuf_data(tx_msdu); - struct ol_txrx_peer_t *peer; - int which_key; - - /* - * The following msdu_info fields were already filled in by the - * ol_tx entry function or the regular ol_tx_classify function: - * htt.info.vdev_id (ol_tx_hl or ol_tx_non_std_hl) - * htt.info.ext_tid (ol_tx_non_std_hl or ol_tx_classify) - * htt.info.frame_type (ol_tx_hl or ol_tx_non_std_hl) - * htt.info.l2_hdr_type (ol_tx_hl or ol_tx_non_std_hl) - * htt.info.is_unicast (ol_tx_classify) - * htt.info.peer_id (ol_tx_classify) - * peer (ol_tx_classify) - * if (is_unicast) { - * htt.info.ethertype (ol_tx_classify) - * htt.info.l3_hdr_offset (ol_tx_classify) - * } - * The following fields need to be filled in by this function: - * if (!is_unicast) { - * htt.info.ethertype - * htt.info.l3_hdr_offset - * } - * htt.action.band (NOT CURRENTLY USED) - * htt.action.do_encrypt - * htt.action.do_tx_complete - * The following fields are not needed for data frames, and can - * be left uninitialized: - * htt.info.frame_subtype - */ - - if (!msdu_info->htt.info.is_unicast) { - int l2_hdr_size; - A_UINT16 ethertype; - - if (msdu_info->htt.info.l2_hdr_type == htt_pkt_type_ethernet) { - struct ethernet_hdr_t *eh; - - eh = (struct ethernet_hdr_t *)datap; - l2_hdr_size = sizeof(*eh); - ethertype = (eh->ethertype[0] << 8) | eh->ethertype[1]; - - if (ethertype == ETHERTYPE_VLAN) { - struct ethernet_vlan_hdr_t *evh; - - evh = (struct ethernet_vlan_hdr_t *)datap; - l2_hdr_size = sizeof(*evh); - ethertype = (evh->ethertype[0] << 8) | - evh->ethertype[1]; - } - - if (!IS_ETHERTYPE(ethertype)) { - /* 802.3 header*/ - struct llc_snap_hdr_t *llc = - (struct llc_snap_hdr_t *)(datap + - l2_hdr_size); - ethertype = (llc->ethertype[0] << 8) | - llc->ethertype[1]; - l2_hdr_size += sizeof(*llc); - } - msdu_info->htt.info.l3_hdr_offset = l2_hdr_size; - msdu_info->htt.info.ethertype = ethertype; - } else { /* 802.11 */ - struct llc_snap_hdr_t *llc; - l2_hdr_size = ol_txrx_ieee80211_hdrsize(datap); - llc = (struct llc_snap_hdr_t *)(datap + l2_hdr_size); - ethertype = (llc->ethertype[0] << 8) | - llc->ethertype[1]; - /* - * Don't include the LLC/SNAP header in l2_hdr_size, - * because l3_hdr_offset is actually supposed to refer - * to the header after the 802.3 or 802.11 header, - * which could be a LLC/SNAP header rather - * than the L3 header. - */ - } - msdu_info->htt.info.l3_hdr_offset = l2_hdr_size; - msdu_info->htt.info.ethertype = ethertype; - which_key = txrx_sec_mcast; - } else { - which_key = txrx_sec_ucast; - } - peer = msdu_info->peer; - /* - * msdu_info->htt.action.do_encrypt is initially set in ol_tx_desc_hl. - * Add more check here. - */ - msdu_info->htt.action.do_encrypt = (!peer) ? 0 : - (peer->security[which_key].sec_type == htt_sec_type_none) ? 0 : - msdu_info->htt.action.do_encrypt; - /* - * For systems that have a frame by frame spec for whether to receive - * a tx completion notification, use the tx completion notification - * only for certain management frames, not for data frames. - * (In the future, this may be changed slightly, e.g. to request a - * tx completion notification for the final EAPOL message sent by a - * STA during the key delivery handshake.) - */ - msdu_info->htt.action.do_tx_complete = 0; - - return A_OK; -} - -A_STATUS -ol_tx_classify_mgmt_extension( - struct ol_txrx_vdev_t *vdev, - struct ol_tx_desc_t *tx_desc, - qdf_nbuf_t tx_msdu, - struct ol_txrx_msdu_info_t *msdu_info) -{ - struct ieee80211_frame *wh; - - /* - * The following msdu_info fields were already filled in by the - * ol_tx entry function or the regular ol_tx_classify_mgmt function: - * htt.info.vdev_id (ol_txrx_mgmt_send) - * htt.info.frame_type (ol_txrx_mgmt_send) - * htt.info.l2_hdr_type (ol_txrx_mgmt_send) - * htt.action.do_tx_complete (ol_txrx_mgmt_send) - * htt.info.peer_id (ol_tx_classify_mgmt) - * htt.info.ext_tid (ol_tx_classify_mgmt) - * htt.info.is_unicast (ol_tx_classify_mgmt) - * peer (ol_tx_classify_mgmt) - * The following fields need to be filled in by this function: - * htt.info.frame_subtype - * htt.info.l3_hdr_offset - * htt.action.band (NOT CURRENTLY USED) - * The following fields are not needed for mgmt frames, and can - * be left uninitialized: - * htt.info.ethertype - * htt.action.do_encrypt - * (This will be filled in by other SW, which knows whether - * the peer has robust-managment-frames enabled.) - */ - wh = (struct ieee80211_frame *)qdf_nbuf_data(tx_msdu); - msdu_info->htt.info.frame_subtype = - (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) >> - IEEE80211_FC0_SUBTYPE_SHIFT; - msdu_info->htt.info.l3_hdr_offset = sizeof(struct ieee80211_frame); - - return A_OK; -} - #endif /* defined(CONFIG_HL_SUPPORT) */ diff --git a/core/dp/txrx/ol_tx_queue.c b/core/dp/txrx/ol_tx_queue.c index 52cec26ba3d5..470496affbb1 100644 --- a/core/dp/txrx/ol_tx_queue.c +++ b/core/dp/txrx/ol_tx_queue.c @@ -837,7 +837,7 @@ ol_txrx_bad_peer_txctl_update_threshold(struct ol_txrx_pdev_t *pdev, * * Return: None */ -void +static void ol_tx_pdev_peer_bal_timer(void *context) { int i; @@ -1171,7 +1171,7 @@ ol_tx_queue_log_oldest_update(struct ol_txrx_pdev_t *pdev, int offset) * * Return: log element */ -void* +static void* ol_tx_queue_log_alloc( struct ol_txrx_pdev_t *pdev, u_int8_t type /* ol_tx_log_entry_type */, diff --git a/core/dp/txrx/ol_tx_sched.c b/core/dp/txrx/ol_tx_sched.c index dc2dd854c56d..4fd26fcf3a7f 100644 --- a/core/dp/txrx/ol_tx_sched.c +++ b/core/dp/txrx/ol_tx_sched.c @@ -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. * @@ -935,7 +935,7 @@ ol_tx_sched_txq_deactivate_wrr_adv( category->state.active = 0; } -ol_tx_frms_queue_list * +static ol_tx_frms_queue_list * ol_tx_sched_category_tx_queues_wrr_adv(struct ol_txrx_pdev_t *pdev, int cat) { struct ol_tx_sched_wrr_adv_t *scheduler = pdev->tx_sched.scheduler; @@ -945,7 +945,7 @@ ol_tx_sched_category_tx_queues_wrr_adv(struct ol_txrx_pdev_t *pdev, int cat) return &category->state.head; } -int +static int ol_tx_sched_discard_select_category_wrr_adv(struct ol_txrx_pdev_t *pdev) { struct ol_tx_sched_wrr_adv_t *scheduler; @@ -972,7 +972,7 @@ ol_tx_sched_discard_select_category_wrr_adv(struct ol_txrx_pdev_t *pdev) return cat; } -void +static void ol_tx_sched_txq_discard_wrr_adv( struct ol_txrx_pdev_t *pdev, struct ol_tx_frms_queue_t *txq, @@ -994,7 +994,7 @@ ol_tx_sched_txq_discard_wrr_adv( category->state.active = 0; } -void +static void ol_tx_sched_category_info_wrr_adv( struct ol_txrx_pdev_t *pdev, int cat, int *active, @@ -1019,7 +1019,7 @@ ol_tx_sched_category_info_wrr_adv( * * Return: none */ -void ol_tx_sched_wrr_param_update(struct ol_txrx_pdev_t *pdev, +static void ol_tx_sched_wrr_param_update(struct ol_txrx_pdev_t *pdev, struct ol_tx_sched_wrr_adv_t *scheduler) { int i; @@ -1075,7 +1075,7 @@ void ol_tx_sched_wrr_param_update(struct ol_txrx_pdev_t *pdev, } } -void * +static void * ol_tx_sched_init_wrr_adv( struct ol_txrx_pdev_t *pdev) { @@ -1223,7 +1223,7 @@ void ol_tx_sched_stats_clear(struct ol_txrx_pdev_t *pdev) /*--- congestion control discard --------------------------------------------*/ -struct ol_tx_frms_queue_t * +static struct ol_tx_frms_queue_t * ol_tx_sched_discard_select_txq( struct ol_txrx_pdev_t *pdev, ol_tx_frms_queue_list *tx_queues) @@ -1363,7 +1363,7 @@ ol_tx_sched_notify( #define OL_TX_MSDU_ID_STORAGE_ERR(ptr) (NULL == ptr) -void +static void ol_tx_sched_dispatch( struct ol_txrx_pdev_t *pdev, struct ol_tx_sched_ctx *sctx) diff --git a/core/wma/src/wma_ocb.c b/core/wma/src/wma_ocb.c index 0a4dcfb395e4..196d5d76eaf0 100644 --- a/core/wma/src/wma_ocb.c +++ b/core/wma/src/wma_ocb.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -424,8 +424,9 @@ int wma_ocb_get_tsf_timer(tp_wma_handle wma_handle, * * Return: 0 on success */ -int wma_ocb_get_tsf_timer_resp_event_handler(void *handle, uint8_t *event_buf, - uint32_t len) +static int wma_ocb_get_tsf_timer_resp_event_handler(void *handle, + uint8_t *event_buf, + uint32_t len) { QDF_STATUS qdf_status; struct sir_ocb_get_tsf_timer_response *response; @@ -494,8 +495,9 @@ int wma_dcc_get_stats(tp_wma_handle wma_handle, * * Return: 0 on success */ -int wma_dcc_get_stats_resp_event_handler(void *handle, uint8_t *event_buf, - uint32_t len) +static int wma_dcc_get_stats_resp_event_handler(void *handle, + uint8_t *event_buf, + uint32_t len) { QDF_STATUS qdf_status; struct sir_dcc_get_stats_response *response; @@ -593,8 +595,9 @@ int wma_dcc_update_ndl(tp_wma_handle wma_handle, * * Return: 0 on success */ -int wma_dcc_update_ndl_resp_event_handler(void *handle, uint8_t *event_buf, - uint32_t len) +static int wma_dcc_update_ndl_resp_event_handler(void *handle, + uint8_t *event_buf, + uint32_t len) { QDF_STATUS qdf_status; struct sir_dcc_update_ndl_response *resp; @@ -634,7 +637,7 @@ int wma_dcc_update_ndl_resp_event_handler(void *handle, uint8_t *event_buf, * * Return: 0 on success */ -int wma_dcc_stats_event_handler(void *handle, uint8_t *event_buf, +static int wma_dcc_stats_event_handler(void *handle, uint8_t *event_buf, uint32_t len) { QDF_STATUS qdf_status; -- cgit v1.2.3