summaryrefslogtreecommitdiff
path: root/cesar
diff options
context:
space:
mode:
authorlaranjeiro2009-04-09 16:39:14 +0000
committerlaranjeiro2009-04-09 16:39:14 +0000
commitfc477c88a44c779e53e1e53a6af600e9b8e4a047 (patch)
treedd18c9e9b51fae2ced422a008d38d6ad024df105 /cesar
parent9c7e2f505686b09f4e013da8de9fe6b70bd9a2ca (diff)
hle:
* Added the parameter in needed function to transmit the arrival time of the MSDU in NTB ticks git-svn-id: svn+ssh://pessac/svn/cesar/trunk@4440 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar')
-rw-r--r--cesar/cl/stub/src/cl.c4
-rw-r--r--cesar/hle/hle.h7
-rw-r--r--cesar/hle/src/hle.c9
-rw-r--r--cesar/hle/test/src/hle_recv_from_arm.c6
4 files changed, 18 insertions, 8 deletions
diff --git a/cesar/cl/stub/src/cl.c b/cesar/cl/stub/src/cl.c
index 759bae5be1..9560698192 100644
--- a/cesar/cl/stub/src/cl.c
+++ b/cesar/cl/stub/src/cl.c
@@ -55,7 +55,7 @@ void
cl_data_send_done (cl_t *ctx, u8 *buffer, void *cl_data) __attribute__((weak));
void
-cl_data_send (cl_t *cl, u8 *buffer, uint length, uint tag) __attribute__((weak));
+cl_data_send (cl_t *cl, u8 *buffer, uint length, uint tag, u32 av_time) __attribute__((weak));
void
cl_data_recv_init (cl_t *cl, cl_data_recv_cb_t cb, void *user) __attribute__((weak));
@@ -113,7 +113,7 @@ void
cl_data_send_done (cl_t *ctx, u8 *buffer, void *cl_data) {}
void
-cl_data_send (cl_t *cl, u8 *buffer, uint length, uint tag) {}
+cl_data_send (cl_t *cl, u8 *buffer, uint length, uint tag, u32 av_time) {}
void
cl_data_recv_init (cl_t *cl, cl_data_recv_cb_t cb, void *user) {}
diff --git a/cesar/hle/hle.h b/cesar/hle/hle.h
index 4002feb738..96bfa0b4da 100644
--- a/cesar/hle/hle.h
+++ b/cesar/hle/hle.h
@@ -71,13 +71,16 @@ void hle_uninit (hle_t *hle);
/**
* Send a data to the Convergence Layer to be sent over the PWL.
- *
+ *
* \param hle the hle context.
* \param buffer the buffer containing the data to send.
* \param length the data length
* \param tag the priority tag provided by the upper layer.
+ * \param arrival_time_ntb arrival time in the station in NTB.
*/
-void hle_data_send (hle_t *hle, u8 *buffer, uint length, uint tag);
+void
+hle_data_send (hle_t *ctx, u8 *buffer, uint length, uint tag,
+ u32 arrival_time_ntb);
/**
* Receives a data from the Convergence layer.
diff --git a/cesar/hle/src/hle.c b/cesar/hle/src/hle.c
index 513a3149a6..16c686c739 100644
--- a/cesar/hle/src/hle.c
+++ b/cesar/hle/src/hle.c
@@ -109,8 +109,11 @@ hle_init_interface_cb (hle_t *ctx, hle_interface_buffer_add_cb_t buffer_cb,
* \param buffer the buffer containing the data to send.
* \param length the data length
* \param tag the priority tag provided by the upper layer.
+ * \param arrival_time_ntb arrival time in the station in NTB.
*/
-void hle_data_send (hle_t *ctx, u8 *buffer, uint length, uint tag)
+void
+hle_data_send (hle_t *ctx, u8 *buffer, uint length, uint tag,
+ u32 arrival_time_ntb)
{
dbg_assert (ctx);
dbg_assert (buffer);
@@ -119,7 +122,7 @@ void hle_data_send (hle_t *ctx, u8 *buffer, uint length, uint tag)
/* tracing data */
HLE_TRACE(DATA_SEND, mac_ntb(), length, buffer);
- cl_data_send (ctx->cl, buffer, length, tag);
+ cl_data_send (ctx->cl, buffer, length, tag, arrival_time_ntb);
}
/**
@@ -295,7 +298,7 @@ bool hle_ipmbox_recv (hle_t *ctx, u32 *msg_buffer, uint length)
{
uint tag = BF_GET (IPMBOX_REG__PARAM_MSG_PRIO, msg);
hle_data_send (ctx,
- (u8 *) msg_buffer[length_processed + 1], data_length, tag);
+ (u8 *) msg_buffer[length_processed + 1], data_length, tag, mac_ntb());
}
else
hle_mme_send (ctx,
diff --git a/cesar/hle/test/src/hle_recv_from_arm.c b/cesar/hle/test/src/hle_recv_from_arm.c
index bd3822934b..2e8ffa9329 100644
--- a/cesar/hle/test/src/hle_recv_from_arm.c
+++ b/cesar/hle/test/src/hle_recv_from_arm.c
@@ -62,7 +62,7 @@ static u8 *cl_mme_buffer;
static u8 *buffers;
void
-cl_data_send (cl_t *cl, u8 *buffer, uint length, uint tag)
+cl_data_send (cl_t *cl, u8 *buffer, uint length, uint tag, u32 av_time)
{
cl_data_length = length;
cl_data_buffer = buffer;
@@ -239,10 +239,14 @@ test_case__hle_recv_interface_msg_type (test_t test)
int main (void)
{
+ uint phy = 0;
+ uint mac_config = 0;
test_t test;
test_init (test, 0, NULL);
+ mac_ntb_init ((phy_t *) &phy, (mac_config_t *) &mac_config);
+
test_case__hle_recv_data_send_to_cl (test);
test_case__hle_recv_buffer (test);
test_case__hle_recv_interface_msg_type (test);