From 24f0ae41f634b740465ba16a0fe4861190cc2cb3 Mon Sep 17 00:00:00 2001 From: Sourav Mohapatra Date: Wed, 3 Jul 2019 15:16:35 +0530 Subject: [PATCH] qcacld-3.0: Remove unused function hdd_get_peer_idx Currently the function hdd_get_peer_idx is not being called from anywhere. As the use of sta_id is being depreceted, the function can be safely removed. Clean up the unused function. Change-Id: I6896d03ad2e8b427147e2259b737836cd3f44ca0 CRs-Fixed: 2484699 --- core/hdd/inc/wlan_hdd_tx_rx.h | 3 --- core/hdd/src/wlan_hdd_tx_rx.c | 24 ------------------------ 2 files changed, 27 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_tx_rx.h b/core/hdd/inc/wlan_hdd_tx_rx.h index 1fadc0cb81d5..2c157359ceab 100644 --- a/core/hdd/inc/wlan_hdd_tx_rx.h +++ b/core/hdd/inc/wlan_hdd_tx_rx.h @@ -275,9 +275,6 @@ static inline void {} #endif /* QCA_HL_NETDEV_FLOW_CONTROL */ -int hdd_get_peer_idx(struct hdd_station_ctx *sta_ctx, - struct qdf_mac_addr *addr); - const char *hdd_reason_type_to_string(enum netif_reason_type reason); const char *hdd_action_type_to_string(enum netif_action_type action); diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c index 5a99e33a8864..5ebbf50849ed 100644 --- a/core/hdd/src/wlan_hdd_tx_rx.c +++ b/core/hdd/src/wlan_hdd_tx_rx.c @@ -1427,30 +1427,6 @@ static QDF_STATUS hdd_mon_rx_packet_cbk(void *context, qdf_nbuf_t rxbuf) } #endif -/** - * hdd_get_peer_idx() - Get the idx for given address in peer table - * @sta_ctx: pointer to HDD Station Context - * @addr: pointer to Peer Mac address - * - * Return: index when success else INVALID_PEER_IDX - */ -int hdd_get_peer_idx(struct hdd_station_ctx *sta_ctx, - struct qdf_mac_addr *addr) -{ - uint8_t idx; - - for (idx = 0; idx < MAX_PEERS; idx++) { - if (sta_ctx->conn_info.sta_id[idx] == HDD_WLAN_INVALID_STA_ID) - continue; - if (qdf_mem_cmp(&sta_ctx->conn_info.peer_macaddr[idx], - addr, sizeof(struct qdf_mac_addr))) - continue; - return idx; - } - - return INVALID_PEER_IDX; -} - /* * hdd_is_mcast_replay() - checks if pkt is multicast replay * @skb: packet skb