at86rf230: add cca ed level reset value
authorAlexander Aring <alex.aring@gmail.com>
Sun, 17 May 2015 19:44:51 +0000 (21:44 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 19 May 2015 09:44:44 +0000 (11:44 +0200)
This patch adds reset values for cca ed level values after running reset
procedure.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/net/ieee802154/at86rf230.c

index 833c42640e4049a29522a5751b9be906df575c5b..3aa7bc9488e4eb307cd5bc497b083082aeead40e 100644 (file)
@@ -1661,7 +1661,7 @@ at86rf230_detect_device(struct at86rf230_local *lp)
        case 2:
                chip = "at86rf230";
                rc = -ENOTSUPP;
-               break;
+               goto not_supp;
        case 3:
                chip = "at86rf231";
                lp->data = &at86rf231_data;
@@ -1697,9 +1697,12 @@ at86rf230_detect_device(struct at86rf230_local *lp)
        default:
                chip = "unknown";
                rc = -ENOTSUPP;
-               break;
+               goto not_supp;
        }
 
+       lp->hw->phy->cca_ed_level = lp->hw->phy->supported.cca_ed_levels[7];
+
+not_supp:
        dev_info(&lp->spi->dev, "Detected %s chip version %d\n", chip, version);
 
        return rc;