mk: do not generate LDLIBS from directory dependencies
[dpdk.git] / drivers / net / qede / base / bcm_osal.c
index 968fb76..e3a2cb4 100644 (file)
@@ -249,8 +249,11 @@ qede_get_mcp_proto_stats(struct ecore_dev *edev,
 
        if (type == ECORE_MCP_LAN_STATS) {
                ecore_get_vport_stats(edev, &lan_stats);
-               stats->lan_stats.ucast_rx_pkts = lan_stats.rx_ucast_pkts;
-               stats->lan_stats.ucast_tx_pkts = lan_stats.tx_ucast_pkts;
+
+               /* @DPDK */
+               stats->lan_stats.ucast_rx_pkts = lan_stats.common.rx_ucast_pkts;
+               stats->lan_stats.ucast_tx_pkts = lan_stats.common.tx_ucast_pkts;
+
                stats->lan_stats.fcs_err = -1;
        } else {
                DP_INFO(edev, "Statistics request type %d not supported\n",
@@ -289,3 +292,15 @@ qede_hw_err_notify(struct ecore_hwfn *p_hwfn, enum ecore_hw_err_type err_type)
        DP_ERR(p_hwfn, "HW error occurred [%s]\n", err_str);
        ecore_int_attn_clr_enable(p_hwfn->p_dev, true);
 }
+
+u32 qede_crc32(u32 crc, u8 *ptr, u32 length)
+{
+       int i;
+
+       while (length--) {
+               crc ^= *ptr++;
+               for (i = 0; i < 8; i++)
+                       crc = (crc >> 1) ^ ((crc & 1) ? 0xedb88320 : 0);
+       }
+       return crc;
+}