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 <madisuma@codeaurora.org>
This commit is contained in:
Michael Adisumarta 2020-12-11 02:09:03 -08:00 • committed by Gerrit - the friendly Code Review server
commit db9f7f48ee

View file

@ -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: