net: ethernet: ti: cpts: clean up event list if event pool is empty
authorWingMan Kwok <w-kwok2@ti.com>
Wed, 7 Dec 2016 00:00:39 +0000 (18:00 -0600)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Dec 2016 16:13:47 +0000 (11:13 -0500)
commite4439fa838eb78b20f82665110b478018268833e
tree3d8810050dda07ffad962436a14c763a2daf960a
parent8fcd68914e447af006f9597a2688754517fabfe9
net: ethernet: ti: cpts: clean up event list if event pool is empty

When a CPTS user does not exit gracefully by disabling cpts
timestamping and leaving a joined multicast group, the system
continues to receive and timestamps the ptp packets which eventually
occupy all the event list entries.  When this happns, the added code
tries to remove some list entries which are expired.

Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpts.c