mirror of
https://github.com/ipxe/ipxe
synced 2026-02-14 02:31:26 +03:00
[ena] Record supported device features
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -707,9 +707,11 @@ static int ena_get_device_attributes ( struct net_device *netdev ) {
|
|||||||
memcpy ( netdev->hw_addr, feature->device.mac, ETH_ALEN );
|
memcpy ( netdev->hw_addr, feature->device.mac, ETH_ALEN );
|
||||||
netdev->max_pkt_len = le32_to_cpu ( feature->device.mtu );
|
netdev->max_pkt_len = le32_to_cpu ( feature->device.mtu );
|
||||||
netdev->mtu = ( netdev->max_pkt_len - ETH_HLEN );
|
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",
|
DBGC ( ena, "ENA %p MAC %s MTU %zd features %#08x\n",
|
||||||
ena, eth_ntoa ( netdev->hw_addr ), netdev->max_pkt_len );
|
ena, eth_ntoa ( netdev->hw_addr ), netdev->max_pkt_len,
|
||||||
|
ena->features );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -751,6 +751,8 @@ struct ena_nic {
|
|||||||
void *regs;
|
void *regs;
|
||||||
/** On-device memory */
|
/** On-device memory */
|
||||||
void *mem;
|
void *mem;
|
||||||
|
/** Device features */
|
||||||
|
uint32_t features;
|
||||||
/** Host info */
|
/** Host info */
|
||||||
struct ena_host_info *info;
|
struct ena_host_info *info;
|
||||||
/** Admin queue */
|
/** Admin queue */
|
||||||
|
|||||||
Reference in New Issue
Block a user