From patchwork Thu Jun 26 13:36:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Varka Bhadram X-Patchwork-Id: 364544 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 2420D14009B for ; Thu, 26 Jun 2014 23:38:36 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755744AbaFZNib (ORCPT ); Thu, 26 Jun 2014 09:38:31 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:37089 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755658AbaFZNia (ORCPT ); Thu, 26 Jun 2014 09:38:30 -0400 Received: by mail-pa0-f47.google.com with SMTP id kq14so3190287pab.6 for ; Thu, 26 Jun 2014 06:38:29 -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=Ce+YlKMoXqmVV/8OfVenI9QpaTc6BBALoTqHDmEOqOE=; b=tduSHXRIJlMplcjCgEcw+fUcYusVdUI8qjWp1I+9uwt8YsdxMm5MiJ3VdZE6K8aqv/ Bw/Nm98nIBQAr2pAqGfQQdT9W6pzS0igfLxhYBSFlZ+kWrYWCyYv1ZTEFeBrVZ8J+2Xb sKI6sedVXktBra5MXIh/IWr4sEzdwabe/a31Hp0H/FgrRhzRFGZxhytLsoQkkn8aPA9p rTCPQhc4w2CAcNn7LX4elwx6n5OpyjP+BlSJaBZgTzDJEFVTm6GEc4ucVBitWRwRQg+6 sP1jRpW7HVuRP+ZU4VXxDF/CRGzSnmi9pxmIAADc9BFecaBHrbbLQc37CRe7WidL1EcO bKLQ== X-Received: by 10.69.26.68 with SMTP id iw4mr15641009pbd.137.1403789909504; Thu, 26 Jun 2014 06:38:29 -0700 (PDT) Received: from cdac.hyderabad.cdac.in ([196.12.45.164]) by mx.google.com with ESMTPSA id no9sm10139496pbc.83.2014.06.26.06.38.26 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Jun 2014 06:38:29 -0700 (PDT) From: Varka Bhadram X-Google-Original-From: Varka Bhadram To: netdev@vger.kernel.org Cc: alex.bluesman.smirnov@gmail.com, dbaryshkov@gmail.com, linux-zigbee-devel@lists.sourceforge.net, davem@davemloft.net, Varka Bhadram Subject: [PATCH net-next 2/2] mac802154: fix coding style issues Date: Thu, 26 Jun 2014 19:06:55 +0530 Message-Id: <1403789815-10418-3-git-send-email-varkab@cdac.in> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1403789815-10418-1-git-send-email-varkab@cdac.in> References: <1403789815-10418-1-git-send-email-varkab@cdac.in> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: Varka Bhadram --- net/mac802154/ieee802154_dev.c | 4 +++- net/mac802154/llsec.c | 1 + net/mac802154/mib.c | 7 ++++--- net/mac802154/tx.c | 1 + 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/net/mac802154/ieee802154_dev.c b/net/mac802154/ieee802154_dev.c index 2cf66d8..c4d4568 100644 --- a/net/mac802154/ieee802154_dev.c +++ b/net/mac802154/ieee802154_dev.c @@ -143,6 +143,7 @@ static void mac802154_del_iface(struct wpan_phy *phy, struct net_device *dev) { struct mac802154_sub_if_data *sdata; + ASSERT_RTNL(); sdata = netdev_priv(dev); @@ -276,7 +277,8 @@ ieee802154_alloc_device(size_t priv_data_len, struct ieee802154_ops *ops) } priv = wpan_phy_priv(phy); - priv->hw.phy = priv->phy = phy; + priv->phy = phy; + priv->hw.phy = priv->phy; priv->hw.priv = (char *)priv + ALIGN(sizeof(*priv), NETDEV_ALIGN); priv->ops = ops; diff --git a/net/mac802154/llsec.c b/net/mac802154/llsec.c index 1456f73..4570581 100644 --- a/net/mac802154/llsec.c +++ b/net/mac802154/llsec.c @@ -538,6 +538,7 @@ static int llsec_recover_addr(struct mac802154_llsec *sec, struct ieee802154_addr *addr) { __le16 caddr = sec->params.coord_shortaddr; + addr->pan_id = sec->params.pan_id; if (caddr == cpu_to_le16(IEEE802154_ADDR_BROADCAST)) { diff --git a/net/mac802154/mib.c b/net/mac802154/mib.c index 15aa2f2..868a040 100644 --- a/net/mac802154/mib.c +++ b/net/mac802154/mib.c @@ -175,9 +175,9 @@ static void phy_chan_notify(struct work_struct *work) mutex_lock(&priv->hw->phy->pib_lock); res = hw->ops->set_channel(&hw->hw, priv->page, priv->chan); - if (res) + if (res) { pr_debug("set_channel failed\n"); - else { + } else { priv->hw->phy->current_channel = priv->chan; priv->hw->phy->current_page = priv->page; } @@ -210,8 +210,9 @@ void mac802154_dev_set_page_channel(struct net_device *dev, u8 page, u8 chan) INIT_WORK(&work->work, phy_chan_notify); work->dev = dev; queue_work(priv->hw->dev_workqueue, &work->work); - } else + } else { mutex_unlock(&priv->hw->phy->pib_lock); + } } diff --git a/net/mac802154/tx.c b/net/mac802154/tx.c index 6d16473..8124353 100644 --- a/net/mac802154/tx.c +++ b/net/mac802154/tx.c @@ -98,6 +98,7 @@ netdev_tx_t mac802154_tx(struct mac802154_priv *priv, struct sk_buff *skb, if (!(priv->hw.flags & IEEE802154_HW_OMIT_CKSUM)) { u16 crc = crc_ccitt(0, skb->data, skb->len); u8 *data = skb_put(skb, 2); + data[0] = crc & 0xff; data[1] = crc >> 8; }