Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
e67d9d9d
K
Kernel
项目概览
openeuler
/
Kernel
接近 2 年 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
e67d9d9d
编写于
5月 12, 2005
作者:
D
David Gibson
提交者:
Jeff Garzik
5月 12, 2005
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[PATCH] Orinoco: wireless stats updates
Minor updates/bugfixes to the handling of wireless statistics.
上级
88d7bd8c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
22 addition
and
19 deletion
+22
-19
drivers/net/wireless/orinoco.c
drivers/net/wireless/orinoco.c
+22
-19
未找到文件。
drivers/net/wireless/orinoco.c
浏览文件 @
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
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录