drivers/net/wireless/intel/iwlwifi/mvm/time-event.h
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/mvm/time-event.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intel/iwlwifi/mvm/time-event.h- Extension
.h- Size
- 8389 bytes
- Lines
- 228
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
fw-api.hmvm.h
Detected Declarations
function iwl_mvm_te_scheduled
Annotated Snippet
#ifndef __time_event_h__
#define __time_event_h__
#include "fw-api.h"
#include "mvm.h"
/**
* DOC: Time Events - what is it?
*
* Time Events are a fw feature that allows the driver to control the presence
* of the device on the channel. Since the fw supports multiple channels
* concurrently, the fw may choose to jump to another channel at any time.
* In order to make sure that the fw is on a specific channel at a certain time
* and for a certain duration, the driver needs to issue a time event.
*
* The simplest example is for BSS association. The driver issues a time event,
* waits for it to start, and only then tells mac80211 that we can start the
* association. This way, we make sure that the association will be done
* smoothly and won't be interrupted by channel switch decided within the fw.
*/
/**
* DOC: The flow against the fw
*
* When the driver needs to make sure we are in a certain channel, at a certain
* time and for a certain duration, it sends a Time Event. The flow against the
* fw goes like this:
* 1) Driver sends a TIME_EVENT_CMD to the fw
* 2) Driver gets the response for that command. This response contains the
* Unique ID (UID) of the event.
* 3) The fw sends notification when the event starts.
*
* Of course the API provides various options that allow to cover parameters
* of the flow.
* What is the duration of the event?
* What is the start time of the event?
* Is there an end-time for the event?
* How much can the event be delayed?
* Can the event be split?
* If yes what is the maximal number of chunks?
* etc...
*/
/**
* DOC: Abstraction to the driver
*
* In order to simplify the use of time events to the rest of the driver,
* we abstract the use of time events. This component provides the functions
* needed by the driver.
*/
#define IWL_MVM_TE_SESSION_PROTECTION_MAX_TIME_MS 600
#define IWL_MVM_TE_SESSION_PROTECTION_MIN_TIME_MS 400
/**
* iwl_mvm_protect_session - start / extend the session protection.
* @mvm: the mvm component
* @vif: the virtual interface for which the session is issued
* @duration: the duration of the session in TU.
* @min_duration: will start a new session if the current session will end
* in less than min_duration.
* @max_delay: maximum delay before starting the time event (in TU)
* @wait_for_notif: true if it is required that a time event notification be
* waited for (that the time event has been scheduled before returning)
*
* This function can be used to start a session protection which means that the
* fw will stay on the channel for %duration_ms milliseconds. This function
* can block (sleep) until the session starts. This function can also be used
* to extend a currently running session.
* This function is meant to be used for BSS association for example, where we
* want to make sure that the fw stays on the channel during the association.
*/
void iwl_mvm_protect_session(struct iwl_mvm *mvm,
struct ieee80211_vif *vif,
u32 duration, u32 min_duration,
u32 max_delay, bool wait_for_notif);
/**
* iwl_mvm_stop_session_protection - cancel the session protection.
* @mvm: the mvm component
* @vif: the virtual interface for which the session is issued
*
* This functions cancels the session protection which is an act of good
* citizenship. If it is not needed any more it should be canceled because
* the other bindings wait for the medium during that time.
* This funtions doesn't sleep.
*/
void iwl_mvm_stop_session_protection(struct iwl_mvm *mvm,
struct ieee80211_vif *vif);
Annotation
- Immediate include surface: `fw-api.h`, `mvm.h`.
- Detected declarations: `function iwl_mvm_te_scheduled`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.