SPI Ethernet packet length clarification
uhi22 opened this issue · 3 comments
In
ccs32clara/sharedsource/ccs/qca7000.c
Line 123 in a4c4c58
According to https://openinverter.org/forum/viewtopic.php?p=62491#p62491 the frame size may not always be correct.
Thanks for the reply! (this is olegiv)
That's what I figured, if you have to check this condition, then it looks like the QCA frame size may not always be correct?
or there may be additional information here in the case of if ((p[4]=0xAA) && (p[5]=0xAA) && (p[6]=0xAA) && (p[7]=0xAA) && (L2+10!=L1))
The plausibilization of the length is just an additional method to avoid, that we interpret "random" data as valid frame. Imagine, that due to electromagnetic influence we see garbage on the SPI, 0xAA, 0xAA, and so on. We would take this as valid frame, but the length check discovers the garbage and we discard it.
I did not see any case where the QCA intentionally violated the length rule.
Closing this issue due to inactivity and no open points.