projects
/
carl9170fw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
carl9170 firmware: toolchain newlib 1.20.0
[carl9170fw.git]
/
tools
/
carlu
/
src
/
tx.c
diff --git
a/tools/carlu/src/tx.c
b/tools/carlu/src/tx.c
index 55d2677857908c90e5102c43aa2fdcdb659c45ec..ec97502038f0e5a3c8c68f1c35ae6c2e901d95ce 100644
(file)
--- a/
tools/carlu/src/tx.c
+++ b/
tools/carlu/src/tx.c
@@
-1,9
+1,9
@@
/*
/*
- * carl
9170user
- userspace testing utility for ar9170 devices
+ * carl
u
- userspace testing utility for ar9170 devices
*
* xmit - related functions
*
*
* xmit - related functions
*
- * Copyright 2009
, 2010
Christian Lamparter <chunkeey@googlemail.com>
+ * Copyright 2009
-2011
Christian Lamparter <chunkeey@googlemail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-137,21
+137,25
@@
static void carlu_tx_fb_cb(struct carlu *ar,
void carlu_tx_feedback(struct carlu *ar,
struct carl9170_rsp *cmd)
{
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++) {
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);
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;
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",
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);
}
}
}
}
}
}
@@
-184,7
+188,7
@@
int carlu_tx(struct carlu *ar, struct frame *frame)
txp->s.len = cpu_to_le16(frame->len);
txp->s.len = cpu_to_le16(frame->len);
- queue =
ar9170_qmap[frame->queue % ARRAY_SIZE(ar9170_qmap)]
;
+ queue =
(frame->queue % __AR9170_NUM_TXQ)
;
SET_VAL(CARL9170_TX_SUPER_MISC_QUEUE, txp->s.misc, queue);
SET_VAL(CARL9170_TX_SUPER_MISC_QUEUE, txp->s.misc, queue);