drivers/net/wireless/ti/wl1251/init.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ti/wl1251/init.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ti/wl1251/init.c- Extension
.c- Size
- 8578 bytes
- Lines
- 411
- 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
linux/kernel.hlinux/module.hlinux/slab.hinit.hwl12xx_80211.hacx.hcmd.hreg.h
Detected Declarations
function Copyrightfunction wl1251_hw_init_templates_configfunction wl1251_hw_init_rx_configfunction wl1251_hw_init_phy_configfunction wl1251_hw_init_beacon_filterfunction wl1251_hw_init_ptafunction wl1251_hw_init_energy_detectionfunction wl1251_hw_init_beacon_broadcastfunction wl1251_hw_init_power_authfunction wl1251_hw_init_mem_configfunction wl1251_hw_init_txq_fillfunction wl1251_hw_init_tx_queue_configfunction wl1251_hw_init_data_path_configfunction wl1251_hw_init
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/*
* This file is part of wl1251
*
* Copyright (C) 2009 Nokia Corporation
*/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include "init.h"
#include "wl12xx_80211.h"
#include "acx.h"
#include "cmd.h"
#include "reg.h"
int wl1251_hw_init_hwenc_config(struct wl1251 *wl)
{
int ret;
ret = wl1251_acx_feature_cfg(wl, 0);
if (ret < 0) {
wl1251_warning("couldn't set feature config");
return ret;
}
ret = wl1251_acx_default_key(wl, wl->default_key);
if (ret < 0) {
wl1251_warning("couldn't set default key");
return ret;
}
return 0;
}
int wl1251_hw_init_templates_config(struct wl1251 *wl)
{
int ret;
u8 partial_vbm[PARTIAL_VBM_MAX];
/* send empty templates for fw memory reservation */
ret = wl1251_cmd_template_set(wl, CMD_PROBE_REQ, NULL,
sizeof(struct wl12xx_probe_req_template));
if (ret < 0)
return ret;
ret = wl1251_cmd_template_set(wl, CMD_NULL_DATA, NULL,
sizeof(struct wl12xx_null_data_template));
if (ret < 0)
return ret;
ret = wl1251_cmd_template_set(wl, CMD_PS_POLL, NULL,
sizeof(struct wl12xx_ps_poll_template));
if (ret < 0)
return ret;
ret = wl1251_cmd_template_set(wl, CMD_QOS_NULL_DATA, NULL,
sizeof
(struct wl12xx_qos_null_data_template));
if (ret < 0)
return ret;
ret = wl1251_cmd_template_set(wl, CMD_PROBE_RESP, NULL,
sizeof
(struct wl12xx_probe_resp_template));
if (ret < 0)
return ret;
ret = wl1251_cmd_template_set(wl, CMD_BEACON, NULL,
sizeof
(struct wl12xx_beacon_template));
if (ret < 0)
return ret;
/* tim templates, first reserve space then allocate an empty one */
memset(partial_vbm, 0, PARTIAL_VBM_MAX);
ret = wl1251_cmd_vbm(wl, TIM_ELE_ID, partial_vbm, PARTIAL_VBM_MAX, 0);
if (ret < 0)
return ret;
ret = wl1251_cmd_vbm(wl, TIM_ELE_ID, partial_vbm, 1, 0);
if (ret < 0)
return ret;
return 0;
}
int wl1251_hw_init_rx_config(struct wl1251 *wl, u32 config, u32 filter)
{
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/slab.h`, `init.h`, `wl12xx_80211.h`, `acx.h`, `cmd.h`, `reg.h`.
- Detected declarations: `function Copyright`, `function wl1251_hw_init_templates_config`, `function wl1251_hw_init_rx_config`, `function wl1251_hw_init_phy_config`, `function wl1251_hw_init_beacon_filter`, `function wl1251_hw_init_pta`, `function wl1251_hw_init_energy_detection`, `function wl1251_hw_init_beacon_broadcast`, `function wl1251_hw_init_power_auth`, `function wl1251_hw_init_mem_config`.
- 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.