diff options
author | Jeremy Rocher <jeremy.rocher@qorvo.com> | 2024-02-16 11:50:02 +0100 |
---|---|---|
committer | Victor Liu <victorliu@google.com> | 2024-02-16 11:08:24 -0800 |
commit | 20eeeaf070d6d2bb4021848e70a58b6bab9ca129 (patch) | |
tree | 621a9a9e6a9d690e0be2eda9364ddc57d2fcef98 | |
parent | ab669fdc037be92576600c4014e711dab6a53862 (diff) | |
download | dw3000-android-gs-pantah-5.10-android14-qpr3-beta.tar.gz |
[R-4.2.0] uwb: update dw3000 driverandroid-u-qpr3-beta-2.1_r0.7android-u-qpr3-beta-2.1_r0.5android-u-qpr3-beta-2.1_r0.4android-u-qpr3-beta-2.1_r0.3android-u-qpr3-beta-2.1_r0.2android-u-qpr3-beta-2.1_r0.1android-15-dp-2_r0.5android-15-dp-2_r0.4android-15-beta-2_r0.6android-15-beta-2_r0.5android-15-beta-2_r0.4android-15-beta-2_r0.3android-15-beta-2_r0.2android-15-beta-2_r0.1android-15-beta-1_r0.6android-15-beta-1_r0.5android-15-beta-1_r0.4android-15-beta-1_r0.3android-15-beta-1_r0.2android-15-beta-1_r0.1android-gs-tangorpro-5.10-android15-dpandroid-gs-tangorpro-5.10-android15-betaandroid-gs-tangorpro-5.10-android14-qpr3-betaandroid-gs-raviole-5.10-android15-dpandroid-gs-raviole-5.10-android15-betaandroid-gs-raviole-5.10-android14-qpr3-betaandroid-gs-pantah-5.10-android15-dpandroid-gs-pantah-5.10-android15-betaandroid-gs-pantah-5.10-android14-qpr3-betaandroid-gs-lynx-5.10-android15-dpandroid-gs-lynx-5.10-android15-betaandroid-gs-lynx-5.10-android14-qpr3-betaandroid-gs-felix-5.10-android15-dpandroid-gs-felix-5.10-android15-betaandroid-gs-felix-5.10-android14-qpr3-betaandroid-gs-bluejay-5.10-android15-dpandroid-gs-bluejay-5.10-android15-betaandroid-gs-bluejay-5.10-android14-qpr3-beta
* P-STS: fix key rotation
* CCC: Fix ETIME error on idle_duration close to anticip_dtu
Bug: 321792737
Bug: 316371073
Bug: 315336416
Bug: 320736554
Change-Id: Ic01c66d2a3022f1ae1b9f90d24c93f09f40c205f
Signed-off-by: Jeremy Rocher <jeremy.rocher@qorvo.com>
-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)); |