On Mon, Jun 15, 2015 at 09:19:08AM +0200, Peter Korsgaard wrote: > >>>>> "Sascha" == Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> writes: > > Hi, > > >> > + crc_expect = cyg_crc16(data, len); > >> > >> Why crc16? RFC916 states that the checksum is the inverted 1s complement > >> 16bit sum, E.G. like TCP/UDP/IP header checksums: > > > Indeed CRC16 is not correct here according to RFC916. We can implement > > the original checksum algorithm, I'm not sure if that's a good idea > > though. Plain checksumming does not detect lost 0 characters. > > True, but missing/extra 0 characters would normally get caught by the > length mismatch, so I'm not sure it is a real problem. You're probably right. We'll change it to the checksum algorithm according to RFC916. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox