Skip to contentSkip to conversation

ieee802154: mrf24j40: fix incorrect mask in mrf24j40_stop

PATCH In review Gustavo A. R. Silva 4 participants 4 messages Oct 31, 2017 – Nov 6, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ieee802154: mrf24j40: fix incorrect mask in mrf24j40_stop

It seems that this is a copy/paste error and the proper bit masking is:
BIT_TXNIE | BIT_RXIE

This issue was detected with the help of Coccinelle.

Fixes 7d840545e5b9 ("mrf24j40: replace magic numbers")
---
 drivers/net/ieee802154/mrf24j40.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ieee802154/mrf24j40.c +1 -1
index ee7084b..cf4788d 100644
@@ -635,7 +635,7 @@ static void mrf24j40_stop(struct ieee802154_hw *hw)
 
 	/* Set TXNIE and RXIE. Disable Interrupts */
 	regmap_update_bits(devrec->regmap_short, REG_INTCON,
-			   BIT_TXNIE | BIT_TXNIE, BIT_TXNIE | BIT_TXNIE);
+			   BIT_TXNIE | BIT_RXIE, BIT_TXNIE | BIT_RXIE);
 }
 
 static int mrf24j40_set_channel(struct ieee802154_hw *hw, u8 page, u8 channel)
Signature · 1 line
2.7.4
#1 lore raw

Hello Alan.

Quoted 18 lines · Gustavo A. R. Silva

It seems that this is a copy/paste error and the proper bit masking is:
BIT_TXNIE | BIT_RXIE

This issue was detected with the help of Coccinelle.

Fixes 7d840545e5b9 ("mrf24j40: replace magic numbers")
---
 drivers/net/ieee802154/mrf24j40.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ieee802154/mrf24j40.c +0 -0
index ee7084b..cf4788d 100644

drivers/net/ieee802154/mrf24j40.c static void mrf24j40_stop(struct ieee802154_hw *hw) · line 641

Quoted 8 lines
drivers/net/ieee802154/mrf24j40.c +1 -1
@@ -635,7 +635,7 @@ static void mrf24j40_stop(struct ieee802154_hw *hw)
 
 	/* Set TXNIE and RXIE. Disable Interrupts */
 	regmap_update_bits(devrec->regmap_short, REG_INTCON,
-			   BIT_TXNIE | BIT_TXNIE, BIT_TXNIE | BIT_TXNIE);
+			   BIT_TXNIE | BIT_RXIE, BIT_TXNIE | BIT_RXIE);
 }
 
 static int mrf24j40_set_channel(struct ieee802154_hw *hw, u8 page, u8 channel)

Could you review this and give me your ack when you are happy so I can apply it to my tree?

regards
Stefan Schmidt

Acked-by
#2 lore raw
Quoted 27 lines · Stefan Schmidt

Hello Alan.

Quoted 24 lines · Gustavo A. R. Silva

It seems that this is a copy/paste error and the proper bit masking is:
BIT_TXNIE | BIT_RXIE

This issue was detected with the help of Coccinelle.

Fixes 7d840545e5b9 ("mrf24j40: replace magic numbers")
---
 drivers/net/ieee802154/mrf24j40.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ieee802154/mrf24j40.c +1 -1
index ee7084b..cf4788d 100644
@@ -635,7 +635,7 @@ static void mrf24j40_stop(struct ieee802154_hw *hw)
 
 	/* Set TXNIE and RXIE. Disable Interrupts */
 	regmap_update_bits(devrec->regmap_short, REG_INTCON,
-			   BIT_TXNIE | BIT_TXNIE, BIT_TXNIE | BIT_TXNIE);
+			   BIT_TXNIE | BIT_RXIE, BIT_TXNIE | BIT_RXIE);
 }
 
Quoted 5 lines

drivers/net/ieee802154/mrf24j40.c static void mrf24j40_stop(struct ieee802154_hw *hw) · line 641

Quoted 2 lines
drivers/net/ieee802154/mrf24j40.c +0 -0
 static int mrf24j40_set_channel(struct ieee802154_hw *hw, u8 page, u8 channel)

Could you review this and give me your ack when you are happy so I can apply it to my tree?

maintainer
#3 lore raw
In reply to Gustavo A. R. Silva

Hello.

Quoted 18 lines · Gustavo A. R. Silva

It seems that this is a copy/paste error and the proper bit masking is:
BIT_TXNIE | BIT_RXIE

This issue was detected with the help of Coccinelle.

Fixes 7d840545e5b9 ("mrf24j40: replace magic numbers")
---
 drivers/net/ieee802154/mrf24j40.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ieee802154/mrf24j40.c +0 -0
index ee7084b..cf4788d 100644

drivers/net/ieee802154/mrf24j40.c static void mrf24j40_stop(struct ieee802154_hw *hw) · line 641

Quoted 8 lines
drivers/net/ieee802154/mrf24j40.c +1 -1
@@ -635,7 +635,7 @@ static void mrf24j40_stop(struct ieee802154_hw *hw)
 
 	/* Set TXNIE and RXIE. Disable Interrupts */
 	regmap_update_bits(devrec->regmap_short, REG_INTCON,
-			   BIT_TXNIE | BIT_TXNIE, BIT_TXNIE | BIT_TXNIE);
+			   BIT_TXNIE | BIT_RXIE, BIT_TXNIE | BIT_RXIE);
 }
 
 static int mrf24j40_set_channel(struct ieee802154_hw *hw, u8 page, u8 channel)

This patch has been applied to the wpan-next tree and will be part of the next pull request to net-next. Thanks!

regards
Stefan Schmidt