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
7f409844
Commit
7f409844
authored
May 14, 2003
by
Dave Jones
Committed by
Linus Torvalds
May 14, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] byte counters for mkiss
From 2.4 from way back 13 months ago..
parent
e33de428
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
drivers/net/hamradio/mkiss.c
drivers/net/hamradio/mkiss.c
+6
-1
drivers/net/hamradio/mkiss.h
drivers/net/hamradio/mkiss.h
+2
-0
No files found.
drivers/net/hamradio/mkiss.c
View file @
7f409844
...
@@ -347,6 +347,7 @@ static void ax_bump(struct ax_disp *ax)
...
@@ -347,6 +347,7 @@ static void ax_bump(struct ax_disp *ax)
netif_rx
(
skb
);
netif_rx
(
skb
);
tmp_ax
->
dev
->
last_rx
=
jiffies
;
tmp_ax
->
dev
->
last_rx
=
jiffies
;
tmp_ax
->
rx_packets
++
;
tmp_ax
->
rx_packets
++
;
tmp_ax
->
rx_bytes
+=
count
;
}
}
/* Encapsulate one AX.25 packet and stuff into a TTY queue. */
/* Encapsulate one AX.25 packet and stuff into a TTY queue. */
...
@@ -386,6 +387,7 @@ static void ax_encaps(struct ax_disp *ax, unsigned char *icp, int len)
...
@@ -386,6 +387,7 @@ static void ax_encaps(struct ax_disp *ax, unsigned char *icp, int len)
ax
->
tty
->
flags
|=
(
1
<<
TTY_DO_WRITE_WAKEUP
);
ax
->
tty
->
flags
|=
(
1
<<
TTY_DO_WRITE_WAKEUP
);
actual
=
ax
->
tty
->
driver
->
write
(
ax
->
tty
,
0
,
ax
->
xbuff
,
count
);
actual
=
ax
->
tty
->
driver
->
write
(
ax
->
tty
,
0
,
ax
->
xbuff
,
count
);
ax
->
tx_packets
++
;
ax
->
tx_packets
++
;
ax
->
tx_bytes
+=
actual
;
ax
->
dev
->
trans_start
=
jiffies
;
ax
->
dev
->
trans_start
=
jiffies
;
ax
->
xleft
=
count
-
actual
;
ax
->
xleft
=
count
-
actual
;
ax
->
xhead
=
ax
->
xbuff
+
actual
;
ax
->
xhead
=
ax
->
xbuff
+
actual
;
...
@@ -394,6 +396,7 @@ static void ax_encaps(struct ax_disp *ax, unsigned char *icp, int len)
...
@@ -394,6 +396,7 @@ static void ax_encaps(struct ax_disp *ax, unsigned char *icp, int len)
ax
->
mkiss
->
tty
->
flags
|=
(
1
<<
TTY_DO_WRITE_WAKEUP
);
ax
->
mkiss
->
tty
->
flags
|=
(
1
<<
TTY_DO_WRITE_WAKEUP
);
actual
=
ax
->
mkiss
->
tty
->
driver
->
write
(
ax
->
mkiss
->
tty
,
0
,
ax
->
mkiss
->
xbuff
,
count
);
actual
=
ax
->
mkiss
->
tty
->
driver
->
write
(
ax
->
mkiss
->
tty
,
0
,
ax
->
mkiss
->
xbuff
,
count
);
ax
->
tx_packets
++
;
ax
->
tx_packets
++
;
ax
->
tx_bytes
+=
actual
;
ax
->
mkiss
->
dev
->
trans_start
=
jiffies
;
ax
->
mkiss
->
dev
->
trans_start
=
jiffies
;
ax
->
mkiss
->
xleft
=
count
-
actual
;
ax
->
mkiss
->
xleft
=
count
-
actual
;
ax
->
mkiss
->
xhead
=
ax
->
mkiss
->
xbuff
+
actual
;
ax
->
mkiss
->
xhead
=
ax
->
mkiss
->
xbuff
+
actual
;
...
@@ -709,6 +712,8 @@ static struct net_device_stats *ax_get_stats(struct net_device *dev)
...
@@ -709,6 +712,8 @@ static struct net_device_stats *ax_get_stats(struct net_device *dev)
stats
.
rx_packets
=
ax
->
rx_packets
;
stats
.
rx_packets
=
ax
->
rx_packets
;
stats
.
tx_packets
=
ax
->
tx_packets
;
stats
.
tx_packets
=
ax
->
tx_packets
;
stats
.
rx_bytes
=
ax
->
rx_bytes
;
stats
.
tx_bytes
=
ax
->
tx_bytes
;
stats
.
rx_dropped
=
ax
->
rx_dropped
;
stats
.
rx_dropped
=
ax
->
rx_dropped
;
stats
.
tx_dropped
=
ax
->
tx_dropped
;
stats
.
tx_dropped
=
ax
->
tx_dropped
;
stats
.
tx_errors
=
ax
->
tx_errors
;
stats
.
tx_errors
=
ax
->
tx_errors
;
...
@@ -936,7 +941,7 @@ static int ax25_init(struct net_device *dev)
...
@@ -936,7 +941,7 @@ static int ax25_init(struct net_device *dev)
memcpy
(
dev
->
dev_addr
,
ax25_test
,
AX25_ADDR_LEN
);
memcpy
(
dev
->
dev_addr
,
ax25_test
,
AX25_ADDR_LEN
);
/* New-style flags. */
/* New-style flags. */
dev
->
flags
=
0
;
dev
->
flags
=
IFF_BROADCAST
|
IFF_MULTICAST
;
return
0
;
return
0
;
}
}
...
...
drivers/net/hamradio/mkiss.h
View file @
7f409844
...
@@ -31,6 +31,8 @@ struct ax_disp {
...
@@ -31,6 +31,8 @@ struct ax_disp {
/* SLIP interface statistics. */
/* SLIP interface statistics. */
unsigned
long
rx_packets
;
/* inbound frames counter */
unsigned
long
rx_packets
;
/* inbound frames counter */
unsigned
long
tx_packets
;
/* outbound frames counter */
unsigned
long
tx_packets
;
/* outbound frames counter */
unsigned
long
rx_bytes
;
/* inbound bytes counter */
unsigned
long
tx_bytes
;
/* outbound bytes counter */
unsigned
long
rx_errors
;
/* Parity, etc. errors */
unsigned
long
rx_errors
;
/* Parity, etc. errors */
unsigned
long
tx_errors
;
/* Planned stuff */
unsigned
long
tx_errors
;
/* Planned stuff */
unsigned
long
rx_dropped
;
/* No memory for skb */
unsigned
long
rx_dropped
;
/* No memory for skb */
...
...
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