Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
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-2.6.23
Commits
e67d9d9d
Commit
e67d9d9d
authored
May 12, 2005
by
David Gibson
Committed by
Jeff Garzik
May 12, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Orinoco: wireless stats updates
Minor updates/bugfixes to the handling of wireless statistics.
parent
88d7bd8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
19 deletions
+22
-19
drivers/net/wireless/orinoco.c
drivers/net/wireless/orinoco.c
+22
-19
No files found.
drivers/net/wireless/orinoco.c
View file @
e67d9d9d
...
...
@@ -686,7 +686,7 @@ static struct iw_statistics *orinoco_get_wireless_stats(struct net_device *dev)
struct
orinoco_private
*
priv
=
netdev_priv
(
dev
);
hermes_t
*
hw
=
&
priv
->
hw
;
struct
iw_statistics
*
wstats
=
&
priv
->
wstats
;
int
err
=
0
;
int
err
;
unsigned
long
flags
;
if
(
!
netif_device_present
(
dev
))
{
...
...
@@ -695,9 +695,21 @@ static struct iw_statistics *orinoco_get_wireless_stats(struct net_device *dev)
return
NULL
;
/* FIXME: Can we do better than this? */
}
/* If busy, return the old stats. Returning NULL may cause
* the interface to disappear from /proc/net/wireless */
if
(
orinoco_lock
(
priv
,
&
flags
)
!=
0
)
return
NULL
;
/* FIXME: Erg, we've been signalled, how
* do we propagate this back up? */
return
wstats
;
/* We can't really wait for the tallies inquiry command to
* complete, so we just use the previous results and trigger
* a new tallies inquiry command for next time - Jean II */
/* FIXME: Really we should wait for the inquiry to come back -
* as it is the stats we give don't make a whole lot of sense.
* Unfortunately, it's not clear how to do that within the
* wireless extensions framework: I think we're in user
* context, but a lock seems to be held by the time we get in
* here so we're not safe to sleep here. */
hermes_inquire
(
hw
,
HERMES_INQ_TALLIES
);
if
(
priv
->
iw_mode
==
IW_MODE_ADHOC
)
{
memset
(
&
wstats
->
qual
,
0
,
sizeof
(
wstats
->
qual
));
...
...
@@ -716,25 +728,16 @@ static struct iw_statistics *orinoco_get_wireless_stats(struct net_device *dev)
err
=
HERMES_READ_RECORD
(
hw
,
USER_BAP
,
HERMES_RID_COMMSQUALITY
,
&
cq
);
wstats
->
qual
.
qual
=
(
int
)
le16_to_cpu
(
cq
.
qual
);
wstats
->
qual
.
level
=
(
int
)
le16_to_cpu
(
cq
.
signal
)
-
0x95
;
wstats
->
qual
.
noise
=
(
int
)
le16_to_cpu
(
cq
.
noise
)
-
0x95
;
wstats
->
qual
.
updated
=
7
;
if
(
!
err
)
{
wstats
->
qual
.
qual
=
(
int
)
le16_to_cpu
(
cq
.
qual
);
wstats
->
qual
.
level
=
(
int
)
le16_to_cpu
(
cq
.
signal
)
-
0x95
;
wstats
->
qual
.
noise
=
(
int
)
le16_to_cpu
(
cq
.
noise
)
-
0x95
;
wstats
->
qual
.
updated
=
7
;
}
}
/* We can't really wait for the tallies inquiry command to
* complete, so we just use the previous results and trigger
* a new tallies inquiry command for next time - Jean II */
/* FIXME: We're in user context (I think?), so we should just
wait for the tallies to come through */
err
=
hermes_inquire
(
hw
,
HERMES_INQ_TALLIES
);
orinoco_unlock
(
priv
,
&
flags
);
if
(
err
)
return
NULL
;
return
wstats
;
}
...
...
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