Skip to content

Commit

Permalink
rtl8xxxu: Fix the reported rx signal strength
Browse files Browse the repository at this point in the history
In rtl8xxxx_rx_query_desc for each chip in rtlwifi family, the
rx_status->signal is always the status->recvsignalpower + 10.

We also observe the same thing in air capture that the RSSI is
always ~10dBm higher than reported from driver.

Add this 10dBm to avoid confusion.
  • Loading branch information
Chris Chiu authored and mschiu77 committed Mar 27, 2021
1 parent 831ecaf commit e1a4f83
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -5314,6 +5314,11 @@ static void rtl8xxxu_rx_parse_phystats(struct rtl8xxxu_priv *priv,
rx_status->signal =
(phy_stats->cck_sig_qual_ofdm_pwdb_all >> 1) - 110;
}

// refers to rtlxxxx_rx_query_desc of rtlwifi/rtlxxxx/trx.c
// needs to verify on RTL8723BU
if (priv->rtl_chip != RTL8723B && priv->rtl_chip != RTL8192E)
rx_status->signal += 10;
}

static void rtl8xxxu_free_rx_resources(struct rtl8xxxu_priv *priv)
Expand Down

0 comments on commit e1a4f83

Please sign in to comment.