Lines Matching refs:rxts
94 struct rxts { struct
120 struct list_head rxts; argument
122 struct rxts rx_pool_data[MAX_RXTS];
272 static void phy2rxts(struct phy_rxts *p, struct rxts *rxts) in phy2rxts() argument
279 rxts->ns = p->ns_lo; in phy2rxts()
280 rxts->ns |= (p->ns_hi & 0x3fff) << 16; in phy2rxts()
281 rxts->ns += ((u64)sec) * 1000000000ULL; in phy2rxts()
282 rxts->seqid = p->seqid; in phy2rxts()
283 rxts->msgtype = (p->msgtype >> 12) & 0xf; in phy2rxts()
284 rxts->hash = p->msgtype & 0x0fff; in phy2rxts()
285 rxts->tmo = jiffies + SKB_TIMESTAMP_TIMEOUT; in phy2rxts()
593 static int expired(struct rxts *rxts) in expired() argument
595 return time_after(jiffies, rxts->tmo); in expired()
602 struct rxts *rxts; in prune_rx_ts() local
604 list_for_each_safe(this, next, &dp83640->rxts) { in prune_rx_ts()
605 rxts = list_entry(this, struct rxts, list); in prune_rx_ts()
606 if (expired(rxts)) { in prune_rx_ts()
607 list_del_init(&rxts->list); in prune_rx_ts()
608 list_add(&rxts->list, &dp83640->rxpool); in prune_rx_ts()
812 static int match(struct sk_buff *skb, unsigned int type, struct rxts *rxts) in match() argument
827 if (rxts->msgtype != (msgtype & 0xf)) in match()
831 if (rxts->seqid != seqid) in match()
836 if (rxts->hash != hash) in match()
845 struct rxts *rxts; in decode_rxts() local
863 rxts = list_first_entry(&dp83640->rxpool, struct rxts, list); in decode_rxts()
864 list_del_init(&rxts->list); in decode_rxts()
865 phy2rxts(phy_rxts, rxts); in decode_rxts()
872 if (match(skb, skb_info->ptp_type, rxts)) { in decode_rxts()
876 shhwtstamps->hwtstamp = ns_to_ktime(rxts->ns); in decode_rxts()
877 list_add(&rxts->list, &dp83640->rxpool); in decode_rxts()
884 list_add_tail(&rxts->list, &dp83640->rxts); in decode_rxts()
1335 struct rxts *rxts; in dp83640_rxtstamp() local
1353 list_for_each_safe(this, next, &dp83640->rxts) { in dp83640_rxtstamp()
1354 rxts = list_entry(this, struct rxts, list); in dp83640_rxtstamp()
1355 if (match(skb, type, rxts)) { in dp83640_rxtstamp()
1358 shhwtstamps->hwtstamp = ns_to_ktime(rxts->ns); in dp83640_rxtstamp()
1359 list_del_init(&rxts->list); in dp83640_rxtstamp()
1360 list_add(&rxts->list, &dp83640->rxpool); in dp83640_rxtstamp()
1454 INIT_LIST_HEAD(&dp83640->rxts); in dp83640_probe()