Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / drivers / net / wireless / intel / iwlwifi / mvm / time-sync.h
blob2cfd0fb5e781a96e510f7801b8289deb00d5edb5
1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
2 /*
3 * Copyright (C) 2022 Intel Corporation
4 */
5 #ifndef __TIME_SYNC_H__
6 #define __TIME_SYNC_H__
8 #include "mvm.h"
9 #include <linux/ieee80211.h>
11 void iwl_mvm_init_time_sync(struct iwl_time_sync_data *data);
12 void iwl_mvm_time_sync_msmt_event(struct iwl_mvm *mvm,
13 struct iwl_rx_cmd_buffer *rxb);
14 void iwl_mvm_time_sync_msmt_confirm_event(struct iwl_mvm *mvm,
15 struct iwl_rx_cmd_buffer *rxb);
16 int iwl_mvm_time_sync_config(struct iwl_mvm *mvm, const u8 *addr,
17 u32 protocols);
19 static inline
20 bool iwl_mvm_time_sync_frame(struct iwl_mvm *mvm, struct sk_buff *skb, u8 *addr)
22 if (ether_addr_equal(mvm->time_sync.peer_addr, addr) &&
23 (ieee80211_is_timing_measurement(skb) || ieee80211_is_ftm(skb))) {
24 skb_queue_tail(&mvm->time_sync.frame_list, skb);
25 return true;
28 return false;
30 #endif