From 13c1a42f1cbe20d3d0e1fc5370d402c020770821 Mon Sep 17 00:00:00 2001 From: eb Date: Mon, 27 Oct 2008 00:20:10 +0000 Subject: [PATCH] removed extra indentation. No change in functionality git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9861 221aa14e-8319-0410-a670-987f0aec2ac5 --- usrp2/firmware/lib/dbsm.c | 74 +++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 38 deletions(-) diff --git a/usrp2/firmware/lib/dbsm.c b/usrp2/firmware/lib/dbsm.c index 5e2042be..b11d1682 100644 --- a/usrp2/firmware/lib/dbsm.c +++ b/usrp2/firmware/lib/dbsm.c @@ -177,50 +177,48 @@ dbsm_process_helper(dbsm_t *sm, int buf_this) { int buf_other = buf_this ^ 1; - if (1){ - bp_clear_buf(buf_this); - - if (buffer_state[buf_this] == BS_FILLING){ - buffer_state[buf_this] = BS_FULL; - // - // does s/w handle this packet? - // - if (sm->inspect(sm, buf_this)){ - // s/w handled the packet; refill the buffer - dbsm_receive_to_buf(sm, buf_this); - buffer_state[buf_this] = BS_FILLING; - } + bp_clear_buf(buf_this); - else { // s/w didn't handle this; pass it on + if (buffer_state[buf_this] == BS_FILLING){ + buffer_state[buf_this] = BS_FULL; + // + // does s/w handle this packet? + // + if (sm->inspect(sm, buf_this)){ + // s/w handled the packet; refill the buffer + dbsm_receive_to_buf(sm, buf_this); + buffer_state[buf_this] = BS_FILLING; + } - if(buffer_state[buf_other] == BS_EMPTY){ - dbsm_receive_to_buf(sm, buf_other); - buffer_state[buf_other] = BS_FILLING; - } - else - sm->rx_idle = true; + else { // s/w didn't handle this; pass it on - if (sm->tx_idle){ - sm->tx_idle = false; - dbsm_send_from_buf(sm, buf_this); - buffer_state[buf_this] = BS_EMPTYING; - } - } - } - else { // buffer was emptying - buffer_state[buf_this] = BS_EMPTY; - if (sm->rx_idle){ - sm->rx_idle = false; - dbsm_receive_to_buf(sm, buf_this); - buffer_state[buf_this] = BS_FILLING; - } - if (buffer_state[buf_other] == BS_FULL){ - dbsm_send_from_buf(sm, buf_other); - buffer_state[buf_other] = BS_EMPTYING; + if(buffer_state[buf_other] == BS_EMPTY){ + dbsm_receive_to_buf(sm, buf_other); + buffer_state[buf_other] = BS_FILLING; } else - sm->tx_idle = true; + sm->rx_idle = true; + + if (sm->tx_idle){ + sm->tx_idle = false; + dbsm_send_from_buf(sm, buf_this); + buffer_state[buf_this] = BS_EMPTYING; + } + } + } + else { // buffer was emptying + buffer_state[buf_this] = BS_EMPTY; + if (sm->rx_idle){ + sm->rx_idle = false; + dbsm_receive_to_buf(sm, buf_this); + buffer_state[buf_this] = BS_FILLING; + } + if (buffer_state[buf_other] == BS_FULL){ + dbsm_send_from_buf(sm, buf_other); + buffer_state[buf_other] = BS_EMPTYING; } + else + sm->tx_idle = true; } } -- 2.47.2