Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
e5ab1fd7
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e5ab1fd7
编写于
3月 20, 2013
作者:
R
Rafał Miłecki
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
b43: N-PHY: simplify conditions in RSSI offset scale function
Signed-off-by:
N
Rafał Miłecki
<
zajec5@gmail.com
>
上级
6aa38725
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
65 addition
and
55 deletion
+65
-55
drivers/net/wireless/b43/phy_n.c
drivers/net/wireless/b43/phy_n.c
+65
-55
未找到文件。
drivers/net/wireless/b43/phy_n.c
浏览文件 @
e5ab1fd7
...
...
@@ -1214,7 +1214,7 @@ static void b43_nphy_run_samples(struct b43_wldev *dev, u16 samps, u16 loops,
static
void
b43_nphy_scale_offset_rssi
(
struct
b43_wldev
*
dev
,
u16
scale
,
s8
offset
,
u8
core
,
enum
n_rail_type
rail
,
enum
b43_nphy_rssi_type
type
)
enum
b43_nphy_rssi_type
rssi_
type
)
{
u16
tmp
;
bool
core1or5
=
(
core
==
1
)
||
(
core
==
5
);
...
...
@@ -1223,60 +1223,70 @@ static void b43_nphy_scale_offset_rssi(struct b43_wldev *dev, u16 scale,
offset
=
clamp_val
(
offset
,
-
32
,
31
);
tmp
=
((
scale
&
0x3F
)
<<
8
)
|
(
offset
&
0x3F
);
if
(
core1or5
&&
(
rail
==
0
)
&&
(
type
==
B43_NPHY_RSSI_Z
))
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_0I_RSSI_Z
,
tmp
);
if
(
core1or5
&&
(
rail
==
1
)
&&
(
type
==
B43_NPHY_RSSI_Z
))
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_0Q_RSSI_Z
,
tmp
);
if
(
core2or5
&&
(
rail
==
0
)
&&
(
type
==
B43_NPHY_RSSI_Z
))
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_1I_RSSI_Z
,
tmp
);
if
(
core2or5
&&
(
rail
==
1
)
&&
(
type
==
B43_NPHY_RSSI_Z
))
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_1Q_RSSI_Z
,
tmp
);
if
(
core1or5
&&
(
rail
==
0
)
&&
(
type
==
B43_NPHY_RSSI_X
))
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_0I_RSSI_X
,
tmp
);
if
(
core1or5
&&
(
rail
==
1
)
&&
(
type
==
B43_NPHY_RSSI_X
))
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_0Q_RSSI_X
,
tmp
);
if
(
core2or5
&&
(
rail
==
0
)
&&
(
type
==
B43_NPHY_RSSI_X
))
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_1I_RSSI_X
,
tmp
);
if
(
core2or5
&&
(
rail
==
1
)
&&
(
type
==
B43_NPHY_RSSI_X
))
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_1Q_RSSI_X
,
tmp
);
if
(
core1or5
&&
(
rail
==
0
)
&&
(
type
==
B43_NPHY_RSSI_Y
))
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_0I_RSSI_Y
,
tmp
);
if
(
core1or5
&&
(
rail
==
1
)
&&
(
type
==
B43_NPHY_RSSI_Y
))
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_0Q_RSSI_Y
,
tmp
);
if
(
core2or5
&&
(
rail
==
0
)
&&
(
type
==
B43_NPHY_RSSI_Y
))
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_1I_RSSI_Y
,
tmp
);
if
(
core2or5
&&
(
rail
==
1
)
&&
(
type
==
B43_NPHY_RSSI_Y
))
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_1Q_RSSI_Y
,
tmp
);
if
(
core1or5
&&
(
rail
==
0
)
&&
(
type
==
B43_NPHY_RSSI_TBD
))
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_0I_TBD
,
tmp
);
if
(
core1or5
&&
(
rail
==
1
)
&&
(
type
==
B43_NPHY_RSSI_TBD
))
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_0Q_TBD
,
tmp
);
if
(
core2or5
&&
(
rail
==
0
)
&&
(
type
==
B43_NPHY_RSSI_TBD
))
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_1I_TBD
,
tmp
);
if
(
core2or5
&&
(
rail
==
1
)
&&
(
type
==
B43_NPHY_RSSI_TBD
))
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_1Q_TBD
,
tmp
);
if
(
core1or5
&&
(
rail
==
0
)
&&
(
type
==
B43_NPHY_RSSI_PWRDET
))
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_0I_PWRDET
,
tmp
);
if
(
core1or5
&&
(
rail
==
1
)
&&
(
type
==
B43_NPHY_RSSI_PWRDET
))
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_0Q_PWRDET
,
tmp
);
if
(
core2or5
&&
(
rail
==
0
)
&&
(
type
==
B43_NPHY_RSSI_PWRDET
))
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_1I_PWRDET
,
tmp
);
if
(
core2or5
&&
(
rail
==
1
)
&&
(
type
==
B43_NPHY_RSSI_PWRDET
))
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_1Q_PWRDET
,
tmp
);
if
(
core1or5
&&
(
type
==
B43_NPHY_RSSI_TSSI_I
))
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_0I_TSSI
,
tmp
);
if
(
core2or5
&&
(
type
==
B43_NPHY_RSSI_TSSI_I
))
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_1I_TSSI
,
tmp
);
if
(
core1or5
&&
(
type
==
B43_NPHY_RSSI_TSSI_Q
))
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_0Q_TSSI
,
tmp
);
if
(
core2or5
&&
(
type
==
B43_NPHY_RSSI_TSSI_Q
))
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_1Q_TSSI
,
tmp
);
switch
(
rssi_type
)
{
case
B43_NPHY_RSSI_Z
:
if
(
core1or5
&&
rail
==
N_RAIL_I
)
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_0I_RSSI_Z
,
tmp
);
if
(
core1or5
&&
rail
==
N_RAIL_Q
)
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_0Q_RSSI_Z
,
tmp
);
if
(
core2or5
&&
rail
==
N_RAIL_I
)
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_1I_RSSI_Z
,
tmp
);
if
(
core2or5
&&
rail
==
N_RAIL_Q
)
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_1Q_RSSI_Z
,
tmp
);
break
;
case
B43_NPHY_RSSI_X
:
if
(
core1or5
&&
rail
==
N_RAIL_I
)
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_0I_RSSI_X
,
tmp
);
if
(
core1or5
&&
rail
==
N_RAIL_Q
)
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_0Q_RSSI_X
,
tmp
);
if
(
core2or5
&&
rail
==
N_RAIL_I
)
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_1I_RSSI_X
,
tmp
);
if
(
core2or5
&&
rail
==
N_RAIL_Q
)
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_1Q_RSSI_X
,
tmp
);
break
;
case
B43_NPHY_RSSI_Y
:
if
(
core1or5
&&
rail
==
N_RAIL_I
)
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_0I_RSSI_Y
,
tmp
);
if
(
core1or5
&&
rail
==
N_RAIL_Q
)
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_0Q_RSSI_Y
,
tmp
);
if
(
core2or5
&&
rail
==
N_RAIL_I
)
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_1I_RSSI_Y
,
tmp
);
if
(
core2or5
&&
rail
==
N_RAIL_Q
)
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_1Q_RSSI_Y
,
tmp
);
break
;
case
B43_NPHY_RSSI_TBD
:
if
(
core1or5
&&
rail
==
N_RAIL_I
)
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_0I_TBD
,
tmp
);
if
(
core1or5
&&
rail
==
N_RAIL_Q
)
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_0Q_TBD
,
tmp
);
if
(
core2or5
&&
rail
==
N_RAIL_I
)
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_1I_TBD
,
tmp
);
if
(
core2or5
&&
rail
==
N_RAIL_Q
)
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_1Q_TBD
,
tmp
);
break
;
case
B43_NPHY_RSSI_PWRDET
:
if
(
core1or5
&&
rail
==
N_RAIL_I
)
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_0I_PWRDET
,
tmp
);
if
(
core1or5
&&
rail
==
N_RAIL_Q
)
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_0Q_PWRDET
,
tmp
);
if
(
core2or5
&&
rail
==
N_RAIL_I
)
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_1I_PWRDET
,
tmp
);
if
(
core2or5
&&
rail
==
N_RAIL_Q
)
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_1Q_PWRDET
,
tmp
);
break
;
case
B43_NPHY_RSSI_TSSI_I
:
if
(
core1or5
)
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_0I_TSSI
,
tmp
);
if
(
core2or5
)
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_1I_TSSI
,
tmp
);
break
;
case
B43_NPHY_RSSI_TSSI_Q
:
if
(
core1or5
)
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_0Q_TSSI
,
tmp
);
if
(
core2or5
)
b43_phy_write
(
dev
,
B43_NPHY_RSSIMC_1Q_TSSI
,
tmp
);
break
;
}
}
static
void
b43_nphy_rev3_rssi_select
(
struct
b43_wldev
*
dev
,
u8
code
,
u8
type
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录