carl9170 firmware: fix !CONFIG_CARL9170FW_RADIO_FUNCTIONS compile errors
authorChristian Lamparter <chunkeey@googlemail.com>
Thu, 17 Jan 2013 22:26:35 +0000 (23:26 +0100)
committerChristian Lamparter <chunkeey@googlemail.com>
Thu, 17 Jan 2013 22:27:13 +0000 (23:27 +0100)
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 <anonymous>’ has no member named ‘state’

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
carlfw/src/main.c

index e36dfad2df0013ad7d22567b63754bf5065db7f3..b2d16390cff576eea2f4fd2608ba849b650f1849 100644 (file)
@@ -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++;
 }