From patchwork Tue Apr 19 13:34:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Aring X-Patchwork-Id: 8880121 Return-Path: X-Original-To: patchwork-linux-wpan@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2FF819F1C1 for ; Tue, 19 Apr 2016 13:34:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3EEFE20268 for ; Tue, 19 Apr 2016 13:34:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6102B20263 for ; Tue, 19 Apr 2016 13:34:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752662AbcDSNes (ORCPT ); Tue, 19 Apr 2016 09:34:48 -0400 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:49712 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752545AbcDSNes (ORCPT ); Tue, 19 Apr 2016 09:34:48 -0400 Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=omega.localdomain) by metis.ext.pengutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1asVni-0006ST-1K; Tue, 19 Apr 2016 15:34:46 +0200 From: Alexander Aring To: linux-wpan@vger.kernel.org Cc: kernel@pengutronix.de, Alexander Aring , Oleg Hahm Subject: [PATCH bluetooth-next] at86rf230: increase sleep to off timings Date: Tue, 19 Apr 2016 15:34:22 +0200 Message-Id: <1461072862-1853-1-git-send-email-aar@pengutronix.de> X-Mailer: git-send-email 2.8.0 X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: aar@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-wpan@vger.kernel.org Sender: linux-wpan-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wpan@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP I expierenced when setting channel while sleep mode it didn't changed the channel inside the hardware registers. Then I got another report of an user which has similar issues. I increased the sleep to off state change timing, which is according at86rf233 at maximum 1000 us. After this change I got no similar effects again. I tried another option to wait on AWAKE_END irq, which can be used to wait until the transceiver is awaked. I tested it and the IRQ took 4 seconds after starting state change. I don't believe it takes 4 seconds to go into the TRX_OFF state from SLEEP state. The alternative is to increase the timings which seems to work. Cc: Oleg Hahm Signed-off-by: Alexander Aring Reviewed-by: Stefan Schmidt --- drivers/net/ieee802154/at86rf230.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index cb9e9fe..9f10da6 100644 --- a/drivers/net/ieee802154/at86rf230.c +++ b/drivers/net/ieee802154/at86rf230.c @@ -1340,7 +1340,7 @@ static struct at86rf2xx_chip_data at86rf233_data = { .t_off_to_aack = 80, .t_off_to_tx_on = 80, .t_off_to_sleep = 35, - .t_sleep_to_off = 210, + .t_sleep_to_off = 1000, .t_frame = 4096, .t_p_ack = 545, .rssi_base_val = -91, @@ -1355,7 +1355,7 @@ static struct at86rf2xx_chip_data at86rf231_data = { .t_off_to_aack = 110, .t_off_to_tx_on = 110, .t_off_to_sleep = 35, - .t_sleep_to_off = 380, + .t_sleep_to_off = 1000, .t_frame = 4096, .t_p_ack = 545, .rssi_base_val = -91, @@ -1370,7 +1370,7 @@ static struct at86rf2xx_chip_data at86rf212_data = { .t_off_to_aack = 200, .t_off_to_tx_on = 200, .t_off_to_sleep = 35, - .t_sleep_to_off = 380, + .t_sleep_to_off = 1000, .t_frame = 4096, .t_p_ack = 545, .rssi_base_val = -100,