From: Christian Lamparter Date: Tue, 19 Oct 2010 18:38:50 +0000 (+0200) Subject: carlu: move from private carl9170_tx_status to public _carl9170_tx_status X-Git-Tag: 1.9.1~5 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=a5cc1f3fc4462940dd9fabb45a865d372d24d1f4;p=carl9170fw.git carlu: move from private carl9170_tx_status to public _carl9170_tx_status Signed-off-by: Christian Lamparter --- diff --git a/tools/carlu/src/test.c b/tools/carlu/src/test.c index d31060d..148f89a 100644 --- a/tools/carlu/src/test.c +++ b/tools/carlu/src/test.c @@ -83,12 +83,9 @@ static int carlu_loopback_cmd(struct carlu *ar __unused, dbg("received tx feedback (%d).\n", n); for (i = 0; i < n; i++) { - dbg("cookie:%x success:%d rix:%d tries:%d queue:%d\n", - cmd->tx_status[i].cookie, - cmd->tx_status[i].success, - cmd->tx_status[i].rix, - cmd->tx_status[i].tries, - cmd->tx_status[i].queue); + dbg("cookie:%x info:%x\n", + cmd->_tx_status[i].cookie, + cmd->_tx_status[i].info); } return -1; @@ -201,7 +198,7 @@ int carlu_gpio_test(struct carlu *ar) #define CHK(cmd) \ do { \ int __err; \ - if (__err = cmd) \ + if ((__err = cmd)) \ return __err; \ } while (0) diff --git a/tools/carlu/src/tx.c b/tools/carlu/src/tx.c index 55d2677..ea3e81f 100644 --- a/tools/carlu/src/tx.c +++ b/tools/carlu/src/tx.c @@ -137,21 +137,25 @@ static void carlu_tx_fb_cb(struct carlu *ar, void carlu_tx_feedback(struct carlu *ar, struct carl9170_rsp *cmd) { - unsigned int i, n, k; + unsigned int i, n, k, q; struct frame *frame; struct carlu_tx_info *tx_info; n = cmd->hdr.ext; for (i = 0; i < n; i++) { - frame = carlu_find_frame(ar, cmd->tx_status[i].queue, - cmd->tx_status[i].cookie); + q = (cmd->_tx_status[i].info >> CARL9170_TX_STATUS_QUEUE_S) & + CARL9170_TX_STATUS_QUEUE; + frame = carlu_find_frame(ar, q, cmd->_tx_status[i].cookie); if (frame) { carlu_free_dev_mem(ar, frame); tx_info = get_tx_info(frame); - k = cmd->tx_status[i].rix; - tx_info->rates[k].cnt = cmd->tx_status[i].tries; + k = (cmd->_tx_status[i].info >> CARL9170_TX_STATUS_RIX) + & CARL9170_TX_STATUS_RIX_S; + tx_info->rates[k].cnt = (cmd->_tx_status[i].info >> + CARL9170_TX_STATUS_TRIES_S) & + CARL9170_TX_STATUS_TRIES; for (k++; k < CARL9170_TX_MAX_RATES; k++) { tx_info->rates[k].rix = -1; tx_info->rates[k].cnt = -1; @@ -160,7 +164,7 @@ void carlu_tx_feedback(struct carlu *ar, carlu_tx_fb_cb(ar, frame); } else { err("Found no frame for cookie %d.\n", - cmd->tx_status[i].cookie); + cmd->_tx_status[i].cookie); } } }