diff options
author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2025-08-12 03:54:51 +0000 |
---|---|---|
committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2025-08-12 03:54:51 +0000 |
commit | 1a52eb13de88a0933159e98abb9a89ec178d62c1 (patch) | |
tree | 10d7728a26095c4d97633e8f487f27d50a059682 | |
parent | 762b052b4274f1837fbb2e950652215b74d6176d (diff) |
ath-common: update common Atheros/QCA codevendor/Linux/ath-common/torvalds-v6.16_1vendor/Linux/ath-common
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
038d61fd642278bab63ee8ef722c50d10ab01e8f ( tag: v6.16 ).
Sponsored by: The FreeBSD Foundation
-rw-r--r-- | Kconfig | 68 | ||||
-rw-r--r-- | Makefile | 25 | ||||
-rw-r--r-- | testmode_i.h | 66 |
3 files changed, 159 insertions, 0 deletions
diff --git a/Kconfig b/Kconfig new file mode 100644 index 000000000000..910c10028b14 --- /dev/null +++ b/Kconfig @@ -0,0 +1,68 @@ +# SPDX-License-Identifier: ISC +config ATH_COMMON + tristate + +config WLAN_VENDOR_ATH + bool "Atheros/Qualcomm devices" + default y + help + If you have a wireless card belonging to this class, say Y. + + Note that the answer to this question doesn't directly affect the + kernel: saying N will just cause the configurator to skip all the + questions about these cards. If you say Y, you will be asked for + your specific card in the following questions. + + For more information and documentation on this module you can visit: + + https://wireless.wiki.kernel.org/en/users/Drivers/ath + + For information on all Atheros wireless drivers visit: + + https://wireless.wiki.kernel.org/en/users/Drivers/Atheros + +if WLAN_VENDOR_ATH + +config ATH_DEBUG + bool "Atheros wireless debugging" + help + Say Y, if you want to debug atheros wireless drivers. + Right now only ath9k makes use of this. + +config ATH_TRACEPOINTS + bool "Atheros wireless tracing" + depends on ATH_DEBUG + depends on EVENT_TRACING + help + This option enables tracepoints for atheros wireless drivers. + Currently, ath9k makes use of this facility. + +config ATH_REG_DYNAMIC_USER_REG_HINTS + bool "Atheros dynamic user regulatory hints" + depends on CFG80211_CERTIFICATION_ONUS + default n + help + Say N. This should only be enabled in countries where + this feature is explicitly allowed and only on cards that + specifically have been tested for this. + +config ATH_REG_DYNAMIC_USER_CERT_TESTING + bool "Atheros dynamic user regulatory testing" + depends on ATH_REG_DYNAMIC_USER_REG_HINTS && CFG80211_CERTIFICATION_ONUS + default n + help + Say N. This should only be enabled on systems + undergoing certification testing. + +source "drivers/net/wireless/ath/ath5k/Kconfig" +source "drivers/net/wireless/ath/ath9k/Kconfig" +source "drivers/net/wireless/ath/carl9170/Kconfig" +source "drivers/net/wireless/ath/ath6kl/Kconfig" +source "drivers/net/wireless/ath/ar5523/Kconfig" +source "drivers/net/wireless/ath/wil6210/Kconfig" +source "drivers/net/wireless/ath/ath10k/Kconfig" +source "drivers/net/wireless/ath/wcn36xx/Kconfig" +source "drivers/net/wireless/ath/ath11k/Kconfig" +source "drivers/net/wireless/ath/ath12k/Kconfig" + +endif diff --git a/Makefile b/Makefile new file mode 100644 index 000000000000..8d6e6e218d24 --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +# SPDX-License-Identifier: ISC +obj-$(CONFIG_ATH5K) += ath5k/ +obj-$(CONFIG_ATH9K_HW) += ath9k/ +obj-$(CONFIG_CARL9170) += carl9170/ +obj-$(CONFIG_ATH6KL) += ath6kl/ +obj-$(CONFIG_AR5523) += ar5523/ +obj-$(CONFIG_WIL6210) += wil6210/ +obj-$(CONFIG_ATH10K) += ath10k/ +obj-$(CONFIG_WCN36XX) += wcn36xx/ +obj-$(CONFIG_ATH11K) += ath11k/ +obj-$(CONFIG_ATH12K) += ath12k/ + +obj-$(CONFIG_ATH_COMMON) += ath.o + +ath-objs := main.o \ + regd.o \ + hw.o \ + key.o \ + dfs_pattern_detector.o \ + dfs_pri_detector.o + +ath-$(CONFIG_ATH_DEBUG) += debug.o +ath-$(CONFIG_ATH_TRACEPOINTS) += trace.o + +CFLAGS_trace.o := -I$(src) diff --git a/testmode_i.h b/testmode_i.h new file mode 100644 index 000000000000..980ef2f3f05f --- /dev/null +++ b/testmode_i.h @@ -0,0 +1,66 @@ +/* SPDX-License-Identifier: BSD-3-Clause-Clear */ +/* + * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2023-2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +/* "API" level of the ath testmode interface. Bump it after every + * incompatible interface change. + */ +#define ATH_TESTMODE_VERSION_MAJOR 1 + +/* Bump this after every _compatible_ interface change, for example + * addition of a new command or an attribute. + */ +#define ATH_TESTMODE_VERSION_MINOR 1 + +#define ATH_TM_DATA_MAX_LEN 5000 +#define ATH_FTM_EVENT_MAX_BUF_LENGTH 2048 + +enum ath_tm_attr { + __ATH_TM_ATTR_INVALID = 0, + ATH_TM_ATTR_CMD = 1, + ATH_TM_ATTR_DATA = 2, + ATH_TM_ATTR_WMI_CMDID = 3, + ATH_TM_ATTR_VERSION_MAJOR = 4, + ATH_TM_ATTR_VERSION_MINOR = 5, + ATH_TM_ATTR_WMI_OP_VERSION = 6, + + /* keep last */ + __ATH_TM_ATTR_AFTER_LAST, + ATH_TM_ATTR_MAX = __ATH_TM_ATTR_AFTER_LAST - 1, +}; + +/* All ath testmode interface commands specified in + * ATH_TM_ATTR_CMD + */ +enum ath_tm_cmd { + /* Returns the supported ath testmode interface version in + * ATH_TM_ATTR_VERSION. Always guaranteed to work. User space + * uses this to verify it's using the correct version of the + * testmode interface + */ + ATH_TM_CMD_GET_VERSION = 0, + + /* The command used to transmit a WMI command to the firmware and + * the event to receive WMI events from the firmware. Without + * struct wmi_cmd_hdr header, only the WMI payload. Command id is + * provided with ATH_TM_ATTR_WMI_CMDID and payload in + * ATH_TM_ATTR_DATA. + */ + ATH_TM_CMD_WMI = 1, + + /* Boots the UTF firmware, the netdev interface must be down at the + * time. + */ + ATH_TM_CMD_TESTMODE_START = 2, + + /* The command used to transmit a FTM WMI command to the firmware + * and the event to receive WMI events from the firmware. The data + * received only contain the payload, need to add the tlv header + * and send the cmd to firmware with command id WMI_PDEV_UTF_CMDID. + * The data payload size could be large and the driver needs to + * send segmented data to firmware. + */ + ATH_TM_CMD_WMI_FTM = 3, +}; |