Lines Matching refs:ps
45 struct hellcreek_port_hwtstamp *ps = in hellcreek_set_hwtstamp_config() local
53 clear_bit_unlock(HELLCREEK_HWTSTAMP_ENABLED, &ps->state); in hellcreek_set_hwtstamp_config()
107 set_bit(HELLCREEK_HWTSTAMP_ENABLED, &ps->state); in hellcreek_set_hwtstamp_config()
116 struct hellcreek_port_hwtstamp *ps; in hellcreek_port_hwtstamp_set() local
120 ps = &hellcreek->ports[port].port_hwtstamp; in hellcreek_port_hwtstamp_set()
130 memcpy(&ps->tstamp_config, &config, sizeof(config)); in hellcreek_port_hwtstamp_set()
140 struct hellcreek_port_hwtstamp *ps; in hellcreek_port_hwtstamp_get() local
143 ps = &hellcreek->ports[port].port_hwtstamp; in hellcreek_port_hwtstamp_get()
144 config = &ps->tstamp_config; in hellcreek_port_hwtstamp_get()
157 struct hellcreek_port_hwtstamp *ps = in hellcreek_should_tstamp() local
165 if (!test_bit(HELLCREEK_HWTSTAMP_ENABLED, &ps->state)) in hellcreek_should_tstamp()
214 struct hellcreek_port_hwtstamp *ps, int port) in hellcreek_txtstamp_work() argument
222 if (!ps->tx_skb) in hellcreek_txtstamp_work()
246 if (time_is_before_jiffies(ps->tx_tstamp_start + in hellcreek_txtstamp_work()
270 tmp_skb = ps->tx_skb; in hellcreek_txtstamp_work()
271 ps->tx_skb = NULL; in hellcreek_txtstamp_work()
277 clear_bit_unlock(HELLCREEK_HWTSTAMP_TX_IN_PROGRESS, &ps->state); in hellcreek_txtstamp_work()
285 dev_kfree_skb_any(ps->tx_skb); in hellcreek_txtstamp_work()
286 ps->tx_skb = NULL; in hellcreek_txtstamp_work()
287 clear_bit_unlock(HELLCREEK_HWTSTAMP_TX_IN_PROGRESS, &ps->state); in hellcreek_txtstamp_work()
293 struct hellcreek_port_hwtstamp *ps, in hellcreek_get_rxts() argument
332 struct hellcreek_port_hwtstamp *ps, in hellcreek_rxtstamp_work() argument
337 skb = skb_dequeue(&ps->rx_queue); in hellcreek_rxtstamp_work()
339 hellcreek_get_rxts(hellcreek, ps, skb, &ps->rx_queue, port); in hellcreek_rxtstamp_work()
349 struct hellcreek_port_hwtstamp *ps; in hellcreek_hwtstamp_work() local
354 ps = &hellcreek->ports[i].port_hwtstamp; in hellcreek_hwtstamp_work()
356 if (test_bit(HELLCREEK_HWTSTAMP_TX_IN_PROGRESS, &ps->state)) in hellcreek_hwtstamp_work()
357 restart |= hellcreek_txtstamp_work(hellcreek, ps, i); in hellcreek_hwtstamp_work()
359 hellcreek_rxtstamp_work(hellcreek, ps, i); in hellcreek_hwtstamp_work()
369 struct hellcreek_port_hwtstamp *ps; in hellcreek_port_txtstamp() local
374 ps = &hellcreek->ports[port].port_hwtstamp; in hellcreek_port_txtstamp()
393 &ps->state)) { in hellcreek_port_txtstamp()
398 ps->tx_skb = clone; in hellcreek_port_txtstamp()
403 ps->tx_tstamp_start = jiffies; in hellcreek_port_txtstamp()
412 struct hellcreek_port_hwtstamp *ps; in hellcreek_port_rxtstamp() local
415 ps = &hellcreek->ports[port].port_hwtstamp; in hellcreek_port_rxtstamp()
420 if (ps->tstamp_config.rx_filter != HWTSTAMP_FILTER_PTP_V2_EVENT) in hellcreek_port_rxtstamp()
433 skb_queue_tail(&ps->rx_queue, skb); in hellcreek_port_rxtstamp()
442 struct hellcreek_port_hwtstamp *ps = in hellcreek_hwtstamp_port_setup() local
445 skb_queue_head_init(&ps->rx_queue); in hellcreek_hwtstamp_port_setup()