diff --git a/core/dp/txrx/ol_txrx.c b/core/dp/txrx/ol_txrx.c index 7a12254ae2..4c7888c116 100644 --- a/core/dp/txrx/ol_txrx.c +++ b/core/dp/txrx/ol_txrx.c @@ -5092,119 +5092,6 @@ static uint16_t ol_txrx_get_vdev_id(struct cdp_vdev *pvdev) return vdev->vdev_id; } -/** - * ol_txrx_get_last_mgmt_timestamp() - get timestamp of last mgmt frame - * @pdev: pdev handle - * @ppeer_addr: peer mac addr - * @subtype: management frame type - * @timestamp: last timestamp - * - * Return: true if timestamp is retrieved for valid peer else false - */ -static bool -ol_txrx_get_last_mgmt_timestamp(struct cdp_pdev *ppdev, - u8 *peer_addr, - u8 subtype, - qdf_time_t *timestamp) -{ - /* - * Take the lock, find the peer based on peer mac addr. - * If peer is valid, retrieve the timestamp for "subtype" mgmt frame. - * release the lock - */ - union ol_txrx_align_mac_addr_t local_mac_addr_aligned, *mac_addr; - unsigned int index; - struct ol_txrx_peer_t *peer; - bool ret = false; - struct ol_txrx_pdev_t *pdev = (struct ol_txrx_pdev_t *)ppdev; - - qdf_mem_copy(&local_mac_addr_aligned.raw[0], - peer_addr, OL_TXRX_MAC_ADDR_LEN); - mac_addr = &local_mac_addr_aligned; - - index = ol_txrx_peer_find_hash_index(pdev, mac_addr); - qdf_spin_lock_bh(&pdev->peer_ref_mutex); - TAILQ_FOREACH(peer, &pdev->peer_hash.bins[index], hash_list_elem) { - if (ol_txrx_peer_find_mac_addr_cmp(mac_addr, &peer->mac_addr) == - 0 && (peer->valid)) { - /* found it */ - switch (subtype) { - case IEEE80211_FC0_SUBTYPE_ASSOC_REQ: - *timestamp = peer->last_assoc_rcvd; - ret = true; - break; - case IEEE80211_FC0_SUBTYPE_DISASSOC: - case IEEE80211_FC0_SUBTYPE_DEAUTH: - *timestamp = peer->last_disassoc_rcvd; - ret = true; - break; - default: - break; - } - qdf_spin_unlock_bh(&pdev->peer_ref_mutex); - return ret; - } - } - qdf_spin_unlock_bh(&pdev->peer_ref_mutex); - return false; /* failure */ -} - -/** - * ol_txrx_update_last_mgmt_timestamp() - set timestamp of last mgmt frame - * @pdev: pdev handle - * @ppeer_addr: peer mac addr - * @timestamp: time to be set - * @subtype: management frame type - * - * Return: true if timestamp is updated for valid peer else false - */ -static bool -ol_txrx_update_last_mgmt_timestamp(struct cdp_pdev *ppdev, u8 *peer_addr, - qdf_time_t timestamp, u8 subtype) -{ - /* - * Take the lock, find the peer based on peer mac addr. - * If peer is valid, update the timestamp for "subtype" mgmt frame. - * release the lock - */ - union ol_txrx_align_mac_addr_t local_mac_addr_aligned, *mac_addr; - bool ret = false; - unsigned int index; - struct ol_txrx_peer_t *peer; - struct ol_txrx_pdev_t *pdev = (struct ol_txrx_pdev_t *)ppdev; - - qdf_mem_copy(&local_mac_addr_aligned.raw[0], - peer_addr, OL_TXRX_MAC_ADDR_LEN); - mac_addr = &local_mac_addr_aligned; - - index = ol_txrx_peer_find_hash_index(pdev, mac_addr); - qdf_spin_lock_bh(&pdev->peer_ref_mutex); - TAILQ_FOREACH(peer, &pdev->peer_hash.bins[index], hash_list_elem) { - if (ol_txrx_peer_find_mac_addr_cmp(mac_addr, &peer->mac_addr) == - 0 && (peer->valid)) { - /* found it */ - switch (subtype) { - case IEEE80211_FC0_SUBTYPE_ASSOC_REQ: - peer->last_assoc_rcvd = timestamp; - ret = true; - break; - case IEEE80211_FC0_SUBTYPE_DISASSOC: - case IEEE80211_FC0_SUBTYPE_DEAUTH: - peer->last_disassoc_rcvd = timestamp; - ret = true; - break; - default: - break; - } - qdf_spin_unlock_bh(&pdev->peer_ref_mutex); - return ret; - } - } - qdf_spin_unlock_bh(&pdev->peer_ref_mutex); - - return false; /* failure */ -} - /** * ol_txrx_soc_attach_target() - attach soc target * @soc: soc handle @@ -5612,8 +5499,6 @@ static struct cdp_peer_ops ol_ops_peer = { .update_last_real_peer = ol_txrx_update_last_real_peer, #endif /* CONFIG_HL_SUPPORT */ .peer_detach_force_delete = ol_txrx_peer_detach_force_delete, - .get_last_mgmt_timestamp = ol_txrx_get_last_mgmt_timestamp, - .update_last_mgmt_timestamp = ol_txrx_update_last_mgmt_timestamp, }; static struct cdp_tx_delay_ops ol_ops_delay = { diff --git a/core/dp/txrx/ol_txrx_peer_find.c b/core/dp/txrx/ol_txrx_peer_find.c index 48a49f3b82..d007c47554 100644 --- a/core/dp/txrx/ol_txrx_peer_find.c +++ b/core/dp/txrx/ol_txrx_peer_find.c @@ -145,7 +145,7 @@ static void ol_txrx_peer_find_hash_detach(struct ol_txrx_pdev_t *pdev) qdf_mem_free(pdev->peer_hash.bins); } -unsigned int +static inline unsigned int ol_txrx_peer_find_hash_index(struct ol_txrx_pdev_t *pdev, union ol_txrx_align_mac_addr_t *mac_addr) { diff --git a/core/dp/txrx/ol_txrx_peer_find.h b/core/dp/txrx/ol_txrx_peer_find.h index 607e095a63..a3d6c37a44 100644 --- a/core/dp/txrx/ol_txrx_peer_find.h +++ b/core/dp/txrx/ol_txrx_peer_find.h @@ -90,10 +90,6 @@ struct ol_txrx_peer_t *ol_txrx_peer_find_by_id(struct ol_txrx_pdev_t *pdev, return NULL; } -unsigned int -ol_txrx_peer_find_hash_index(struct ol_txrx_pdev_t *pdev, - union ol_txrx_align_mac_addr_t *mac_addr); - void ol_txrx_peer_find_hash_add(struct ol_txrx_pdev_t *pdev, struct ol_txrx_peer_t *peer);