[ena] Record supported device features

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2025-10-16 15:53:47 +01:00
parent e5e371f485
commit 0d15d7f0a5
2 changed files with 6 additions and 2 deletions

View File

@@ -707,9 +707,11 @@ static int ena_get_device_attributes ( struct net_device *netdev ) {
memcpy ( netdev->hw_addr, feature->device.mac, ETH_ALEN );
netdev->max_pkt_len = le32_to_cpu ( feature->device.mtu );
netdev->mtu = ( netdev->max_pkt_len - ETH_HLEN );
ena->features = le32_to_cpu ( feature->device.features );
DBGC ( ena, "ENA %p MAC %s MTU %zd\n",
ena, eth_ntoa ( netdev->hw_addr ), netdev->max_pkt_len );
DBGC ( ena, "ENA %p MAC %s MTU %zd features %#08x\n",
ena, eth_ntoa ( netdev->hw_addr ), netdev->max_pkt_len,
ena->features );
return 0;
}

View File

@@ -751,6 +751,8 @@ struct ena_nic {
void *regs;
/** On-device memory */
void *mem;
/** Device features */
uint32_t features;
/** Host info */
struct ena_host_info *info;
/** Admin queue */