aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/p54/txrx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c
index 34447d1ad80d..8f67db487f57 100644
--- a/drivers/net/wireless/p54/txrx.c
+++ b/drivers/net/wireless/p54/txrx.c
@@ -275,15 +275,15 @@ static int p54_rssi_to_dbm(struct p54_common *priv, int rssi)
275{ 275{
276 int band = priv->hw->conf.channel->band; 276 int band = priv->hw->conf.channel->band;
277 277
278 if (priv->rxhw != 5) 278 if (priv->rxhw != 5) {
279 return ((rssi * priv->rssical_db[band].mul) / 64 + 279 return ((rssi * priv->rssical_db[band].mul) / 64 +
280 priv->rssical_db[band].add) / 4; 280 priv->rssical_db[band].add) / 4;
281 else 281 } else {
282 /* 282 /*
283 * TODO: find the correct formula 283 * TODO: find the correct formula
284 */ 284 */
285 return ((rssi * priv->rssical_db[band].mul) / 64 + 285 return rssi / 2 - 110;
286 priv->rssical_db[band].add) / 4; 286 }
287} 287}
288 288
289/* 289/*