Path: blob/main/sys/contrib/dev/athk/ath12k/peer.h
48375 views
/* SPDX-License-Identifier: BSD-3-Clause-Clear */1/*2* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.3* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.4*/56#ifndef ATH12K_PEER_H7#define ATH12K_PEER_H89#include "dp_rx.h"1011struct ppdu_user_delayba {12u16 sw_peer_id;13u32 info0;14u16 ru_end;15u16 ru_start;16u32 info1;17u32 rate_flags;18u32 resp_rate_flags;19};2021struct ath12k_peer {22struct list_head list;23struct ieee80211_sta *sta;24int vdev_id;25u8 addr[ETH_ALEN];26int peer_id;27u16 ast_hash;28u8 pdev_idx;29u16 hw_peer_id;3031/* protected by ab->data_lock */32struct ieee80211_key_conf *keys[WMI_MAX_KEY_INDEX + 1];33struct ath12k_dp_rx_tid rx_tid[IEEE80211_NUM_TIDS + 1];3435/* Info used in MMIC verification of36* RX fragments37*/38struct crypto_shash *tfm_mmic;39u8 mcast_keyidx;40u8 ucast_keyidx;41u16 sec_type;42u16 sec_type_grp;43struct ppdu_user_delayba ppdu_stats_delayba;44bool delayba_flag;45bool is_authorized;46};4748void ath12k_peer_unmap_event(struct ath12k_base *ab, u16 peer_id);49void ath12k_peer_map_event(struct ath12k_base *ab, u8 vdev_id, u16 peer_id,50u8 *mac_addr, u16 ast_hash, u16 hw_peer_id);51struct ath12k_peer *ath12k_peer_find(struct ath12k_base *ab, int vdev_id,52const u8 *addr);53struct ath12k_peer *ath12k_peer_find_by_addr(struct ath12k_base *ab,54const u8 *addr);55struct ath12k_peer *ath12k_peer_find_by_id(struct ath12k_base *ab, int peer_id);56void ath12k_peer_cleanup(struct ath12k *ar, u32 vdev_id);57int ath12k_peer_delete(struct ath12k *ar, u32 vdev_id, u8 *addr);58int ath12k_peer_create(struct ath12k *ar, struct ath12k_vif *arvif,59struct ieee80211_sta *sta,60struct ath12k_wmi_peer_create_arg *arg);61int ath12k_wait_for_peer_delete_done(struct ath12k *ar, u32 vdev_id,62const u8 *addr);63bool ath12k_peer_exist_by_vdev_id(struct ath12k_base *ab, int vdev_id);64struct ath12k_peer *ath12k_peer_find_by_ast(struct ath12k_base *ab, int ast_hash);6566#endif /* _PEER_H_ */676869