[PATCH 5/9] pcmcia: add new CIS access helpers

Komuro komurojun-mbn at nifty.com
Sat Oct 24 22:22:31 EDT 2009


Hi,

The pcmcia_do_get_mac has a bug,
tuple->TupleDataLen should be ETH_ALEN + 3;



static int pcmcia_do_get_mac(struct pcmcia_device *p_dev, tuple_t *tuple,
			     void *priv)
{
	struct net_device *dev = priv;
	int i;

	if (tuple->TupleData[0] != CISTPL_FUNCE_LAN_NODE_ID)
		return -EINVAL;
-	if (tuple->TupleDataLen != ETH_ALEN + 2)
+	if (tuple->TupleDataLen != ETH_ALEN + 3)
		return -EINVAL;
	if (tuple->TupleData[1] != ETH_ALEN)
		return -EINVAL;
	for (i = 0; i < 6; i++)
		dev->dev_addr[i] = tuple->TupleData[i+2];
	return 0;
};

Best Regards
Komuro



More information about the linux-pcmcia mailing list