Message ID | 1535997033-16330-1-git-send-email-pozega.tomislav@gmail.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Kalle Valo |
Headers | show |
Series | [1/3] debug: use common debug for ack timeout output | expand |
Tomislav Požega wrote: > Move ack debug code to common-debug and adjust > ath9k/ath9k_htc debug for common ack output. > > Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com> Failed to build: drivers/net/wireless/ath/ath9k/debug.c: In function 'ath9k_init_debug': drivers/net/wireless/ath/ath9k/debug.c:1431:2: error: implicit declaration of function 'ath9k_cmn_dbg_ack_to'; did you mean 'ath9k_cmn_debug_ack_to'? [-Werror=implicit-function-declaration] ath9k_cmn_dbg_ack_to(sc->debug.debugfs_phy, sc->sc_ah); ^~~~~~~~~~~~~~~~~~~~ ath9k_cmn_debug_ack_to cc1: some warnings being treated as errors make[5]: *** [drivers/net/wireless/ath/ath9k/debug.o] Error 1 make[5]: *** Waiting for unfinished jobs.... make[5]: *** wait: No child processes. Stop. make[4]: *** [drivers/net/wireless/ath/ath9k] Error 2 make[3]: *** [drivers/net/wireless/ath] Error 2 make[2]: *** [drivers/net/wireless] Error 2 make[1]: *** [drivers/net] Error 2 make: *** [drivers] Error 2 3 patches set to Changes Requested. 10586273 [1/3] debug: use common debug for ack timeout output 10586277 [2/3] ath9k_htc: enable ANI debug output 10586275 [3/3] ath9k_htc: increase number of configurable virtual interfaces
Tomislav Požega <pozega.tomislav@gmail.com> writes: > Move ack debug code to common-debug and adjust > ath9k/ath9k_htc debug for common ack output. Why? I guess to be able to get ack timeout with ath9k_htc, but please write the reason clearly in the commit log. Also the title prefix should be "ath9k:".
Kalle Valo <kvalo@codeaurora.org> writes: > Tomislav Požega <pozega.tomislav@gmail.com> writes: > >> Move ack debug code to common-debug and adjust >> ath9k/ath9k_htc debug for common ack output. > > Why? I guess to be able to get ack timeout with ath9k_htc, but please > write the reason clearly in the commit log. > > Also the title prefix should be "ath9k:". Also please don't CC ath9k_htc_fw list. They spam with "Your message to ath9k_htc_fw awaits moderator approval" which is REALLY annoying. From now on I'll drop them automatically.
diff --git a/drivers/net/wireless/ath/ath9k/common-debug.c b/drivers/net/wireless/ath/ath9k/common-debug.c index 239429f..230fe55 100644 --- a/drivers/net/wireless/ath/ath9k/common-debug.c +++ b/drivers/net/wireless/ath/ath9k/common-debug.c @@ -258,3 +258,32 @@ void ath9k_cmn_debug_phy_err(struct dentry *debugfs_phy, &fops_phy_err); } EXPORT_SYMBOL(ath9k_cmn_debug_phy_err); + +#ifdef CONFIG_ATH9K_DYNACK +static ssize_t read_file_ackto(struct file *file, char __user *user_buf, + size_t count, loff_t *ppos) +{ + struct ath_hw *ah = file->private_data; + char buf[32]; + unsigned int len; + + len = sprintf(buf, "%u %c\n", ah->dynack.ackto, + (ah->dynack.enabled) ? 'A' : 'S'); + + return simple_read_from_buffer(user_buf, count, ppos, buf, len); +} + +static const struct file_operations fops_ackto = { + .read = read_file_ackto, + .open = simple_open, + .owner = THIS_MODULE, + .llseek = default_llseek, +}; + +void ath9k_cmn_debug_ack_to(struct dentry *debugfs_phy, + struct ath_hw *ah) +{ + debugfs_create_file("ack_to", 0400, debugfs_phy, ah, &fops_ackto); +} +EXPORT_SYMBOL(ath9k_cmn_debug_ack_to); +#endif diff --git a/drivers/net/wireless/ath/ath9k/common-debug.h b/drivers/net/wireless/ath/ath9k/common-debug.h index 3376990..a4bc75f 100644 --- a/drivers/net/wireless/ath/ath9k/common-debug.h +++ b/drivers/net/wireless/ath/ath9k/common-debug.h @@ -71,6 +71,8 @@ void ath9k_cmn_debug_recv(struct dentry *debugfs_phy, struct ath_rx_stats *rxstats); void ath9k_cmn_debug_phy_err(struct dentry *debugfs_phy, struct ath_rx_stats *rxstats); +void ath9k_cmn_debug_ack_to(struct dentry *debugfs_phy, + struct ath_hw *ah); #else static inline void ath9k_cmn_debug_modal_eeprom(struct dentry *debugfs_phy, struct ath_hw *ah) @@ -96,4 +98,9 @@ static inline void ath9k_cmn_debug_phy_err(struct dentry *debugfs_phy, struct ath_rx_stats *rxstats) { } + +static inline void ath9k_cmn_debug_ack_to(struct dentry *debugfs_phy, + struct ath_hw *ah) +{ +} #endif /* CONFIG_ATH9K_COMMON_DEBUG */ diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index 0a6eb8a..d2ea0b1 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c @@ -1038,29 +1038,6 @@ static ssize_t read_file_btcoex(struct file *file, char __user *user_buf, }; #endif -#ifdef CONFIG_ATH9K_DYNACK -static ssize_t read_file_ackto(struct file *file, char __user *user_buf, - size_t count, loff_t *ppos) -{ - struct ath_softc *sc = file->private_data; - struct ath_hw *ah = sc->sc_ah; - char buf[32]; - unsigned int len; - - len = sprintf(buf, "%u %c\n", ah->dynack.ackto, - (ah->dynack.enabled) ? 'A' : 'S'); - - return simple_read_from_buffer(user_buf, count, ppos, buf, len); -} - -static const struct file_operations fops_ackto = { - .read = read_file_ackto, - .open = simple_open, - .owner = THIS_MODULE, - .llseek = default_llseek, -}; -#endif - #ifdef CONFIG_ATH9K_WOW static ssize_t read_file_wow(struct file *file, char __user *user_buf, @@ -1451,8 +1428,7 @@ int ath9k_init_debug(struct ath_hw *ah) #endif #ifdef CONFIG_ATH9K_DYNACK - debugfs_create_file("ack_to", 0400, sc->debug.debugfs_phy, - sc, &fops_ackto); + ath9k_cmn_dbg_ack_to(sc->debug.debugfs_phy, sc->sc_ah); #endif debugfs_create_file("tpc", 0600, sc->debug.debugfs_phy, sc, &fops_tpc); diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c index b3ed65e..a345da8 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c @@ -520,5 +520,9 @@ int ath9k_htc_init_debug(struct ath_hw *ah) ath9k_cmn_debug_base_eeprom(priv->debug.debugfs_phy, priv->ah); ath9k_cmn_debug_modal_eeprom(priv->debug.debugfs_phy, priv->ah); +#ifdef CONFIG_ATH9K_DYNACK + ath9k_cmn_debug_ack_to(priv->debug.debugfs_phy, priv->ah); +#endif + return 0; }
Move ack debug code to common-debug and adjust ath9k/ath9k_htc debug for common ack output. Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com> --- drivers/net/wireless/ath/ath9k/common-debug.c | 29 ++++++++++++++++++++++++ drivers/net/wireless/ath/ath9k/common-debug.h | 7 +++++ drivers/net/wireless/ath/ath9k/debug.c | 26 +-------------------- drivers/net/wireless/ath/ath9k/htc_drv_debug.c | 4 +++ 4 files changed, 41 insertions(+), 25 deletions(-)