diff options
-rw-r--r-- | kernel/drivers/net/ieee802154/dw3000_nfcc_coex_mcps.c | 9 | ||||
-rw-r--r-- | kernel/drivers/net/ieee802154/dw3000_spi.c | 2 | ||||
-rwxr-xr-x | mac/fira_crypto.c | 8 |
3 files changed, 14 insertions, 5 deletions
diff --git a/kernel/drivers/net/ieee802154/dw3000_nfcc_coex_mcps.c b/kernel/drivers/net/ieee802154/dw3000_nfcc_coex_mcps.c index 2214859..ce3343c 100644 --- a/kernel/drivers/net/ieee802154/dw3000_nfcc_coex_mcps.c +++ b/kernel/drivers/net/ieee802154/dw3000_nfcc_coex_mcps.c @@ -29,6 +29,7 @@ #include "dw3000_core.h" #define DW3000_NFCC_COEX_WATCHDOG_DEFAULT_DURATION_MS 24000 +#define DW3000_MARGIN_TO_ENTER_IDLE 2 static int dw3000_nfcc_coex_wakeup_and_send(struct dw3000 *dw, s32 idle_duration_dtu, @@ -40,7 +41,13 @@ static int dw3000_nfcc_coex_wakeup_and_send(struct dw3000 *dw, trace_dw3000_nfcc_coex_wakeup_and_send( dw, nfcc_coex->send, idle_duration_dtu, send_timestamp_dtu); - if (idle_duration_dtu > dw->llhw->anticip_dtu) { + if (idle_duration_dtu > + DW3000_MARGIN_TO_ENTER_IDLE * dw->llhw->anticip_dtu) { + /* If idle_duration_dtu is too close to anticip_dtu, the + * idle_delay computed in dw3000_idle might end up negative + * and fail with -ETIME. A DW3000_MARGIN_TO_ENTER_IDLE + * multiplicator is used to avoid this. + */ r = dw3000_idle(dw, true, send_timestamp_dtu, dw3000_nfcc_coex_idle_timeout, DW3000_OP_STATE_MAX); diff --git a/kernel/drivers/net/ieee802154/dw3000_spi.c b/kernel/drivers/net/ieee802154/dw3000_spi.c index cadc9b1..18372c7 100644 --- a/kernel/drivers/net/ieee802154/dw3000_spi.c +++ b/kernel/drivers/net/ieee802154/dw3000_spi.c @@ -116,7 +116,7 @@ static int dw3000_spi_probe(struct spi_device *spi) hrtimer_init(&dw->idle_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); dw->idle_timer.function = dw3000_idle_timeout; - dev_info(dw->dev, "Loading driver...06202023"); + dev_info(dw->dev, "Loading driver...02162024"); dw3000_sysfs_init(dw); /* Setup SPI parameters */ diff --git a/mac/fira_crypto.c b/mac/fira_crypto.c index 3613c9a..3329a75 100755 --- a/mac/fira_crypto.c +++ b/mac/fira_crypto.c @@ -468,9 +468,11 @@ int fira_crypto_rotate_elements(struct fira_crypto *fira_crypto_ctx, if (r) goto error_out; - if (fira_crypto_ctx->base.aead.ctx == NULL) - r = fira_crypto_aead_set_key(&fira_crypto_ctx->base.aead, - fira_crypto_ctx->base.derived_payload_key); + if (fira_crypto_ctx->base.aead.ctx) + fira_crypto_aead_destroy(&fira_crypto_ctx->base.aead); + + r = fira_crypto_aead_set_key(&fira_crypto_ctx->base.aead, + fira_crypto_ctx->base.derived_payload_key); error_out: memzero_explicit(context, sizeof(context)); |