drivers/net/wireless/ti/wl1251/acx.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ti/wl1251/acx.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ti/wl1251/acx.c- Extension
.c- Size
- 21739 bytes
- Lines
- 1013
- 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
acx.hlinux/module.hlinux/slab.hlinux/string.hwl1251.hreg.hcmd.hps.h
Detected Declarations
function wl1251_acx_frame_ratesfunction wl1251_acx_station_idfunction wl1251_acx_default_keyfunction wl1251_acx_wake_up_conditionsfunction wl1251_acx_sleep_authfunction wl1251_acx_fw_versionfunction wl1251_acx_tx_powerfunction wl1251_acx_feature_cfgfunction wl1251_acx_mem_mapfunction wl1251_acx_data_path_paramsfunction wl1251_acx_rx_msdu_life_timefunction wl1251_acx_rx_configfunction wl1251_acx_pd_thresholdfunction wl1251_acx_slotfunction wl1251_acx_group_address_tblfunction wl1251_acx_service_period_timeoutfunction wl1251_acx_rts_thresholdfunction wl1251_acx_beacon_filter_optfunction wl1251_acx_beacon_filter_tablefunction wl1251_acx_conn_monit_paramsfunction wl1251_acx_sg_enablefunction wl1251_acx_sg_cfgfunction wl1251_acx_cca_thresholdfunction wl1251_acx_bcn_dtim_optionsfunction wl1251_acx_aidfunction wl1251_acx_event_mbox_maskfunction wl1251_acx_low_rssifunction wl1251_acx_set_preamblefunction wl1251_acx_cts_protectfunction wl1251_acx_tsf_infofunction wl1251_acx_statisticsfunction wl1251_acx_mem_cfgfunction wl1251_acx_wr_tbtt_and_dtimfunction wl1251_acx_bet_enablefunction wl1251_acx_arp_ip_filterfunction wl1251_acx_ac_cfgfunction wl1251_acx_tid_cfg
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
#include "acx.h"
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/string.h>
#include "wl1251.h"
#include "reg.h"
#include "cmd.h"
#include "ps.h"
int wl1251_acx_frame_rates(struct wl1251 *wl, u8 ctrl_rate, u8 ctrl_mod,
u8 mgt_rate, u8 mgt_mod)
{
struct acx_fw_gen_frame_rates *rates;
int ret;
wl1251_debug(DEBUG_ACX, "acx frame rates");
rates = kzalloc_obj(*rates);
if (!rates)
return -ENOMEM;
rates->tx_ctrl_frame_rate = ctrl_rate;
rates->tx_ctrl_frame_mod = ctrl_mod;
rates->tx_mgt_frame_rate = mgt_rate;
rates->tx_mgt_frame_mod = mgt_mod;
ret = wl1251_cmd_configure(wl, ACX_FW_GEN_FRAME_RATES,
rates, sizeof(*rates));
if (ret < 0) {
wl1251_error("Failed to set FW rates and modulation");
goto out;
}
out:
kfree(rates);
return ret;
}
int wl1251_acx_station_id(struct wl1251 *wl)
{
struct acx_dot11_station_id *mac;
int ret, i;
wl1251_debug(DEBUG_ACX, "acx dot11_station_id");
mac = kzalloc_obj(*mac);
if (!mac)
return -ENOMEM;
for (i = 0; i < ETH_ALEN; i++)
mac->mac[i] = wl->mac_addr[ETH_ALEN - 1 - i];
ret = wl1251_cmd_configure(wl, DOT11_STATION_ID, mac, sizeof(*mac));
kfree(mac);
return ret;
}
int wl1251_acx_default_key(struct wl1251 *wl, u8 key_id)
{
struct acx_dot11_default_key *default_key;
int ret;
wl1251_debug(DEBUG_ACX, "acx dot11_default_key (%d)", key_id);
default_key = kzalloc_obj(*default_key);
if (!default_key)
return -ENOMEM;
default_key->id = key_id;
ret = wl1251_cmd_configure(wl, DOT11_DEFAULT_KEY,
default_key, sizeof(*default_key));
if (ret < 0) {
wl1251_error("Couldn't set default key");
goto out;
}
wl->default_key = key_id;
out:
kfree(default_key);
return ret;
}
int wl1251_acx_wake_up_conditions(struct wl1251 *wl, u8 wake_up_event,
Annotation
- Immediate include surface: `acx.h`, `linux/module.h`, `linux/slab.h`, `linux/string.h`, `wl1251.h`, `reg.h`, `cmd.h`, `ps.h`.
- Detected declarations: `function wl1251_acx_frame_rates`, `function wl1251_acx_station_id`, `function wl1251_acx_default_key`, `function wl1251_acx_wake_up_conditions`, `function wl1251_acx_sleep_auth`, `function wl1251_acx_fw_version`, `function wl1251_acx_tx_power`, `function wl1251_acx_feature_cfg`, `function wl1251_acx_mem_map`, `function wl1251_acx_data_path_params`.
- 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.