new file mode 100644
@@ -0,0 +1,100 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (C) [2022-2025] Renesas Electronics Corporation and/or its affiliates.
+ */
+
+#ifndef RA6W_STATS_H
+#define RA6W_STATS_H
+
+#define RA6W_MCS_MAX_HT 8
+#define RA6W_MCS_MAX_VHT 9
+#define RA6W_MCS_MAX_HE 12
+#define RA6W_GI_MAX_HT 2
+#define RA6W_GI_MAX_VHT 2
+#define RA6W_GI_MAX_HE 3
+
+enum ra6w_stats_bits {
+ RA6W_STATS_RX_CCK_BIT = BIT(0),
+ RA6W_STATS_RX_OFDM_BIT = BIT(1),
+ RA6W_STATS_RX_HT_BIT = BIT(2),
+ RA6W_STATS_RX_VHT_BIT = BIT(3),
+ RA6W_STATS_RX_HE_SU_BIT = BIT(4),
+ RA6W_STATS_RX_HE_MU_BIT = BIT(5),
+ RA6W_STATS_RX_HE_EXT_BIT = BIT(6),
+ RA6W_STATS_RX_HE_TRIGFLAG_LONG_BIT = BIT(7)
+};
+
+enum ra6w_stats_status {
+ RA6W_STATS_STATUS_DISABLED,
+ RA6W_STATS_STATUS_ENABLED,
+
+ RA6W_STATS_STATUS_MAX
+};
+
+struct ra6w_stats_non_ht {
+ u8 bw;
+ u64 ofdm;
+ u64 cck;
+};
+
+struct ra6w_stats_rx {
+ u8 format_mode;
+ u8 flags;
+ struct ra6w_stats_non_ht non_ht;
+ struct {
+ u8 bw;
+ u8 mcs;
+ u8 gi;
+ u8 nss;
+ u64 ht[RA6W_GI_MAX_HT][RA6W_MCS_MAX_HT];
+ } ht;
+ struct {
+ u8 bw;
+ u8 mcs;
+ u8 gi;
+ u8 nss;
+ u64 vht[RA6W_GI_MAX_VHT][RA6W_MCS_MAX_VHT];
+ } vht;
+ struct {
+ u8 bw;
+ u8 mcs;
+ u8 gi;
+ u8 nss;
+ u64 he[RA6W_GI_MAX_HE][RA6W_MCS_MAX_HE];
+ } he_su;
+};
+
+struct ra6w_stats {
+ struct ra6w_stats_rx *rx_stats;
+ bool stats_enabled;
+};
+
+struct ra6w_cfg80211_sta_stats;
+
+#ifdef CONFIG_NL80211_TESTMODE
+
+int ra6w_stats_init(struct ra6w_stats *stats);
+void ra6w_stats_deinit(struct ra6w_stats *stats);
+void ra6w_stats_rx_update(struct ra6w_stats *stats,
+ const struct ra6w_cfg80211_sta_stats *sta_stats);
+
+#else
+
+static inline int ra6w_stats_init(struct ra6w_stats *stats)
+{
+ return 0;
+}
+
+static inline void ra6w_stats_deinit(struct ra6w_stats *stats)
+{
+}
+
+static inline
+void ra6w_stats_rx_update(struct ra6w_stats *stats,
+ const struct ra6w_cfg80211_sta_stats *sta_stats)
+{
+}
+
+#endif /* CONFIG_NL80211_TESTMODE */
+
+#endif /* RA6W_STATS_H */