Path: blob/main/sys/contrib/dev/athk/ath11k/peer.h
48375 views
/* SPDX-License-Identifier: BSD-3-Clause-Clear */1/*2* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.3* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.4*/56#ifndef ATH11K_PEER_H7#define ATH11K_PEER_H89struct ath11k_peer {10struct list_head list;11struct ieee80211_sta *sta;12int vdev_id;13u8 addr[ETH_ALEN];14int peer_id;15u16 ast_hash;16u8 pdev_idx;17u16 hw_peer_id;1819/* protected by ab->data_lock */20struct ieee80211_key_conf *keys[WMI_MAX_KEY_INDEX + 1];21struct dp_rx_tid rx_tid[IEEE80211_NUM_TIDS + 1];2223/* peer id based rhashtable list pointer */24struct rhash_head rhash_id;25/* peer addr based rhashtable list pointer */26struct rhash_head rhash_addr;2728/* Info used in MMIC verification of29* RX fragments30*/31struct crypto_shash *tfm_mmic;32u8 mcast_keyidx;33u8 ucast_keyidx;34u16 sec_type;35u16 sec_type_grp;36bool is_authorized;37bool dp_setup_done;38};3940void ath11k_peer_unmap_event(struct ath11k_base *ab, u16 peer_id);41void ath11k_peer_map_event(struct ath11k_base *ab, u8 vdev_id, u16 peer_id,42u8 *mac_addr, u16 ast_hash, u16 hw_peer_id);43struct ath11k_peer *ath11k_peer_find(struct ath11k_base *ab, int vdev_id,44const u8 *addr);45struct ath11k_peer *ath11k_peer_find_by_addr(struct ath11k_base *ab,46const u8 *addr);47struct ath11k_peer *ath11k_peer_find_by_id(struct ath11k_base *ab, int peer_id);48void ath11k_peer_cleanup(struct ath11k *ar, u32 vdev_id);49int ath11k_peer_delete(struct ath11k *ar, u32 vdev_id, u8 *addr);50int ath11k_peer_create(struct ath11k *ar, struct ath11k_vif *arvif,51struct ieee80211_sta *sta, struct peer_create_params *param);52int ath11k_wait_for_peer_delete_done(struct ath11k *ar, u32 vdev_id,53const u8 *addr);54struct ath11k_peer *ath11k_peer_find_by_vdev_id(struct ath11k_base *ab,55int vdev_id);56int ath11k_peer_rhash_tbl_init(struct ath11k_base *ab);57void ath11k_peer_rhash_tbl_destroy(struct ath11k_base *ab);58int ath11k_peer_rhash_delete(struct ath11k_base *ab, struct ath11k_peer *peer);59#endif /* _PEER_H_ */606162