drivers/net/wireless/intel/iwlwifi/mvm/rx.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intel/iwlwifi/mvm/rx.c- Extension
.c- Size
- 37475 bytes
- Lines
- 1242
- 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/unaligned.hlinux/etherdevice.hlinux/skbuff.hiwl-trans.hmvm.hfw-api.h
Detected Declarations
struct iwl_mvm_stat_datastruct iwl_mvm_stat_data_all_macsfunction Copyrightfunction iwl_mvm_pass_packet_to_mac80211function iwl_mvm_get_signal_strengthfunction iwl_mvm_set_mac80211_rx_flagfunction iwl_mvm_rx_handle_tcmfunction iwl_mvm_rx_csumfunction iwl_mvm_rx_rx_mpdufunction errorsfunction iwl_mvm_update_link_sigfunction iwl_mvm_stat_iteratorfunction iwl_mvm_stat_iterator_all_macsfunction iwl_mvm_rx_stats_check_triggerfunction iwl_mvm_stats_energy_iterfunction iwl_mvm_update_tcm_from_statsfunction iwl_mvm_handle_per_phy_statsfunction iwl_mvm_stats_ver_15function iwl_mvm_stats_ver_14function iwl_mvm_verify_stats_lenfunction iwl_mvm_stat_iterator_all_linksfunction iwl_mvm_handle_rx_system_oper_statsfunction iwl_mvm_handle_rx_system_oper_part1_statsfunction iwl_mvm_handle_rx_statistics_tlvfunction iwl_mvm_handle_rx_statisticsfunction iwl_mvm_rx_statisticsfunction iwl_mvm_window_status_notif
Annotated Snippet
struct iwl_mvm_stat_data {
struct iwl_mvm *mvm;
__le32 flags;
__le32 mac_id;
u8 beacon_filter_average_energy;
__le32 *beacon_counter;
u8 *beacon_average_energy;
};
struct iwl_mvm_stat_data_all_macs {
struct iwl_mvm *mvm;
__le32 flags;
struct iwl_stats_ntfy_per_mac *per_mac;
};
static void iwl_mvm_update_link_sig(struct ieee80211_vif *vif, int sig,
struct iwl_mvm_vif_link_info *link_info,
struct ieee80211_bss_conf *bss_conf)
{
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
struct iwl_mvm *mvm = mvmvif->mvm;
int thold = bss_conf->cqm_rssi_thold;
int hyst = bss_conf->cqm_rssi_hyst;
int last_event;
if (sig == 0) {
IWL_DEBUG_RX(mvm, "RSSI is 0 - skip signal based decision\n");
return;
}
link_info->bf_data.ave_beacon_signal = sig;
/* BT Coex */
if (link_info->bf_data.bt_coex_min_thold !=
link_info->bf_data.bt_coex_max_thold) {
last_event = link_info->bf_data.last_bt_coex_event;
if (sig > link_info->bf_data.bt_coex_max_thold &&
(last_event <= link_info->bf_data.bt_coex_min_thold ||
last_event == 0)) {
link_info->bf_data.last_bt_coex_event = sig;
IWL_DEBUG_RX(mvm, "cqm_iterator bt coex high %d\n",
sig);
iwl_mvm_bt_rssi_event(mvm, vif, RSSI_EVENT_HIGH);
} else if (sig < link_info->bf_data.bt_coex_min_thold &&
(last_event >= link_info->bf_data.bt_coex_max_thold ||
last_event == 0)) {
link_info->bf_data.last_bt_coex_event = sig;
IWL_DEBUG_RX(mvm, "cqm_iterator bt coex low %d\n",
sig);
iwl_mvm_bt_rssi_event(mvm, vif, RSSI_EVENT_LOW);
}
}
if (!(vif->driver_flags & IEEE80211_VIF_SUPPORTS_CQM_RSSI))
return;
/* CQM Notification */
last_event = link_info->bf_data.last_cqm_event;
if (thold && sig < thold && (last_event == 0 ||
sig < last_event - hyst)) {
link_info->bf_data.last_cqm_event = sig;
IWL_DEBUG_RX(mvm, "cqm_iterator cqm low %d\n",
sig);
ieee80211_cqm_rssi_notify(
vif,
NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW,
sig,
GFP_KERNEL);
} else if (sig > thold &&
(last_event == 0 || sig > last_event + hyst)) {
link_info->bf_data.last_cqm_event = sig;
IWL_DEBUG_RX(mvm, "cqm_iterator cqm high %d\n",
sig);
ieee80211_cqm_rssi_notify(
vif,
NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH,
sig,
GFP_KERNEL);
}
}
static void iwl_mvm_stat_iterator(void *_data, u8 *mac,
struct ieee80211_vif *vif)
{
struct iwl_mvm_stat_data *data = _data;
int sig = -data->beacon_filter_average_energy;
u16 id = le32_to_cpu(data->mac_id);
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
u16 vif_id = mvmvif->id;
Annotation
- Immediate include surface: `linux/unaligned.h`, `linux/etherdevice.h`, `linux/skbuff.h`, `iwl-trans.h`, `mvm.h`, `fw-api.h`.
- Detected declarations: `struct iwl_mvm_stat_data`, `struct iwl_mvm_stat_data_all_macs`, `function Copyright`, `function iwl_mvm_pass_packet_to_mac80211`, `function iwl_mvm_get_signal_strength`, `function iwl_mvm_set_mac80211_rx_flag`, `function iwl_mvm_rx_handle_tcm`, `function iwl_mvm_rx_csum`, `function iwl_mvm_rx_rx_mpdu`, `function errors`.
- 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.