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)
commit500dd04724f2a89b0e532dffe5259abd6e84242f
tree991eae27a7c5df73faf39cb01c7a28557afe8ad2
parentba71ad2af81b46853584b03c83f41e619eb7495a
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>
src/mktplinkfw2.c