/*
* Driver for the built-in ethernet switch of the Atheros AR7240 SoC
* Copyright (c) 2010 Gabor Juhos <juhosg@openwrt.org>
- * Copyright (c) 2010 Felix Fietkau <nbd@openwrt.org>
+ * Copyright (c) 2010 Felix Fietkau <nbd@nbd.name>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
struct mii_bus *mii = as->mii_bus;
u32 status;
- if (port > AR7240_NUM_PORTS)
+ if (port >= AR7240_NUM_PORTS)
return -EINVAL;
status = ar7240sw_reg_read(mii, AR7240_REG_PORT_STATUS(port));
{
struct ar7240sw *as = sw_to_ar7240(dev);
- if (port > AR7240_NUM_PORTS)
+ if (port >= AR7240_NUM_PORTS)
return -EINVAL;
ar7240sw_capture_stats(as);