|
@@ -39,7 +39,6 @@
|
|
|
*/
|
|
|
|
|
|
#define LAN9303_TAG_LEN 4
|
|
|
-#define LAN9303_MAX_PORTS 3
|
|
|
|
|
|
static struct sk_buff *lan9303_xmit(struct sk_buff *skb, struct net_device *dev)
|
|
|
{
|
|
@@ -104,7 +103,7 @@ static struct sk_buff *lan9303_rcv(struct sk_buff *skb, struct net_device *dev,
|
|
|
|
|
|
source_port = ntohs(lan9303_tag[1]) & 0x3;
|
|
|
|
|
|
- if (source_port >= LAN9303_MAX_PORTS) {
|
|
|
+ if (source_port >= ds->num_ports) {
|
|
|
dev_warn_ratelimited(&dev->dev, "Dropping packet due to invalid source port\n");
|
|
|
return NULL;
|
|
|
}
|