Skip to contentSkip to conversation

atusb: don't change csma settings while set channel

PATCH In review Alexander Aring 2 participants 2 messages Jun 20, 2016 – Jun 21, 2016

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

PATCH 1/1 atusb: don't change csma settings while set channel

This patch fixes the behaviour to not overwrite csma settings when set channel afterwards.

---
 drivers/net/ieee802154/atusb.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/net/ieee802154/atusb.c +1 -5
index 52c9051..1056ed1 100644
@@ -366,11 +366,7 @@ static int atusb_channel(struct ieee802154_hw *hw, u8 page, u8 channel)
 	struct atusb *atusb = hw->priv;
 	int ret;
 
-	/* This implicitly sets the CCA (Clear Channel Assessment) mode to 0,
-	 * "Mode 3a, Carrier sense OR energy above threshold".
-	 * We should probably make this configurable. @@@
-	 */
-	ret = atusb_write_reg(atusb, RG_PHY_CC_CCA, channel);
+	ret = atusb_write_subreg(atusb, SR_CHANNEL, channel);
 	if (ret < 0)
 		return ret;
 	msleep(1);	/* @@@ ugly synchronization */
Signature · 1 line
2.9.0
Acked-by on v1 1/1
#1 lore raw

Hello.

Quoted 16 lines · Alexander Aring

This patch fixes the behaviour to not overwrite csma settings when set channel afterwards.

---
  drivers/net/ieee802154/atusb.c | 6 +-----
  1 file changed, 1 insertion(+), 5 deletions(-)
drivers/net/ieee802154/atusb.c +0 -0
index 52c9051..1056ed1 100644
@@ -366,11 +366,7 @@ static int atusb_channel(struct ieee802154_hw *hw, u8 page, u8 channel)
  	struct atusb *atusb = hw->priv;
  	int ret;

drivers/net/ieee802154/atusb.c static int atusb_channel(struct ieee802154_hw *hw, u8 page, u8 channel) · line 372

Quoted 10 lines
drivers/net/ieee802154/atusb.c +1 -5
 
-	/* This implicitly sets the CCA (Clear Channel Assessment) mode to 0,
-	 * "Mode 3a, Carrier sense OR energy above threshold".
-	 * We should probably make this configurable. @@@
-	 */
-	ret = atusb_write_reg(atusb, RG_PHY_CC_CCA, channel);
+	ret = atusb_write_subreg(atusb, SR_CHANNEL, channel);
  	if (ret < 0)
  		return ret;
  	msleep(1);	/* @@@ ugly synchronization */

Good point. We have csma ops and iwpan support for csma now this setting is no longer needed.

regards
Stefan Schmidt