[PATCH 6/6] Changed RSSI0 macros to inline function

Eugene Krasnikov k.eugene.e at gmail.com
Mon Aug 5 09:56:21 EDT 2013


This will add type checking.

Signed-off-by: Eugene Krasnikov <k.eugene.e at gmail.com>
---
 txrx.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/txrx.c b/txrx.c
index 4dd764d..ad35d21 100644
--- a/txrx.c
+++ b/txrx.c
@@ -17,7 +17,10 @@
 
 #include "txrx.h"
 
-#define RSSI0(x) (100 - ((x->phy_stat0 >> 24) & 0xff))
+static inline int get_rssi0(struct wcn36xx_rx_bd *bd)
+{
+	return 100 - ((bd->phy_stat0 >> 24) & 0xff);
+}
 
 int wcn36xx_rx_skb(struct wcn36xx *wcn, struct sk_buff *skb)
 {
@@ -44,7 +47,7 @@ int wcn36xx_rx_skb(struct wcn36xx *wcn, struct sk_buff *skb)
 	status.mactime = 10;
 	status.freq = WCN36XX_CENTER_FREQ(wcn);
 	status.band = WCN36XX_BAND(wcn);
-	status.signal = -RSSI0(bd);
+	status.signal = -get_rssi0(bd);
 	status.antenna = 1;
 	status.rate_idx = 1;
 	status.flag = 0;
-- 
1.8.2.2




More information about the wcn36xx mailing list