drivers/net/wireless/broadcom/b43legacy/leds.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/broadcom/b43legacy/leds.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/broadcom/b43legacy/leds.c- Extension
.c- Size
- 6392 bytes
- Lines
- 231
- 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
b43legacy.hleds.hrfkill.h
Detected Declarations
function Copyrightfunction b43legacy_led_turn_offfunction b43legacy_led_brightness_setfunction b43legacy_register_ledfunction b43legacy_unregister_ledfunction b43legacy_map_ledfunction b43legacy_leds_initfunction b43legacy_leds_exit
Annotated Snippet
if (sprom[i] == 0xFF) {
/* There is no LED information in the SPROM
* for this LED. Hardcode it here. */
activelow = false;
switch (i) {
case 0:
behaviour = B43legacy_LED_ACTIVITY;
activelow = true;
if (bus->boardinfo.vendor == PCI_VENDOR_ID_COMPAQ)
behaviour = B43legacy_LED_RADIO_ALL;
break;
case 1:
behaviour = B43legacy_LED_RADIO_B;
if (bus->boardinfo.vendor == PCI_VENDOR_ID_ASUSTEK)
behaviour = B43legacy_LED_ASSOC;
break;
case 2:
behaviour = B43legacy_LED_RADIO_A;
break;
case 3:
behaviour = B43legacy_LED_OFF;
break;
default:
B43legacy_WARN_ON(1);
return;
}
} else {
behaviour = sprom[i] & B43legacy_LED_BEHAVIOUR;
activelow = !!(sprom[i] & B43legacy_LED_ACTIVELOW);
}
b43legacy_map_led(dev, i, behaviour, activelow);
}
}
void b43legacy_leds_exit(struct b43legacy_wldev *dev)
{
b43legacy_unregister_led(&dev->led_tx);
b43legacy_unregister_led(&dev->led_rx);
b43legacy_unregister_led(&dev->led_assoc);
b43legacy_unregister_led(&dev->led_radio);
}
Annotation
- Immediate include surface: `b43legacy.h`, `leds.h`, `rfkill.h`.
- Detected declarations: `function Copyright`, `function b43legacy_led_turn_off`, `function b43legacy_led_brightness_set`, `function b43legacy_register_led`, `function b43legacy_unregister_led`, `function b43legacy_map_led`, `function b43legacy_leds_init`, `function b43legacy_leds_exit`.
- 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.