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
45c16cd9
Commit
45c16cd9
authored
Oct 15, 2008
by
David Vrabel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uwb: use time_after() when purging stale beacons
Signed-off-by:
David Vrabel
<
david.vrabel@csr.com
>
parent
99ee3a6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
drivers/uwb/beacon.c
drivers/uwb/beacon.c
+4
-3
No files found.
drivers/uwb/beacon.c
View file @
45c16cd9
...
...
@@ -298,11 +298,12 @@ struct uwb_beca_e *__uwb_beca_add(struct uwb_rc_evt_beacon *be,
void
uwb_beca_purge
(
void
)
{
struct
uwb_beca_e
*
bce
,
*
next
;
unsigned
long
now
=
jiffies
;
unsigned
long
expires
;
mutex_lock
(
&
uwb_beca
.
mutex
);
list_for_each_entry_safe
(
bce
,
next
,
&
uwb_beca
.
list
,
node
)
{
if
(
now
-
bce
->
ts_jiffies
>
msecs_to_jiffies
(
beacon_timeout_m
s
))
{
expires
=
bce
->
ts_jiffies
+
msecs_to_jiffies
(
beacon_timeout_ms
);
if
(
time_after
(
jiffies
,
expire
s
))
{
uwbd_dev_offair
(
bce
);
list_del
(
&
bce
->
node
);
uwb_bce_put
(
bce
);
...
...
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