Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
linux-seco-imx
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Jira
Code
Merge requests
12
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Clea OS
bsp
nxp
linux-seco-imx
Commits
d78c68ef
Commit
d78c68ef
authored
14 years ago
by
David S. Miller
Browse files
Options
Downloads
Plain Diff
Merge branch 'for-david' of
git://git.open-mesh.org/ecsv/linux-merge
parents
16c0f936
aa0adb1a
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
net/batman-adv/main.h
+3
-3
3 additions, 3 deletions
net/batman-adv/main.h
net/batman-adv/packet.h
+7
-7
7 additions, 7 deletions
net/batman-adv/packet.h
net/batman-adv/types.h
+2
-2
2 additions, 2 deletions
net/batman-adv/types.h
net/batman-adv/unicast.c
+4
-2
4 additions, 2 deletions
net/batman-adv/unicast.c
with
16 additions
and
14 deletions
net/batman-adv/main.h
+
3
−
3
View file @
d78c68ef
...
@@ -151,9 +151,9 @@ int debug_log(struct bat_priv *bat_priv, char *fmt, ...);
...
@@ -151,9 +151,9 @@ int debug_log(struct bat_priv *bat_priv, char *fmt, ...);
} \
} \
while (0)
while (0)
#else
/* !CONFIG_BATMAN_ADV_DEBUG */
#else
/* !CONFIG_BATMAN_ADV_DEBUG */
static
inline
void
bat_dbg
(
char
type
__a
ttribute__
((
unused
))
,
static
inline
void
bat_dbg
(
char
type
__a
lways_
unused
,
struct
bat_priv
*
bat_priv
__a
ttribute__
((
unused
))
,
struct
bat_priv
*
bat_priv
__a
lways_
unused
,
char
*
fmt
__a
ttribute__
((
unused
))
,
...)
char
*
fmt
__a
lways_
unused
,
...)
{
{
}
}
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
net/batman-adv/packet.h
+
7
−
7
View file @
d78c68ef
...
@@ -63,7 +63,7 @@ struct batman_packet {
...
@@ -63,7 +63,7 @@ struct batman_packet {
uint8_t
num_hna
;
uint8_t
num_hna
;
uint8_t
gw_flags
;
/* flags related to gateway class */
uint8_t
gw_flags
;
/* flags related to gateway class */
uint8_t
align
;
uint8_t
align
;
}
__
attribute__
((
packed
))
;
}
__packed
;
#define BAT_PACKET_LEN sizeof(struct batman_packet)
#define BAT_PACKET_LEN sizeof(struct batman_packet)
...
@@ -76,7 +76,7 @@ struct icmp_packet {
...
@@ -76,7 +76,7 @@ struct icmp_packet {
uint8_t
orig
[
6
];
uint8_t
orig
[
6
];
uint16_t
seqno
;
uint16_t
seqno
;
uint8_t
uid
;
uint8_t
uid
;
}
__
attribute__
((
packed
))
;
}
__packed
;
#define BAT_RR_LEN 16
#define BAT_RR_LEN 16
...
@@ -93,14 +93,14 @@ struct icmp_packet_rr {
...
@@ -93,14 +93,14 @@ struct icmp_packet_rr {
uint8_t
uid
;
uint8_t
uid
;
uint8_t
rr_cur
;
uint8_t
rr_cur
;
uint8_t
rr
[
BAT_RR_LEN
][
ETH_ALEN
];
uint8_t
rr
[
BAT_RR_LEN
][
ETH_ALEN
];
}
__
attribute__
((
packed
))
;
}
__packed
;
struct
unicast_packet
{
struct
unicast_packet
{
uint8_t
packet_type
;
uint8_t
packet_type
;
uint8_t
version
;
/* batman version field */
uint8_t
version
;
/* batman version field */
uint8_t
dest
[
6
];
uint8_t
dest
[
6
];
uint8_t
ttl
;
uint8_t
ttl
;
}
__
attribute__
((
packed
))
;
}
__packed
;
struct
unicast_frag_packet
{
struct
unicast_frag_packet
{
uint8_t
packet_type
;
uint8_t
packet_type
;
...
@@ -110,7 +110,7 @@ struct unicast_frag_packet {
...
@@ -110,7 +110,7 @@ struct unicast_frag_packet {
uint8_t
flags
;
uint8_t
flags
;
uint8_t
orig
[
6
];
uint8_t
orig
[
6
];
uint16_t
seqno
;
uint16_t
seqno
;
}
__
attribute__
((
packed
))
;
}
__packed
;
struct
bcast_packet
{
struct
bcast_packet
{
uint8_t
packet_type
;
uint8_t
packet_type
;
...
@@ -118,7 +118,7 @@ struct bcast_packet {
...
@@ -118,7 +118,7 @@ struct bcast_packet {
uint8_t
orig
[
6
];
uint8_t
orig
[
6
];
uint8_t
ttl
;
uint8_t
ttl
;
uint32_t
seqno
;
uint32_t
seqno
;
}
__
attribute__
((
packed
))
;
}
__packed
;
struct
vis_packet
{
struct
vis_packet
{
uint8_t
packet_type
;
uint8_t
packet_type
;
...
@@ -131,6 +131,6 @@ struct vis_packet {
...
@@ -131,6 +131,6 @@ struct vis_packet {
* neighbors */
* neighbors */
uint8_t
target_orig
[
6
];
/* who should receive this packet */
uint8_t
target_orig
[
6
];
/* who should receive this packet */
uint8_t
sender_orig
[
6
];
/* who sent or rebroadcasted this packet */
uint8_t
sender_orig
[
6
];
/* who sent or rebroadcasted this packet */
}
__
attribute__
((
packed
))
;
}
__packed
;
#endif
/* _NET_BATMAN_ADV_PACKET_H_ */
#endif
/* _NET_BATMAN_ADV_PACKET_H_ */
This diff is collapsed.
Click to expand it.
net/batman-adv/types.h
+
2
−
2
View file @
d78c68ef
...
@@ -246,13 +246,13 @@ struct vis_info {
...
@@ -246,13 +246,13 @@ struct vis_info {
/* this packet might be part of the vis send queue. */
/* this packet might be part of the vis send queue. */
struct
sk_buff
*
skb_packet
;
struct
sk_buff
*
skb_packet
;
/* vis_info may follow here*/
/* vis_info may follow here*/
}
__
attribute__
((
packed
))
;
}
__packed
;
struct
vis_info_entry
{
struct
vis_info_entry
{
uint8_t
src
[
ETH_ALEN
];
uint8_t
src
[
ETH_ALEN
];
uint8_t
dest
[
ETH_ALEN
];
uint8_t
dest
[
ETH_ALEN
];
uint8_t
quality
;
/* quality = 0 means HNA */
uint8_t
quality
;
/* quality = 0 means HNA */
}
__
attribute__
((
packed
))
;
}
__packed
;
struct
recvlist_node
{
struct
recvlist_node
{
struct
list_head
list
;
struct
list_head
list
;
...
...
This diff is collapsed.
Click to expand it.
net/batman-adv/unicast.c
+
4
−
2
View file @
d78c68ef
...
@@ -229,10 +229,12 @@ int frag_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv,
...
@@ -229,10 +229,12 @@ int frag_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv,
if
(
!
bat_priv
->
primary_if
)
if
(
!
bat_priv
->
primary_if
)
goto
dropped
;
goto
dropped
;
unicast_packet
=
(
struct
unicast_packet
*
)
skb
->
data
;
frag_skb
=
dev_alloc_skb
(
data_len
-
(
data_len
/
2
)
+
ucf_hdr_len
);
if
(
!
frag_skb
)
goto
dropped
;
unicast_packet
=
(
struct
unicast_packet
*
)
skb
->
data
;
memcpy
(
&
tmp_uc
,
unicast_packet
,
uc_hdr_len
);
memcpy
(
&
tmp_uc
,
unicast_packet
,
uc_hdr_len
);
frag_skb
=
dev_alloc_skb
(
data_len
-
(
data_len
/
2
)
+
ucf_hdr_len
);
skb_split
(
skb
,
frag_skb
,
data_len
/
2
);
skb_split
(
skb
,
frag_skb
,
data_len
/
2
);
if
(
my_skb_head_push
(
skb
,
ucf_hdr_len
-
uc_hdr_len
)
<
0
||
if
(
my_skb_head_push
(
skb
,
ucf_hdr_len
-
uc_hdr_len
)
<
0
||
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment