diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-07-14 01:44:10 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-07-14 01:44:10 +0200 |
commit | b492b1aac3d12683ccbc973b08b023ba0466cbec (patch) | |
tree | 09f6d3d0cc3725b62a5c9210220e14316b737622 /dma/nwl_loopback.c | |
parent | 9f17f71885344d93b16fdc17458aa28ba350a480 (diff) | |
download | ipecamera-b492b1aac3d12683ccbc973b08b023ba0466cbec.tar.gz ipecamera-b492b1aac3d12683ccbc973b08b023ba0466cbec.tar.bz2 ipecamera-b492b1aac3d12683ccbc973b08b023ba0466cbec.tar.xz ipecamera-b492b1aac3d12683ccbc973b08b023ba0466cbec.zip |
Support modifications of DMA engine and allow DMA customizations by Event engine
Diffstat (limited to 'dma/nwl_loopback.c')
-rw-r--r-- | dma/nwl_loopback.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/dma/nwl_loopback.c b/dma/nwl_loopback.c index 9c74b14..a31bd08 100644 --- a/dma/nwl_loopback.c +++ b/dma/nwl_loopback.c @@ -43,11 +43,12 @@ int dma_nwl_start_loopback(nwl_dma_t *ctx, pcilib_dma_direction_t direction, si int dma_nwl_stop_loopback(nwl_dma_t *ctx) { uint32_t val = 0; - if (ctx->loopback_started) { - nwl_write_register(val, ctx, ctx->base_addr, TX_CONFIG_ADDRESS); - nwl_write_register(val, ctx, ctx->base_addr, RX_CONFIG_ADDRESS); - ctx->loopback_started = 0; - } + /* Stop in any case, otherwise we can have problems in benchmark due to + engine initialized in previous run, and benchmark is only actual usage. + Otherwise, we should detect current loopback status during initialization */ + nwl_write_register(val, ctx, ctx->base_addr, TX_CONFIG_ADDRESS); + nwl_write_register(val, ctx, ctx->base_addr, RX_CONFIG_ADDRESS); + ctx->loopback_started = 0; return 0; } |