summaryrefslogtreecommitdiff
path: root/hal/phy
diff options
context:
space:
mode:
authorburet2007-11-08 14:59:25 +0000
committerburet2007-11-08 14:59:25 +0000
commit2136e248dd510bcc68bd9a844faed23819fa3c0e (patch)
tree248ca08a3226c3d65fca214a78c5788de2ec71b6 /hal/phy
parent645e9968de66a7cda60e60408a9568f5a02c05bc (diff)
Maximus HAL PHY: Fixes #41
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@974 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'hal/phy')
-rw-r--r--hal/phy/maximus/src/maximus_phy_ctrl.c1
-rw-r--r--hal/phy/maximus/src/maximus_phy_ctrl_cb.c1
-rw-r--r--hal/phy/maximus/test/src/test_phy_ctrl.c11
3 files changed, 5 insertions, 8 deletions
diff --git a/hal/phy/maximus/src/maximus_phy_ctrl.c b/hal/phy/maximus/src/maximus_phy_ctrl.c
index d2a2fb2390..1292551dee 100644
--- a/hal/phy/maximus/src/maximus_phy_ctrl.c
+++ b/hal/phy/maximus/src/maximus_phy_ctrl.c
@@ -734,7 +734,6 @@ maximus_phy_recv_mpdu_payload (phy_t *ctx, sci_msg_t *msg)
ctx->pbdma.status_word.pb_crc_error = 1;
}
ctx->pbdma.status_word.end_rx_pb = 1;
- maximus_pending_isrs |= (1 << PHY_HAL_INTERRUPT_PBDMA);
}
ret = 0;
diff --git a/hal/phy/maximus/src/maximus_phy_ctrl_cb.c b/hal/phy/maximus/src/maximus_phy_ctrl_cb.c
index e1f0c7143e..7ddb07a152 100644
--- a/hal/phy/maximus/src/maximus_phy_ctrl_cb.c
+++ b/hal/phy/maximus/src/maximus_phy_ctrl_cb.c
@@ -656,7 +656,6 @@ maximus_phy_tx_mpdu_cb (void *data)
if (ctx->pbdma.index_current_pb == ctx->pbdma.nb_total)
{
ctx->pbdma.status_word.end_tx_pb = 1; // it is the end of a PB transfer
- maximus_pending_isrs |= (1 << PHY_HAL_INTERRUPT_PBDMA);
}
}
}
diff --git a/hal/phy/maximus/test/src/test_phy_ctrl.c b/hal/phy/maximus/test/src/test_phy_ctrl.c
index 2600e52b49..4074cb00ff 100644
--- a/hal/phy/maximus/test/src/test_phy_ctrl.c
+++ b/hal/phy/maximus/test/src/test_phy_ctrl.c
@@ -608,12 +608,12 @@ void maximus_phy_recv_test_case(test_t t)
test_fail_unless ((maximus_pending_isrs & (1 << PHY_HAL_INTERRUPT_PBDMA))
&& (0 == ctx->pbdma.status_word.pb_null)
&& (0 == ctx->pbdma.status_word.null_pb_index)
+ && (1 == ctx->pbdma.status_word.pb_it)
&& (1 == ctx->pbdma.status_word.end_rx_pb)
&& !ctx->control.rx_prepared);
+ // pb_it
ctx->pbdma.status_word.end_rx_pb = 0;
(*ctx->control.pbdma_cb)(ctx->control.user_data, (*(u32*)(void*)&(ctx->pbdma.status_word)));
- ctx->pbdma.status_word.end_rx_pb = 1;
- (*ctx->control.pbdma_cb)(ctx->control.user_data, (*(u32*)(void*)&(ctx->pbdma.status_word)));
maximus_pending_isrs &= (0 << PHY_HAL_INTERRUPT_PBDMA);
}
// test PRS
@@ -1449,10 +1449,9 @@ void phy_tx_frame_test_case(test_t t)
&& (0 == ctx->pbdma.status_word.null_pb_index)
&& (1 == ctx->pbdma.status_word.pb_it)
&& (1 == ctx->pbdma.status_word.end_tx_pb));
+ // pb_it
ctx->pbdma.status_word.end_tx_pb = 0;
(*ctx->control.pbdma_cb)(ctx->control.user_data, (*(u32*)(void*)&(ctx->pbdma.status_word)));
- ctx->pbdma.status_word.end_tx_pb = 1;
- (*ctx->control.pbdma_cb)(ctx->control.user_data, (*(u32*)(void*)&(ctx->pbdma.status_word)));
maximus_pending_isrs &= (0 << PHY_HAL_INTERRUPT_PBDMA);
} test_end;
@@ -1705,11 +1704,11 @@ void maximus_phy_send_test_case(test_t t)
&& (maximus_pending_isrs & (1 << PHY_HAL_INTERRUPT_PBDMA))
&& (0 == ctx->pbdma.status_word.pb_null)
&& (0 == ctx->pbdma.status_word.null_pb_index)
+ && (1 == ctx->pbdma.status_word.pb_it)
&& (1 == ctx->pbdma.status_word.end_tx_pb));
+ // pb_it
ctx->pbdma.status_word.end_tx_pb = 0;
(*ctx->control.pbdma_cb)(ctx->control.user_data, (*(u32*)(void*)&(ctx->pbdma.status_word)));
- ctx->pbdma.status_word.end_tx_pb = 1;
- (*ctx->control.pbdma_cb)(ctx->control.user_data, (*(u32*)(void*)&(ctx->pbdma.status_word)));
maximus_pending_isrs &= (0 << PHY_HAL_INTERRUPT_PBDMA);
// check that the correct phy messages have been sent to Maximus