generic: platform/mikrotik: fix LZOR support
authorThibaut VARÈNE <hacks@slashdirt.org>
Sat, 16 May 2020 15:12:06 +0000 (17:12 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 16 May 2020 18:32:20 +0000 (20:32 +0200)
commit85e04e9f46bf68a8a35e2578ea4083cbf44f12f6
tree04b3c0cecd15b0299b3d59841a0f096da744713a
parent4cd9ae41c5f7fd4de6d9a2970f8243c9555428a7
generic: platform/mikrotik: fix LZOR support

31e99fe3da which introduced this code was unfortunately untested.
This commit fixes a number of issues and works around the fact that in
this particular scheme, the LZO payload may be padded at the end which
will trigger a harmless lzo decompression error.
This commit also disambiguates the debug printks.

Tested-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
Fixes: 31e99fe3da ("generic: platform/mikrotik: support LZOR encoding")
(cherry picked from commit 2ea481193c1654c9cb42aa0331cdbc4570783e26)
target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c