Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
d1a9421d
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看板
提交
d1a9421d
编写于
11月 14, 2011
作者:
K
Kalle Valo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ath6kl: add firmware filename info to struct ath6kl_hw
Signed-off-by:
N
Kalle Valo
<
kvalo@qca.qualcomm.com
>
上级
f0ea5d58
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
67 addition
and
90 deletion
+67
-90
drivers/net/wireless/ath/ath6kl/core.h
drivers/net/wireless/ath/ath6kl/core.h
+8
-0
drivers/net/wireless/ath/ath6kl/init.c
drivers/net/wireless/ath/ath6kl/init.c
+59
-90
未找到文件。
drivers/net/wireless/ath/ath6kl/core.h
浏览文件 @
d1a9421d
...
...
@@ -553,6 +553,14 @@ struct ath6kl {
u32
board_ext_data_addr
;
u32
reserved_ram_size
;
u32
board_addr
;
const
char
*
fw_otp
;
const
char
*
fw
;
const
char
*
fw_tcmd
;
const
char
*
fw_patch
;
const
char
*
fw_api2
;
const
char
*
fw_board
;
const
char
*
fw_default_board
;
}
hw
;
u16
conf_flags
;
...
...
drivers/net/wireless/ath/ath6kl/init.c
浏览文件 @
d1a9421d
...
...
@@ -44,6 +44,14 @@ static const struct ath6kl_hw hw_list[] = {
/* hw2.0 needs override address hardcoded */
.
app_start_override_addr
=
0x944C00
,
.
fw_otp
=
AR6003_HW_2_0_OTP_FILE
,
.
fw
=
AR6003_HW_2_0_FIRMWARE_FILE
,
.
fw_tcmd
=
AR6003_HW_2_0_TCMD_FIRMWARE_FILE
,
.
fw_patch
=
AR6003_HW_2_0_PATCH_FILE
,
.
fw_api2
=
AR6003_HW_2_0_FIRMWARE_2_FILE
,
.
fw_board
=
AR6003_HW_2_0_BOARD_DATA_FILE
,
.
fw_default_board
=
AR6003_HW_2_0_DEFAULT_BOARD_DATA_FILE
,
},
{
.
id
=
AR6003_HW_2_1_1_VERSION
,
...
...
@@ -52,6 +60,14 @@ static const struct ath6kl_hw hw_list[] = {
.
app_load_addr
=
0x1234
,
.
board_ext_data_addr
=
0x542330
,
.
reserved_ram_size
=
512
,
.
fw_otp
=
AR6003_HW_2_1_1_OTP_FILE
,
.
fw
=
AR6003_HW_2_1_1_FIRMWARE_FILE
,
.
fw_tcmd
=
AR6003_HW_2_1_1_TCMD_FIRMWARE_FILE
,
.
fw_patch
=
AR6003_HW_2_1_1_PATCH_FILE
,
.
fw_api2
=
AR6003_HW_2_1_1_FIRMWARE_2_FILE
,
.
fw_board
=
AR6003_HW_2_1_1_BOARD_DATA_FILE
,
.
fw_default_board
=
AR6003_HW_2_1_1_DEFAULT_BOARD_DATA_FILE
,
},
{
.
id
=
AR6004_HW_1_0_VERSION
,
...
...
@@ -61,6 +77,11 @@ static const struct ath6kl_hw hw_list[] = {
.
board_ext_data_addr
=
0x437000
,
.
reserved_ram_size
=
19456
,
.
board_addr
=
0x433900
,
.
fw
=
AR6004_HW_1_0_FIRMWARE_FILE
,
.
fw_api2
=
AR6004_HW_1_0_FIRMWARE_2_FILE
,
.
fw_board
=
AR6004_HW_1_0_BOARD_DATA_FILE
,
.
fw_default_board
=
AR6004_HW_1_0_DEFAULT_BOARD_DATA_FILE
,
},
{
.
id
=
AR6004_HW_1_1_VERSION
,
...
...
@@ -70,6 +91,11 @@ static const struct ath6kl_hw hw_list[] = {
.
board_ext_data_addr
=
0x437000
,
.
reserved_ram_size
=
11264
,
.
board_addr
=
0x43d400
,
.
fw
=
AR6004_HW_1_1_FIRMWARE_FILE
,
.
fw_api2
=
AR6004_HW_1_1_FIRMWARE_2_FILE
,
.
fw_board
=
AR6004_HW_1_1_BOARD_DATA_FILE
,
.
fw_default_board
=
AR6004_HW_1_1_DEFAULT_BOARD_DATA_FILE
,
},
};
...
...
@@ -652,17 +678,10 @@ static int ath6kl_fetch_board_file(struct ath6kl *ar)
if
(
ar
->
fw_board
!=
NULL
)
return
0
;
switch
(
ar
->
version
.
target_ver
)
{
case
AR6003_HW_2_0_VERSION
:
filename
=
AR6003_HW_2_0_BOARD_DATA_FILE
;
break
;
case
AR6004_HW_1_0_VERSION
:
filename
=
AR6004_HW_1_0_BOARD_DATA_FILE
;
break
;
default:
filename
=
AR6003_HW_2_1_1_BOARD_DATA_FILE
;
break
;
}
if
(
WARN_ON
(
ar
->
hw
.
fw_board
==
NULL
))
return
-
EINVAL
;
filename
=
ar
->
hw
.
fw_board
;
ret
=
ath6kl_get_fw
(
ar
,
filename
,
&
ar
->
fw_board
,
&
ar
->
fw_board_len
);
...
...
@@ -680,17 +699,7 @@ static int ath6kl_fetch_board_file(struct ath6kl *ar)
ath6kl_warn
(
"Failed to get board file %s (%d), trying to find default board file.
\n
"
,
filename
,
ret
);
switch
(
ar
->
version
.
target_ver
)
{
case
AR6003_HW_2_0_VERSION
:
filename
=
AR6003_HW_2_0_DEFAULT_BOARD_DATA_FILE
;
break
;
case
AR6004_HW_1_0_VERSION
:
filename
=
AR6004_HW_1_0_DEFAULT_BOARD_DATA_FILE
;
break
;
default:
filename
=
AR6003_HW_2_1_1_DEFAULT_BOARD_DATA_FILE
;
break
;
}
filename
=
ar
->
hw
.
fw_default_board
;
ret
=
ath6kl_get_fw
(
ar
,
filename
,
&
ar
->
fw_board
,
&
ar
->
fw_board_len
);
...
...
@@ -714,19 +723,14 @@ static int ath6kl_fetch_otp_file(struct ath6kl *ar)
if
(
ar
->
fw_otp
!=
NULL
)
return
0
;
switch
(
ar
->
version
.
target_ver
)
{
case
AR6003_HW_2_0_VERSION
:
filename
=
AR6003_HW_2_0_OTP_FILE
;
break
;
case
AR6004_HW_1_0_VERSION
:
ath6kl_dbg
(
ATH6KL_DBG_TRC
,
"AR6004 doesn't need OTP file
\n
"
);
if
(
ar
->
hw
.
fw_otp
==
NULL
)
{
ath6kl_dbg
(
ATH6KL_DBG_BOOT
,
"no OTP file configured for this hw
\n
"
);
return
0
;
break
;
default:
filename
=
AR6003_HW_2_1_1_OTP_FILE
;
break
;
}
filename
=
ar
->
hw
.
fw_otp
;
ret
=
ath6kl_get_fw
(
ar
,
filename
,
&
ar
->
fw_otp
,
&
ar
->
fw_otp_len
);
if
(
ret
)
{
...
...
@@ -747,38 +751,22 @@ static int ath6kl_fetch_fw_file(struct ath6kl *ar)
return
0
;
if
(
testmode
)
{
switch
(
ar
->
version
.
target_ver
)
{
case
AR6003_HW_2_0_VERSION
:
filename
=
AR6003_HW_2_0_TCMD_FIRMWARE_FILE
;
break
;
case
AR6003_HW_2_1_1_VERSION
:
filename
=
AR6003_HW_2_1_1_TCMD_FIRMWARE_FILE
;
break
;
case
AR6004_HW_1_0_VERSION
:
ath6kl_warn
(
"testmode not supported with ar6004
\n
"
);
if
(
ar
->
hw
.
fw_tcmd
==
NULL
)
{
ath6kl_warn
(
"testmode not supported
\n
"
);
return
-
EOPNOTSUPP
;
default:
ath6kl_warn
(
"unknown target version: 0x%x
\n
"
,
ar
->
version
.
target_ver
);
return
-
EINVAL
;
}
filename
=
ar
->
hw
.
fw_tcmd
;
set_bit
(
TESTMODE
,
&
ar
->
flag
);
goto
get_fw
;
}
switch
(
ar
->
version
.
target_ver
)
{
case
AR6003_HW_2_0_VERSION
:
filename
=
AR6003_HW_2_0_FIRMWARE_FILE
;
break
;
case
AR6004_HW_1_0_VERSION
:
filename
=
AR6004_HW_1_0_FIRMWARE_FILE
;
break
;
default:
filename
=
AR6003_HW_2_1_1_FIRMWARE_FILE
;
break
;
}
if
(
WARN_ON
(
ar
->
hw
.
fw
==
NULL
))
return
-
EINVAL
;
filename
=
ar
->
hw
.
fw
;
get_fw:
ret
=
ath6kl_get_fw
(
ar
,
filename
,
&
ar
->
fw
,
&
ar
->
fw_len
);
...
...
@@ -796,27 +784,20 @@ static int ath6kl_fetch_patch_file(struct ath6kl *ar)
const
char
*
filename
;
int
ret
;
switch
(
ar
->
version
.
target_ver
)
{
case
AR6003_HW_2_0_VERSION
:
filename
=
AR6003_HW_2_0_PATCH_FILE
;
break
;
case
AR6004_HW_1_0_VERSION
:
/* FIXME: implement for AR6004 */
if
(
ar
->
fw_patch
!=
NULL
)
return
0
;
break
;
default:
filename
=
AR6003_HW_2_1_1_PATCH_FILE
;
break
;
}
if
(
ar
->
fw_patch
==
NULL
)
{
ret
=
ath6kl_get_fw
(
ar
,
filename
,
&
ar
->
fw_patch
,
&
ar
->
fw_patch_len
);
if
(
ret
)
{
ath6kl_err
(
"Failed to get patch file %s: %d
\n
"
,
filename
,
ret
);
return
ret
;
}
if
(
ar
->
hw
.
fw_patch
==
NULL
)
return
0
;
filename
=
ar
->
hw
.
fw_patch
;
ret
=
ath6kl_get_fw
(
ar
,
filename
,
&
ar
->
fw_patch
,
&
ar
->
fw_patch_len
);
if
(
ret
)
{
ath6kl_err
(
"Failed to get patch file %s: %d
\n
"
,
filename
,
ret
);
return
ret
;
}
return
0
;
...
...
@@ -851,22 +832,10 @@ static int ath6kl_fetch_fw_api2(struct ath6kl *ar)
int
ret
,
ie_id
,
i
,
index
,
bit
;
__le32
*
val
;
switch
(
ar
->
version
.
target_ver
)
{
case
AR6003_HW_2_0_VERSION
:
filename
=
AR6003_HW_2_0_FIRMWARE_2_FILE
;
break
;
case
AR6003_HW_2_1_1_VERSION
:
filename
=
AR6003_HW_2_1_1_FIRMWARE_2_FILE
;
break
;
case
AR6004_HW_1_0_VERSION
:
filename
=
AR6004_HW_1_0_FIRMWARE_2_FILE
;
break
;
case
AR6004_HW_1_1_VERSION
:
filename
=
AR6004_HW_1_1_FIRMWARE_2_FILE
;
break
;
default:
if
(
ar
->
hw
.
fw_api2
==
NULL
)
return
-
EOPNOTSUPP
;
}
filename
=
ar
->
hw
.
fw_api2
;
ret
=
request_firmware
(
&
fw
,
filename
,
ar
->
dev
);
if
(
ret
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录