From 0fbdfefebc30e389c69f132abda42f79bf8bd620 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Fri, 18 Sep 2020 20:11:14 +0200 Subject: arch: x86: Fix convolve optimizations breaking signal This patch fixes MS failing to even see the network, and only RACHs of 1 zeroed byte being seen in GSMTAP. The issue seems to only appear on some specific machines; others have been running fine for weeks without this memset being an issue. Fixes: 7a52e42ee0676f47e801dd348b478302de5d2e50 Change-Id: I98ad885a5d71e7775973a4d881c0f1cd665ea711 --- Transceiver52M/arch/x86/convolve.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Transceiver52M/arch/x86/convolve.c b/Transceiver52M/arch/x86/convolve.c index 81ea782..be62721 100644 --- a/Transceiver52M/arch/x86/convolve.c +++ b/Transceiver52M/arch/x86/convolve.c @@ -102,9 +102,9 @@ int convolve_real(const float *x, int x_len, #ifndef __OPTIMIZE__ if (bounds_check(x_len, h_len, y_len, start, len) < 0) return -1; - - memset(y, 0, len * 2 * sizeof(float)); #endif + memset(y, 0, len * 2 * sizeof(float)); + switch (h_len) { case 4: c.conv_real4(x, x_len, h, h_len, y, y_len, start, len); @@ -142,9 +142,9 @@ int convolve_complex(const float *x, int x_len, #ifndef __OPTIMIZE__ if (bounds_check(x_len, h_len, y_len, start, len) < 0) return -1; - - memset(y, 0, len * 2 * sizeof(float)); #endif + memset(y, 0, len * 2 * sizeof(float)); + if (!(h_len % 8)) c.conv_cmplx_8n(x, x_len, h, h_len, y, y_len, start, len); else if (!(h_len % 4)) -- cgit v1.2.3