Commit 039d5d4d authored by Bryan O'Donoghue's avatar Bryan O'Donoghue Committed by Kalle Valo

wcn36xx: Implement get_snr()

The wcn36xx BD phy descriptor returns both Received Signal Strength
Information (RSSI) and Signal To Noise Ratio (SNR) with each delivered BD.

The macro to extract this data is a simple-one liner, easily imported from
prima driver. This data will be useful to us when implementing
mac80211-ops->get_survey().
Signed-off-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: default avatarLoic Poulain <loic.poulain@linaro.org>
Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220115001646.3981501-2-bryan.odonoghue@linaro.org
parent 6bae9de6
...@@ -23,6 +23,11 @@ static inline int get_rssi0(struct wcn36xx_rx_bd *bd) ...@@ -23,6 +23,11 @@ static inline int get_rssi0(struct wcn36xx_rx_bd *bd)
return 100 - ((bd->phy_stat0 >> 24) & 0xff); return 100 - ((bd->phy_stat0 >> 24) & 0xff);
} }
static inline int get_snr(struct wcn36xx_rx_bd *bd)
{
return ((bd->phy_stat1 >> 24) & 0xff);
}
struct wcn36xx_rate { struct wcn36xx_rate {
u16 bitrate; u16 bitrate;
u16 mcs_or_legacy_index; u16 mcs_or_legacy_index;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment