diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 14:38:13 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 14:38:13 -0500 |
commit | cb18eccff48ef3986d1072964590bce6fec705fb (patch) | |
tree | 777fb1d15e0281341e1e02c9803d989538d346f2 /net/bluetooth/bnep/netdev.c | |
parent | c827ba4cb49a30ce581201fd0ba2be77cde412c7 (diff) | |
parent | 5ef213f6842277ee1df5659f59fac0ffc9beb411 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (45 commits)
[IPV4]: Restore multipath routing after rt_next changes.
[XFRM] IPV6: Fix outbound RO transformation which is broken by IPsec tunnel patch.
[NET]: Reorder fields of struct dst_entry
[DECNET]: Convert decnet route to use the new dst_entry 'next' pointer
[IPV6]: Convert ipv6 route to use the new dst_entry 'next' pointer
[IPV4]: Convert ipv4 route to use the new dst_entry 'next' pointer
[NET]: Introduce union in struct dst_entry to hold 'next' pointer
[DECNET]: fix misannotation of linkinfo_dn
[DECNET]: FRA_{DST,SRC} are le16 for decnet
[UDP]: UDP can use sk_hash to speedup lookups
[NET]: Fix whitespace errors.
[NET] XFRM: Fix whitespace errors.
[NET] X25: Fix whitespace errors.
[NET] WANROUTER: Fix whitespace errors.
[NET] UNIX: Fix whitespace errors.
[NET] TIPC: Fix whitespace errors.
[NET] SUNRPC: Fix whitespace errors.
[NET] SCTP: Fix whitespace errors.
[NET] SCHED: Fix whitespace errors.
[NET] RXRPC: Fix whitespace errors.
...
Diffstat (limited to 'net/bluetooth/bnep/netdev.c')
-rw-r--r-- | net/bluetooth/bnep/netdev.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/net/bluetooth/bnep/netdev.c b/net/bluetooth/bnep/netdev.c index 67a002a9751a..9092816f58de 100644 --- a/net/bluetooth/bnep/netdev.c +++ b/net/bluetooth/bnep/netdev.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | BNEP implementation for Linux Bluetooth stack (BlueZ). | 2 | BNEP implementation for Linux Bluetooth stack (BlueZ). |
3 | Copyright (C) 2001-2002 Inventel Systemes | 3 | Copyright (C) 2001-2002 Inventel Systemes |
4 | Written 2001-2002 by | 4 | Written 2001-2002 by |
@@ -15,19 +15,19 @@ | |||
15 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | 15 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. | 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. |
17 | IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY | 17 | IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY |
18 | CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES | 18 | CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES |
19 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | 19 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
20 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | 20 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
21 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 21 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
22 | 22 | ||
23 | ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, | 23 | ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, |
24 | COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS | 24 | COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS |
25 | SOFTWARE IS DISCLAIMED. | 25 | SOFTWARE IS DISCLAIMED. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | /* | 28 | /* |
29 | * $Id: netdev.c,v 1.8 2002/08/04 21:23:58 maxk Exp $ | 29 | * $Id: netdev.c,v 1.8 2002/08/04 21:23:58 maxk Exp $ |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
33 | 33 | ||
@@ -94,7 +94,7 @@ static void bnep_net_set_mc_list(struct net_device *dev) | |||
94 | r->type = BNEP_CONTROL; | 94 | r->type = BNEP_CONTROL; |
95 | r->ctrl = BNEP_FILTER_MULTI_ADDR_SET; | 95 | r->ctrl = BNEP_FILTER_MULTI_ADDR_SET; |
96 | 96 | ||
97 | if (dev->flags & (IFF_PROMISC | IFF_ALLMULTI)) { | 97 | if (dev->flags & (IFF_PROMISC | IFF_ALLMULTI)) { |
98 | u8 start[ETH_ALEN] = { 0x01 }; | 98 | u8 start[ETH_ALEN] = { 0x01 }; |
99 | 99 | ||
100 | /* Request all addresses */ | 100 | /* Request all addresses */ |
@@ -102,14 +102,14 @@ static void bnep_net_set_mc_list(struct net_device *dev) | |||
102 | memcpy(__skb_put(skb, ETH_ALEN), dev->broadcast, ETH_ALEN); | 102 | memcpy(__skb_put(skb, ETH_ALEN), dev->broadcast, ETH_ALEN); |
103 | r->len = htons(ETH_ALEN * 2); | 103 | r->len = htons(ETH_ALEN * 2); |
104 | } else { | 104 | } else { |
105 | struct dev_mc_list *dmi = dev->mc_list; | 105 | struct dev_mc_list *dmi = dev->mc_list; |
106 | int i, len = skb->len; | 106 | int i, len = skb->len; |
107 | 107 | ||
108 | if (dev->flags & IFF_BROADCAST) { | 108 | if (dev->flags & IFF_BROADCAST) { |
109 | memcpy(__skb_put(skb, ETH_ALEN), dev->broadcast, ETH_ALEN); | 109 | memcpy(__skb_put(skb, ETH_ALEN), dev->broadcast, ETH_ALEN); |
110 | memcpy(__skb_put(skb, ETH_ALEN), dev->broadcast, ETH_ALEN); | 110 | memcpy(__skb_put(skb, ETH_ALEN), dev->broadcast, ETH_ALEN); |
111 | } | 111 | } |
112 | 112 | ||
113 | /* FIXME: We should group addresses here. */ | 113 | /* FIXME: We should group addresses here. */ |
114 | 114 | ||
115 | for (i = 0; i < dev->mc_count && i < BNEP_MAX_MULTICAST_FILTERS; i++) { | 115 | for (i = 0; i < dev->mc_count && i < BNEP_MAX_MULTICAST_FILTERS; i++) { |
@@ -159,13 +159,13 @@ static inline u16 bnep_net_eth_proto(struct sk_buff *skb) | |||
159 | { | 159 | { |
160 | struct ethhdr *eh = (void *) skb->data; | 160 | struct ethhdr *eh = (void *) skb->data; |
161 | u16 proto = ntohs(eh->h_proto); | 161 | u16 proto = ntohs(eh->h_proto); |
162 | 162 | ||
163 | if (proto >= 1536) | 163 | if (proto >= 1536) |
164 | return proto; | 164 | return proto; |
165 | 165 | ||
166 | if (get_unaligned((__be16 *) skb->data) == htons(0xFFFF)) | 166 | if (get_unaligned((__be16 *) skb->data) == htons(0xFFFF)) |
167 | return ETH_P_802_3; | 167 | return ETH_P_802_3; |
168 | 168 | ||
169 | return ETH_P_802_2; | 169 | return ETH_P_802_2; |
170 | } | 170 | } |
171 | 171 | ||
@@ -174,7 +174,7 @@ static inline int bnep_net_proto_filter(struct sk_buff *skb, struct bnep_session | |||
174 | u16 proto = bnep_net_eth_proto(skb); | 174 | u16 proto = bnep_net_eth_proto(skb); |
175 | struct bnep_proto_filter *f = s->proto_filter; | 175 | struct bnep_proto_filter *f = s->proto_filter; |
176 | int i; | 176 | int i; |
177 | 177 | ||
178 | for (i = 0; i < BNEP_MAX_PROTO_FILTERS && f[i].end; i++) { | 178 | for (i = 0; i < BNEP_MAX_PROTO_FILTERS && f[i].end; i++) { |
179 | if (proto >= f[i].start && proto <= f[i].end) | 179 | if (proto >= f[i].start && proto <= f[i].end) |
180 | return 0; | 180 | return 0; |
@@ -198,14 +198,14 @@ static int bnep_net_xmit(struct sk_buff *skb, struct net_device *dev) | |||
198 | return 0; | 198 | return 0; |
199 | } | 199 | } |
200 | #endif | 200 | #endif |
201 | 201 | ||
202 | #ifdef CONFIG_BT_BNEP_PROTO_FILTER | 202 | #ifdef CONFIG_BT_BNEP_PROTO_FILTER |
203 | if (bnep_net_proto_filter(skb, s)) { | 203 | if (bnep_net_proto_filter(skb, s)) { |
204 | kfree_skb(skb); | 204 | kfree_skb(skb); |
205 | return 0; | 205 | return 0; |
206 | } | 206 | } |
207 | #endif | 207 | #endif |
208 | 208 | ||
209 | /* | 209 | /* |
210 | * We cannot send L2CAP packets from here as we are potentially in a bh. | 210 | * We cannot send L2CAP packets from here as we are potentially in a bh. |
211 | * So we have to queue them and wake up session thread which is sleeping | 211 | * So we have to queue them and wake up session thread which is sleeping |