mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-20 02:43:38 +00:00
This series is based on * 2020-07-10 ipq6018-ilq-11-0_qca_oem-034672b0676c37b1f4519e5720e18e95fe6236ef Add support for * qsdk kernel/v4.4 * qsdk ethernet subsystem * v5.7 ath11k backport + QualComm staging patches (wlan_ap_1.0) * ath11k-firmware * hostapd/iw/... Feature support * full boot, system detection * sysupgrade to nand * HE support via latest hostapd * driver support for usb, crypto, hwmon, cpufreq, ... Missing * NSS/HW flow offloading - FW blob is not redistributable Using the qsdk v4.4 is an intermediate solution while the vanilla is being tested. Vanilla kernel is almost on feature par. Work has already started to upstream the ethernet and switch drivers. Once complete the target will be fully upstream. Signed-off-by: John Crispin <john@phrozen.org>
159 lines
5.4 KiB
Diff
159 lines
5.4 KiB
Diff
--- a/drivers/net/wireless/ath/ath11k/debug.h
|
|
+++ b/drivers/net/wireless/ath/ath11k/debug.h
|
|
@@ -82,6 +82,8 @@ struct ath_pktlog_hdr {
|
|
u8 payload[0];
|
|
};
|
|
|
|
+#define ATH11K_HTT_PEER_STATS_RESET BIT(16)
|
|
+
|
|
#define ATH11K_HTT_STATS_BUF_SIZE (1024 * 512)
|
|
#define ATH11K_FW_STATS_BUF_SIZE (1024 * 1024)
|
|
|
|
--- a/drivers/net/wireless/ath/ath11k/debugfs_sta.c
|
|
+++ b/drivers/net/wireless/ath/ath11k/debugfs_sta.c
|
|
@@ -8,6 +8,8 @@
|
|
#include "core.h"
|
|
#include "peer.h"
|
|
#include "debug.h"
|
|
+#include "dp_tx.h"
|
|
+#include "debug_htt_stats.h"
|
|
|
|
static u8 mac80211_bw_to_ath11k_bw( u8 bw)
|
|
{
|
|
@@ -770,6 +772,68 @@ static const struct file_operations fops
|
|
.llseek = default_llseek,
|
|
};
|
|
|
|
+static ssize_t
|
|
+ath11k_write_htt_peer_stats_reset(struct file *file,
|
|
+ const char __user *user_buf,
|
|
+ size_t count, loff_t *ppos)
|
|
+{
|
|
+
|
|
+ struct ieee80211_sta *sta = file->private_data;
|
|
+ struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv;
|
|
+ struct ath11k *ar = arsta->arvif->ar;
|
|
+ struct htt_ext_stats_cfg_params cfg_params = { 0 };
|
|
+ int ret;
|
|
+ u8 type;
|
|
+
|
|
+ ret = kstrtou8_from_user(user_buf, count, 0, &type);
|
|
+ if (ret)
|
|
+ return ret;
|
|
+
|
|
+ if (!type)
|
|
+ return ret;
|
|
+
|
|
+ mutex_lock(&ar->conf_mutex);
|
|
+ cfg_params.cfg0 = HTT_STAT_PEER_INFO_MAC_ADDR;
|
|
+ cfg_params.cfg0 |= FIELD_PREP(GENMASK(15, 1),
|
|
+ HTT_PEER_STATS_REQ_MODE_FLUSH_TQM);
|
|
+
|
|
+ cfg_params.cfg1 = HTT_STAT_DEFAULT_PEER_REQ_TYPE;
|
|
+
|
|
+ cfg_params.cfg2 |= FIELD_PREP(GENMASK(7, 0), sta->addr[0]);
|
|
+ cfg_params.cfg2 |= FIELD_PREP(GENMASK(15, 8), sta->addr[1]);
|
|
+ cfg_params.cfg2 |= FIELD_PREP(GENMASK(23, 16), sta->addr[2]);
|
|
+ cfg_params.cfg2 |= FIELD_PREP(GENMASK(31, 24), sta->addr[3]);
|
|
+
|
|
+ cfg_params.cfg3 |= FIELD_PREP(GENMASK(7, 0), sta->addr[4]);
|
|
+ cfg_params.cfg3 |= FIELD_PREP(GENMASK(15, 8), sta->addr[5]);
|
|
+
|
|
+
|
|
+ cfg_params.cfg3 |= ATH11K_HTT_PEER_STATS_RESET;
|
|
+
|
|
+ ret = ath11k_dp_tx_htt_h2t_ext_stats_req(ar,
|
|
+ ATH11K_DBG_HTT_EXT_STATS_PEER_INFO,
|
|
+ &cfg_params,
|
|
+ 0ULL);
|
|
+ if (ret) {
|
|
+ ath11k_warn(ar->ab, "failed to send htt peer stats request: %d\n", ret);
|
|
+ mutex_unlock(&ar->conf_mutex);
|
|
+ return ret;
|
|
+ }
|
|
+
|
|
+ mutex_unlock(&ar->conf_mutex);
|
|
+
|
|
+ ret = count;
|
|
+
|
|
+ return ret;
|
|
+}
|
|
+
|
|
+static const struct file_operations fops_htt_peer_stats_reset = {
|
|
+ .write = ath11k_write_htt_peer_stats_reset,
|
|
+ .open = simple_open,
|
|
+ .owner = THIS_MODULE,
|
|
+ .llseek = default_llseek,
|
|
+};
|
|
+
|
|
void ath11k_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
|
struct ieee80211_sta *sta, struct dentry *dir)
|
|
{
|
|
@@ -788,6 +852,11 @@ void ath11k_sta_add_debugfs(struct ieee8
|
|
debugfs_create_file("peer_pktlog", 0644, dir, sta,
|
|
&fops_peer_pktlog);
|
|
|
|
+ if (test_bit(WMI_TLV_SERVICE_PER_PEER_HTT_STATS_RESET,
|
|
+ ar->ab->wmi_ab.svc_map))
|
|
+ debugfs_create_file("htt_peer_stats_reset", 0600, dir, sta,
|
|
+ &fops_htt_peer_stats_reset);
|
|
+
|
|
debugfs_create_file("aggr_mode", 0644, dir, sta, &fops_aggr_mode);
|
|
debugfs_create_file("addba", 0200, dir, sta, &fops_addba);
|
|
debugfs_create_file("addba_resp", 0200, dir, sta, &fops_addba_resp);
|
|
--- a/drivers/net/wireless/ath/ath11k/wmi.h
|
|
+++ b/drivers/net/wireless/ath/ath11k/wmi.h
|
|
@@ -1983,6 +1983,52 @@ enum wmi_tlv_service {
|
|
WMI_TLV_SERVICE_TX_DATA_MGMT_ACK_RSSI = 174,
|
|
WMI_TLV_SERVICE_NAN_DISABLE_SUPPORT = 175,
|
|
WMI_TLV_SERVICE_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN = 176,
|
|
+ WMI_TLV_SERVICE_COEX_SUPPORT_UNEQUAL_ISOLATION=177,
|
|
+ WMI_TLV_SERVICE_HW_DB2DBM_CONVERSION_SUPPORT = 178,
|
|
+ WMI_TLV_SERVICE_SUPPORT_EXTEND_ADDRESS=179,
|
|
+ WMI_TLV_SERVICE_BEACON_RECEPTION_STATS=180,
|
|
+ WMI_TLV_SERVICE_FETCH_TX_PN=181,
|
|
+ WMI_TLV_SERVICE_PEER_UNMAP_RESPONSE_SUPPORT = 182,
|
|
+ WMI_TLV_SERVICE_TX_PER_PEER_AMPDU_SIZE = 183,
|
|
+ WMI_TLV_SERVICE_BSS_COLOR_SWITCH_COUNT = 184,
|
|
+ WMI_TLV_SERVICE_HTT_PEER_STATS_SUPPORT = 185,
|
|
+ WMI_TLV_SERVICE_UL_RU26_ALLOWED = 186,
|
|
+ WMI_TLV_SERVICE_GET_MWS_COEX_STATE = 187,
|
|
+ WMI_TLV_SERVICE_GET_MWS_DPWB_STATE = 188,
|
|
+ WMI_TLV_SERVICE_GET_MWS_TDM_STATE = 189,
|
|
+ WMI_TLV_SERVICE_GET_MWS_IDRX_STATE = 190,
|
|
+ WMI_TLV_SERVICE_GET_MWS_ANTENNA_SHARING_STATE = 191,
|
|
+ WMI_TLV_SERVICE_ENHANCED_TPC_CONFIG_EVENT = 192,
|
|
+ WMI_TLV_SERVICE_WLM_STATS_REQUEST = 193,
|
|
+ WMI_TLV_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT = 194,
|
|
+ WMI_TLV_SERVICE_WPA3_FT_SAE_SUPPORT = 195,
|
|
+ WMI_TLV_SERVICE_WPA3_FT_SUITE_B_SUPPORT = 196,
|
|
+ WMI_TLV_SERVICE_VOW_ENABLE=197,
|
|
+ WMI_TLV_SERVICE_CFR_CAPTURE_IND_EVT_TYPE_1 = 198,
|
|
+ WMI_TLV_SERVICE_BROADCAST_TWT = 199,
|
|
+ WMI_TLV_SERVICE_RAP_DETECTION_SUPPORT = 200,
|
|
+ WMI_TLV_SERVICE_PS_TDCC = 201,
|
|
+ WMI_TLV_SERVICE_THREE_WAY_COEX_CONFIG_LEGACY = 202,
|
|
+ WMI_TLV_SERVICE_THREE_WAY_COEX_CONFIG_OVERRIDE = 203,
|
|
+ WMI_TLV_SERVICE_TX_PWR_PER_PEER = 204,
|
|
+ WMI_TLV_SERVICE_STA_PLUS_STA_SUPPORT = 205,
|
|
+ WMI_TLV_SERVICE_WPA3_FT_FILS = 206,
|
|
+ WMI_TLV_SERVICE_ADAPTIVE_11R_ROAM = 207,
|
|
+ WMI_TLV_SERVICE_CHAN_RF_CHARACTERIZATION_INFO = 208,
|
|
+ WMI_TLV_SERVICE_FW_IFACE_COMBINATION_SUPPORT = 209,
|
|
+ WMI_TLV_SERVICE_TX_COMPL_TSF64 = 210,
|
|
+ WMI_TLV_SERVICE_DSM_ROAM_FILTER = 211,
|
|
+ WMI_TLV_SERVICE_PACKET_CAPTURE_SUPPORT = 212,
|
|
+ WMI_TLV_SERVICE_PER_PEER_HTT_STATS_RESET = 213,
|
|
+ WMI_TLV_SERVICE_DELETE_ALL_PEER_SUPPORT = 214,
|
|
+ WMI_TLV_SERVICE_DYNAMIC_HW_MODE_SWITCH_SUPPORT = 215,
|
|
+ WMI_TLV_SERVICE_MSDU_FLOW_OVERRIDE_BY_HOST = 216,
|
|
+ WMI_TLV_SERVICE_WMI_CHAN_RF_CHARACTERIZATION_INFO_EVENT= 217,
|
|
+ WMI_TLV_SERVICE_RX_FSE_SUPPORT = 218,
|
|
+ WMI_TLV_SERVICE_FREQINFO_IN_METADATA = 219,
|
|
+ WMI_TLV_SERVICE_EXT2_MSG = 220,
|
|
+ WMI_TLV_SERVICE_WPA3_SAE_ROAM_SUPPORT = 221,
|
|
+ WMI_TLV_SERVICE_WPA3_OWE_ROAM_SUPPORT = 222,
|
|
|
|
WMI_MAX_EXT_SERVICE
|
|
|