cc2520: update initial transmit power value
authorVarka Bhadram <varkabhadram@gmail.com>
Fri, 29 May 2015 05:26:57 +0000 (10:56 +0530)
committerMarcel Holtmann <marcel@holtmann.org>
Sun, 31 May 2015 11:40:54 +0000 (13:40 +0200)
CC2520 has the default 0dBm transmit power level  on reset.
This patch update initial value of transmit power with 0dBm value.

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

index 36a4f312cc7c6ea591d13c711ea9c5e78bf0c519..2384c286163f19fa480bfc190dd065aedaa83960 100644 (file)
@@ -755,9 +755,11 @@ static int cc2520_register(struct cc2520_private *priv)
        if (!priv->amplified) {
                priv->hw->phy->supported.tx_powers = cc2520_powers;
                priv->hw->phy->supported.tx_powers_size = ARRAY_SIZE(cc2520_powers);
+               priv->hw->phy->transmit_power = priv->hw->phy->supported.tx_powers[4];
        } else {
                priv->hw->phy->supported.tx_powers = cc2520_cc2591_powers;
                priv->hw->phy->supported.tx_powers_size = ARRAY_SIZE(cc2520_cc2591_powers);
+               priv->hw->phy->transmit_power = priv->hw->phy->supported.tx_powers[0];
        }
 
        dev_vdbg(&priv->spi->dev, "registered cc2520\n");