mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 13:23:02 -04:00
wifi: carl9170: rx: track PHY errors via debugfs
Count PHY errors reported by the hardware in the RX status and expose the counter through debugfs as rx_phy_errors. Previously, PHY errors from ar9170_rx_phystatus were silently ignored (marked with a TODO comment). The counter helps diagnose RF environment issues (interference, multipath, low SNR) without requiring monitor mode or additional tooling. Signed-off-by: Masi Osmani <mas-i@hotmail.de> Acked-by: Christian Lamparter <chunkeey@gmail.com> Link: https://patch.msgid.link/AM7PPF5613FA0B6B42814E38096301FE9429444A@AM7PPF5613FA0B6.EURP251.PROD.OUTLOOK.COM Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
This commit is contained in:
committed by
Jeff Johnson
parent
a711bf00b8
commit
2ac1d4de8e
@@ -381,6 +381,7 @@ struct ar9170 {
|
||||
unsigned int tx_ack_failures;
|
||||
unsigned int tx_fcs_errors;
|
||||
unsigned int rx_dropped;
|
||||
unsigned int rx_phy_errors;
|
||||
|
||||
/* EEPROM */
|
||||
struct ar9170_eeprom eeprom;
|
||||
|
||||
@@ -794,6 +794,7 @@ DEBUGFS_READONLY_FILE(tx_janitor_last_run, 64, "last run:%d ms ago",
|
||||
DEBUGFS_READONLY_FILE(tx_dropped, 20, "%d", ar->tx_dropped);
|
||||
|
||||
DEBUGFS_READONLY_FILE(rx_dropped, 20, "%d", ar->rx_dropped);
|
||||
DEBUGFS_READONLY_FILE(rx_phy_errors, 20, "%d", ar->rx_phy_errors);
|
||||
|
||||
DEBUGFS_READONLY_FILE(sniffer_enabled, 20, "%d", ar->sniffer_enabled);
|
||||
DEBUGFS_READONLY_FILE(rx_software_decryption, 20, "%d",
|
||||
@@ -830,6 +831,7 @@ void carl9170_debugfs_register(struct ar9170 *ar)
|
||||
DEBUGFS_ADD(tx_ampdu_list_len);
|
||||
|
||||
DEBUGFS_ADD(rx_dropped);
|
||||
DEBUGFS_ADD(rx_phy_errors);
|
||||
DEBUGFS_ADD(sniffer_enabled);
|
||||
DEBUGFS_ADD(rx_software_decryption);
|
||||
|
||||
|
||||
@@ -455,7 +455,9 @@ static void carl9170_rx_phy_status(struct ar9170 *ar,
|
||||
if (phy->rssi[i] & 0x80)
|
||||
phy->rssi[i] = ((~phy->rssi[i] & 0x7f) + 1) & 0x7f;
|
||||
|
||||
/* TODO: we could do something with phy_errors */
|
||||
if (phy->phy_err)
|
||||
ar->rx_phy_errors++;
|
||||
|
||||
status->signal = ar->noise[0] + phy->rssi_combined;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user