#include "ecore.h"
#include "ecore_hw.h"
#include "ecore_iov_api.h"
+#include "ecore_mcp_api.h"
+#include "ecore_l2_api.h"
+
unsigned long qede_log2_align(unsigned long n)
{
return p_hwfn->stream->total_out / 4;
}
+
+void
+qede_get_mcp_proto_stats(struct ecore_dev *edev,
+ enum ecore_mcp_protocol_type type,
+ union ecore_mcp_protocol_stats *stats)
+{
+ struct ecore_eth_stats lan_stats;
+
+ 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;
+ stats->lan_stats.fcs_err = -1;
+ } else {
+ DP_INFO(edev, "Statistics request type %d not supported\n",
+ type);
+ }
+}
struct ecore_hwfn;
struct ecore_vf_acquire_sw_info;
struct vf_pf_resc_request;
+enum ecore_mcp_protocol_type;
+union ecore_mcp_protocol_stats;
+
void qed_link_update(struct ecore_hwfn *hwfn);
#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
#define OSAL_MAX_T(type, __max1, __max2) \
((type)(__max1) > (type)(__max2) ? (type)(__max1) : (type)(__max2))
-#define OSAL_GET_PROTOCOL_STATS(p_hwfn, type, stats) (0)
+void qede_get_mcp_proto_stats(struct ecore_dev *, enum ecore_mcp_protocol_type,
+ union ecore_mcp_protocol_stats *);
+#define OSAL_GET_PROTOCOL_STATS(dev, type, stats) \
+ qede_get_mcp_proto_stats(dev, type, stats)
+
#define OSAL_SLOWPATH_IRQ_REQ(p_hwfn) (0)
#endif /* __BCM_OSAL_H */