qtnfmac: cleanup alignment in firmware communication protocol
authorIgor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Mon, 27 Jan 2020 10:46:53 +0000 (10:46 +0000)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 12 Feb 2020 16:16:46 +0000 (18:16 +0200)
commit8b0b5f1ba9e02191aedb496abbfdae174c24c85b
tree7625a6d773349efdf5bb8350ccd23d368207a2c3
parent0d18a9c0a387652c51fd78e945ab47efd8afc220
qtnfmac: cleanup alignment in firmware communication protocol

Make sure that all elements in QLINK protocol message are aligned to
4 bytes. For this purpose add necessary amount of padding bytes to
each message. Besides, add padding for non-aligned variable length
fields, e.g. SSID, so that the first byte of the next variable length
element is aligned. to 4 bytes. Finally, introduce TLV parsing helpers
to reduce boilerplate TLV parsing code.

Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/quantenna/qtnfmac/commands.c
drivers/net/wireless/quantenna/qtnfmac/event.c
drivers/net/wireless/quantenna/qtnfmac/qlink.h
drivers/net/wireless/quantenna/qtnfmac/qlink_util.h