cc2520: fix zero perm_extended_addr address
authorVarka Bhadram <varkabhadram@gmail.com>
Fri, 26 Dec 2014 04:43:40 +0000 (10:13 +0530)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 30 Dec 2014 06:15:55 +0000 (07:15 +0100)
It will remove the bug of havine zero perm_extended_addr address.

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/net/ieee802154/cc2520.c

index 64017f1eca7f3b9d4021f0ad5a9d6621752cdb13..a43c8acb7268d6ef897f5a992101e0ee125231ff 100644 (file)
@@ -650,6 +650,7 @@ static int cc2520_register(struct cc2520_private *priv)
        priv->hw->parent = &priv->spi->dev;
        priv->hw->extra_tx_headroom = 0;
        priv->hw->vif_data_size = sizeof(*priv);
+       ieee802154_random_extended_addr(&priv->hw->phy->perm_extended_addr);
 
        /* We do support only 2.4 Ghz */
        priv->hw->phy->channels_supported[0] = 0x7FFF800;