diff options
author | Avraham Stern <[email protected]> | 2023-03-20 12:33:18 +0200 |
---|---|---|
committer | Johannes Berg <[email protected]> | 2023-03-22 13:16:37 +0100 |
commit | cf85123a210fe99cdd972a5cc84857fec925f794 (patch) | |
tree | 59521bd24fb216dbda1940dae4d860cc5effbffe /drivers/net/wireless/intel/iwlwifi/mvm/time-sync.c | |
parent | 3068248b860c3c5163b0c6881cbaee5ebc020184 (diff) |
wifi: iwlwifi: mvm: support enabling and disabling HW timestamping
Instead of enabling HW timestamping by default every time a station
is connected, disable it by default and enable it only upon request
for a specific station. HW timestamping can be enabled for only one
peer at a time.
Signed-off-by: Avraham Stern <[email protected]>
Signed-off-by: Gregory Greenman <[email protected]>
Link: https://lore.kernel.org/r/20230320122330.62b98fbf545b.I450c1017ada7900a71a63d879bb542a08e3166c8@changeid
Signed-off-by: Johannes Berg <[email protected]>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/time-sync.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/time-sync.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/time-sync.c b/drivers/net/wireless/intel/iwlwifi/mvm/time-sync.c index 434d27a44dea..edae3e24192b 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/time-sync.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/time-sync.c @@ -125,7 +125,7 @@ void iwl_mvm_time_sync_msmt_confirm_event(struct iwl_mvm *mvm, ieee80211_tx_status_ext(mvm->hw, &status); } -int iwl_mvm_time_sync_config(struct iwl_mvm *mvm, u8 *addr, u32 protocols) +int iwl_mvm_time_sync_config(struct iwl_mvm *mvm, const u8 *addr, u32 protocols) { struct iwl_time_sync_cfg_cmd cmd = {}; int err; @@ -166,13 +166,8 @@ int iwl_mvm_time_sync_config(struct iwl_mvm *mvm, u8 *addr, u32 protocols) IWL_DEBUG_INFO(mvm, "Time sync: set peer addr=%pM\n", addr); } - return err; -} + if (!mvm->time_sync.active) + skb_queue_purge(&mvm->time_sync.frame_list); -void iwl_mvm_time_sync_sta_rm(struct iwl_mvm *mvm, struct ieee80211_sta *sta) -{ - /* Disable time sync with this station */ - iwl_mvm_time_sync_config(mvm, sta->addr, 0); - - skb_queue_purge(&mvm->time_sync.frame_list); + return err; } |