From: Christian Lamparter Date: Thu, 17 Jan 2013 22:26:35 +0000 (+0100) Subject: carl9170 firmware: fix !CONFIG_CARL9170FW_RADIO_FUNCTIONS compile errors X-Git-Tag: 1.9.8~22 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=5b149f61948fee829cb9407702c17231c0aa1b6b;p=carl9170fw.git carl9170 firmware: fix !CONFIG_CARL9170FW_RADIO_FUNCTIONS compile errors 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 --- 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++; }