From 5b149f61948fee829cb9407702c17231c0aa1b6b Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Thu, 17 Jan 2013 23:26:35 +0100 Subject: [PATCH] carl9170 firmware: fix !CONFIG_CARL9170FW_RADIO_FUNCTIONS compile errors MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit carlfw/src/main.c:87:27: error: unused variable ‘delta’ carlfw/src/main.c:87:15: error: unused variable ‘boff’ carlfw/src/main.c:90:12: error: ‘struct ’ has no member named ‘state’ Signed-off-by: Christian Lamparter --- carlfw/src/main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/carlfw/src/main.c b/carlfw/src/main.c index e36dfad..b2d1639 100644 --- a/carlfw/src/main.c +++ b/carlfw/src/main.c @@ -84,10 +84,13 @@ static void handle_fw(void) static void tally_update(void) { - unsigned int boff, time, delta; + unsigned int time; time = get_clock_counter(); +#ifdef CONFIG_CARL9170FW_RADIO_FUNCTIONS if (fw.phy.state == CARL9170_PHY_ON) { + unsigned int boff, delta; + delta = (time - fw.tally_clock); fw.tally.active += delta; @@ -98,7 +101,7 @@ static void tally_update(void) if (boff & AR9170_MAC_BACKOFF_CCA) fw.tally.cca += delta; } - +#endif /* CONFIG_CARL9170FW_RADIO_FUNCTIONS */ fw.tally_clock = time; fw.counter++; } -- 2.31.1