From aa6deb6c22cb094112327f93103d0d0f7db949b3 Mon Sep 17 00:00:00 2001 From: Amar Singhal Date: Fri, 25 May 2018 16:00:25 -0700 Subject: [PATCH] Revert "qcacmn: Use the right index while accessing ipv6 array" This reverts change-Id I38eb1d3be2840bfbb5fdc9c72606ce. Zero_comp value can be 0 also; so revert the change. Change-Id: I7ab10c20c74d005009f435d483d39e138687a547 CRs-Fixed: 2233854 --- qdf/src/qdf_types.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qdf/src/qdf_types.c b/qdf/src/qdf_types.c index cb201e782c37..5886aa5082d9 100644 --- a/qdf/src/qdf_types.c +++ b/qdf/src/qdf_types.c @@ -512,8 +512,8 @@ QDF_STATUS qdf_ipv6_parse(const char *ipv6_str, struct qdf_ipv6_addr *out_addr) /* shift lower hextets if zero compressed */ if (zero_comp >= 0) { uint8_t shift = QDF_IPV6_ADDR_HEXTET_COUNT - hextets_found; - void *to = &addr.bytes[((zero_comp - 1) + shift) *2]; - void *from = &addr.bytes[(zero_comp - 1) *2]; + void *to = &addr.bytes[(zero_comp + shift) * 2]; + void *from = &addr.bytes[zero_comp * 2]; qdf_mem_move(to, from, (hextets_found - zero_comp) * 2); qdf_mem_set(from, shift * 2, 0);