net: wwan: iosm: release data channel in case no active IP session
authorM Chetan Kumar <m.chetan.kumar@linux.intel.com>
Thu, 9 Dec 2021 14:32:28 +0000 (20:02 +0530)
committerJakub Kicinski <kuba@kernel.org>
Sat, 11 Dec 2021 04:53:56 +0000 (20:53 -0800)
commitda633aa3163fe1019c9e85333a17b74a5b99f5ac
tree1eb55e9c2c657994ac6c7fb41458b40f1ce1f93f
parent5d710dc3318c981475780158c17a8725bdcc6a5d
net: wwan: iosm: release data channel in case no active IP session

If there is no active IP session (interface up & running) then
release the data channel.

Use nr_sessions variable to track current active IP sessions.
If the count drops to 0, then send pipe close ctrl message to
release the data channel.

Signed-off-by: M Chetan Kumar <m.chetan.kumar@linux.intel.com>
Reviewed-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/wwan/iosm/iosm_ipc_imem.c
drivers/net/wwan/iosm/iosm_ipc_mux.c
drivers/net/wwan/iosm/iosm_ipc_mux.h
drivers/net/wwan/iosm/iosm_ipc_mux_codec.c