From 2cb8fc7e185a564230d241cea172749da6bea231 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Sat, 17 Dec 2016 10:45:08 -0800 Subject: [PATCH] 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 --- dp/wifi3.0/dp_htt.c | 10 ++-------- dp/wifi3.0/dp_peer.c | 15 +-------------- dp/wifi3.0/dp_peer.h | 13 ++++++++++++- 3 files changed, 15 insertions(+), 23 deletions(-) diff --git a/dp/wifi3.0/dp_htt.c b/dp/wifi3.0/dp_htt.c index 7019da30eec8..c1adbe2a96cd 100644 --- a/dp/wifi3.0/dp_htt.c +++ b/dp/wifi3.0/dp_htt.c @@ -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 @@ -19,19 +19,13 @@ #include #include #include "dp_htt.h" +#include "dp_peer.h" #define HTT_HTC_PKT_POOL_INIT_SIZE 64 #define HTT_MSG_BUF_SIZE(msg_bytes) \ ((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_soc: HTT SOC handle diff --git a/dp/wifi3.0/dp_peer.c b/dp/wifi3.0/dp_peer.c index 838ea8decbc0..795e582c4943 100644 --- a/dp/wifi3.0/dp_peer.c +++ b/dp/wifi3.0/dp_peer.c @@ -21,6 +21,7 @@ #include "dp_htt.h" #include "dp_types.h" #include "dp_internal.h" +#include "dp_peer.h" #include /* 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)); } -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) { uint32_t max_peers, peer_map_size; diff --git a/dp/wifi3.0/dp_peer.h b/dp/wifi3.0/dp_peer.h index 194d89c1aeb0..d04442a2ac54 100644 --- a/dp/wifi3.0/dp_peer.h +++ b/dp/wifi3.0/dp_peer.h @@ -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 @@ -15,6 +15,8 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ +#ifndef _DP_PEER_H_ +#define _DP_PEER_H_ #include #include @@ -42,3 +44,12 @@ dp_peer_find_by_id(struct dp_soc *soc, 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_ */