net: qualcomm: rmnet: Update rmnet device MTU based on real device
authorSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Thu, 10 Dec 2020 05:51:46 +0000 (22:51 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Dec 2020 21:30:26 +0000 (13:30 -0800)
commitb7f5eb6ba21b0b54b04918fc9df13309ff3c67b8
treeb7f65d507af669f1e7f4f1514784c665e3f190cf
parent3b0c860f872da622a39707bda11064395199836f
net: qualcomm: rmnet: Update rmnet device MTU based on real device

Packets sent by rmnet to the real device have variable MAP header
lengths based on the data format configured. This patch adds checks
to ensure that the real device MTU is sufficient to transmit the MAP
packet comprising of the MAP header and the IP packet. This check
is enforced when rmnet devices are created and updated and during
MTU updates of both the rmnet and real device.

Additionally, rmnet devices now have a default MTU configured which
accounts for the real device MTU and the headroom based on the data
format.

Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Tested-by: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h
drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c
drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.h