summaryrefslogtreecommitdiff
path: root/Kernel/Net
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Net')
-rw-r--r--Kernel/Net/E1000NetworkAdapter.cpp3
-rw-r--r--Kernel/Net/RTL8139NetworkAdapter.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/Kernel/Net/E1000NetworkAdapter.cpp b/Kernel/Net/E1000NetworkAdapter.cpp
index e884e297c3..8f0e8aef84 100644
--- a/Kernel/Net/E1000NetworkAdapter.cpp
+++ b/Kernel/Net/E1000NetworkAdapter.cpp
@@ -24,6 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <AK/MACAddress.h>
#include <Kernel/IO.h>
#include <Kernel/Net/E1000NetworkAdapter.h>
#include <Kernel/Thread.h>
@@ -258,7 +259,7 @@ u32 E1000NetworkAdapter::read_eeprom(u8 address)
void E1000NetworkAdapter::read_mac_address()
{
if (m_has_eeprom) {
- u8 mac[6];
+ MACAddress mac {};
u32 tmp = read_eeprom(0);
mac[0] = tmp & 0xff;
mac[1] = tmp >> 8;
diff --git a/Kernel/Net/RTL8139NetworkAdapter.cpp b/Kernel/Net/RTL8139NetworkAdapter.cpp
index efb26fdb92..f0faa21cd8 100644
--- a/Kernel/Net/RTL8139NetworkAdapter.cpp
+++ b/Kernel/Net/RTL8139NetworkAdapter.cpp
@@ -24,6 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <AK/MACAddress.h>
#include <Kernel/IO.h>
#include <Kernel/Net/RTL8139NetworkAdapter.h>
@@ -284,7 +285,7 @@ void RTL8139NetworkAdapter::reset()
void RTL8139NetworkAdapter::read_mac_address()
{
- u8 mac[6];
+ MACAddress mac {};
for (int i = 0; i < 6; i++)
mac[i] = in8(REG_MAC + i);
set_mac_address(mac);