drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intel/iwlwifi/mvm/time-event.c- Extension
.c- Size
- 44085 bytes
- Lines
- 1489
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/jiffies.hnet/mac80211.hfw/notif-wait.hiwl-trans.hfw-api.htime-event.hmvm.hiwl-io.hiwl-prph.h
Detected Declarations
struct iwl_mvm_rx_roc_iterator_datafunction Copyrightfunction iwl_mvm_cleanup_rocfunction iwl_mvm_prepare_mac_removalfunction iwl_mvm_roc_done_wkfunction iwl_mvm_roc_finishedfunction iwl_mvm_csa_noa_startfunction iwl_mvm_te_check_disconnectfunction iwl_mvm_te_handle_notify_csafunction iwl_mvm_te_check_triggerfunction iwl_mvm_te_handle_notiffunction eventfunction iwl_mvm_rx_roc_iteratorfunction iwl_mvm_rx_roc_notiffunction iwl_mvm_aux_roc_te_handle_notiffunction list_for_each_entryfunction iwl_mvm_rx_time_event_notiffunction list_for_each_entry_safefunction iwl_mvm_te_notiffunction iwl_mvm_time_event_responsefunction iwl_mvm_time_event_send_addfunction iwl_mvm_protect_sessionfunction TU_TO_JIFFIESfunction iwl_mvm_get_session_prot_idfunction iwl_mvm_cancel_session_protectionfunction iwl_mvm_roc_rm_cmdfunction __iwl_mvm_remove_time_eventfunction iwl_mvm_remove_aux_roc_tefunction iwl_mvm_remove_time_eventfunction iwl_mvm_stop_session_protectionfunction iwl_mvm_rx_session_protect_notiffunction iwl_mvm_roc_duration_and_delayfunction iwl_mvm_roc_add_cmdfunction iwl_mvm_start_p2p_roc_session_protectionfunction iwl_mvm_start_p2p_rocfunction iwl_mvm_cleanup_roc_tefunction iwl_mvm_stop_rocfunction iwl_mvm_remove_csa_periodfunction iwl_mvm_schedule_csa_periodfunction iwl_mvm_session_prot_notiffunction iwl_mvm_schedule_session_protectionfunction time_afterfunction TU_TO_JIFFIES
Annotated Snippet
struct iwl_mvm_rx_roc_iterator_data {
u32 activity;
bool end_activity;
bool found;
};
static void iwl_mvm_rx_roc_iterator(void *_data, u8 *mac,
struct ieee80211_vif *vif)
{
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
struct iwl_mvm_rx_roc_iterator_data *data = _data;
if (mvmvif->roc_activity == data->activity) {
data->found = true;
if (data->end_activity)
mvmvif->roc_activity = ROC_NUM_ACTIVITIES;
}
}
void iwl_mvm_rx_roc_notif(struct iwl_mvm *mvm,
struct iwl_rx_cmd_buffer *rxb)
{
struct iwl_rx_packet *pkt = rxb_addr(rxb);
struct iwl_roc_notif *notif = (void *)pkt->data;
u32 activity = le32_to_cpu(notif->activity);
bool started = le32_to_cpu(notif->success) &&
le32_to_cpu(notif->started);
struct iwl_mvm_rx_roc_iterator_data data = {
.activity = activity,
.end_activity = !started,
};
/* Clear vif roc_activity if done (set to ROC_NUM_ACTIVITIES) */
ieee80211_iterate_active_interfaces_atomic(mvm->hw,
IEEE80211_IFACE_ITER_NORMAL,
iwl_mvm_rx_roc_iterator,
&data);
/*
* It is possible that the ROC was canceled
* but the notification was already fired.
*/
if (!data.found)
return;
if (started) {
set_bit(IWL_MVM_STATUS_ROC_AUX_RUNNING, &mvm->status);
ieee80211_ready_on_channel(mvm->hw);
} else {
iwl_mvm_roc_finished(mvm);
ieee80211_remain_on_channel_expired(mvm->hw);
}
}
/*
* Handle A Aux ROC time event
*/
static int iwl_mvm_aux_roc_te_handle_notif(struct iwl_mvm *mvm,
struct iwl_time_event_notif *notif)
{
struct iwl_mvm_time_event_data *aux_roc_te = NULL, *te_data;
list_for_each_entry(te_data, &mvm->aux_roc_te_list, list) {
if (le32_to_cpu(notif->unique_id) == te_data->uid) {
aux_roc_te = te_data;
break;
}
}
if (!aux_roc_te) /* Not a Aux ROC time event */
return -EINVAL;
iwl_mvm_te_check_trigger(mvm, notif, aux_roc_te);
IWL_DEBUG_TE(mvm,
"Aux ROC time event notification - UID = 0x%x action %d (error = %d)\n",
le32_to_cpu(notif->unique_id),
le32_to_cpu(notif->action), le32_to_cpu(notif->status));
if (!le32_to_cpu(notif->status) ||
le32_to_cpu(notif->action) == TE_V2_NOTIF_HOST_EVENT_END) {
/* End TE, notify mac80211 */
ieee80211_remain_on_channel_expired(mvm->hw);
iwl_mvm_roc_finished(mvm); /* flush aux queue */
list_del(&aux_roc_te->list); /* remove from list */
aux_roc_te->running = false;
aux_roc_te->vif = NULL;
aux_roc_te->uid = 0;
aux_roc_te->id = TE_MAX;
} else if (le32_to_cpu(notif->action) == TE_V2_NOTIF_HOST_EVENT_START) {
set_bit(IWL_MVM_STATUS_ROC_AUX_RUNNING, &mvm->status);
aux_roc_te->running = true;
Annotation
- Immediate include surface: `linux/jiffies.h`, `net/mac80211.h`, `fw/notif-wait.h`, `iwl-trans.h`, `fw-api.h`, `time-event.h`, `mvm.h`, `iwl-io.h`.
- Detected declarations: `struct iwl_mvm_rx_roc_iterator_data`, `function Copyright`, `function iwl_mvm_cleanup_roc`, `function iwl_mvm_prepare_mac_removal`, `function iwl_mvm_roc_done_wk`, `function iwl_mvm_roc_finished`, `function iwl_mvm_csa_noa_start`, `function iwl_mvm_te_check_disconnect`, `function iwl_mvm_te_handle_notify_csa`, `function iwl_mvm_te_check_trigger`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.