Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4ee1944 authored by Alexander Aring's avatar Alexander Aring Committed by Marcel Holtmann
Browse files

mac802154: iface: fix hrtimer cancel on ifdown



The interframe spacing timer is a per phy definition and is part of a
ieee802154_local structure. If we have possible multiple interfaces
ifdown one interface then the timer should not be cancled. First if the
last interface is down and the receive handling is stopped we should be
sure that the interframe spacing timer isn't run anymore.

Signed-off-by: default avatarAlexander Aring <alex.aring@gmail.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 1bc1754e
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -302,15 +302,15 @@ static int mac802154_slave_close(struct net_device *dev)


	ASSERT_RTNL();
	ASSERT_RTNL();


	hrtimer_cancel(&local->ifs_timer);

	netif_stop_queue(dev);
	netif_stop_queue(dev);
	local->open_count--;
	local->open_count--;


	clear_bit(SDATA_STATE_RUNNING, &sdata->state);
	clear_bit(SDATA_STATE_RUNNING, &sdata->state);


	if (!local->open_count)
	if (!local->open_count) {
		hrtimer_cancel(&local->ifs_timer);
		drv_stop(local);
		drv_stop(local);
	}


	return 0;
	return 0;
}
}