0001
0002
0003
0004
0005
0006
0007 #ifndef ATH11K_PEER_H
0008 #define ATH11K_PEER_H
0009
0010 struct ath11k_peer {
0011 struct list_head list;
0012 struct ieee80211_sta *sta;
0013 int vdev_id;
0014 u8 addr[ETH_ALEN];
0015 int peer_id;
0016 u16 ast_hash;
0017 u8 pdev_idx;
0018 u16 hw_peer_id;
0019
0020
0021 struct ieee80211_key_conf *keys[WMI_MAX_KEY_INDEX + 1];
0022 struct dp_rx_tid rx_tid[IEEE80211_NUM_TIDS + 1];
0023
0024
0025 struct rhash_head rhash_id;
0026
0027 struct rhash_head rhash_addr;
0028
0029
0030
0031
0032 struct crypto_shash *tfm_mmic;
0033 u8 mcast_keyidx;
0034 u8 ucast_keyidx;
0035 u16 sec_type;
0036 u16 sec_type_grp;
0037 bool is_authorized;
0038 };
0039
0040 void ath11k_peer_unmap_event(struct ath11k_base *ab, u16 peer_id);
0041 void ath11k_peer_map_event(struct ath11k_base *ab, u8 vdev_id, u16 peer_id,
0042 u8 *mac_addr, u16 ast_hash, u16 hw_peer_id);
0043 struct ath11k_peer *ath11k_peer_find(struct ath11k_base *ab, int vdev_id,
0044 const u8 *addr);
0045 struct ath11k_peer *ath11k_peer_find_by_addr(struct ath11k_base *ab,
0046 const u8 *addr);
0047 struct ath11k_peer *ath11k_peer_find_by_id(struct ath11k_base *ab, int peer_id);
0048 void ath11k_peer_cleanup(struct ath11k *ar, u32 vdev_id);
0049 int ath11k_peer_delete(struct ath11k *ar, u32 vdev_id, u8 *addr);
0050 int ath11k_peer_create(struct ath11k *ar, struct ath11k_vif *arvif,
0051 struct ieee80211_sta *sta, struct peer_create_params *param);
0052 int ath11k_wait_for_peer_delete_done(struct ath11k *ar, u32 vdev_id,
0053 const u8 *addr);
0054 struct ath11k_peer *ath11k_peer_find_by_vdev_id(struct ath11k_base *ab,
0055 int vdev_id);
0056 int ath11k_peer_rhash_tbl_init(struct ath11k_base *ab);
0057 void ath11k_peer_rhash_tbl_destroy(struct ath11k_base *ab);
0058 int ath11k_peer_rhash_delete(struct ath11k_base *ab, struct ath11k_peer *peer);
0059 #endif