From patchwork Wed Jul 2 15:10:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Aring X-Patchwork-Id: 366392 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 B0F35140111 for ; Thu, 3 Jul 2014 01:10:42 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754752AbaGBPKk (ORCPT ); Wed, 2 Jul 2014 11:10:40 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:47328 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754715AbaGBPKe (ORCPT ); Wed, 2 Jul 2014 11:10:34 -0400 Received: by mail-wi0-f179.google.com with SMTP id cc10so676618wib.0 for ; Wed, 02 Jul 2014 08:10:28 -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=++EOS+g4g9l0Xq8D03zxdg+kwkjcHjciZGM3i4ZeB6M=; b=rD39t09Z67IC6uMJkDpYPhWMgdj4+OB2VEtY8+O2jt7odFSrU0TXqcoocgynSkHI+I BqRO4DPjbKetTBLY6PFM84/n+6rpqprkvBevPtgw1nRkrQYa2a38J53MIls8Od/buQke MvrPqowOdUpITW5MB6NqetAOgHOohP5yWD4apKrlZ6Lb8SVrYk0Bd+2pAOH+Xu91aXvo 8xYlEYsTZT5Ec0vKDAWHA0QtEJgVckHdcuV2ZBtuz+V/jmlDQVGHckG0eYx6Jv5Zw39w wWlZ1xFJe7i8AcVRRSSNvT6J54IsCg6fXvG7aEu5rc5o+1nWqLSRiijRbndPYIswbP75 ZtWg== X-Received: by 10.180.212.68 with SMTP id ni4mr4692549wic.64.1404313828197; Wed, 02 Jul 2014 08:10:28 -0700 (PDT) Received: from omega.localdomain (p4FD3BDAF.dip0.t-ipconnect.de. [79.211.189.175]) by mx.google.com with ESMTPSA id cj8sm55656607wjb.5.2014.07.02.08.10.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Jul 2014 08:10:27 -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 v2 net-next 11/13] at86rf230: add timing for channel switch Date: Wed, 2 Jul 2014 17:10:08 +0200 Message-Id: <1404313810-30232-12-git-send-email-alex.aring@gmail.com> X-Mailer: git-send-email 2.0.1 In-Reply-To: <1404313810-30232-1-git-send-email-alex.aring@gmail.com> References: <1404313810-30232-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 87685d4..517a30f 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,