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
73594418
Commit
73594418
authored
May 17, 2002
by
Kai Germaschewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ISDN: CAPI: Remove duplicate statistics
No need to maintain statistics twice.
parent
7914ddde
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
36 deletions
+8
-36
drivers/isdn/capi/capi.c
drivers/isdn/capi/capi.c
+4
-21
drivers/isdn/capi/capidrv.c
drivers/isdn/capi/capidrv.c
+4
-15
No files found.
drivers/isdn/capi/capi.c
View file @
73594418
...
...
@@ -128,12 +128,6 @@ struct capidev {
struct
sk_buff_head
recvqueue
;
wait_queue_head_t
recvwait
;
/* Statistic */
unsigned
long
nrecvctlpkt
;
unsigned
long
nrecvdatapkt
;
unsigned
long
nsentctlpkt
;
unsigned
long
nsentdatapkt
;
struct
capincci
*
nccis
;
};
...
...
@@ -686,12 +680,6 @@ capi_read(struct file *file, char *buf, size_t count, loff_t *ppos)
}
copied
=
skb
->
len
;
if
(
CAPIMSG_CMD
(
skb
->
data
)
==
CAPI_DATA_B3_IND
)
{
cdev
->
nrecvdatapkt
++
;
}
else
{
cdev
->
nrecvctlpkt
++
;
}
kfree_skb
(
skb
);
return
copied
;
...
...
@@ -744,11 +732,6 @@ capi_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
kfree_skb
(
skb
);
return
-
EIO
;
}
if
(
CAPIMSG_CMD
(
skb
->
data
)
==
CAPI_DATA_B3_REQ
)
{
cdev
->
nsentdatapkt
++
;
}
else
{
cdev
->
nsentctlpkt
++
;
}
return
count
;
}
...
...
@@ -1420,10 +1403,10 @@ static int proc_capidev_read_proc(char *page, char **start, off_t off,
cdev
=
list_entry
(
l
,
struct
capidev
,
list
);
len
+=
sprintf
(
page
+
len
,
"0 %d %lu %lu %lu %lu
\n
"
,
cdev
->
ap
.
applid
,
cdev
->
nrecvctlpkt
,
cdev
->
nrecvdatapkt
,
cdev
->
nsentctlpkt
,
cdev
->
nsentdatapkt
);
cdev
->
ap
.
nrecvctlpkt
,
cdev
->
ap
.
nrecvdatapkt
,
cdev
->
ap
.
nsentctlpkt
,
cdev
->
ap
.
nsentdatapkt
);
if
(
len
<=
off
)
{
off
-=
len
;
len
=
0
;
...
...
drivers/isdn/capi/capidrv.c
View file @
73594418
...
...
@@ -128,12 +128,6 @@ struct capidrv_data {
struct
capi20_appl
ap
;
int
ncontr
;
struct
capidrv_contr
*
contr_list
;
/* statistic */
unsigned
long
nrecvctlpkt
;
unsigned
long
nrecvdatapkt
;
unsigned
long
nsentctlpkt
;
unsigned
long
nsentdatapkt
;
};
typedef
struct
capidrv_plci
capidrv_plci
;
...
...
@@ -519,7 +513,6 @@ static void send_message(capidrv_contr * card, _cmsg * cmsg)
skb
=
alloc_skb
(
len
,
GFP_ATOMIC
);
memcpy
(
skb_put
(
skb
,
len
),
cmsg
->
buf
,
len
);
capi20_put_message
(
&
global
.
ap
,
skb
);
global
.
nsentctlpkt
++
;
}
/* -------- state machine -------------------------------------------- */
...
...
@@ -1382,7 +1375,6 @@ static void capidrv_recv_message(struct capi20_appl *ap, struct sk_buff *skb)
if
(
s_cmsg
.
Command
==
CAPI_DATA_B3
&&
s_cmsg
.
Subcommand
==
CAPI_IND
)
{
handle_data
(
&
s_cmsg
,
skb
);
global
.
nrecvdatapkt
++
;
return
;
}
if
((
s_cmsg
.
adr
.
adrController
&
0xffffff00
)
==
0
)
...
...
@@ -1397,7 +1389,6 @@ static void capidrv_recv_message(struct capi20_appl *ap, struct sk_buff *skb)
* thanks to Lars Heete <hel@admin.de>
*/
kfree_skb
(
skb
);
global
.
nrecvctlpkt
++
;
}
/* ------------------------------------------------------------------- */
...
...
@@ -1912,7 +1903,6 @@ static int if_sendbuf(int id, int channel, int doack, struct sk_buff *skb)
if
(
errcode
==
CAPI_NOERROR
)
{
dev_kfree_skb
(
skb
);
nccip
->
datahandle
++
;
global
.
nsentdatapkt
++
;
return
len
;
}
(
void
)
capidrv_del_ack
(
nccip
,
datahandle
);
...
...
@@ -1923,7 +1913,6 @@ static int if_sendbuf(int id, int channel, int doack, struct sk_buff *skb)
errcode
=
capi20_put_message
(
&
global
.
ap
,
skb
);
if
(
errcode
==
CAPI_NOERROR
)
{
nccip
->
datahandle
++
;
global
.
nsentdatapkt
++
;
return
len
;
}
skb_pull
(
skb
,
msglen
);
...
...
@@ -2238,10 +2227,10 @@ static int proc_capidrv_read_proc(char *page, char **start, off_t off,
int
len
=
0
;
len
+=
sprintf
(
page
+
len
,
"%lu %lu %lu %lu
\n
"
,
global
.
nrecvctlpkt
,
global
.
nrecvdatapkt
,
global
.
nsentctlpkt
,
global
.
nsentdatapkt
);
global
.
ap
.
nrecvctlpkt
,
global
.
ap
.
nrecvdatapkt
,
global
.
ap
.
nsentctlpkt
,
global
.
ap
.
nsentdatapkt
);
if
(
off
+
count
>=
len
)
*
eof
=
1
;
if
(
len
<
off
)
...
...
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