From patchwork Wed Jul 2 22:20:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Aring X-Patchwork-Id: 366497 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id B93161400DD for ; Thu, 3 Jul 2014 08:21:55 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751809AbaGBWVv (ORCPT ); Wed, 2 Jul 2014 18:21:51 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:64117 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757886AbaGBWVn (ORCPT ); Wed, 2 Jul 2014 18:21:43 -0400 Received: by mail-wi0-f181.google.com with SMTP id n3so1306559wiv.2 for ; Wed, 02 Jul 2014 15:21:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sseFQ/RAkmkhS/baClm4C/Ddy7yoqyYl3zan2WZANEU=; b=0dQQwMBJ2c4qG6JyOSXUKhVGu+nfpbbC+n4zzeN22oTytz8EJDjsDwiKxZiJmVy5Xz 3TjXSY3bX9VgZVek1GZ3mLgnkCxeMtj9SzJ+nzAglrX1Qfw8tVb/u1h6SCZFsA/yM7Gn q+gdWVeB8VqltZ1n/OT85hrJeiSbSbHHB6/7a4vSpXnnZKJDxLM+8SrqELe7C9E6zMAm YdCkqnTp/KcYRtZDxw/gmqFostwk5ATppbmS1NlCyHViudSb+fZAAKEKYSyPqfcByt4K P3gNW2rA5mPtQpMd1cFURy5HLfs7oA6W7bhQaufd8qhFbeOZwZE5IGfUhtD5oVxIHGYU Cp1A== X-Received: by 10.194.10.130 with SMTP id i2mr706779wjb.70.1404339702413; Wed, 02 Jul 2014 15:21:42 -0700 (PDT) Received: from omega.localdomain (p4FD3BDAF.dip0.t-ipconnect.de. [79.211.189.175]) by mx.google.com with ESMTPSA id a13sm57797875wjs.12.2014.07.02.15.21.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Jul 2014 15:21:41 -0700 (PDT) From: Alexander Aring To: alex.bluesman.smirnov@gmail.com Cc: dbaryshkov@gmail.com, linux-zigbee-devel@lists.sourceforge.net, netdev@vger.kernel.org, stilwellt@openlabs.co, Alexander Aring Subject: [PATCH v3 net-next 11/13] at86rf230: add timing for channel switch Date: Thu, 3 Jul 2014 00:20:53 +0200 Message-Id: <1404339655-8456-12-git-send-email-alex.aring@gmail.com> X-Mailer: git-send-email 2.0.1 In-Reply-To: <1404339655-8456-1-git-send-email-alex.aring@gmail.com> References: <1404339655-8456-1-git-send-email-alex.aring@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: Alexander Aring --- drivers/net/ieee802154/at86rf230.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index a64914a..dbf85b8 100644 --- a/drivers/net/ieee802154/at86rf230.c +++ b/drivers/net/ieee802154/at86rf230.c @@ -42,6 +42,7 @@ struct at86rf230_local; * All timings are in us. */ struct at86rf2xx_chip_data { + u16 t_channel_switch; u16 t_reset_to_off; u16 t_off_to_aack; u16 t_off_to_tx_on; @@ -1079,7 +1080,9 @@ at86rf230_channel(struct ieee802154_dev *dev, int page, int channel) if (rc < 0) return rc; - msleep(1); /* Wait for PLL */ + /* Wait for PLL */ + usleep_range(lp->data->t_channel_switch, + lp->data->t_channel_switch + 10); dev->phy->current_channel = channel; dev->phy->current_page = page; @@ -1247,6 +1250,7 @@ static struct ieee802154_ops at86rf230_ops = { }; static struct at86rf2xx_chip_data at86rf233_data = { + .t_channel_switch = 11, .t_reset_to_off = 26, .t_off_to_aack = 80, .t_off_to_tx_on = 80, @@ -1261,6 +1265,7 @@ static struct at86rf2xx_chip_data at86rf233_data = { }; static struct at86rf2xx_chip_data at86rf231_data = { + .t_channel_switch = 24, .t_reset_to_off = 37, .t_off_to_aack = 110, .t_off_to_tx_on = 110, @@ -1275,6 +1280,7 @@ static struct at86rf2xx_chip_data at86rf231_data = { }; static struct at86rf2xx_chip_data at86rf212_data = { + .t_channel_switch = 11, .t_reset_to_off = 26, .t_off_to_aack = 200, .t_off_to_tx_on = 200,