Search Linux Wireless

Re: [PATCH] wilc1000: Use crc7 in lib/ rather than a private copy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 23, 2020 at 05:03:02AM +0000, Ajay.Kathat@xxxxxxxxxxxxx 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.



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux