firmware-utils: mktplinkfw2: support additional hardware version
authorPiotr Dymacz <pepe2k@gmail.com>
Wed, 21 Jun 2017 12:15:55 +0000 (14:15 +0200)
committerPiotr Dymacz <pepe2k@gmail.com>
Thu, 29 Jun 2017 08:37:36 +0000 (10:37 +0200)
commit4b35e174caa5bb85604e856a5f2e50fd970599db
tree9d4c611e339b4ba383b4a95d57ac79601626d144
parentad8c31581203fad8fc69d4680c6c2d29289041ae
firmware-utils: mktplinkfw2: support additional hardware version

As it turned out, some of new MediaTek based TP-Link devices use value
from field at 0x3c offset in version 3 of TP-Link header to specify
"Additional Hardware Version".

Value from this field is validated during regular (GUI) firmware upgrade
on devices like TL-WR840N v4 or TL-WR841N v13. If it's zero (based on
some tests, it seems that firmware will accept anything != 0), errors
like below are printed on console and upgrade fails:

[ rsl_sys_updateFirmware ] 2137:  Firmware Additional HardwareVersion
check failed

[ rdp_updateFirmware ] 345:  perror:4506

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
tools/firmware-utils/src/mktplinkfw2.c