aboutsummaryrefslogtreecommitdiffstats
path: root/net/ieee802154
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-02-28 01:32:48 -0500
committerDavid S. Miller <davem@davemloft.net>2014-02-28 17:05:22 -0500
commitd57fec84fb103f2c96522f0c7d7a9fa49b50498f (patch)
treefbc9d32b38bcc456dce4ba64d9efe0d4d1d8638a /net/ieee802154
parent01348b34485eceace5d9ca9756ba40679cf22ac6 (diff)
6lowpan: fix some checkpatch issues
Detected with: ./scripts/checkpatch.pl --strict -f net/ieee802154/6lowpan_rtnl.c Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ieee802154')
-rw-r--r--net/ieee802154/6lowpan_rtnl.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/net/ieee802154/6lowpan_rtnl.c b/net/ieee802154/6lowpan_rtnl.c
index 6b7d17fd5481..f9c954824ddb 100644
--- a/net/ieee802154/6lowpan_rtnl.c
+++ b/net/ieee802154/6lowpan_rtnl.c
@@ -1,10 +1,8 @@
1/* 1/* Copyright 2011, Siemens AG
2 * Copyright 2011, Siemens AG
3 * written by Alexander Smirnov <alex.bluesman.smirnov@gmail.com> 2 * written by Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
4 */ 3 */
5 4
6/* 5/* Based on patches from Jon Smirl <jonsmirl@gmail.com>
7 * Based on patches from Jon Smirl <jonsmirl@gmail.com>
8 * Copyright (c) 2011 Jon Smirl <jonsmirl@gmail.com> 6 * Copyright (c) 2011 Jon Smirl <jonsmirl@gmail.com>
9 * 7 *
10 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
@@ -15,10 +13,6 @@
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details. 15 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 */ 16 */
23 17
24/* Jon's code is based on 6lowpan implementation for Contiki which is: 18/* Jon's code is based on 6lowpan implementation for Contiki which is:
@@ -124,13 +118,11 @@ static int lowpan_header_create(struct sk_buff *skb,
124 118
125 lowpan_header_compress(skb, dev, type, daddr, saddr, len); 119 lowpan_header_compress(skb, dev, type, daddr, saddr, len);
126 120
127 /* 121 /* NOTE1: I'm still unsure about the fact that compression and WPAN
128 * NOTE1: I'm still unsure about the fact that compression and WPAN
129 * header are created here and not later in the xmit. So wait for 122 * header are created here and not later in the xmit. So wait for
130 * an opinion of net maintainers. 123 * an opinion of net maintainers.
131 */ 124 */
132 /* 125 /* NOTE2: to be absolutely correct, we must derive PANid information
133 * NOTE2: to be absolutely correct, we must derive PANid information
134 * from MAC subif of the 'dev' and 'real_dev' network devices, but 126 * from MAC subif of the 'dev' and 'real_dev' network devices, but
135 * this isn't implemented in mainline yet, so currently we assign 0xff 127 * this isn't implemented in mainline yet, so currently we assign 0xff
136 */ 128 */
@@ -145,8 +137,7 @@ static int lowpan_header_create(struct sk_buff *skb,
145 /* intra-PAN communications */ 137 /* intra-PAN communications */
146 da.pan_id = ieee802154_mlme_ops(dev)->get_pan_id(dev); 138 da.pan_id = ieee802154_mlme_ops(dev)->get_pan_id(dev);
147 139
148 /* 140 /* if the destination address is the broadcast address, use the
149 * if the destination address is the broadcast address, use the
150 * corresponding short address 141 * corresponding short address
151 */ 142 */
152 if (lowpan_is_addr_broadcast(daddr)) { 143 if (lowpan_is_addr_broadcast(daddr)) {
@@ -386,7 +377,7 @@ static int lowpan_set_address(struct net_device *dev, void *p)
386 377
387static int 378static int
388lowpan_fragment_xmit(struct sk_buff *skb, u8 *head, 379lowpan_fragment_xmit(struct sk_buff *skb, u8 *head,
389 int mlen, int plen, int offset, int type) 380 int mlen, int plen, int offset, int type)
390{ 381{
391 struct sk_buff *frag; 382 struct sk_buff *frag;
392 int hlen; 383 int hlen;
@@ -478,8 +469,8 @@ lowpan_skb_fragmentation(struct sk_buff *skb, struct net_device *dev)
478 err = lowpan_fragment_xmit(skb, head, header_length, len, 469 err = lowpan_fragment_xmit(skb, head, header_length, len,
479 offset, LOWPAN_DISPATCH_FRAGN); 470 offset, LOWPAN_DISPATCH_FRAGN);
480 if (err) { 471 if (err) {
481 pr_debug("%s unable to send a subsequent FRAGN packet " 472 pr_debug("%s unable to send a FRAGN packet. (tag: %d, offset: %d)\n",
482 "(tag: %d, offset: %d", __func__, tag, offset); 473 __func__, tag, offset);
483 goto exit; 474 goto exit;
484 } 475 }
485 476
@@ -686,7 +677,7 @@ static int lowpan_newlink(struct net *src_net, struct net_device *dev,
686 lowpan_dev_info(dev)->fragment_tag = 0; 677 lowpan_dev_info(dev)->fragment_tag = 0;
687 mutex_init(&lowpan_dev_info(dev)->dev_list_mtx); 678 mutex_init(&lowpan_dev_info(dev)->dev_list_mtx);
688 679
689 entry = kzalloc(sizeof(struct lowpan_dev_record), GFP_KERNEL); 680 entry = kzalloc(sizeof(*entry), GFP_KERNEL);
690 if (!entry) { 681 if (!entry) {
691 dev_put(real_dev); 682 dev_put(real_dev);
692 lowpan_dev_info(dev)->real_dev = NULL; 683 lowpan_dev_info(dev)->real_dev = NULL;