net: ipa: ignore endianness if there is no header
authorAlex Elder <elder@linaro.org>
Thu, 19 May 2022 15:12:13 +0000 (10:12 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:39 +0000 (10:22 +0200)
commitd295f28cb6ebf3668bfd7750e4209ee6a4717b74
tree390457175ecf8ebe34ad1d1893a4a44df10efeb6
parent6f516847427c186f4c71a369400379ff1a589ebf
net: ipa: ignore endianness if there is no header

[ Upstream commit 332ef7c814bdd60f08d0d9013d0e1104798b2d23 ]

If we program an RX endpoint to have no header (header length is 0),
header-related endpoint configuration values are meaningless and are
ignored.

The only case we support that defines a header is QMAP endpoints.
In ipa_endpoint_init_hdr_ext() we set the endianness mask value
unconditionally, but it should not be done if there is no header
(meaning it is not configured for QMAP).

Set the endianness conditionally, and rearrange the logic in that
function slightly to avoid testing the qmap flag twice.

Delete an incorrect comment in ipa_endpoint_init_aggr().

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ipa/ipa_endpoint.c