wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices
ath12k is a new mac80211 driver for Qualcomm Wi-Fi 7 devices, first
supporting QCN9274 and WCN7850 PCI devices. QCN9274 supports both AP
and station; WCN7850 supports only station mode. Monitor mode is not
(yet) supported. Only PCI bus devices are supported.
ath12k is forked from an earlier version of ath11k. It was simpler to
have a "clean start" for the new generation and not try to share the
code with ath11k. This makes maintenance easier and avoids major
changes in ath11k, which would have significantly increased the risk
of regressions in existing setups.
ath12k uses le32 and cpu_to_le32() macros to handle endian
conversions, instead of using the firmware byte swap feature utilized
by ath11k. There is only one kernel module, named ath12k.ko.
Currently ath12k only supports HE mode (IEEE 802.11ax) or older, but
work is ongoing to add EHT mode (IEEE 802.11be) support.
The size of the driver is ~41 kLOC and 45 files. To make the review
easier, this initial version of ath12k does not support Device Tree,
debugfs or any other extra features. Those will be added later, after
ath12k is accepted to upstream.
The driver is build tested by Intel's kernel test robot with both GCC
and Clang. Sparse reports no warnings. The driver is mostly free of
checkpatch warnings, albeit few of the warnings are omitted on
purpose, list of them here:
https://github.com/qca/qca-swiss-army-knife/blob/master/tools/scripts/ath12k/ath12k-check#L52
The driver has had multiple authors who are listed in alphabetical
order below.
Co-developed-by: Balamurugan Selvarajan <quic_bselvara@quicinc.com>
Signed-off-by: Balamurugan Selvarajan <quic_bselvara@quicinc.com>
Co-developed-by: Baochen Qiang <quic_bqiang@quicinc.com>
Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
Co-developed-by: Bhagavathi Perumal S <quic_bperumal@quicinc.com>
Signed-off-by: Bhagavathi Perumal S <quic_bperumal@quicinc.com>
Co-developed-by: Carl Huang <quic_cjhuang@quicinc.com>
Signed-off-by: Carl Huang <quic_cjhuang@quicinc.com>
Co-developed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Co-developed-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Co-developed-by: P Praneesh <quic_ppranees@quicinc.com>
Signed-off-by: P Praneesh <quic_ppranees@quicinc.com>
Co-developed-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
Co-developed-by: Ramya Gnanasekar <quic_rgnanase@quicinc.com>
Signed-off-by: Ramya Gnanasekar <quic_rgnanase@quicinc.com>
Co-developed-by: Sriram R <quic_srirrama@quicinc.com>
Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
Co-developed-by: Vasanthakumar Thiagarajan <quic_vthiagar@quicinc.com>
Signed-off-by: Vasanthakumar Thiagarajan <quic_vthiagar@quicinc.com>
Co-developed-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
2022-11-28 10:09:53 -05:00
|
|
|
/* SPDX-License-Identifier: BSD-3-Clause-Clear */
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
|
2023-11-22 13:31:02 -05:00
|
|
|
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices
ath12k is a new mac80211 driver for Qualcomm Wi-Fi 7 devices, first
supporting QCN9274 and WCN7850 PCI devices. QCN9274 supports both AP
and station; WCN7850 supports only station mode. Monitor mode is not
(yet) supported. Only PCI bus devices are supported.
ath12k is forked from an earlier version of ath11k. It was simpler to
have a "clean start" for the new generation and not try to share the
code with ath11k. This makes maintenance easier and avoids major
changes in ath11k, which would have significantly increased the risk
of regressions in existing setups.
ath12k uses le32 and cpu_to_le32() macros to handle endian
conversions, instead of using the firmware byte swap feature utilized
by ath11k. There is only one kernel module, named ath12k.ko.
Currently ath12k only supports HE mode (IEEE 802.11ax) or older, but
work is ongoing to add EHT mode (IEEE 802.11be) support.
The size of the driver is ~41 kLOC and 45 files. To make the review
easier, this initial version of ath12k does not support Device Tree,
debugfs or any other extra features. Those will be added later, after
ath12k is accepted to upstream.
The driver is build tested by Intel's kernel test robot with both GCC
and Clang. Sparse reports no warnings. The driver is mostly free of
checkpatch warnings, albeit few of the warnings are omitted on
purpose, list of them here:
https://github.com/qca/qca-swiss-army-knife/blob/master/tools/scripts/ath12k/ath12k-check#L52
The driver has had multiple authors who are listed in alphabetical
order below.
Co-developed-by: Balamurugan Selvarajan <quic_bselvara@quicinc.com>
Signed-off-by: Balamurugan Selvarajan <quic_bselvara@quicinc.com>
Co-developed-by: Baochen Qiang <quic_bqiang@quicinc.com>
Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
Co-developed-by: Bhagavathi Perumal S <quic_bperumal@quicinc.com>
Signed-off-by: Bhagavathi Perumal S <quic_bperumal@quicinc.com>
Co-developed-by: Carl Huang <quic_cjhuang@quicinc.com>
Signed-off-by: Carl Huang <quic_cjhuang@quicinc.com>
Co-developed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Co-developed-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Co-developed-by: P Praneesh <quic_ppranees@quicinc.com>
Signed-off-by: P Praneesh <quic_ppranees@quicinc.com>
Co-developed-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
Co-developed-by: Ramya Gnanasekar <quic_rgnanase@quicinc.com>
Signed-off-by: Ramya Gnanasekar <quic_rgnanase@quicinc.com>
Co-developed-by: Sriram R <quic_srirrama@quicinc.com>
Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
Co-developed-by: Vasanthakumar Thiagarajan <quic_vthiagar@quicinc.com>
Signed-off-by: Vasanthakumar Thiagarajan <quic_vthiagar@quicinc.com>
Co-developed-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
2022-11-28 10:09:53 -05:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef ATH12K_DP_MON_H
|
|
|
|
#define ATH12K_DP_MON_H
|
|
|
|
|
|
|
|
#include "core.h"
|
|
|
|
|
|
|
|
enum dp_monitor_mode {
|
|
|
|
ATH12K_DP_TX_MONITOR_MODE,
|
|
|
|
ATH12K_DP_RX_MONITOR_MODE
|
|
|
|
};
|
|
|
|
|
|
|
|
enum dp_mon_tx_ppdu_info_type {
|
|
|
|
DP_MON_TX_PROT_PPDU_INFO,
|
|
|
|
DP_MON_TX_DATA_PPDU_INFO
|
|
|
|
};
|
|
|
|
|
|
|
|
enum dp_mon_tx_tlv_status {
|
|
|
|
DP_MON_TX_FES_SETUP,
|
|
|
|
DP_MON_TX_FES_STATUS_END,
|
|
|
|
DP_MON_RX_RESPONSE_REQUIRED_INFO,
|
|
|
|
DP_MON_RESPONSE_END_STATUS_INFO,
|
|
|
|
DP_MON_TX_MPDU_START,
|
|
|
|
DP_MON_TX_MSDU_START,
|
|
|
|
DP_MON_TX_BUFFER_ADDR,
|
|
|
|
DP_MON_TX_DATA,
|
|
|
|
DP_MON_TX_STATUS_PPDU_NOT_DONE,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum dp_mon_tx_medium_protection_type {
|
|
|
|
DP_MON_TX_MEDIUM_NO_PROTECTION,
|
|
|
|
DP_MON_TX_MEDIUM_RTS_LEGACY,
|
|
|
|
DP_MON_TX_MEDIUM_RTS_11AC_STATIC_BW,
|
|
|
|
DP_MON_TX_MEDIUM_RTS_11AC_DYNAMIC_BW,
|
|
|
|
DP_MON_TX_MEDIUM_CTS2SELF,
|
|
|
|
DP_MON_TX_MEDIUM_QOS_NULL_NO_ACK_3ADDR,
|
|
|
|
DP_MON_TX_MEDIUM_QOS_NULL_NO_ACK_4ADDR
|
|
|
|
};
|
|
|
|
|
|
|
|
struct dp_mon_qosframe_addr4 {
|
|
|
|
__le16 frame_control;
|
|
|
|
__le16 duration;
|
|
|
|
u8 addr1[ETH_ALEN];
|
|
|
|
u8 addr2[ETH_ALEN];
|
|
|
|
u8 addr3[ETH_ALEN];
|
|
|
|
__le16 seq_ctrl;
|
|
|
|
u8 addr4[ETH_ALEN];
|
|
|
|
__le16 qos_ctrl;
|
|
|
|
} __packed;
|
|
|
|
|
|
|
|
struct dp_mon_frame_min_one {
|
|
|
|
__le16 frame_control;
|
|
|
|
__le16 duration;
|
|
|
|
u8 addr1[ETH_ALEN];
|
|
|
|
} __packed;
|
|
|
|
|
|
|
|
struct dp_mon_packet_info {
|
|
|
|
u64 cookie;
|
|
|
|
u16 dma_length;
|
|
|
|
bool msdu_continuation;
|
|
|
|
bool truncated;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct dp_mon_tx_ppdu_info {
|
|
|
|
u32 ppdu_id;
|
|
|
|
u8 num_users;
|
|
|
|
bool is_used;
|
|
|
|
struct hal_rx_mon_ppdu_info rx_status;
|
|
|
|
struct list_head dp_tx_mon_mpdu_list;
|
|
|
|
struct dp_mon_mpdu *tx_mon_mpdu;
|
|
|
|
};
|
|
|
|
|
|
|
|
enum hal_rx_mon_status
|
|
|
|
ath12k_dp_mon_rx_parse_mon_status(struct ath12k *ar,
|
|
|
|
struct ath12k_mon_data *pmon,
|
|
|
|
int mac_id, struct sk_buff *skb,
|
|
|
|
struct napi_struct *napi);
|
|
|
|
int ath12k_dp_mon_buf_replenish(struct ath12k_base *ab,
|
2023-11-22 13:31:02 -05:00
|
|
|
struct dp_rxdma_mon_ring *buf_ring,
|
wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices
ath12k is a new mac80211 driver for Qualcomm Wi-Fi 7 devices, first
supporting QCN9274 and WCN7850 PCI devices. QCN9274 supports both AP
and station; WCN7850 supports only station mode. Monitor mode is not
(yet) supported. Only PCI bus devices are supported.
ath12k is forked from an earlier version of ath11k. It was simpler to
have a "clean start" for the new generation and not try to share the
code with ath11k. This makes maintenance easier and avoids major
changes in ath11k, which would have significantly increased the risk
of regressions in existing setups.
ath12k uses le32 and cpu_to_le32() macros to handle endian
conversions, instead of using the firmware byte swap feature utilized
by ath11k. There is only one kernel module, named ath12k.ko.
Currently ath12k only supports HE mode (IEEE 802.11ax) or older, but
work is ongoing to add EHT mode (IEEE 802.11be) support.
The size of the driver is ~41 kLOC and 45 files. To make the review
easier, this initial version of ath12k does not support Device Tree,
debugfs or any other extra features. Those will be added later, after
ath12k is accepted to upstream.
The driver is build tested by Intel's kernel test robot with both GCC
and Clang. Sparse reports no warnings. The driver is mostly free of
checkpatch warnings, albeit few of the warnings are omitted on
purpose, list of them here:
https://github.com/qca/qca-swiss-army-knife/blob/master/tools/scripts/ath12k/ath12k-check#L52
The driver has had multiple authors who are listed in alphabetical
order below.
Co-developed-by: Balamurugan Selvarajan <quic_bselvara@quicinc.com>
Signed-off-by: Balamurugan Selvarajan <quic_bselvara@quicinc.com>
Co-developed-by: Baochen Qiang <quic_bqiang@quicinc.com>
Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
Co-developed-by: Bhagavathi Perumal S <quic_bperumal@quicinc.com>
Signed-off-by: Bhagavathi Perumal S <quic_bperumal@quicinc.com>
Co-developed-by: Carl Huang <quic_cjhuang@quicinc.com>
Signed-off-by: Carl Huang <quic_cjhuang@quicinc.com>
Co-developed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Co-developed-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Co-developed-by: P Praneesh <quic_ppranees@quicinc.com>
Signed-off-by: P Praneesh <quic_ppranees@quicinc.com>
Co-developed-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
Co-developed-by: Ramya Gnanasekar <quic_rgnanase@quicinc.com>
Signed-off-by: Ramya Gnanasekar <quic_rgnanase@quicinc.com>
Co-developed-by: Sriram R <quic_srirrama@quicinc.com>
Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
Co-developed-by: Vasanthakumar Thiagarajan <quic_vthiagar@quicinc.com>
Signed-off-by: Vasanthakumar Thiagarajan <quic_vthiagar@quicinc.com>
Co-developed-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
2022-11-28 10:09:53 -05:00
|
|
|
int req_entries);
|
|
|
|
int ath12k_dp_mon_srng_process(struct ath12k *ar, int mac_id,
|
|
|
|
int *budget, enum dp_monitor_mode monitor_mode,
|
|
|
|
struct napi_struct *napi);
|
|
|
|
int ath12k_dp_mon_process_ring(struct ath12k_base *ab, int mac_id,
|
|
|
|
struct napi_struct *napi, int budget,
|
|
|
|
enum dp_monitor_mode monitor_mode);
|
|
|
|
struct sk_buff *ath12k_dp_mon_tx_alloc_skb(void);
|
|
|
|
enum dp_mon_tx_tlv_status
|
|
|
|
ath12k_dp_mon_tx_status_get_num_user(u16 tlv_tag,
|
|
|
|
struct hal_tlv_hdr *tx_tlv,
|
|
|
|
u8 *num_users);
|
|
|
|
enum hal_rx_mon_status
|
|
|
|
ath12k_dp_mon_tx_parse_mon_status(struct ath12k *ar,
|
|
|
|
struct ath12k_mon_data *pmon,
|
|
|
|
int mac_id,
|
|
|
|
struct sk_buff *skb,
|
|
|
|
struct napi_struct *napi,
|
|
|
|
u32 ppdu_id);
|
|
|
|
void ath12k_dp_mon_rx_process_ulofdma(struct hal_rx_mon_ppdu_info *ppdu_info);
|
|
|
|
int ath12k_dp_mon_rx_process_stats(struct ath12k *ar, int mac_id,
|
|
|
|
struct napi_struct *napi, int *budget);
|
|
|
|
#endif
|