qcacmn: Properly export dp_peer API

Currently some of the public functions in dp_peer.c do not have their
prototypes exposed in a header file. In addition clients of these
functions currently have local prototypes. Fix these issues by adding
the prototypes to dp_peer.h.

Change-Id: I461cf69024da56fad57b75a325775ecd68872c8e
CRs-Fixed: 1108085
This commit is contained in:
Jeff Johnson
2016-12-17 10:45:08 -08:00
committed by qcabuildsw
parent 5ce2a8cd89
commit 2cb8fc7e18
3 changed files with 15 additions and 23 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 * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -19,19 +19,13 @@
#include <htt.h> #include <htt.h>
#include <hal_api.h> #include <hal_api.h>
#include "dp_htt.h" #include "dp_htt.h"
#include "dp_peer.h"
#define HTT_HTC_PKT_POOL_INIT_SIZE 64 #define HTT_HTC_PKT_POOL_INIT_SIZE 64
#define HTT_MSG_BUF_SIZE(msg_bytes) \ #define HTT_MSG_BUF_SIZE(msg_bytes) \
((msg_bytes) + HTC_HEADER_LEN + HTC_HDR_ALIGNMENT_PADDING) ((msg_bytes) + HTC_HEADER_LEN + HTC_HDR_ALIGNMENT_PADDING)
void dp_rx_peer_map_handler(void *soc_handle, uint16_t peer_id,
uint8_t vdev_id, uint8_t *peer_mac_addr);
void dp_rx_peer_unmap_handler(void *soc_handle, uint16_t peer_id);
void dp_rx_sec_ind_handler(void *soc_handle, uint16_t peer_id,
enum htt_sec_type sec_type, int is_unicast,
u_int32_t *michael_key, u_int32_t *rx_pn);
/* /*
* htt_htc_pkt_alloc() - Allocate HTC packet buffer * htt_htc_pkt_alloc() - Allocate HTC packet buffer
* @htt_soc: HTT SOC handle * @htt_soc: HTT SOC handle

View File

@@ -21,6 +21,7 @@
#include "dp_htt.h" #include "dp_htt.h"
#include "dp_types.h" #include "dp_types.h"
#include "dp_internal.h" #include "dp_internal.h"
#include "dp_peer.h"
#include <hal_api.h> #include <hal_api.h>
/* Temporary definitions to be moved to wlan_cfg */ /* Temporary definitions to be moved to wlan_cfg */
@@ -47,20 +48,6 @@ static inline int dp_peer_find_mac_addr_cmp(
(mac_addr1->align4.bytes_ef == mac_addr2->align4.bytes_ef)); (mac_addr1->align4.bytes_ef == mac_addr2->align4.bytes_ef));
} }
static inline struct dp_peer *dp_peer_find_by_id(
struct dp_soc *soc, uint16_t peer_id)
{
struct dp_peer *peer;
peer = (peer_id == HTT_INVALID_PEER) ? NULL :
soc->peer_id_to_obj_map[peer_id];
/*
* Currently, peer IDs are assigned to vdevs as well as peers.
* If the peer ID is for a vdev, the peer_id_to_obj_map entry
* will hold NULL rather than a valid peer pointer.
*/
return peer;
}
static int dp_peer_find_map_attach(struct dp_soc *soc) static int dp_peer_find_map_attach(struct dp_soc *soc)
{ {
uint32_t max_peers, peer_map_size; uint32_t max_peers, peer_map_size;

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 * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -15,6 +15,8 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
#ifndef _DP_PEER_H_
#define _DP_PEER_H_
#include <qdf_types.h> #include <qdf_types.h>
#include <qdf_lock.h> #include <qdf_lock.h>
@@ -42,3 +44,12 @@ dp_peer_find_by_id(struct dp_soc *soc,
return peer; return peer;
} }
void dp_rx_peer_map_handler(void *soc_handle, uint16_t peer_id,
uint8_t vdev_id, uint8_t *peer_mac_addr);
void dp_rx_peer_unmap_handler(void *soc_handle, uint16_t peer_id);
void dp_rx_sec_ind_handler(void *soc_handle, uint16_t peer_id,
enum htt_sec_type sec_type, int is_unicast,
u_int32_t *michael_key, u_int32_t *rx_pn);
#endif /* _DP_PEER_H_ */