Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
08fdef99
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看板
提交
08fdef99
编写于
8月 18, 2009
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
上级
c1a8f1f1
518ff04f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
14 deletion
+16
-14
drivers/net/wireless/orinoco/hw.c
drivers/net/wireless/orinoco/hw.c
+1
-1
net/mac80211/key.c
net/mac80211/key.c
+15
-13
未找到文件。
drivers/net/wireless/orinoco/hw.c
浏览文件 @
08fdef99
...
...
@@ -70,7 +70,7 @@ int orinoco_hw_get_tkip_iv(struct orinoco_private *priv, int key, u8 *tsc)
int
err
=
0
;
u8
tsc_arr
[
4
][
IW_ENCODE_SEQ_MAX_SIZE
];
if
((
key
<
0
)
||
(
key
>
4
))
if
((
key
<
0
)
||
(
key
>
=
4
))
return
-
EINVAL
;
err
=
hermes_read_ltv
(
hw
,
USER_BAP
,
HERMES_RID_CURRENT_TKIP_IV
,
...
...
net/mac80211/key.c
浏览文件 @
08fdef99
...
...
@@ -67,6 +67,8 @@ static DECLARE_WORK(todo_work, key_todo);
*
* @key: key to add to do item for
* @flag: todo flag(s)
*
* Must be called with IRQs or softirqs disabled.
*/
static
void
add_todo
(
struct
ieee80211_key
*
key
,
u32
flag
)
{
...
...
@@ -140,9 +142,9 @@ static void ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
ret
=
drv_set_key
(
key
->
local
,
SET_KEY
,
&
sdata
->
vif
,
sta
,
&
key
->
conf
);
if
(
!
ret
)
{
spin_lock
(
&
todo_lock
);
spin_lock
_bh
(
&
todo_lock
);
key
->
flags
|=
KEY_FLAG_UPLOADED_TO_HARDWARE
;
spin_unlock
(
&
todo_lock
);
spin_unlock
_bh
(
&
todo_lock
);
}
if
(
ret
&&
ret
!=
-
ENOSPC
&&
ret
!=
-
EOPNOTSUPP
)
...
...
@@ -164,12 +166,12 @@ static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key)
if
(
!
key
||
!
key
->
local
->
ops
->
set_key
)
return
;
spin_lock
(
&
todo_lock
);
spin_lock
_bh
(
&
todo_lock
);
if
(
!
(
key
->
flags
&
KEY_FLAG_UPLOADED_TO_HARDWARE
))
{
spin_unlock
(
&
todo_lock
);
spin_unlock
_bh
(
&
todo_lock
);
return
;
}
spin_unlock
(
&
todo_lock
);
spin_unlock
_bh
(
&
todo_lock
);
sta
=
get_sta_for_key
(
key
);
sdata
=
key
->
sdata
;
...
...
@@ -188,9 +190,9 @@ static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key)
wiphy_name
(
key
->
local
->
hw
.
wiphy
),
key
->
conf
.
keyidx
,
sta
?
sta
->
addr
:
bcast_addr
,
ret
);
spin_lock
(
&
todo_lock
);
spin_lock
_bh
(
&
todo_lock
);
key
->
flags
&=
~
KEY_FLAG_UPLOADED_TO_HARDWARE
;
spin_unlock
(
&
todo_lock
);
spin_unlock
_bh
(
&
todo_lock
);
}
static
void
__ieee80211_set_default_key
(
struct
ieee80211_sub_if_data
*
sdata
,
...
...
@@ -437,14 +439,14 @@ void ieee80211_key_link(struct ieee80211_key *key,
__ieee80211_key_replace
(
sdata
,
sta
,
old_key
,
key
);
spin_unlock_irqrestore
(
&
sdata
->
local
->
key_lock
,
flags
);
/* free old key later */
add_todo
(
old_key
,
KEY_FLAG_TODO_DELETE
);
add_todo
(
key
,
KEY_FLAG_TODO_ADD_DEBUGFS
);
if
(
netif_running
(
sdata
->
dev
))
add_todo
(
key
,
KEY_FLAG_TODO_HWACCEL_ADD
);
spin_unlock_irqrestore
(
&
sdata
->
local
->
key_lock
,
flags
);
}
static
void
__ieee80211_key_free
(
struct
ieee80211_key
*
key
)
...
...
@@ -547,7 +549,7 @@ static void __ieee80211_key_todo(void)
*/
synchronize_rcu
();
spin_lock
(
&
todo_lock
);
spin_lock
_bh
(
&
todo_lock
);
while
(
!
list_empty
(
&
todo_list
))
{
key
=
list_first_entry
(
&
todo_list
,
struct
ieee80211_key
,
todo
);
list_del_init
(
&
key
->
todo
);
...
...
@@ -558,7 +560,7 @@ static void __ieee80211_key_todo(void)
KEY_FLAG_TODO_HWACCEL_REMOVE
|
KEY_FLAG_TODO_DELETE
);
key
->
flags
&=
~
todoflags
;
spin_unlock
(
&
todo_lock
);
spin_unlock
_bh
(
&
todo_lock
);
work_done
=
false
;
...
...
@@ -591,9 +593,9 @@ static void __ieee80211_key_todo(void)
WARN_ON
(
!
work_done
);
spin_lock
(
&
todo_lock
);
spin_lock
_bh
(
&
todo_lock
);
}
spin_unlock
(
&
todo_lock
);
spin_unlock
_bh
(
&
todo_lock
);
}
void
ieee80211_key_todo
(
void
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录