The naming was a bit inconsistent.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
struct ath10k_mem_chunk mem_chunks[WMI_MAX_MEM_REQS];
};
-struct ath10k_peer_stat {
+struct ath10k_fw_stats_peer {
u8 peer_macaddr[ETH_ALEN];
u32 peer_rssi;
u32 peer_tx_rate;
u32 peer_rx_rate; /* 10x only */
};
-struct ath10k_target_stats {
+struct ath10k_fw_stats {
/* PDEV stats */
s32 ch_noise_floor;
u32 tx_frame_count;
/* PEER STATS */
u8 peers;
- struct ath10k_peer_stat peer_stat[TARGET_NUM_PEERS];
+ struct ath10k_fw_stats_peer peer_stat[TARGET_NUM_PEERS];
/* TODO: Beacon filter stats */
struct ath10k_debug {
struct dentry *debugfs_phy;
- struct ath10k_target_stats target_stats;
+ struct ath10k_fw_stats fw_stats;
+ struct completion fw_stats_complete;
DECLARE_BITMAP(wmi_service_bitmap, WMI_SERVICE_MAX);
- struct completion event_stats_compl;
-
unsigned long htt_stats_mask;
struct delayed_work htt_stats_dwork;
struct ath10k_dfs_stats dfs_stats;
.llseek = default_llseek,
};
-void ath10k_debug_read_target_stats(struct ath10k *ar, struct sk_buff *skb)
+void ath10k_debug_fw_stats_process(struct ath10k *ar, struct sk_buff *skb)
{
int ret;
spin_lock_bh(&ar->data_lock);
- ret = ath10k_wmi_pull_fw_stats(ar, skb, &ar->debug.target_stats);
+ ret = ath10k_wmi_pull_fw_stats(ar, skb, &ar->debug.fw_stats);
if (ret) {
ath10k_warn(ar, "failed to pull fw stats: %d\n", ret);
goto unlock;
}
- complete(&ar->debug.event_stats_compl);
+ complete(&ar->debug.fw_stats_complete);
unlock:
spin_unlock_bh(&ar->data_lock);
}
-static ssize_t ath10k_read_fw_stats(struct file *file, char __user *user_buf,
+static ssize_t ath10k_fw_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
struct ath10k *ar = file->private_data;
- struct ath10k_target_stats *fw_stats;
+ struct ath10k_fw_stats *fw_stats;
char *buf = NULL;
unsigned int len = 0, buf_len = 8000;
ssize_t ret_cnt = 0;
int i;
int ret;
- fw_stats = &ar->debug.target_stats;
+ fw_stats = &ar->debug.fw_stats;
mutex_lock(&ar->conf_mutex);
goto exit;
}
- left = wait_for_completion_timeout(&ar->debug.event_stats_compl, 1*HZ);
+ left = wait_for_completion_timeout(&ar->debug.fw_stats_complete, 1*HZ);
if (left <= 0)
goto exit;
}
static const struct file_operations fops_fw_stats = {
- .read = ath10k_read_fw_stats,
+ .read = ath10k_fw_stats_read,
.open = simple_open,
.owner = THIS_MODULE,
.llseek = default_llseek,
INIT_DELAYED_WORK(&ar->debug.htt_stats_dwork,
ath10k_debug_htt_stats_dwork);
- init_completion(&ar->debug.event_stats_compl);
+ init_completion(&ar->debug.fw_stats_complete);
debugfs_create_file("fw_stats", S_IRUSR, ar->debug.debugfs_phy, ar,
&fops_fw_stats);
void ath10k_debug_read_service_map(struct ath10k *ar,
const void *service_map,
size_t map_size);
-void ath10k_debug_read_target_stats(struct ath10k *ar, struct sk_buff *skb);
+void ath10k_debug_fw_stats_process(struct ath10k *ar, struct sk_buff *skb);
struct ath10k_fw_crash_data *
ath10k_debug_get_new_fw_crash_data(struct ath10k *ar);
{
}
-static inline void ath10k_debug_read_target_stats(struct ath10k *ar,
- struct sk_buff *skb)
+static inline void ath10k_debug_fw_stats_process(struct ath10k *ar,
+ struct sk_buff *skb)
{
}
}
static void ath10k_wmi_pull_pdev_stats(const struct wmi_pdev_stats *src,
- struct ath10k_target_stats *dst)
+ struct ath10k_fw_stats *dst)
{
const struct wal_dbg_tx_stats *tx = &src->wal.tx;
const struct wal_dbg_rx_stats *rx = &src->wal.rx;
}
static void ath10k_wmi_pull_peer_stats(const struct wmi_peer_stats *src,
- struct ath10k_peer_stat *dst)
+ struct ath10k_fw_stats_peer *dst)
{
ether_addr_copy(dst->peer_macaddr, src->peer_macaddr.addr);
dst->peer_rssi = __le32_to_cpu(src->peer_rssi);
static int ath10k_wmi_main_pull_fw_stats(struct ath10k *ar,
struct sk_buff *skb,
- struct ath10k_target_stats *stats)
+ struct ath10k_fw_stats *stats)
{
const struct wmi_stats_event *ev = (void *)skb->data;
u32 num_pdev_stats, num_vdev_stats, num_peer_stats;
static int ath10k_wmi_10x_pull_fw_stats(struct ath10k *ar,
struct sk_buff *skb,
- struct ath10k_target_stats *stats)
+ struct ath10k_fw_stats *stats)
{
const struct wmi_stats_event *ev = (void *)skb->data;
u32 num_pdev_stats, num_vdev_stats, num_peer_stats;
}
int ath10k_wmi_pull_fw_stats(struct ath10k *ar, struct sk_buff *skb,
- struct ath10k_target_stats *stats)
+ struct ath10k_fw_stats *stats)
{
if (test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features))
return ath10k_wmi_10x_pull_fw_stats(ar, skb, stats);
struct sk_buff *skb)
{
ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_UPDATE_STATS_EVENTID\n");
- ath10k_debug_read_target_stats(ar, skb);
+ ath10k_debug_fw_stats_process(ar, skb);
}
static void ath10k_wmi_event_vdev_start_resp(struct ath10k *ar,
struct ath10k;
struct ath10k_vif;
-struct ath10k_target_stats;
+struct ath10k_fw_stats;
int ath10k_wmi_attach(struct ath10k *ar);
void ath10k_wmi_detach(struct ath10k *ar);
int ath10k_wmi_mgmt_tx(struct ath10k *ar, struct sk_buff *skb);
int ath10k_wmi_dbglog_cfg(struct ath10k *ar, u32 module_enable);
int ath10k_wmi_pull_fw_stats(struct ath10k *ar, struct sk_buff *skb,
- struct ath10k_target_stats *stats);
+ struct ath10k_fw_stats *stats);
#endif /* _WMI_H_ */