drivers/net/wireless/ath/ath9k/ar9003_mci.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/ath9k/ar9003_mci.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ath/ath9k/ar9003_mci.c- Extension
.c- Size
- 43728 bytes
- Lines
- 1584
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/export.hhw.hhw-ops.har9003_phy.har9003_mci.har9003_aic.h
Detected Declarations
function Copyrightfunction ar9003_mci_wait_for_interruptfunction ar9003_mci_remote_resetfunction ar9003_mci_send_lna_transferfunction ar9003_mci_send_req_wakefunction ar9003_mci_send_sys_wakingfunction ar9003_mci_send_lna_takefunction ar9003_mci_send_sys_sleepingfunction ar9003_mci_send_coex_version_queryfunction ar9003_mci_send_coex_version_responsefunction ar9003_mci_send_coex_wlan_channelsfunction ar9003_mci_send_coex_bt_status_queryfunction ar9003_mci_send_coex_halt_bt_gpmfunction ar9003_mci_prep_interfacefunction ar9003_mci_set_full_sleepfunction ar9003_mci_disable_interruptfunction ar9003_mci_enable_interruptfunction ar9003_mci_check_intfunction ar9003_mci_get_interruptfunction ar9003_mci_get_isrfunction ar9003_mci_2g5g_changedfunction ar9003_mci_is_gpm_validfunction ar9003_mci_observation_set_upfunction ar9003_mci_send_coex_bt_flagsfunction ar9003_mci_sync_bt_statefunction ar9003_mci_check_btfunction ar9003_mci_process_gpm_extrafunction ar9003_mci_wait_for_gpmfunction ar9003_mci_start_resetfunction ar9003_mci_end_resetfunction ar9003_mci_mute_btfunction ar9003_mci_osla_setupfunction ar9003_mci_stat_setupfunction ar9003_mci_set_btcoex_ctrl_9565_1ANTfunction ar9003_mci_set_btcoex_ctrl_9565_2ANTfunction ar9003_mci_set_btcoex_ctrl_9462function ar9003_mci_resetfunction ar9003_mci_stop_btfunction ar9003_mci_send_2g5g_statusfunction ar9003_mci_queue_unsent_gpmfunction ar9003_mci_2g5g_switchfunction ar9003_mci_send_messagefunction ar9003_mci_init_cal_reqfunction ar9003_mci_init_cal_donefunction ar9003_mci_setupfunction ar9003_mci_cleanupfunction ar9003_mci_statefunction ar9003_mci_bt_gain_ctrl
Annotated Snippet
if (!(REG_READ(ah, address) & bit_position)) {
udelay(10);
time_out -= 10;
if (time_out < 0)
break;
else
continue;
}
REG_WRITE(ah, address, bit_position);
if (address != AR_MCI_INTERRUPT_RX_MSG_RAW)
break;
if (bit_position & AR_MCI_INTERRUPT_RX_MSG_REQ_WAKE)
ar9003_mci_reset_req_wakeup(ah);
if (bit_position & (AR_MCI_INTERRUPT_RX_MSG_SYS_SLEEPING |
AR_MCI_INTERRUPT_RX_MSG_SYS_WAKING))
REG_WRITE(ah, AR_MCI_INTERRUPT_RAW,
AR_MCI_INTERRUPT_REMOTE_SLEEP_UPDATE);
REG_WRITE(ah, AR_MCI_INTERRUPT_RAW, AR_MCI_INTERRUPT_RX_MSG);
break;
}
if (time_out <= 0) {
ath_dbg(common, MCI,
"MCI Wait for Reg 0x%08x = 0x%08x timeout\n",
address, bit_position);
ath_dbg(common, MCI,
"MCI INT_RAW = 0x%08x, RX_MSG_RAW = 0x%08x\n",
REG_READ(ah, AR_MCI_INTERRUPT_RAW),
REG_READ(ah, AR_MCI_INTERRUPT_RX_MSG_RAW));
time_out = 0;
}
return time_out;
}
static void ar9003_mci_remote_reset(struct ath_hw *ah, bool wait_done)
{
u32 payload[4] = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffff00};
ar9003_mci_send_message(ah, MCI_REMOTE_RESET, 0, payload, 16,
wait_done, false);
udelay(5);
}
static void ar9003_mci_send_lna_transfer(struct ath_hw *ah, bool wait_done)
{
u32 payload = 0x00000000;
ar9003_mci_send_message(ah, MCI_LNA_TRANS, 0, &payload, 1,
wait_done, false);
}
static void ar9003_mci_send_req_wake(struct ath_hw *ah, bool wait_done)
{
ar9003_mci_send_message(ah, MCI_REQ_WAKE, MCI_FLAG_DISABLE_TIMESTAMP,
NULL, 0, wait_done, false);
udelay(5);
}
static void ar9003_mci_send_sys_waking(struct ath_hw *ah, bool wait_done)
{
ar9003_mci_send_message(ah, MCI_SYS_WAKING, MCI_FLAG_DISABLE_TIMESTAMP,
NULL, 0, wait_done, false);
}
static void ar9003_mci_send_lna_take(struct ath_hw *ah, bool wait_done)
{
u32 payload = 0x70000000;
ar9003_mci_send_message(ah, MCI_LNA_TAKE, 0, &payload, 1,
wait_done, false);
}
static void ar9003_mci_send_sys_sleeping(struct ath_hw *ah, bool wait_done)
{
ar9003_mci_send_message(ah, MCI_SYS_SLEEPING,
MCI_FLAG_DISABLE_TIMESTAMP,
NULL, 0, wait_done, false);
}
static void ar9003_mci_send_coex_version_query(struct ath_hw *ah,
bool wait_done)
{
struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci;
u32 payload[4] = {0, 0, 0, 0};
Annotation
- Immediate include surface: `linux/export.h`, `hw.h`, `hw-ops.h`, `ar9003_phy.h`, `ar9003_mci.h`, `ar9003_aic.h`.
- Detected declarations: `function Copyright`, `function ar9003_mci_wait_for_interrupt`, `function ar9003_mci_remote_reset`, `function ar9003_mci_send_lna_transfer`, `function ar9003_mci_send_req_wake`, `function ar9003_mci_send_sys_waking`, `function ar9003_mci_send_lna_take`, `function ar9003_mci_send_sys_sleeping`, `function ar9003_mci_send_coex_version_query`, `function ar9003_mci_send_coex_version_response`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: integration 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.