Commit d1075ac1 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

minic: use only fid 0 for ptp packets, rest is for wr-nic

parent 978b79c2
...@@ -265,7 +265,6 @@ int minic_rx_frame(uint8_t *hdr, uint8_t *payload, uint32_t buf_size, struct hw_ ...@@ -265,7 +265,6 @@ int minic_rx_frame(uint8_t *hdr, uint8_t *payload, uint32_t buf_size, struct hw_
} }
static uint16_t tx_oob_val = 0;
int minic_tx_frame(uint8_t *hdr, uint8_t *payload, uint32_t size, struct hw_timestamp *hwts) int minic_tx_frame(uint8_t *hdr, uint8_t *payload, uint32_t size, struct hw_timestamp *hwts)
{ {
...@@ -286,7 +285,7 @@ int minic_tx_frame(uint8_t *hdr, uint8_t *payload, uint32_t size, struct hw_time ...@@ -286,7 +285,7 @@ int minic_tx_frame(uint8_t *hdr, uint8_t *payload, uint32_t size, struct hw_time
d_hdr = 0; d_hdr = 0;
if(hwts) if(hwts)
d_hdr = TX_DESC_WITH_OOB | (tx_oob_val << 12); d_hdr = TX_DESC_WITH_OOB | (WRPC_FID<<12);
d_hdr |= TX_DESC_VALID | nwords; d_hdr |= TX_DESC_VALID | nwords;
...@@ -311,9 +310,9 @@ int minic_tx_frame(uint8_t *hdr, uint8_t *payload, uint32_t size, struct hw_time ...@@ -311,9 +310,9 @@ int minic_tx_frame(uint8_t *hdr, uint8_t *payload, uint32_t size, struct hw_time
raw_ts = minic_readl(MINIC_REG_TSR1); raw_ts = minic_readl(MINIC_REG_TSR1);
fid = MINIC_TSR0_FID_R(minic_readl(MINIC_REG_TSR0)); fid = MINIC_TSR0_FID_R(minic_readl(MINIC_REG_TSR0));
if(fid != tx_oob_val) if(fid != WRPC_FID)
{ {
TRACE_DEV("minic_tx_frame: unmatched fid %d vs %d\n", fid, tx_oob_val); TRACE_DEV("minic_tx_frame: unmatched fid %d vs %d\n", fid, WRPC_FID);
} }
EXPLODE_WR_TIMESTAMP(raw_ts, counter_r, counter_f); EXPLODE_WR_TIMESTAMP(raw_ts, counter_r, counter_f);
...@@ -331,8 +330,6 @@ int minic_tx_frame(uint8_t *hdr, uint8_t *payload, uint32_t size, struct hw_time ...@@ -331,8 +330,6 @@ int minic_tx_frame(uint8_t *hdr, uint8_t *payload, uint32_t size, struct hw_time
minic.tx_count++; minic.tx_count++;
} }
tx_oob_val++;
return size; return size;
} }
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include "types.h" #include "types.h"
#define ETH_HEADER_SIZE 14 #define ETH_HEADER_SIZE 14
#define WRPC_FID 0
void minic_init(); void minic_init();
void minic_disable(); void minic_disable();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment