提交 a8c944f8 编写于 作者: B Bruno Randolf 提交者: John W. Linville

ath5k: add capability flag for phyerror counters

Chipsets since revision AR5213A (0x59) have hardware counters for PHY errors
which we can read directly from the registers. Older hardware has to use the RX
descriptor status to get a count of PHY errors. This will be used in several
places in the ANI implementation, so a flag is useful.
Signed-off-by: NBruno Randolf <br1@einfach.org>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 da35111a
......@@ -982,6 +982,8 @@ struct ath5k_capabilities {
struct {
u8 q_tx_num;
} cap_queues;
bool cap_has_phyerr_counters;
};
/* size of noise floor history (keep it a power of two) */
......
......@@ -109,6 +109,12 @@ int ath5k_hw_set_capabilities(struct ath5k_hw *ah)
else
ah->ah_capabilities.cap_queues.q_tx_num = AR5K_NUM_TX_QUEUES;
/* newer hardware has PHY error counters */
if (ah->ah_mac_srev >= AR5K_SREV_AR5213A)
ah->ah_capabilities.cap_has_phyerr_counters = true;
else
ah->ah_capabilities.cap_has_phyerr_counters = false;
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册