Skip to content

Commit

Permalink
net: iosm: drop custom netdev(s) removing
Browse files Browse the repository at this point in the history
Since the last commit, the WWAN core will remove all our network
interfaces for us at the time of the WWAN netdev ops unregistering.
Therefore, we can safely drop the custom code that cleans the list of
created netdevs. Anyway it no longer removes any netdev, since all
netdevs were removed earlier in the wwan_unregister_ops() call.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Reviewed-by: M Chetan Kumar <m.chetan.kumar@intel.com>
CC: M Chetan Kumar <m.chetan.kumar@intel.com>
CC: Intel Corporation <linuxwwan@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sergey Ryazanov authored and David S. Miller committed Jun 22, 2021
1 parent 2f75238 commit 322a0ba
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions drivers/net/wwan/iosm/iosm_ipc_wwan.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,22 +329,9 @@ struct iosm_wwan *ipc_wwan_init(struct iosm_imem *ipc_imem, struct device *dev)

void ipc_wwan_deinit(struct iosm_wwan *ipc_wwan)
{
int if_id;

/* This call will remove all child netdev(s) */
wwan_unregister_ops(ipc_wwan->dev);

for (if_id = 0; if_id < ARRAY_SIZE(ipc_wwan->sub_netlist); if_id++) {
struct iosm_netdev_priv *priv;

priv = rcu_access_pointer(ipc_wwan->sub_netlist[if_id]);
if (!priv)
continue;

rtnl_lock();
ipc_wwan_dellink(ipc_wwan, priv->netdev, NULL);
rtnl_unlock();
}

mutex_destroy(&ipc_wwan->if_mutex);

kfree(ipc_wwan);
Expand Down

0 comments on commit 322a0ba

Please sign in to comment.