Commit f53300fd authored by Pablo Greco's avatar Pablo Greco Committed by Felix Fietkau

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 bf92e768 ("mt76: mt7615: add support for per-chain
signal strength reporting")
Reported in https://lkml.org/lkml/2019/9/21/146Reported-by: default avatarkbuild test robot <lkp@intel.com>
Signed-off-by: default avatarPablo Greco <pgreco@centosproject.org>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 1a874afb
...@@ -13,10 +13,7 @@ ...@@ -13,10 +13,7 @@
#include "../dma.h" #include "../dma.h"
#include "mac.h" #include "mac.h"
static inline s8 to_rssi(u32 field, u32 rxv) #define to_rssi(field, rxv) ((FIELD_GET(field, rxv) - 220) / 2)
{
return (FIELD_GET(field, rxv) - 220) / 2;
}
static struct mt76_wcid *mt7615_rx_get_wcid(struct mt7615_dev *dev, static struct mt76_wcid *mt7615_rx_get_wcid(struct mt7615_dev *dev,
u8 idx, bool unicast) u8 idx, bool unicast)
......
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