diff --git a/tools/scripts/ath10k/ath10k-bdencoder b/tools/scripts/ath10k/ath10k-bdencoder index 5285394..602560b 100755 --- a/tools/scripts/ath10k/ath10k-bdencoder +++ b/tools/scripts/ath10k/ath10k-bdencoder @@ -105,7 +105,8 @@ class BoardName(): def parse_ie(buf, offset, length): self = BoardName() fmt = '<%ds' % length - (self.name, ) = struct.unpack_from(fmt, buf, offset) + (name, ) = struct.unpack_from(fmt, buf, offset) + self.name = name.decode('utf-8') logging.debug('BoardName.parse_ie(): offset %d length %d self %s' % (offset, length, self)) @@ -117,7 +118,7 @@ class BoardName(): if ebdf: ie_id = ATH10K_BD_IE_BOARD_EXT_NAME - return add_ie(buf, offset, ie_id, str(self.name)) + return add_ie(buf, offset, ie_id, self.name.encode('utf-8')) def __eq__(self, other): return self.name == other.name @@ -310,7 +311,7 @@ class BoardContainer: allnames.append(name) def _add_signature(self, buf, offset): - signature = ATH10K_BOARD_SIGNATURE + '\0' + signature = (ATH10K_BOARD_SIGNATURE + '\0').encode('utf-8') length = len(signature) pad_len = padding_needed(length) length = length + pad_len @@ -321,7 +322,7 @@ class BoardContainer: struct.pack_into('