summaryrefslogtreecommitdiff
path: root/cesar/cl
diff options
context:
space:
mode:
authorlaranjeiro2010-04-02 13:40:16 +0000
committerlaranjeiro2010-04-02 13:40:16 +0000
commitc27210167dacf33ba175a38137abeca187c10d5f (patch)
treeb9fb4a961e9f0ebd831b5d3d2152726cd5b36589 /cesar/cl
parent26f7a34ee5288b7fb4bbbf2e9acdd2bde85df6a0 (diff)
cesar/cl: add a config to deactivate the DATA rate by default
Add CONFIG_CL_DATA_RATE=y to reactivate the DATA rate in both ways TX/RX. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@6871 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/cl')
-rw-r--r--cesar/cl/Config1
-rw-r--r--cesar/cl/src/cl.c5
2 files changed, 4 insertions, 2 deletions
diff --git a/cesar/cl/Config b/cesar/cl/Config
index 5412b55ff9..c91d7c649d 100644
--- a/cesar/cl/Config
+++ b/cesar/cl/Config
@@ -2,3 +2,4 @@ CONFIG_GPIO_LED_CL_RX = n
CONFIG_GPIO_LED_CL_RX_GPIO = 0
CONFIG_GPIO_LED_CL_TX = n
CONFIG_GPIO_LED_CL_TX_GPIO = 0
+CONFIG_CL_DATA_RATE=n
diff --git a/cesar/cl/src/cl.c b/cesar/cl/src/cl.c
index e106929d4e..78c55aa74c 100644
--- a/cesar/cl/src/cl.c
+++ b/cesar/cl/src/cl.c
@@ -16,6 +16,7 @@
#include "common/defs/ethernet.h"
#include "lib/bitstream.h"
+#include "config/cl.h"
#include "cl/cl.h"
#include "cl/data_rate.h"
#include "mac/sar/sar.h"
@@ -142,7 +143,7 @@ cl_data_send_with_tei (cl_t *ctx, u8 *buffer, uint length, uint tei,
/* update data rate informations associated to the TX
* from the local sta to the associated sta */
- if (MAC_TEI_IS_STA (tei))
+ if (MAC_TEI_IS_STA (tei) && CONFIG_CL_DATA_RATE)
{
sta = mac_store_sta_get (ctx->mac_store, tei);
if (sta)
@@ -851,7 +852,7 @@ void cl_data_recv (cl_t *ctx, u8 *buffer, uint length, mfs_rx_t *mfs)
* from the associated sta to the local sta */
tei = mfs->common.tei;
- if (MAC_TEI_IS_STA (tei))
+ if (MAC_TEI_IS_STA (tei) && CONFIG_CL_DATA_RATE)
{
sta = mac_store_sta_get (ctx->mac_store, tei);
if (sta)