From: George Spelvin <lkml@SDF.ORG>
To: Ajay.Kathat@microchip.com
Cc: Adham.Abozaeid@microchip.com, linux-wireless@vger.kernel.org,
lkml@sdf.org
Subject: Re: [PATCH] wilc1000: Use crc7 in lib/ rather than a private copy
Date: Mon, 23 Mar 2020 06:45:58 +0000 [thread overview]
Message-ID: <20200323064558.GC19411@SDF.ORG> (raw)
In-Reply-To: <2315a030-75ad-0383-3aa3-25528d2cd29a@microchip.com>
On Mon, Mar 23, 2020 at 05:03:02AM +0000, Ajay.Kathat@microchip.com wrote:
> On 22/03/20 5:34 pm, George Spelvin wrote:
>> The code in lib/ is the desired polynomial, and even includes
>> the 1-bit left shift in the table rather than needing to code
>> it explicitly.
>
> These changes will break functionality. The crc7 used in 'wilc' is based
> on the previous revision(commit# ad241528c491). The new changes can not
> be adopted from 'wilc' device side because the crc calculation is done
> on hardware IP and it expects the value based the older implementation.
I'm confused. Both crc7 functions compute the exact same value.
I put them in a test harness and checked that they produce identical
output before submitting.
The only difference is that the implementation I deleted does
crc = 0x7f;
while (len--)
crc = crc_cyndrome_table[(crc << 1) ^ *byte++];
return crc << 1;
while the lib/crc7.c code maintains its "crc" state value already
shifted left 1 bit, so it can use the simpler loop:
crc = 0xfe; /* 0x7f << 1 */
while (len--)
crc = crc_cyndrome_table2[crc ^ *byte++];
return crc;
It's not a different CRC-7, it's the *exact same* CRC-7. You can
see that the syndrome tables are identical, just shifted one bit over.
> It seems you are using an old version of 'wilc' driver. This logic is
> already changed in the latest code. We have remove custom behavior to
> decide p2p role (P2P_Go/P2P_Client) between 2 wilc devices based on
> 'local_random' value and now relies on 'intent' value received from 'wpa_s'.
> To submit changes for wilc, please use 'staging-next' branch of
> https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git repo.
Ah, thanks. Sorry for the noise, then. The rcr7 patch still applies,
however.
next prev parent reply other threads:[~2020-03-23 6:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-22 12:04 [PATCH] wilc1000: Use crc7 in lib/ rather than a private copy George Spelvin
2020-03-23 5:03 ` Ajay.Kathat
2020-03-23 6:45 ` George Spelvin [this message]
2020-03-23 8:22 ` Ajay.Kathat
2020-03-23 14:14 ` [PATCH v2] " George Spelvin
2020-03-23 16:29 ` Ajay.Kathat
2020-03-26 14:54 ` Ajay.Kathat
2020-03-26 14:57 ` Greg KH
2020-03-23 17:05 ` George Spelvin
2020-03-24 7:19 ` Ajay.Kathat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200323064558.GC19411@SDF.ORG \
--to=lkml@sdf.org \
--cc=Adham.Abozaeid@microchip.com \
--cc=Ajay.Kathat@microchip.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).