ath10k: rename fw_stats related stuff
authorMichal Kazior <michal.kazior@tieto.com>
Thu, 25 Sep 2014 10:33:48 +0000 (12:33 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Mon, 29 Sep 2014 11:30:32 +0000 (14:30 +0300)
The naming was a bit inconsistent.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/core.h
drivers/net/wireless/ath/ath10k/debug.c
drivers/net/wireless/ath/ath10k/debug.h
drivers/net/wireless/ath/ath10k/wmi.c
drivers/net/wireless/ath/ath10k/wmi.h

index 8a997b6e11c307193c89e3cf3ac0add8154ad91e..082a8dad9938774f5cc93b87077400e5393c219c 100644 (file)
@@ -116,14 +116,14 @@ struct ath10k_wmi {
        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;
@@ -183,7 +183,7 @@ struct ath10k_target_stats {
 
        /* 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 */
 
@@ -292,11 +292,10 @@ struct ath10k_fw_crash_data {
 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;
index 906319f49ca2c718f700e1872b57fefe32ebb97b..9e85533a8ba556308a3db41c94b0b34f8cfe5927 100644 (file)
@@ -239,29 +239,29 @@ static const struct file_operations fops_wmi_services = {
        .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;
@@ -269,7 +269,7 @@ static ssize_t ath10k_read_fw_stats(struct file *file, char __user *user_buf,
        int i;
        int ret;
 
-       fw_stats = &ar->debug.target_stats;
+       fw_stats = &ar->debug.fw_stats;
 
        mutex_lock(&ar->conf_mutex);
 
@@ -286,7 +286,7 @@ static ssize_t ath10k_read_fw_stats(struct file *file, char __user *user_buf,
                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;
 
@@ -445,7 +445,7 @@ 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,
@@ -1147,7 +1147,7 @@ int ath10k_debug_register(struct ath10k *ar)
        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);
index 8d8b68eb04e6bc2d5c90f4034c3ed31532faaf8d..efbcd29fe9a1b5753a3b1ab118229f70e955653d 100644 (file)
@@ -55,7 +55,7 @@ void ath10k_debug_unregister(struct ath10k *ar);
 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);
 
@@ -97,8 +97,8 @@ static inline void ath10k_debug_read_service_map(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)
 {
 }
 
index 8e2d0217686d4d6d754fb3e0fd7766cb73053010..c4640aac55d5c28a6565faf7a510eadfd46b730a 100644 (file)
@@ -1330,7 +1330,7 @@ static int ath10k_wmi_event_debug_mesg(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;
@@ -1383,7 +1383,7 @@ static void ath10k_wmi_pull_pdev_stats(const struct wmi_pdev_stats *src,
 }
 
 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);
@@ -1392,7 +1392,7 @@ static void ath10k_wmi_pull_peer_stats(const struct wmi_peer_stats *src,
 
 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;
@@ -1432,7 +1432,7 @@ static int ath10k_wmi_main_pull_fw_stats(struct ath10k *ar,
 
 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;
@@ -1481,7 +1481,7 @@ static int ath10k_wmi_10x_pull_fw_stats(struct ath10k *ar,
 }
 
 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);
@@ -1493,7 +1493,7 @@ static void ath10k_wmi_event_update_stats(struct ath10k *ar,
                                          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,
index 4ce8e3c9ca814632cfed2c19b65d3d62c349bcde..6243dbe756ea59a9c659c940a69f2d48c46344ee 100644 (file)
@@ -4573,7 +4573,7 @@ struct wmi_svc_rdy_ev_arg {
 
 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);
@@ -4646,6 +4646,6 @@ int ath10k_wmi_force_fw_hang(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_ */