Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
8fc5387c
Commit
8fc5387c
authored
Sep 21, 2008
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bluetooth: hci_bcsp: Use SKB list interfaces instead of home-grown stuff.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
e9bb8fb0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
drivers/bluetooth/hci_bcsp.c
drivers/bluetooth/hci_bcsp.c
+9
-9
No files found.
drivers/bluetooth/hci_bcsp.c
View file @
8fc5387c
...
@@ -352,14 +352,14 @@ static int bcsp_flush(struct hci_uart *hu)
...
@@ -352,14 +352,14 @@ static int bcsp_flush(struct hci_uart *hu)
/* Remove ack'ed packets */
/* Remove ack'ed packets */
static
void
bcsp_pkt_cull
(
struct
bcsp_struct
*
bcsp
)
static
void
bcsp_pkt_cull
(
struct
bcsp_struct
*
bcsp
)
{
{
struct
sk_buff
*
skb
,
*
tmp
;
unsigned
long
flags
;
unsigned
long
flags
;
struct
sk_buff
*
skb
;
int
i
,
pkts_to_be_removed
;
int
i
,
pkts_to_be_removed
;
u8
seqno
;
u8
seqno
;
spin_lock_irqsave
(
&
bcsp
->
unack
.
lock
,
flags
);
spin_lock_irqsave
(
&
bcsp
->
unack
.
lock
,
flags
);
pkts_to_be_removed
=
bcsp
->
unack
.
qlen
;
pkts_to_be_removed
=
skb_queue_len
(
&
bcsp
->
unack
)
;
seqno
=
bcsp
->
msgq_txseq
;
seqno
=
bcsp
->
msgq_txseq
;
while
(
pkts_to_be_removed
)
{
while
(
pkts_to_be_removed
)
{
...
@@ -373,19 +373,19 @@ static void bcsp_pkt_cull(struct bcsp_struct *bcsp)
...
@@ -373,19 +373,19 @@ static void bcsp_pkt_cull(struct bcsp_struct *bcsp)
BT_ERR
(
"Peer acked invalid packet"
);
BT_ERR
(
"Peer acked invalid packet"
);
BT_DBG
(
"Removing %u pkts out of %u, up to seqno %u"
,
BT_DBG
(
"Removing %u pkts out of %u, up to seqno %u"
,
pkts_to_be_removed
,
bcsp
->
unack
.
qlen
,
(
seqno
-
1
)
&
0x07
);
pkts_to_be_removed
,
skb_queue_len
(
&
bcsp
->
unack
),
(
seqno
-
1
)
&
0x07
);
for
(
i
=
0
,
skb
=
((
struct
sk_buff
*
)
&
bcsp
->
unack
)
->
next
;
i
<
pkts_to_be_removed
i
=
0
;
&&
skb
!=
(
struct
sk_buff
*
)
&
bcsp
->
unack
;
i
++
)
{
skb_queue_walk_safe
(
&
bcsp
->
unack
,
skb
,
tmp
)
{
struct
sk_buff
*
nskb
;
if
(
i
++
>=
pkts_to_be_removed
)
break
;
nskb
=
skb
->
next
;
__skb_unlink
(
skb
,
&
bcsp
->
unack
);
__skb_unlink
(
skb
,
&
bcsp
->
unack
);
kfree_skb
(
skb
);
kfree_skb
(
skb
);
skb
=
nskb
;
}
}
if
(
bcsp
->
unack
.
qlen
==
0
)
if
(
skb_queue_empty
(
&
bcsp
->
unack
)
)
del_timer
(
&
bcsp
->
tbcsp
);
del_timer
(
&
bcsp
->
tbcsp
);
spin_unlock_irqrestore
(
&
bcsp
->
unack
.
lock
,
flags
);
spin_unlock_irqrestore
(
&
bcsp
->
unack
.
lock
,
flags
);
...
...
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