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: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Loic Poulain <loic.poulain@linaro.org> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20220115001646.3981501-2-bryan.odonoghue@linaro.org
This commit is contained in:
parent
6bae9de622
commit
039d5d4db4
1 changed files with 5 additions and 0 deletions
|
@ -23,6 +23,11 @@ static inline int get_rssi0(struct wcn36xx_rx_bd *bd)
|
|||
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 {
|
||||
u16 bitrate;
|
||||
u16 mcs_or_legacy_index;
|
||||
|
|
Loading…
Add table
Reference in a new issue