OSDN Git Service

mrf24j40: add default channel setting
authorAlexander Aring <alex.aring@gmail.com>
Mon, 21 Sep 2015 09:24:27 +0000 (11:24 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 22 Sep 2015 09:51:21 +0000 (11:51 +0200)
Per default mrf24j40 has the channel 11 after reset. This patch adds the
right phy default value for the channel setting.

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/net/ieee802154/mrf24j40.c

index 89150bd..7c224cd 100644 (file)
@@ -720,6 +720,11 @@ err_ret:
        return ret;
 }
 
+static void  mrf24j40_phy_setup(struct mrf24j40 *devrec)
+{
+       devrec->hw->phy->current_channel = 11;
+}
+
 static int mrf24j40_probe(struct spi_device *spi)
 {
        int ret = -ENOMEM;
@@ -759,6 +764,8 @@ static int mrf24j40_probe(struct spi_device *spi)
        if (ret)
                goto err_register_device;
 
+       mrf24j40_phy_setup(devrec);
+
        ret = devm_request_threaded_irq(&spi->dev,
                                        spi->irq,
                                        NULL,