drivers/net/wireless/ti/wl18xx/event.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ti/wl18xx/event.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ti/wl18xx/event.c- Extension
.c- Size
- 6139 bytes
- Lines
- 237
- 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
net/genetlink.hevent.hscan.hconf.h../wlcore/cmd.h../wlcore/debug.h../wlcore/vendor_cmd.h
Detected Declarations
function Copyrightfunction wlcore_smart_config_sync_eventfunction wlcore_smart_config_decode_eventfunction wlcore_event_time_syncfunction wl18xx_process_mailbox_events
Annotated Snippet
nla_put(skb, WLCORE_VENDOR_ATTR_PSK, pwd_len, pwd)) {
kfree_skb(skb);
return -EMSGSIZE;
}
cfg80211_vendor_event(skb, GFP_KERNEL);
return 0;
}
static void wlcore_event_time_sync(struct wl1271 *wl,
u16 tsf_high_msb, u16 tsf_high_lsb,
u16 tsf_low_msb, u16 tsf_low_lsb)
{
u32 clock_low;
u32 clock_high;
clock_high = (tsf_high_msb << 16) | tsf_high_lsb;
clock_low = (tsf_low_msb << 16) | tsf_low_lsb;
wl1271_info("TIME_SYNC_EVENT_ID: clock_high %u, clock low %u",
clock_high, clock_low);
}
int wl18xx_process_mailbox_events(struct wl1271 *wl)
{
struct wl18xx_event_mailbox *mbox = wl->mbox;
u32 vector;
vector = le32_to_cpu(mbox->events_vector);
wl1271_debug(DEBUG_EVENT, "MBOX vector: 0x%x", vector);
if (vector & SCAN_COMPLETE_EVENT_ID) {
wl1271_debug(DEBUG_EVENT, "scan results: %d",
mbox->number_of_scan_results);
if (wl->scan_wlvif)
wl18xx_scan_completed(wl, wl->scan_wlvif);
}
if (vector & TIME_SYNC_EVENT_ID)
wlcore_event_time_sync(wl,
le16_to_cpu(mbox->time_sync_tsf_high_msb),
le16_to_cpu(mbox->time_sync_tsf_high_lsb),
le16_to_cpu(mbox->time_sync_tsf_low_msb),
le16_to_cpu(mbox->time_sync_tsf_low_lsb));
if (vector & RADAR_DETECTED_EVENT_ID) {
wl1271_info("radar event: channel %d type %s",
mbox->radar_channel,
wl18xx_radar_type_decode(mbox->radar_type));
if (!wl->radar_debug_mode)
ieee80211_radar_detected(wl->hw, NULL);
}
if (vector & PERIODIC_SCAN_REPORT_EVENT_ID) {
wl1271_debug(DEBUG_EVENT,
"PERIODIC_SCAN_REPORT_EVENT (results %d)",
mbox->number_of_sched_scan_results);
wlcore_scan_sched_scan_results(wl);
}
if (vector & PERIODIC_SCAN_COMPLETE_EVENT_ID)
wlcore_event_sched_scan_completed(wl, 1);
if (vector & RSSI_SNR_TRIGGER_0_EVENT_ID)
wlcore_event_rssi_trigger(wl, mbox->rssi_snr_trigger_metric);
if (vector & BA_SESSION_RX_CONSTRAINT_EVENT_ID)
wlcore_event_ba_rx_constraint(wl,
le16_to_cpu(mbox->rx_ba_role_id_bitmap),
le16_to_cpu(mbox->rx_ba_allowed_bitmap));
if (vector & BSS_LOSS_EVENT_ID)
wlcore_event_beacon_loss(wl,
le16_to_cpu(mbox->bss_loss_bitmap));
if (vector & CHANNEL_SWITCH_COMPLETE_EVENT_ID)
wlcore_event_channel_switch(wl,
le16_to_cpu(mbox->channel_switch_role_id_bitmap),
true);
if (vector & DUMMY_PACKET_EVENT_ID)
wlcore_event_dummy_packet(wl);
/*
* "TX retries exceeded" has a different meaning according to mode.
* In AP mode the offending station is disconnected.
*/
if (vector & MAX_TX_FAILURE_EVENT_ID)
Annotation
- Immediate include surface: `net/genetlink.h`, `event.h`, `scan.h`, `conf.h`, `../wlcore/cmd.h`, `../wlcore/debug.h`, `../wlcore/vendor_cmd.h`.
- Detected declarations: `function Copyright`, `function wlcore_smart_config_sync_event`, `function wlcore_smart_config_decode_event`, `function wlcore_event_time_sync`, `function wl18xx_process_mailbox_events`.
- 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.