b/drivers/net/ieee802154/mrf24j40.c
@@ -610,12 +610,34 @@ static int mrf24j40_ed(struct ieee802154_hw *hw,
u8 *level)
static int mrf24j40_start(struct ieee802154_hw *hw)
{
struct mrf24j40 *devrec = hw->priv;
+ int ret, reg;
dev_dbg(printdev(devrec), "start\n");
+ /* Enable promiscuous mode to workaround security-enabled RX issues */
+ ret = regmap_update_bits(devrec->regmap_short, REG_RXMCR,
BIT_PROMI, BIT_PROMI);
+ if (ret)
+ goto err_ret;
+
+ /* Accept all PAN ID and short addresses */
+ for (reg = REG_PANIDL; reg <= REG_SADRH; reg++) {
+ ret = regmap_write(devrec->regmap_short, reg, 0xff);
+ if (ret)
+ goto err_ret;
+ }
+
+ /* Clear out extended address filter */
+ for (reg = REG_EADR0; reg <= REG_EADR7; reg++) {
+ ret = regmap_write(devrec->regmap_short, reg, 0x00);
+ if (ret)
+ goto err_ret;
+ }
+
/* Clear TXNIE and RXIE. Enable interrupts */
return regmap_update_bits(devrec->regmap_short, REG_INTCON,
BIT_TXNIE | BIT_RXIE, 0);
+err_ret:
+ return ret;
}