Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
902bca00
Commit
902bca00
authored
Nov 06, 2010
by
Stefan Richter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewire: net: count stats.tx_packets and stats.tx_bytes
Signed-off-by:
Stefan Richter
<
stefanr@s5r6.in-berlin.de
>
parent
e53beacd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
drivers/firewire/net.c
drivers/firewire/net.c
+6
-3
No files found.
drivers/firewire/net.c
View file @
902bca00
...
...
@@ -906,6 +906,7 @@ static int fwnet_send_packet(struct fwnet_packet_task *ptask);
static
void
fwnet_transmit_packet_done
(
struct
fwnet_packet_task
*
ptask
)
{
struct
fwnet_device
*
dev
=
ptask
->
dev
;
struct
sk_buff
*
skb
=
ptask
->
skb
;
unsigned
long
flags
;
bool
free
;
...
...
@@ -916,8 +917,11 @@ static void fwnet_transmit_packet_done(struct fwnet_packet_task *ptask)
/* Check whether we or the networking TX soft-IRQ is last user. */
free
=
(
ptask
->
outstanding_pkts
==
0
&&
!
list_empty
(
&
ptask
->
pt_link
));
if
(
ptask
->
outstanding_pkts
==
0
)
if
(
ptask
->
outstanding_pkts
==
0
)
{
list_del
(
&
ptask
->
pt_link
);
dev
->
netdev
->
stats
.
tx_packets
++
;
dev
->
netdev
->
stats
.
tx_bytes
+=
skb
->
len
;
}
spin_unlock_irqrestore
(
&
dev
->
lock
,
flags
);
...
...
@@ -926,7 +930,6 @@ static void fwnet_transmit_packet_done(struct fwnet_packet_task *ptask)
u16
fg_off
;
u16
datagram_label
;
u16
lf
;
struct
sk_buff
*
skb
;
/* Update the ptask to point to the next fragment and send it */
lf
=
fwnet_get_hdr_lf
(
&
ptask
->
hdr
);
...
...
@@ -953,7 +956,7 @@ static void fwnet_transmit_packet_done(struct fwnet_packet_task *ptask)
datagram_label
=
fwnet_get_hdr_dgl
(
&
ptask
->
hdr
);
break
;
}
skb
=
ptask
->
skb
;
skb_pull
(
skb
,
ptask
->
max_payload
);
if
(
ptask
->
outstanding_pkts
>
1
)
{
fwnet_make_sf_hdr
(
&
ptask
->
hdr
,
RFC2374_HDR_INTFRAG
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment