Commit cb4e57db authored by Kalle Valo's avatar Kalle Valo
Browse files

ath11k: debugfs: use ath11k_debugfs_ prefix



As these functions are now defined in debugfs.c change the prefix to use
ath11k_debugfs_ as well.

No functional changes. Compile tested only.

Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1600264523-12939-2-git-send-email-kvalo@codeaurora.org
parent da3a9d3c
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -412,7 +412,7 @@ static int ath11k_core_soc_create(struct ath11k_base *ab)
		return ret;
	}

	ret = ath11k_debug_soc_create(ab);
	ret = ath11k_debugfs_soc_create(ab);
	if (ret) {
		ath11k_err(ab, "failed to create ath11k debugfs\n");
		goto err_qmi_deinit;
@@ -427,7 +427,7 @@ static int ath11k_core_soc_create(struct ath11k_base *ab)
	return 0;

err_debugfs_reg:
	ath11k_debug_soc_destroy(ab);
	ath11k_debugfs_soc_destroy(ab);
err_qmi_deinit:
	ath11k_qmi_deinit_service(ab);
	return ret;
@@ -435,7 +435,7 @@ static int ath11k_core_soc_create(struct ath11k_base *ab)

static void ath11k_core_soc_destroy(struct ath11k_base *ab)
{
	ath11k_debug_soc_destroy(ab);
	ath11k_debugfs_soc_destroy(ab);
	ath11k_dp_free(ab);
	ath11k_reg_free(ab);
	ath11k_qmi_deinit_service(ab);
@@ -445,7 +445,7 @@ static int ath11k_core_pdev_create(struct ath11k_base *ab)
{
	int ret;

	ret = ath11k_debug_pdev_create(ab);
	ret = ath11k_debugfs_pdev_create(ab);
	if (ret) {
		ath11k_err(ab, "failed to create core pdev debugfs: %d\n", ret);
		return ret;
@@ -485,7 +485,7 @@ static int ath11k_core_pdev_create(struct ath11k_base *ab)
err_mac_unregister:
	ath11k_mac_unregister(ab);
err_pdev_debug:
	ath11k_debug_pdev_destroy(ab);
	ath11k_debugfs_pdev_destroy(ab);

	return ret;
}
@@ -497,7 +497,7 @@ static void ath11k_core_pdev_destroy(struct ath11k_base *ab)
	ath11k_mac_unregister(ab);
	ath11k_hif_irq_disable(ab);
	ath11k_dp_pdev_free(ab);
	ath11k_debug_pdev_destroy(ab);
	ath11k_debugfs_pdev_destroy(ab);
}

static int ath11k_core_start(struct ath11k_base *ab,
+23 −23
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ static void ath11k_fw_stats_bcn_free(struct list_head *head)
	}
}

static void ath11k_debug_fw_stats_reset(struct ath11k *ar)
static void ath11k_debugfs_fw_stats_reset(struct ath11k *ar)
{
	spin_lock_bh(&ar->data_lock);
	ar->debug.fw_stats_done = false;
@@ -89,7 +89,7 @@ static void ath11k_debug_fw_stats_reset(struct ath11k *ar)
	spin_unlock_bh(&ar->data_lock);
}

void ath11k_debug_fw_stats_process(struct ath11k_base *ab, struct sk_buff *skb)
void ath11k_debugfs_fw_stats_process(struct ath11k_base *ab, struct sk_buff *skb)
{
	struct ath11k_fw_stats stats = {};
	struct ath11k *ar;
@@ -181,7 +181,7 @@ void ath11k_debug_fw_stats_process(struct ath11k_base *ab, struct sk_buff *skb)
	ath11k_fw_stats_bcn_free(&stats.bcn);
}

static int ath11k_debug_fw_stats_request(struct ath11k *ar,
static int ath11k_debugfs_fw_stats_request(struct ath11k *ar,
					   struct stats_request_params *req_param)
{
	struct ath11k_base *ab = ar->ab;
@@ -197,7 +197,7 @@ static int ath11k_debug_fw_stats_request(struct ath11k *ar,
	 */
	timeout = jiffies + msecs_to_jiffies(3 * HZ);

	ath11k_debug_fw_stats_reset(ar);
	ath11k_debugfs_fw_stats_reset(ar);

	reinit_completion(&ar->debug.fw_stats_complete);

@@ -254,7 +254,7 @@ static int ath11k_open_pdev_stats(struct inode *inode, struct file *file)
	req_param.vdev_id = 0;
	req_param.stats_id = WMI_REQUEST_PDEV_STAT;

	ret = ath11k_debug_fw_stats_request(ar, &req_param);
	ret = ath11k_debugfs_fw_stats_request(ar, &req_param);
	if (ret) {
		ath11k_warn(ab, "failed to request fw pdev stats: %d\n", ret);
		goto err_free;
@@ -326,7 +326,7 @@ static int ath11k_open_vdev_stats(struct inode *inode, struct file *file)
	req_param.vdev_id = 0;
	req_param.stats_id = WMI_REQUEST_VDEV_STAT;

	ret = ath11k_debug_fw_stats_request(ar, &req_param);
	ret = ath11k_debugfs_fw_stats_request(ar, &req_param);
	if (ret) {
		ath11k_warn(ar->ab, "failed to request fw vdev stats: %d\n", ret);
		goto err_free;
@@ -403,7 +403,7 @@ static int ath11k_open_bcn_stats(struct inode *inode, struct file *file)
			continue;

		req_param.vdev_id = arvif->vdev_id;
		ret = ath11k_debug_fw_stats_request(ar, &req_param);
		ret = ath11k_debugfs_fw_stats_request(ar, &req_param);
		if (ret) {
			ath11k_warn(ar->ab, "failed to request fw bcn stats: %d\n", ret);
			goto err_free;
@@ -705,7 +705,7 @@ static int ath11k_fill_bp_stats(struct ath11k_base *ab,
	return len;
}

static ssize_t ath11k_debug_dump_soc_ring_bp_stats(struct ath11k_base *ab,
static ssize_t ath11k_debugfs_dump_soc_ring_bp_stats(struct ath11k_base *ab,
						     char *buf, int size)
{
	struct ath11k_bp_stats *bp_stats;
@@ -754,7 +754,7 @@ static ssize_t ath11k_debug_dump_soc_ring_bp_stats(struct ath11k_base *ab,
	return len;
}

static ssize_t ath11k_debug_dump_soc_dp_stats(struct file *file,
static ssize_t ath11k_debugfs_dump_soc_dp_stats(struct file *file,
						char __user *user_buf,
						size_t count, loff_t *ppos)
{
@@ -814,7 +814,7 @@ static ssize_t ath11k_debug_dump_soc_dp_stats(struct file *file,
			 "\nMisc Transmit Failures: %d\n",
			 atomic_read(&soc_stats->tx_err.misc_fail));

	len += ath11k_debug_dump_soc_ring_bp_stats(ab, buf + len, size - len);
	len += ath11k_debugfs_dump_soc_ring_bp_stats(ab, buf + len, size - len);

	if (len > size)
		len = size;
@@ -825,13 +825,13 @@ static ssize_t ath11k_debug_dump_soc_dp_stats(struct file *file,
}

static const struct file_operations fops_soc_dp_stats = {
	.read = ath11k_debug_dump_soc_dp_stats,
	.read = ath11k_debugfs_dump_soc_dp_stats,
	.open = simple_open,
	.owner = THIS_MODULE,
	.llseek = default_llseek,
};

int ath11k_debug_pdev_create(struct ath11k_base *ab)
int ath11k_debugfs_pdev_create(struct ath11k_base *ab)
{
	if (test_bit(ATH11K_FLAG_REGISTERED, &ab->dev_flags))
		return 0;
@@ -853,13 +853,13 @@ int ath11k_debug_pdev_create(struct ath11k_base *ab)
	return 0;
}

void ath11k_debug_pdev_destroy(struct ath11k_base *ab)
void ath11k_debugfs_pdev_destroy(struct ath11k_base *ab)
{
	debugfs_remove_recursive(ab->debugfs_ath11k);
	ab->debugfs_ath11k = NULL;
}

int ath11k_debug_soc_create(struct ath11k_base *ab)
int ath11k_debugfs_soc_create(struct ath11k_base *ab)
{
	ab->debugfs_ath11k = debugfs_create_dir("ath11k", NULL);

@@ -872,13 +872,13 @@ int ath11k_debug_soc_create(struct ath11k_base *ab)
	return 0;
}

void ath11k_debug_soc_destroy(struct ath11k_base *ab)
void ath11k_debugfs_soc_destroy(struct ath11k_base *ab)
{
	debugfs_remove_recursive(ab->debugfs_soc);
	ab->debugfs_soc = NULL;
}

void ath11k_debug_fw_stats_init(struct ath11k *ar)
void ath11k_debugfs_fw_stats_init(struct ath11k *ar)
{
	struct dentry *fwstats_dir = debugfs_create_dir("fw_stats",
							ar->debug.debugfs_pdev);
@@ -1060,7 +1060,7 @@ static const struct file_operations fops_simulate_radar = {
	.open = simple_open
};

int ath11k_debug_register(struct ath11k *ar)
int ath11k_debugfs_register(struct ath11k *ar)
{
	struct ath11k_base *ab = ar->ab;
	char pdev_name[5];
@@ -1083,7 +1083,7 @@ int ath11k_debug_register(struct ath11k *ar)

	ath11k_debug_htt_stats_init(ar);

	ath11k_debug_fw_stats_init(ar);
	ath11k_debugfs_fw_stats_init(ar);

	debugfs_create_file("ext_tx_stats", 0644,
			    ar->debug.debugfs_pdev, ar,
@@ -1107,6 +1107,6 @@ int ath11k_debug_register(struct ath11k *ar)
	return 0;
}

void ath11k_debug_unregister(struct ath11k *ar)
void ath11k_debugfs_unregister(struct ath11k *ar)
{
}
+29 −29
Original line number Diff line number Diff line
@@ -104,46 +104,46 @@ enum ath11k_dbg_aggr_mode {
};

#ifdef CONFIG_ATH11K_DEBUGFS
int ath11k_debug_soc_create(struct ath11k_base *ab);
void ath11k_debug_soc_destroy(struct ath11k_base *ab);
int ath11k_debug_pdev_create(struct ath11k_base *ab);
void ath11k_debug_pdev_destroy(struct ath11k_base *ab);
int ath11k_debug_register(struct ath11k *ar);
void ath11k_debug_unregister(struct ath11k *ar);
int ath11k_debugfs_soc_create(struct ath11k_base *ab);
void ath11k_debugfs_soc_destroy(struct ath11k_base *ab);
int ath11k_debugfs_pdev_create(struct ath11k_base *ab);
void ath11k_debugfs_pdev_destroy(struct ath11k_base *ab);
int ath11k_debugfs_register(struct ath11k *ar);
void ath11k_debugfs_unregister(struct ath11k *ar);
void ath11k_dbg_htt_ext_stats_handler(struct ath11k_base *ab,
				      struct sk_buff *skb);
void ath11k_debug_fw_stats_process(struct ath11k_base *ab, struct sk_buff *skb);
void ath11k_debugfs_fw_stats_process(struct ath11k_base *ab, struct sk_buff *skb);

void ath11k_debug_fw_stats_init(struct ath11k *ar);
void ath11k_debugfs_fw_stats_init(struct ath11k *ar);
int ath11k_dbg_htt_stats_req(struct ath11k *ar);

static inline bool ath11k_debug_is_pktlog_lite_mode_enabled(struct ath11k *ar)
static inline bool ath11k_debugfs_is_pktlog_lite_mode_enabled(struct ath11k *ar)
{
	return (ar->debug.pktlog_mode == ATH11K_PKTLOG_MODE_LITE);
}

static inline bool ath11k_debug_is_pktlog_rx_stats_enabled(struct ath11k *ar)
static inline bool ath11k_debugfs_is_pktlog_rx_stats_enabled(struct ath11k *ar)
{
	return (!ar->debug.pktlog_peer_valid && ar->debug.pktlog_mode);
}

static inline bool ath11k_debug_is_pktlog_peer_valid(struct ath11k *ar, u8 *addr)
static inline bool ath11k_debugfs_is_pktlog_peer_valid(struct ath11k *ar, u8 *addr)
{
	return (ar->debug.pktlog_peer_valid && ar->debug.pktlog_mode &&
		ether_addr_equal(addr, ar->debug.pktlog_peer_addr));
}

static inline int ath11k_debug_is_extd_tx_stats_enabled(struct ath11k *ar)
static inline int ath11k_debugfs_is_extd_tx_stats_enabled(struct ath11k *ar)
{
	return ar->debug.extd_tx_stats;
}

static inline int ath11k_debug_is_extd_rx_stats_enabled(struct ath11k *ar)
static inline int ath11k_debugfs_is_extd_rx_stats_enabled(struct ath11k *ar)
{
	return ar->debug.extd_rx_stats;
}

static inline int ath11k_debug_rx_filter(struct ath11k *ar)
static inline int ath11k_debugfs_rx_filter(struct ath11k *ar)
{
	return ar->debug.rx_filter;
}
@@ -158,30 +158,30 @@ void ath11k_update_per_peer_stats_from_txcompl(struct ath11k *ar,
					       struct sk_buff *msdu,
					       struct hal_tx_status *ts);
#else
static inline int ath11k_debug_soc_create(struct ath11k_base *ab)
static inline int ath11k_debugfs_soc_create(struct ath11k_base *ab)
{
	return 0;
}

static inline void ath11k_debug_soc_destroy(struct ath11k_base *ab)
static inline void ath11k_debugfs_soc_destroy(struct ath11k_base *ab)
{
}

static inline int ath11k_debug_pdev_create(struct ath11k_base *ab)
static inline int ath11k_debugfs_pdev_create(struct ath11k_base *ab)
{
	return 0;
}

static inline void ath11k_debug_pdev_destroy(struct ath11k_base *ab)
static inline void ath11k_debugfs_pdev_destroy(struct ath11k_base *ab)
{
}

static inline int ath11k_debug_register(struct ath11k *ar)
static inline int ath11k_debugfs_register(struct ath11k *ar)
{
	return 0;
}

static inline void ath11k_debug_unregister(struct ath11k *ar)
static inline void ath11k_debugfs_unregister(struct ath11k *ar)
{
}

@@ -190,21 +190,21 @@ static inline void ath11k_dbg_htt_ext_stats_handler(struct ath11k_base *ab,
{
}

static inline void ath11k_debug_fw_stats_process(struct ath11k_base *ab,
static inline void ath11k_debugfs_fw_stats_process(struct ath11k_base *ab,
						   struct sk_buff *skb)
{
}

static inline void ath11k_debug_fw_stats_init(struct ath11k *ar)
static inline void ath11k_debugfs_fw_stats_init(struct ath11k *ar)
{
}

static inline int ath11k_debug_is_extd_tx_stats_enabled(struct ath11k *ar)
static inline int ath11k_debugfs_is_extd_tx_stats_enabled(struct ath11k *ar)
{
	return 0;
}

static inline int ath11k_debug_is_extd_rx_stats_enabled(struct ath11k *ar)
static inline int ath11k_debugfs_is_extd_rx_stats_enabled(struct ath11k *ar)
{
	return 0;
}
@@ -214,22 +214,22 @@ static inline int ath11k_dbg_htt_stats_req(struct ath11k *ar)
	return 0;
}

static inline bool ath11k_debug_is_pktlog_lite_mode_enabled(struct ath11k *ar)
static inline bool ath11k_debugfs_is_pktlog_lite_mode_enabled(struct ath11k *ar)
{
	return false;
}

static inline bool ath11k_debug_is_pktlog_rx_stats_enabled(struct ath11k *ar)
static inline bool ath11k_debugfs_is_pktlog_rx_stats_enabled(struct ath11k *ar)
{
	return false;
}

static inline bool ath11k_debug_is_pktlog_peer_valid(struct ath11k *ar, u8 *addr)
static inline bool ath11k_debugfs_is_pktlog_peer_valid(struct ath11k *ar, u8 *addr)
{
	return false;
}

static inline int ath11k_debug_rx_filter(struct ath11k *ar)
static inline int ath11k_debugfs_rx_filter(struct ath11k *ar)
{
	return 0;
}
+2 −2
Original line number Diff line number Diff line
@@ -825,10 +825,10 @@ void ath11k_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
{
	struct ath11k *ar = hw->priv;

	if (ath11k_debug_is_extd_tx_stats_enabled(ar))
	if (ath11k_debugfs_is_extd_tx_stats_enabled(ar))
		debugfs_create_file("tx_stats", 0400, dir, sta,
				    &fops_tx_stats);
	if (ath11k_debug_is_extd_rx_stats_enabled(ar))
	if (ath11k_debugfs_is_extd_rx_stats_enabled(ar))
		debugfs_create_file("rx_stats", 0400, dir, sta,
				    &fops_rx_stats);

+1 −1
Original line number Diff line number Diff line
@@ -832,7 +832,7 @@ void ath11k_dp_pdev_free(struct ath11k_base *ab)
	for (i = 0; i < ab->num_radios; i++) {
		ar = ab->pdevs[i].ar;
		ath11k_dp_rx_pdev_free(ab, i);
		ath11k_debug_unregister(ar);
		ath11k_debugfs_unregister(ar);
		ath11k_dp_rx_pdev_mon_detach(ar);
	}
}
Loading