drivers/net/wireless/intel/iwlwifi/dvm/rx.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/dvm/rx.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intel/iwlwifi/dvm/rx.c- Extension
.c- Size
- 31520 bytes
- Lines
- 1022
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/etherdevice.hlinux/slab.hlinux/sched.hnet/mac80211.hlinux/unaligned.hiwl-trans.hiwl-io.hdev.hcalib.hagn.h
Detected Declarations
function Copyrightfunction iwlagn_rx_csafunction iwlagn_rx_spectrum_measure_notiffunction iwlagn_rx_pm_sleep_notiffunction iwlagn_rx_pm_debug_statistics_notiffunction iwlagn_rx_beacon_notiffunction iwlagn_good_plcp_healthfunction iwl_force_rf_resetfunction time_afterfunction iwlagn_recover_from_statisticsfunction iwlagn_rx_calc_noisefunction accum_statsfunction iwlagn_accumulative_statisticsfunction iwlagn_accumulative_statisticsfunction iwlagn_rx_reply_statisticsfunction iwlagn_rx_card_state_notiffunction iwlagn_rx_missed_beacon_notiffunction iwl_rx_reply_rxfunction iwlagn_set_decrypted_flagfunction iwlagn_pass_packet_to_mac80211function for_each_contextfunction iwlagn_translate_rx_statusfunction iwlagn_calc_rssifunction iwlagn_rx_reply_rxfunction iwlagn_rx_noa_notificationfunction iwl_setup_rx_handlersfunction iwl_rx_dispatch
Annotated Snippet
if (le32_to_cpu(*cur) > le32_to_cpu(*prev)) {
*delta = cpu_to_le32(
le32_to_cpu(*cur) - le32_to_cpu(*prev));
le32_add_cpu(accum, le32_to_cpu(*delta));
if (le32_to_cpu(*delta) > le32_to_cpu(*max_delta))
*max_delta = *delta;
}
}
}
static void
iwlagn_accumulative_statistics(struct iwl_priv *priv,
struct statistics_general_common *common,
struct statistics_rx_non_phy *rx_non_phy,
struct statistics_rx_phy *rx_ofdm,
struct statistics_rx_ht_phy *rx_ofdm_ht,
struct statistics_rx_phy *rx_cck,
struct statistics_tx *tx,
struct statistics_bt_activity *bt_activity)
{
#define ACCUM(_name) \
accum_stats((__le32 *)&priv->statistics._name, \
(__le32 *)_name, \
(__le32 *)&priv->delta_stats._name, \
(__le32 *)&priv->max_delta_stats._name, \
(__le32 *)&priv->accum_stats._name, \
sizeof(*_name))
ACCUM(common);
ACCUM(rx_non_phy);
ACCUM(rx_ofdm);
ACCUM(rx_ofdm_ht);
ACCUM(rx_cck);
ACCUM(tx);
if (bt_activity)
ACCUM(bt_activity);
#undef ACCUM
}
#else
static inline void
iwlagn_accumulative_statistics(struct iwl_priv *priv,
struct statistics_general_common *common,
struct statistics_rx_non_phy *rx_non_phy,
struct statistics_rx_phy *rx_ofdm,
struct statistics_rx_ht_phy *rx_ofdm_ht,
struct statistics_rx_phy *rx_cck,
struct statistics_tx *tx,
struct statistics_bt_activity *bt_activity)
{
}
#endif
static void iwlagn_rx_statistics(struct iwl_priv *priv,
struct iwl_rx_cmd_buffer *rxb)
{
unsigned long stamp = jiffies;
const int reg_recalib_period = 60;
int change;
struct iwl_rx_packet *pkt = rxb_addr(rxb);
u32 len = iwl_rx_packet_payload_len(pkt);
__le32 *flag;
struct statistics_general_common *common;
struct statistics_rx_non_phy *rx_non_phy;
struct statistics_rx_phy *rx_ofdm;
struct statistics_rx_ht_phy *rx_ofdm_ht;
struct statistics_rx_phy *rx_cck;
struct statistics_tx *tx;
struct statistics_bt_activity *bt_activity;
IWL_DEBUG_RX(priv, "Statistics notification received (%d bytes).\n",
len);
spin_lock(&priv->statistics.lock);
if (len == sizeof(struct iwl_bt_notif_statistics)) {
struct iwl_bt_notif_statistics *stats;
stats = (void *)&pkt->data;
flag = &stats->flag;
common = &stats->general.common;
rx_non_phy = &stats->rx.general.common;
rx_ofdm = &stats->rx.ofdm;
rx_ofdm_ht = &stats->rx.ofdm_ht;
rx_cck = &stats->rx.cck;
tx = &stats->tx;
bt_activity = &stats->general.activity;
#ifdef CONFIG_IWLWIFI_DEBUGFS
/* handle this exception directly */
priv->statistics.num_bt_kills = stats->rx.general.num_bt_kills;
le32_add_cpu(&priv->statistics.accum_num_bt_kills,
Annotation
- Immediate include surface: `linux/etherdevice.h`, `linux/slab.h`, `linux/sched.h`, `net/mac80211.h`, `linux/unaligned.h`, `iwl-trans.h`, `iwl-io.h`, `dev.h`.
- Detected declarations: `function Copyright`, `function iwlagn_rx_csa`, `function iwlagn_rx_spectrum_measure_notif`, `function iwlagn_rx_pm_sleep_notif`, `function iwlagn_rx_pm_debug_statistics_notif`, `function iwlagn_rx_beacon_notif`, `function iwlagn_good_plcp_health`, `function iwl_force_rf_reset`, `function time_after`, `function iwlagn_recover_from_statistics`.
- 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.