From db9f7f48ee970eebfbfac1e479ecba589e3d7d0b Mon Sep 17 00:00:00 2001 From: Michael Adisumarta Date: Fri, 11 Dec 2020 02:09:03 -0800 Subject: [PATCH] msm: ipa: Add a check to see if mtu is set or SET_MTU IOCTL Add an check for mtu set before sending an event to IPACM so MTU will always be nonzero. Change-Id: Ib8954865ba46743e143d72cf15d8bbce282aa013 Signed-off-by: Michael Adisumarta --- drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c b/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c index 4e447e453acb..de5d8d7ac681 100644 --- a/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c +++ b/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c @@ -2144,11 +2144,12 @@ static int ipa3_wwan_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) if (mtu_v4_set && mtu_v6_set) iptype = IPA_IP_MAX; - rc = rmnet_ipa_send_set_mtu_notification( - ext_ioctl_data.u.mtu_params.if_name, - mux_channel[rmnet_index].mtu_v4, - mux_channel[rmnet_index].mtu_v6, - iptype); + if (mtu_v4_set || mtu_v6_set) + rc = rmnet_ipa_send_set_mtu_notification( + ext_ioctl_data.u.mtu_params.if_name, + mux_channel[rmnet_index].mtu_v4, + mux_channel[rmnet_index].mtu_v6, + iptype); break; default: