virtio-devices: net: Remove write_config implementation

The spec specifies that all fields are read-only from the driver.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2020-07-16 09:56:08 +01:00 committed by Sebastien Boeuf
parent e3dc620146
commit f1e940df8d

View File

@ -427,18 +427,6 @@ impl VirtioDevice for Net {
}
}
fn write_config(&mut self, offset: u64, data: &[u8]) {
let config_slice = self.config.as_mut_slice();
let data_len = data.len() as u64;
let config_len = config_slice.len() as u64;
if offset + data_len > config_len {
error!("Failed to write config space");
return;
}
let (_, right) = config_slice.split_at_mut(offset as usize);
right.copy_from_slice(&data[..]);
}
fn activate(
&mut self,
mem: GuestMemoryAtomic<GuestMemoryMmap>,