summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPablo Greco <pgreco@centosproject.org>2019-12-01 15:17:10 -0300
committerFelix Fietkau <nbd@nbd.name>2020-02-14 10:06:00 +0100
commitf53300fdaa84dc02f96ab9446b5bac4d20016c43 (patch)
tree234dd1b85f23787f6f95b97e62627b851f82375d /drivers
parent1a874afbbf8812af4c4e269eb3d2c6b201532ed0 (diff)
mt76: mt7615: Fix build with older compilers
Some compilers (tested with 4.8.5 from CentOS 7) fail properly process FIELD_GET inside an inline function, which ends up in a BUILD_BUG_ON. Convert inline function to a macro. Fixes commit bf92e7685100 ("mt76: mt7615: add support for per-chain signal strength reporting") Reported in https://lkml.org/lkml/2019/9/21/146 Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Pablo Greco <pgreco@centosproject.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7615/mac.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
index 4d528aa725fd..b03b5c6fd571 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
@@ -13,10 +13,7 @@
#include "../dma.h"
#include "mac.h"
-static inline s8 to_rssi(u32 field, u32 rxv)
-{
- return (FIELD_GET(field, rxv) - 220) / 2;
-}
+#define to_rssi(field, rxv) ((FIELD_GET(field, rxv) - 220) / 2)
static struct mt76_wcid *mt7615_rx_get_wcid(struct mt7615_dev *dev,
u8 idx, bool unicast)