/* vxge_hw_device_stats_get - Get the device hw statistics. Returns the vpath h/w stats for the device.  */
enum vxge_hw_status vxge_hw_device_stats_get(struct __vxge_hw_device *hldev, struct vxge_hw_device_stats_hw_info *hw_stats)
/* vxge_hw_device_stats_get - Get the device hw statistics. Returns the vpath h/w stats for the device.  */
enum vxge_hw_status vxge_hw_device_stats_get(struct __vxge_hw_device *hldev, struct vxge_hw_device_stats_hw_info *hw_stats)
{
	u32 i;
	enum vxge_hw_status status = VXGE_HW_OK;
	for (i = 0; i < VXGE_HW_MAX_VIRTUAL_PATHS; i++) {
		if (!(hldev->vpaths_deployed & vxge_mBIT(i)) ||
			(hldev->virtual_paths[i].vp_open ==
				VXGE_HW_VP_NOT_OPEN))
			continue;
		memcpy(hldev->virtual_paths[i].hw_stats_sav,
				hldev->virtual_paths[i].hw_stats,
				sizeof(struct vxge_hw_vpath_stats_hw_info));
		status = __vxge_hw_vpath_stats_get(
			&hldev->virtual_paths[i],
			hldev->virtual_paths[i].hw_stats);
	}
	memcpy(hw_stats, &hldev->stats.hw_dev_info_stats,
			sizeof(struct vxge_hw_device_stats_hw_info));
	return status;
}