diff options
Diffstat (limited to 'package/utils/rbextract')
-rw-r--r-- | package/utils/rbextract/Makefile | 2 | ||||
-rw-r--r-- | package/utils/rbextract/src/rbextract.c | 14 |
2 files changed, 14 insertions, 2 deletions
diff --git a/package/utils/rbextract/Makefile b/package/utils/rbextract/Makefile index 4bc6898b11..f50bbea120 100644 --- a/package/utils/rbextract/Makefile +++ b/package/utils/rbextract/Makefile @@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=rbextract -PKG_RELEASE:=2 +PKG_RELEASE:=3 CMAKE_INSTALL:=1 include $(INCLUDE_DIR)/package.mk diff --git a/package/utils/rbextract/src/rbextract.c b/package/utils/rbextract/src/rbextract.c index ceed2494a1..e75d74957a 100644 --- a/package/utils/rbextract/src/rbextract.c +++ b/package/utils/rbextract/src/rbextract.c @@ -335,7 +335,7 @@ __rb_get_wlan_data(void) } /* Older ath79-based boards directly show the RB_MAGIC_ERD bytes followed by the LZO-compressed calibration data with no RLE */ - if (magic == RB_MAGIC_ERD) { + else if (magic == RB_MAGIC_ERD) { if (tag_len > RB_ART_SIZE) { printf("Calibration data too large\n"); goto err_free_lzo_in; @@ -362,6 +362,18 @@ __rb_get_wlan_data(void) buf_rle_out = buf_lzo_out; } + /* Even older ath79-base boards directly have RLE-encoded calibration data, + without any LZO compresion nor showing RB_MAGIC_ERD bytes */ + else { + printf("Decode calibration data with RLE\n"); + err = rle_decode(tag, tag_len, buf_rle_out, RB_ART_SIZE, + NULL, NULL); + if (err) { + printf("unable to decode ERD data\n"); + goto err_free_rle_out; + } + } + return buf_rle_out; err_free_rle_out: |