drivers/net/wireless/ath/ath6kl/init.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/ath6kl/init.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ath/ath6kl/init.c- Extension
.c- Size
- 48343 bytes
- Lines
- 1946
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/moduleparam.hlinux/errno.hlinux/export.hlinux/of.hlinux/mmc/sdio_func.hlinux/vmalloc.hcore.hcfg80211.htarget.hdebug.hhif-ops.hhtc-ops.h
Detected Declarations
function ath6kl_init_profile_infofunction ath6kl_set_host_app_areafunction set_ac2_ep_mapfunction ath6kl_connectservicefunction ath6kl_init_service_epfunction ath6kl_init_control_infofunction ath6kl_set_htc_paramsfunction ath6kl_target_config_wlan_paramsfunction ath6kl_configure_targetfunction ath6kl_get_fwfunction check_device_treefunction for_each_compatible_nodefunction check_device_treefunction ath6kl_fetch_board_filefunction ath6kl_fetch_otp_filefunction ath6kl_fetch_testmode_filefunction ath6kl_fetch_fw_filefunction ath6kl_fetch_patch_filefunction ath6kl_fetch_testscript_filefunction ath6kl_fetch_fw_api1function ath6kl_fetch_fw_apinfunction ath6kl_init_fetch_firmwaresfunction ath6kl_upload_board_filefunction ath6kl_upload_otpfunction ath6kl_upload_firmwarefunction ath6kl_upload_patchfunction ath6kl_upload_testscriptfunction ath6kl_init_uploadfunction ath6kl_init_hw_paramsfunction ath6kl_init_get_fwcapsfunction ath6kl_init_hw_resetfunction __ath6kl_init_hw_startfunction ath6kl_init_hw_startfunction __ath6kl_init_hw_stopfunction ath6kl_init_hw_stopfunction ath6kl_init_hw_restartfunction ath6kl_stop_txrxexport ath6kl_stop_txrx
Annotated Snippet
if (status) {
ath6kl_err("bmi_write_memory for yield limit failed\n");
goto out;
}
}
out:
return status;
}
static int ath6kl_target_config_wlan_params(struct ath6kl *ar, int idx)
{
int ret;
/*
* Configure the device for rx dot11 header rules. "0,0" are the
* default values. Required if checksum offload is needed. Set
* RxMetaVersion to 2.
*/
ret = ath6kl_wmi_set_rx_frame_format_cmd(ar->wmi, idx,
ar->rx_meta_ver, 0, 0);
if (ret) {
ath6kl_err("unable to set the rx frame format: %d\n", ret);
return ret;
}
if (ar->conf_flags & ATH6KL_CONF_IGNORE_PS_FAIL_EVT_IN_SCAN) {
ret = ath6kl_wmi_pmparams_cmd(ar->wmi, idx, 0, 1, 0, 0, 1,
IGNORE_PS_FAIL_DURING_SCAN);
if (ret) {
ath6kl_err("unable to set power save fail event policy: %d\n",
ret);
return ret;
}
}
if (!(ar->conf_flags & ATH6KL_CONF_IGNORE_ERP_BARKER)) {
ret = ath6kl_wmi_set_lpreamble_cmd(ar->wmi, idx, 0,
WMI_FOLLOW_BARKER_IN_ERP);
if (ret) {
ath6kl_err("unable to set barker preamble policy: %d\n",
ret);
return ret;
}
}
ret = ath6kl_wmi_set_keepalive_cmd(ar->wmi, idx,
WLAN_CONFIG_KEEP_ALIVE_INTERVAL);
if (ret) {
ath6kl_err("unable to set keep alive interval: %d\n", ret);
return ret;
}
ret = ath6kl_wmi_disctimeout_cmd(ar->wmi, idx,
WLAN_CONFIG_DISCONNECT_TIMEOUT);
if (ret) {
ath6kl_err("unable to set disconnect timeout: %d\n", ret);
return ret;
}
if (!(ar->conf_flags & ATH6KL_CONF_ENABLE_TX_BURST)) {
ret = ath6kl_wmi_set_wmm_txop(ar->wmi, idx, WMI_TXOP_DISABLED);
if (ret) {
ath6kl_err("unable to set txop bursting: %d\n", ret);
return ret;
}
}
if (ar->p2p && (ar->vif_max == 1 || idx)) {
ret = ath6kl_wmi_info_req_cmd(ar->wmi, idx,
P2P_FLAG_CAPABILITIES_REQ |
P2P_FLAG_MACADDR_REQ |
P2P_FLAG_HMODEL_REQ);
if (ret) {
ath6kl_dbg(ATH6KL_DBG_TRC,
"failed to request P2P capabilities (%d) - assuming P2P not supported\n",
ret);
ar->p2p = false;
}
}
if (ar->p2p && (ar->vif_max == 1 || idx)) {
/* Enable Probe Request reporting for P2P */
ret = ath6kl_wmi_probe_report_req_cmd(ar->wmi, idx, true);
if (ret) {
ath6kl_dbg(ATH6KL_DBG_TRC,
"failed to enable Probe Request reporting (%d)\n",
ret);
}
}
Annotation
- Immediate include surface: `linux/moduleparam.h`, `linux/errno.h`, `linux/export.h`, `linux/of.h`, `linux/mmc/sdio_func.h`, `linux/vmalloc.h`, `core.h`, `cfg80211.h`.
- Detected declarations: `function ath6kl_init_profile_info`, `function ath6kl_set_host_app_area`, `function set_ac2_ep_map`, `function ath6kl_connectservice`, `function ath6kl_init_service_ep`, `function ath6kl_init_control_info`, `function ath6kl_set_htc_params`, `function ath6kl_target_config_wlan_params`, `function ath6kl_configure_target`, `function ath6kl_get_fw`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: integration 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.