Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
c6ceb872
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c6ceb872
编写于
9月 14, 2011
作者:
L
Luciano Coelho
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'wl12xx-next' into for-linville
上级
56e6786e
bd4932b8
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
103 addition
and
29 deletion
+103
-29
drivers/net/wireless/wl12xx/boot.c
drivers/net/wireless/wl12xx/boot.c
+1
-3
drivers/net/wireless/wl12xx/main.c
drivers/net/wireless/wl12xx/main.c
+34
-16
drivers/net/wireless/wl12xx/scan.c
drivers/net/wireless/wl12xx/scan.c
+59
-7
drivers/net/wireless/wl12xx/tx.c
drivers/net/wireless/wl12xx/tx.c
+5
-3
drivers/net/wireless/wl12xx/tx.h
drivers/net/wireless/wl12xx/tx.h
+1
-0
drivers/net/wireless/wl12xx/wl12xx.h
drivers/net/wireless/wl12xx/wl12xx.h
+3
-0
未找到文件。
drivers/net/wireless/wl12xx/boot.c
浏览文件 @
c6ceb872
...
...
@@ -294,9 +294,7 @@ static int wl1271_boot_upload_nvs(struct wl1271 *wl)
*/
if
(
wl
->
nvs_len
==
sizeof
(
struct
wl1271_nvs_file
)
||
wl
->
nvs_len
==
WL1271_INI_LEGACY_NVS_FILE_SIZE
)
{
/* for now 11a is unsupported in AP mode */
if
(
wl
->
bss_type
!=
BSS_TYPE_AP_BSS
&&
nvs
->
general_params
.
dual_mode_select
)
if
(
nvs
->
general_params
.
dual_mode_select
)
wl
->
enable_11a
=
true
;
}
...
...
drivers/net/wireless/wl12xx/main.c
浏览文件 @
c6ceb872
...
...
@@ -236,7 +236,7 @@ static struct conf_drv_settings default_conf = {
.
ps_poll_recovery_period
=
700
,
.
bet_enable
=
CONF_BET_MODE_ENABLE
,
.
bet_max_consecutive
=
50
,
.
psm_entry_retries
=
5
,
.
psm_entry_retries
=
8
,
.
psm_exit_retries
=
16
,
.
psm_entry_nullfunc_retries
=
3
,
.
psm_entry_hangover_period
=
1
,
...
...
@@ -2064,6 +2064,7 @@ static void __wl1271_op_remove_interface(struct wl1271 *wl,
wl
->
session_counter
=
0
;
wl
->
rate_set
=
CONF_TX_RATE_MASK_BASIC
;
wl
->
vif
=
NULL
;
wl
->
tx_spare_blocks
=
TX_HW_BLOCK_SPARE_DEFAULT
;
wl1271_free_ap_keys
(
wl
);
memset
(
wl
->
ap_hlid_map
,
0
,
sizeof
(
wl
->
ap_hlid_map
));
wl
->
ap_fw_ps_map
=
0
;
...
...
@@ -2199,10 +2200,14 @@ static int wl1271_unjoin(struct wl1271 *wl)
static
void
wl1271_set_band_rate
(
struct
wl1271
*
wl
)
{
if
(
wl
->
band
==
IEEE80211_BAND_2GHZ
)
if
(
wl
->
band
==
IEEE80211_BAND_2GHZ
)
{
wl
->
basic_rate_set
=
wl
->
conf
.
tx
.
basic_rate
;
else
wl
->
rate_set
=
wl
->
conf
.
tx
.
basic_rate
;
}
else
{
wl
->
basic_rate_set
=
wl
->
conf
.
tx
.
basic_rate_5
;
wl
->
rate_set
=
wl
->
conf
.
tx
.
basic_rate_5
;
}
}
static
bool
wl12xx_is_roc
(
struct
wl1271
*
wl
)
...
...
@@ -2653,6 +2658,17 @@ static int wl1271_set_key(struct wl1271 *wl, u16 action, u8 id, u8 key_type,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
};
/*
* A STA set to GEM cipher requires 2 tx spare blocks.
* Return to default value when GEM cipher key is removed
*/
if
(
key_type
==
KEY_GEM
)
{
if
(
action
==
KEY_ADD_OR_REPLACE
)
wl
->
tx_spare_blocks
=
2
;
else
if
(
action
==
KEY_REMOVE
)
wl
->
tx_spare_blocks
=
TX_HW_BLOCK_SPARE_DEFAULT
;
}
addr
=
sta
?
sta
->
addr
:
bcast_addr
;
if
(
is_zero_ether_addr
(
addr
))
{
...
...
@@ -3345,19 +3361,6 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl,
ret
=
wl1271_acx_conn_monit_params
(
wl
,
true
);
if
(
ret
<
0
)
goto
out
;
/* If we want to go in PSM but we're not there yet */
if
(
test_bit
(
WL1271_FLAG_PSM_REQUESTED
,
&
wl
->
flags
)
&&
!
test_bit
(
WL1271_FLAG_PSM
,
&
wl
->
flags
))
{
enum
wl1271_cmd_ps_mode
mode
;
mode
=
STATION_POWER_SAVE_MODE
;
ret
=
wl1271_ps_set_mode
(
wl
,
mode
,
wl
->
basic_rate
,
true
);
if
(
ret
<
0
)
goto
out
;
}
}
else
{
/* use defaults when not associated */
bool
was_assoc
=
...
...
@@ -3501,6 +3504,19 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl,
if
(
ret
<
0
)
goto
out
;
}
/* If we want to go in PSM but we're not there yet */
if
(
test_bit
(
WL1271_FLAG_PSM_REQUESTED
,
&
wl
->
flags
)
&&
!
test_bit
(
WL1271_FLAG_PSM
,
&
wl
->
flags
))
{
enum
wl1271_cmd_ps_mode
mode
;
mode
=
STATION_POWER_SAVE_MODE
;
ret
=
wl1271_ps_set_mode
(
wl
,
mode
,
wl
->
basic_rate
,
true
);
if
(
ret
<
0
)
goto
out
;
}
}
/* Handle new association with HT. Do this after join. */
...
...
@@ -4475,6 +4491,7 @@ int wl1271_init_ieee80211(struct wl1271 *wl)
wl
->
hw
->
wiphy
->
interface_modes
=
BIT
(
NL80211_IFTYPE_STATION
)
|
BIT
(
NL80211_IFTYPE_ADHOC
)
|
BIT
(
NL80211_IFTYPE_AP
);
wl
->
hw
->
wiphy
->
max_scan_ssids
=
1
;
wl
->
hw
->
wiphy
->
max_sched_scan_ssids
=
8
;
/*
* Maximum length of elements in scanning probe request templates
* should be the maximum length possible for a template, without
...
...
@@ -4599,6 +4616,7 @@ struct ieee80211_hw *wl1271_alloc_hw(void)
wl
->
sched_scanning
=
false
;
wl
->
tx_security_seq
=
0
;
wl
->
tx_security_last_seq_lsb
=
0
;
wl
->
tx_spare_blocks
=
TX_HW_BLOCK_SPARE_DEFAULT
;
wl
->
role_id
=
WL12XX_INVALID_ROLE_ID
;
wl
->
system_hlid
=
WL12XX_SYSTEM_HLID
;
wl
->
sta_hlid
=
WL12XX_INVALID_LINK_ID
;
...
...
drivers/net/wireless/wl12xx/scan.c
浏览文件 @
c6ceb872
...
...
@@ -473,6 +473,51 @@ wl1271_scan_sched_scan_channels(struct wl1271 *wl,
cfg
->
passive
[
2
]
||
cfg
->
active
[
2
];
}
/* Returns 0 if no wildcard is used, 1 if wildcard is used or a
* negative value on error */
static
int
wl12xx_scan_sched_scan_ssid_list
(
struct
wl1271
*
wl
,
struct
cfg80211_sched_scan_request
*
req
)
{
struct
wl1271_cmd_sched_scan_ssid_list
*
cmd
=
NULL
;
struct
cfg80211_ssid
*
ssid
=
req
->
ssids
;
int
ret
,
wildcard
=
0
;
wl1271_debug
(
DEBUG_CMD
,
"cmd sched scan ssid list"
);
cmd
=
kzalloc
(
sizeof
(
*
cmd
),
GFP_KERNEL
);
if
(
!
cmd
)
return
-
ENOMEM
;
while
((
cmd
->
n_ssids
<
req
->
n_ssids
)
&&
ssid
)
{
if
(
ssid
->
ssid_len
==
0
)
{
wildcard
=
1
;
cmd
->
ssids
[
cmd
->
n_ssids
].
type
=
SCAN_SSID_TYPE_PUBLIC
;
}
else
{
cmd
->
ssids
[
cmd
->
n_ssids
].
type
=
SCAN_SSID_TYPE_HIDDEN
;
}
cmd
->
ssids
[
cmd
->
n_ssids
].
len
=
ssid
->
ssid_len
;
memcpy
(
cmd
->
ssids
[
cmd
->
n_ssids
].
ssid
,
ssid
->
ssid
,
ssid
->
ssid_len
);
ssid
++
;
cmd
->
n_ssids
++
;
}
wl1271_dump
(
DEBUG_SCAN
,
"SSID_LIST: "
,
cmd
,
sizeof
(
*
cmd
));
ret
=
wl1271_cmd_send
(
wl
,
CMD_CONNECTION_SCAN_SSID_CFG
,
cmd
,
sizeof
(
*
cmd
),
0
);
if
(
ret
<
0
)
{
wl1271_error
(
"cmd sched scan ssid list failed"
);
goto
out
;
}
ret
=
wildcard
;
out:
kfree
(
cmd
);
return
ret
;
}
int
wl1271_scan_sched_scan_config
(
struct
wl1271
*
wl
,
struct
cfg80211_sched_scan_request
*
req
,
struct
ieee80211_sched_scan_ies
*
ies
)
...
...
@@ -504,14 +549,21 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl,
for
(
i
=
0
;
i
<
SCAN_MAX_CYCLE_INTERVALS
;
i
++
)
cfg
->
intervals
[
i
]
=
cpu_to_le32
(
req
->
interval
);
if
(
!
force_passive
&&
req
->
ssids
[
0
].
ssid_len
&&
req
->
ssids
[
0
].
ssid
)
{
cfg
->
filter_type
=
SCAN_SSID_FILTER_SPECIFIC
;
cfg
->
ssid_len
=
req
->
ssids
[
0
].
ssid_len
;
memcpy
(
cfg
->
ssid
,
req
->
ssids
[
0
].
ssid
,
req
->
ssids
[
0
].
ssid_len
);
}
else
{
cfg
->
ssid_len
=
0
;
if
(
req
->
n_ssids
==
0
)
{
wl1271_debug
(
DEBUG_SCAN
,
"using SCAN_SSID_FILTER_ANY"
);
cfg
->
filter_type
=
SCAN_SSID_FILTER_ANY
;
cfg
->
ssid_len
=
0
;
}
else
{
ret
=
wl12xx_scan_sched_scan_ssid_list
(
wl
,
req
);
if
(
ret
<
0
)
goto
out
;
if
(
ret
)
{
wl1271_debug
(
DEBUG_SCAN
,
"using SCAN_SSID_FILTER_DISABLED"
);
cfg
->
filter_type
=
SCAN_SSID_FILTER_DISABLED
;
}
else
{
wl1271_debug
(
DEBUG_SCAN
,
"using SCAN_SSID_FILTER_LIST"
);
cfg
->
filter_type
=
SCAN_SSID_FILTER_LIST
;
}
}
if
(
!
wl1271_scan_sched_scan_channels
(
wl
,
req
,
cfg
))
{
...
...
drivers/net/wireless/wl12xx/tx.c
浏览文件 @
c6ceb872
...
...
@@ -204,9 +204,7 @@ static int wl1271_tx_allocate(struct wl1271 *wl, struct sk_buff *skb, u32 extra,
u32
len
;
u32
total_blocks
;
int
id
,
ret
=
-
EBUSY
,
ac
;
/* we use 1 spare block */
u32
spare_blocks
=
1
;
u32
spare_blocks
=
wl
->
tx_spare_blocks
;
if
(
buf_offset
+
total_len
>
WL1271_AGGR_BUFFER_SIZE
)
return
-
EAGAIN
;
...
...
@@ -220,6 +218,10 @@ static int wl1271_tx_allocate(struct wl1271 *wl, struct sk_buff *skb, u32 extra,
in the firmware */
len
=
wl12xx_calc_packet_alignment
(
wl
,
total_len
);
/* in case of a dummy packet, use default amount of spare mem blocks */
if
(
unlikely
(
wl12xx_is_dummy_packet
(
wl
,
skb
)))
spare_blocks
=
TX_HW_BLOCK_SPARE_DEFAULT
;
total_blocks
=
(
len
+
TX_HW_BLOCK_SIZE
-
1
)
/
TX_HW_BLOCK_SIZE
+
spare_blocks
;
...
...
drivers/net/wireless/wl12xx/tx.h
浏览文件 @
c6ceb872
...
...
@@ -25,6 +25,7 @@
#ifndef __TX_H__
#define __TX_H__
#define TX_HW_BLOCK_SPARE_DEFAULT 1
#define TX_HW_BLOCK_SIZE 252
#define TX_HW_MGMT_PKT_LIFETIME_TU 2000
...
...
drivers/net/wireless/wl12xx/wl12xx.h
浏览文件 @
c6ceb872
...
...
@@ -425,6 +425,9 @@ struct wl1271 {
u32
tx_allocated_blocks
;
u32
tx_results_count
;
/* amount of spare TX blocks to use */
u32
tx_spare_blocks
;
/* Accounting for allocated / available Tx packets in HW */
u32
tx_pkts_freed
[
NUM_TX_QUEUES
];
u32
tx_allocated_pkts
[
NUM_TX_QUEUES
];
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录