drivers/net/wireless/broadcom/b43/bus.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/broadcom/b43/bus.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/broadcom/b43/bus.c- Extension
.c- Size
- 6585 bytes
- Lines
- 253
- 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.
- 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
asm/mach-bcm47xx/bcm47xx.hb43.hbus.h
Detected Declarations
function Copyrightfunction b43_bus_bcma_bus_powerupfunction b43_bus_bcma_device_is_enabledfunction b43_bus_bcma_device_enablefunction b43_bus_bcma_device_disablefunction b43_bus_bcma_read16function b43_bus_bcma_read32function b43_bus_bcma_write16function b43_bus_bcma_write32function b43_bus_bcma_block_readfunction b43_bus_bcma_block_writefunction b43_bus_ssb_bus_may_powerdownfunction b43_bus_ssb_bus_powerupfunction b43_bus_ssb_device_is_enabledfunction b43_bus_ssb_device_enablefunction b43_bus_ssb_device_disablefunction b43_bus_ssb_read16function b43_bus_ssb_read32function b43_bus_ssb_write16function b43_bus_ssb_write32function b43_bus_ssb_block_readfunction b43_bus_ssb_block_writefunction b43_bus_set_wldev
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-or-later
/*
Broadcom B43 wireless driver
Bus abstraction layer
Copyright (c) 2011 Rafał Miłecki <zajec5@gmail.com>
*/
#ifdef CONFIG_BCM47XX_BCMA
#include <asm/mach-bcm47xx/bcm47xx.h>
#endif
#include "b43.h"
#include "bus.h"
/* BCMA */
#ifdef CONFIG_B43_BCMA
static int b43_bus_bcma_bus_may_powerdown(struct b43_bus_dev *dev)
{
return 0; /* bcma_bus_may_powerdown(dev->bdev->bus); */
}
static int b43_bus_bcma_bus_powerup(struct b43_bus_dev *dev,
bool dynamic_pctl)
{
return 0; /* bcma_bus_powerup(dev->sdev->bus, dynamic_pctl); */
}
static int b43_bus_bcma_device_is_enabled(struct b43_bus_dev *dev)
{
return bcma_core_is_enabled(dev->bdev);
}
static void b43_bus_bcma_device_enable(struct b43_bus_dev *dev,
u32 core_specific_flags)
{
bcma_core_enable(dev->bdev, core_specific_flags);
}
static void b43_bus_bcma_device_disable(struct b43_bus_dev *dev,
u32 core_specific_flags)
{
bcma_core_disable(dev->bdev, core_specific_flags);
}
static u16 b43_bus_bcma_read16(struct b43_bus_dev *dev, u16 offset)
{
return bcma_read16(dev->bdev, offset);
}
static u32 b43_bus_bcma_read32(struct b43_bus_dev *dev, u16 offset)
{
return bcma_read32(dev->bdev, offset);
}
static
void b43_bus_bcma_write16(struct b43_bus_dev *dev, u16 offset, u16 value)
{
bcma_write16(dev->bdev, offset, value);
}
static
void b43_bus_bcma_write32(struct b43_bus_dev *dev, u16 offset, u32 value)
{
bcma_write32(dev->bdev, offset, value);
}
static
void b43_bus_bcma_block_read(struct b43_bus_dev *dev, void *buffer,
size_t count, u16 offset, u8 reg_width)
{
bcma_block_read(dev->bdev, buffer, count, offset, reg_width);
}
static
void b43_bus_bcma_block_write(struct b43_bus_dev *dev, const void *buffer,
size_t count, u16 offset, u8 reg_width)
{
bcma_block_write(dev->bdev, buffer, count, offset, reg_width);
}
struct b43_bus_dev *b43_bus_dev_bcma_init(struct bcma_device *core)
{
struct b43_bus_dev *dev = kzalloc_obj(*dev);
if (!dev)
return NULL;
dev->bus_type = B43_BUS_BCMA;
dev->bdev = core;
dev->bus_may_powerdown = b43_bus_bcma_bus_may_powerdown;
dev->bus_powerup = b43_bus_bcma_bus_powerup;
dev->device_is_enabled = b43_bus_bcma_device_is_enabled;
dev->device_enable = b43_bus_bcma_device_enable;
dev->device_disable = b43_bus_bcma_device_disable;
dev->read16 = b43_bus_bcma_read16;
Annotation
- Immediate include surface: `asm/mach-bcm47xx/bcm47xx.h`, `b43.h`, `bus.h`.
- Detected declarations: `function Copyright`, `function b43_bus_bcma_bus_powerup`, `function b43_bus_bcma_device_is_enabled`, `function b43_bus_bcma_device_enable`, `function b43_bus_bcma_device_disable`, `function b43_bus_bcma_read16`, `function b43_bus_bcma_read32`, `function b43_bus_bcma_write16`, `function b43_bus_bcma_write32`, `function b43_bus_bcma_block_read`.
- 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.