qcacmn: Fix -Wmissing-prototypes in dp_peer.c

We want to enable the compiler's -Wmissing-prototypes switch, but
there is existing code in dp_peer.c that is generating warnings.  Fix
these warnings by making the following functions static:
	dp_peer_find_hash_find()
	dp_rx_tid_update_wifi3()
	dp_rx_tid_delete_cb()
	dp_rx_tid_delete_wifi3()

And by exporting a public prototype for:
	dp_peer_find_hash_erase()

Change-Id: I5c945f27c0334a4d88da6136de8aacae2ba840a7
CRs-Fixed: 1108459
This commit is contained in:
Jeff Johnson 2017-01-06 09:42:43 -08:00 • committed by qcabuildsw
commit 416168bfaf
2 changed files with 17 additions and 11 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 The Linux Foundation. All rights reserved.
* Copyright (c) 2016-2017 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
@ -56,6 +56,7 @@ extern int dp_peer_find_attach(struct dp_soc *soc);
extern void dp_peer_find_detach(struct dp_soc *soc);
extern void dp_peer_find_hash_add(struct dp_soc *soc, struct dp_peer *peer);
extern void dp_peer_find_hash_remove(struct dp_soc *soc, struct dp_peer *peer);
extern void dp_peer_find_hash_erase(struct dp_soc *soc);
extern void dp_peer_rx_init(struct dp_pdev *pdev, struct dp_peer *peer);
extern void dp_peer_rx_cleanup(struct dp_vdev *vdev, struct dp_peer *peer);
extern void dp_peer_unref_delete(void *peer_handle);

View file

@ -176,10 +176,10 @@ void dp_peer_find_hash_add(struct dp_soc *soc, struct dp_peer *peer)
}
#if ATH_SUPPORT_WRAP
struct dp_peer *dp_peer_find_hash_find(struct dp_soc *soc,
static struct dp_peer *dp_peer_find_hash_find(struct dp_soc *soc,
uint8_t *peer_mac_addr, int mac_addr_is_aligned, uint8_t vdev_id)
#else
struct dp_peer *dp_peer_find_hash_find(struct dp_soc *soc,
static struct dp_peer *dp_peer_find_hash_find(struct dp_soc *soc,
uint8_t *peer_mac_addr, int mac_addr_is_aligned)
#endif
{
@ -439,8 +439,8 @@ void *dp_find_peer_by_addr(void *dev, uint8_t *peer_mac_addr,
*
* Return: 0 on success, error code on failure
*/
int dp_rx_tid_update_wifi3(struct dp_peer *peer, int tid, uint32_t
ba_window_size, uint32_t start_seq)
static int dp_rx_tid_update_wifi3(struct dp_peer *peer, int tid, uint32_t
ba_window_size, uint32_t start_seq)
{
/* TODO: Implement this once REO command API is available */
return 0;
@ -455,8 +455,8 @@ ba_window_size, uint32_t start_seq)
*
* Return: 0 on success, error code on failure
*/
int dp_rx_tid_setup_wifi3(struct dp_peer *peer, int tid,
uint32_t ba_window_size, uint32_t start_seq)
static int dp_rx_tid_setup_wifi3(struct dp_peer *peer, int tid,
uint32_t ba_window_size, uint32_t start_seq)
{
struct dp_rx_tid *rx_tid = &peer->rx_tid[tid];
struct dp_vdev *vdev = peer->vdev;
@ -586,10 +586,11 @@ int dp_rx_tid_setup_wifi3(struct dp_peer *peer, int tid,
return 0;
}
#ifdef notyet /* TBD: Enable this once REO command interface is available */
/*
* Rx TID deletion callback to free memory allocated for HW queue descriptor
*/
void dp_rx_tid_delete_cb(struct dp_pdev *pdev, void *cb_ctxt, int status)
static void dp_rx_tid_delete_cb(struct dp_pdev *pdev, void *cb_ctxt, int status)
{
struct dp_soc *soc = pdev->soc;
struct dp_rx_tid *rx_tid = (struct dp_rx_tid *)cb_ctxt;
@ -617,15 +618,19 @@ void dp_rx_tid_delete_cb(struct dp_pdev *pdev, void *cb_ctxt, int status)
*
* Return: 0 on success, error code on failure
*/
int dp_rx_tid_delete_wifi3(struct dp_peer *peer, int tid)
static int dp_rx_tid_delete_wifi3(struct dp_peer *peer, int tid)
{
#ifdef notyet /* TBD: Enable this once REO command interface is available */
struct dp_rx_tid *rx_tid = peer->rx_tid[tid];
dp_rx_tid_hw_update_valid(rx_tid->hw_qdesc_paddr, 0,
dp_rx_tid_delete_cb, (void *)rx_tid);
#endif
return 0;
}
#else
static int dp_rx_tid_delete_wifi3(struct dp_peer *peer, int tid)
{
return 0;
}
#endif
/*
* dp_peer_rx_init() – Initialize receive TID state