]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf1214cbf647a0734d976845dae6ccccc8b2d83a2
treeb7f65d507af669f1e7f4f1514784c665e3f190cf
parent0a2ef0c3f9efb37cefa71ef3e9f5f08706a60f13
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