aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2014-03-13 15:58:03 -0400
committerDavid S. Miller <davem@davemloft.net>2014-03-13 16:10:11 -0400
commit177943260a6088bec51fc6c04643d84e43bef423 (patch)
treee3dbed894d435bf3cf68f8f2fe38939e97f353ad
parent702eca02b7c8574b42359512ebccfa777a71f66e (diff)
6lowpan: reassembly: un-export local functions
most of these are only used locally, make them static. fold lowpan_expire_frag_queue into its caller, its small enough. Cc: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ieee802154/reassembly.c30
1 files changed, 11 insertions, 19 deletions
diff --git a/net/ieee802154/reassembly.c b/net/ieee802154/reassembly.c
index f4ac95778977..1dae1991883d 100644
--- a/net/ieee802154/reassembly.c
+++ b/net/ieee802154/reassembly.c
@@ -58,7 +58,7 @@ static unsigned int lowpan_hashfn(struct inet_frag_queue *q)
58 return lowpan_hash_frag(fq->tag, fq->d_size, &fq->saddr, &fq->daddr); 58 return lowpan_hash_frag(fq->tag, fq->d_size, &fq->saddr, &fq->daddr);
59} 59}
60 60
61bool lowpan_frag_match(struct inet_frag_queue *q, void *a) 61static bool lowpan_frag_match(struct inet_frag_queue *q, void *a)
62{ 62{
63 struct lowpan_frag_queue *fq; 63 struct lowpan_frag_queue *fq;
64 struct lowpan_create_arg *arg = a; 64 struct lowpan_create_arg *arg = a;
@@ -68,9 +68,8 @@ bool lowpan_frag_match(struct inet_frag_queue *q, void *a)
68 ieee802154_addr_addr_equal(&fq->saddr, arg->src) && 68 ieee802154_addr_addr_equal(&fq->saddr, arg->src) &&
69 ieee802154_addr_addr_equal(&fq->daddr, arg->dst); 69 ieee802154_addr_addr_equal(&fq->daddr, arg->dst);
70} 70}
71EXPORT_SYMBOL(lowpan_frag_match);
72 71
73void lowpan_frag_init(struct inet_frag_queue *q, void *a) 72static void lowpan_frag_init(struct inet_frag_queue *q, void *a)
74{ 73{
75 struct lowpan_frag_queue *fq; 74 struct lowpan_frag_queue *fq;
76 struct lowpan_create_arg *arg = a; 75 struct lowpan_create_arg *arg = a;
@@ -82,21 +81,6 @@ void lowpan_frag_init(struct inet_frag_queue *q, void *a)
82 fq->saddr = *arg->src; 81 fq->saddr = *arg->src;
83 fq->daddr = *arg->dst; 82 fq->daddr = *arg->dst;
84} 83}
85EXPORT_SYMBOL(lowpan_frag_init);
86
87void lowpan_expire_frag_queue(struct frag_queue *fq, struct inet_frags *frags)
88{
89 spin_lock(&fq->q.lock);
90
91 if (fq->q.last_in & INET_FRAG_COMPLETE)
92 goto out;
93
94 inet_frag_kill(&fq->q, frags);
95out:
96 spin_unlock(&fq->q.lock);
97 inet_frag_put(&fq->q, frags);
98}
99EXPORT_SYMBOL(lowpan_expire_frag_queue);
100 84
101static void lowpan_frag_expire(unsigned long data) 85static void lowpan_frag_expire(unsigned long data)
102{ 86{
@@ -106,7 +90,15 @@ static void lowpan_frag_expire(unsigned long data)
106 fq = container_of((struct inet_frag_queue *)data, struct frag_queue, q); 90 fq = container_of((struct inet_frag_queue *)data, struct frag_queue, q);
107 net = container_of(fq->q.net, struct net, ieee802154_lowpan.frags); 91 net = container_of(fq->q.net, struct net, ieee802154_lowpan.frags);
108 92
109 lowpan_expire_frag_queue(fq, &lowpan_frags); 93 spin_lock(&fq->q.lock);
94
95 if (fq->q.last_in & INET_FRAG_COMPLETE)
96 goto out;
97
98 inet_frag_kill(&fq->q, &lowpan_frags);
99out:
100 spin_unlock(&fq->q.lock);
101 inet_frag_put(&fq->q, &lowpan_frags);
110} 102}
111 103
112static inline struct lowpan_frag_queue * 104static inline struct lowpan_frag_queue *