Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
25b645be
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
6
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看板
提交
25b645be
编写于
7月 12, 2005
作者:
提交者:
James Ketrenos
11月 07, 2005
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed WEP on ipw2100 (priv->sec was being used instead of
priv->ieee->sec)
上级
82328354
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
51 addition
and
48 deletion
+51
-48
drivers/net/wireless/ipw2100.c
drivers/net/wireless/ipw2100.c
+51
-46
drivers/net/wireless/ipw2100.h
drivers/net/wireless/ipw2100.h
+0
-2
未找到文件。
drivers/net/wireless/ipw2100.c
浏览文件 @
25b645be
...
...
@@ -1616,7 +1616,7 @@ static int ipw2100_set_scan_options(struct ipw2100_priv *priv)
if
(
!
(
priv
->
config
&
CFG_ASSOCIATE
))
cmd
.
host_command_parameters
[
0
]
|=
IPW_SCAN_NOASSOCIATE
;
if
((
priv
->
sec
.
flags
&
SEC_ENABLED
)
&&
priv
->
sec
.
enabled
)
if
((
priv
->
ieee
->
sec
.
flags
&
SEC_ENABLED
)
&&
priv
->
ieee
->
sec
.
enabled
)
cmd
.
host_command_parameters
[
0
]
|=
IPW_SCAN_MIXED_CELL
;
if
(
priv
->
config
&
CFG_PASSIVE_SCAN
)
cmd
.
host_command_parameters
[
0
]
|=
IPW_SCAN_PASSIVE
;
...
...
@@ -5349,23 +5349,23 @@ static int ipw2100_configure_security(struct ipw2100_priv *priv, int batch_mode)
return
err
;
}
if
(
!
priv
->
sec
.
enabled
)
{
if
(
!
priv
->
ieee
->
sec
.
enabled
)
{
err
=
ipw2100_set_security_information
(
priv
,
IPW_AUTH_OPEN
,
SEC_LEVEL_0
,
0
,
1
);
}
else
{
auth_mode
=
IPW_AUTH_OPEN
;
if
((
priv
->
sec
.
flags
&
SEC_AUTH_MODE
)
&&
(
priv
->
sec
.
auth_mode
==
WLAN_AUTH_SHARED_KEY
))
if
((
priv
->
ieee
->
sec
.
flags
&
SEC_AUTH_MODE
)
&&
(
priv
->
ieee
->
sec
.
auth_mode
==
WLAN_AUTH_SHARED_KEY
))
auth_mode
=
IPW_AUTH_SHARED
;
sec_level
=
SEC_LEVEL_0
;
if
(
priv
->
sec
.
flags
&
SEC_LEVEL
)
sec_level
=
priv
->
sec
.
level
;
if
(
priv
->
ieee
->
sec
.
flags
&
SEC_LEVEL
)
sec_level
=
priv
->
ieee
->
sec
.
level
;
use_group
=
0
;
if
(
priv
->
sec
.
flags
&
SEC_UNICAST_GROUP
)
use_group
=
priv
->
sec
.
unicast_uses_group
;
if
(
priv
->
ieee
->
sec
.
flags
&
SEC_UNICAST_GROUP
)
use_group
=
priv
->
ieee
->
sec
.
unicast_uses_group
;
err
=
ipw2100_set_security_information
(
priv
,
auth_mode
,
sec_level
,
...
...
@@ -5375,16 +5375,16 @@ static int ipw2100_configure_security(struct ipw2100_priv *priv, int batch_mode)
if
(
err
)
goto
exit
;
if
(
priv
->
sec
.
enabled
)
{
if
(
priv
->
ieee
->
sec
.
enabled
)
{
for
(
i
=
0
;
i
<
4
;
i
++
)
{
if
(
!
(
priv
->
sec
.
flags
&
(
1
<<
i
)))
{
memset
(
priv
->
sec
.
keys
[
i
],
0
,
WEP_KEY_LEN
);
priv
->
sec
.
key_sizes
[
i
]
=
0
;
if
(
!
(
priv
->
ieee
->
sec
.
flags
&
(
1
<<
i
)))
{
memset
(
priv
->
ieee
->
sec
.
keys
[
i
],
0
,
WEP_KEY_LEN
);
priv
->
ieee
->
sec
.
key_sizes
[
i
]
=
0
;
}
else
{
err
=
ipw2100_set_key
(
priv
,
i
,
priv
->
sec
.
keys
[
i
],
priv
->
sec
.
key_sizes
[
i
],
1
);
priv
->
ieee
->
sec
.
keys
[
i
],
priv
->
ieee
->
sec
.
key_sizes
[
i
],
1
);
if
(
err
)
goto
exit
;
}
...
...
@@ -5397,8 +5397,8 @@ static int ipw2100_configure_security(struct ipw2100_priv *priv, int batch_mode)
* encrypted data is sent up */
err
=
ipw2100_set_wep_flags
(
priv
,
priv
->
sec
.
enabled
?
IPW_PRIVACY_CAPABLE
:
0
,
1
);
priv
->
ieee
->
sec
.
enabled
?
IPW_PRIVACY_CAPABLE
:
0
,
1
);
if
(
err
)
goto
exit
;
...
...
@@ -5433,58 +5433,61 @@ static void shim__set_security(struct net_device *dev,
for
(
i
=
0
;
i
<
4
;
i
++
)
{
if
(
sec
->
flags
&
(
1
<<
i
))
{
priv
->
sec
.
key_sizes
[
i
]
=
sec
->
key_sizes
[
i
];
priv
->
ieee
->
sec
.
key_sizes
[
i
]
=
sec
->
key_sizes
[
i
];
if
(
sec
->
key_sizes
[
i
]
==
0
)
priv
->
sec
.
flags
&=
~
(
1
<<
i
);
priv
->
ieee
->
sec
.
flags
&=
~
(
1
<<
i
);
else
memcpy
(
priv
->
sec
.
keys
[
i
],
sec
->
keys
[
i
],
memcpy
(
priv
->
ieee
->
sec
.
keys
[
i
],
sec
->
keys
[
i
],
sec
->
key_sizes
[
i
]);
priv
->
sec
.
flags
|=
(
1
<<
i
);
priv
->
ieee
->
sec
.
flags
|=
(
1
<<
i
);
priv
->
status
|=
STATUS_SECURITY_UPDATED
;
}
}
if
((
sec
->
flags
&
SEC_ACTIVE_KEY
)
&&
priv
->
sec
.
active_key
!=
sec
->
active_key
)
{
priv
->
ieee
->
sec
.
active_key
!=
sec
->
active_key
)
{
if
(
sec
->
active_key
<=
3
)
{
priv
->
sec
.
active_key
=
sec
->
active_key
;
priv
->
sec
.
flags
|=
SEC_ACTIVE_KEY
;
priv
->
ieee
->
sec
.
active_key
=
sec
->
active_key
;
priv
->
ieee
->
sec
.
flags
|=
SEC_ACTIVE_KEY
;
}
else
priv
->
sec
.
flags
&=
~
SEC_ACTIVE_KEY
;
priv
->
ieee
->
sec
.
flags
&=
~
SEC_ACTIVE_KEY
;
priv
->
status
|=
STATUS_SECURITY_UPDATED
;
}
if
((
sec
->
flags
&
SEC_AUTH_MODE
)
&&
(
priv
->
sec
.
auth_mode
!=
sec
->
auth_mode
))
{
priv
->
sec
.
auth_mode
=
sec
->
auth_mode
;
priv
->
sec
.
flags
|=
SEC_AUTH_MODE
;
(
priv
->
ieee
->
sec
.
auth_mode
!=
sec
->
auth_mode
))
{
priv
->
ieee
->
sec
.
auth_mode
=
sec
->
auth_mode
;
priv
->
ieee
->
sec
.
flags
|=
SEC_AUTH_MODE
;
priv
->
status
|=
STATUS_SECURITY_UPDATED
;
}
if
(
sec
->
flags
&
SEC_ENABLED
&&
priv
->
sec
.
enabled
!=
sec
->
enabled
)
{
priv
->
sec
.
flags
|=
SEC_ENABLED
;
priv
->
sec
.
enabled
=
sec
->
enabled
;
if
(
sec
->
flags
&
SEC_ENABLED
&&
priv
->
ieee
->
sec
.
enabled
!=
sec
->
enabled
)
{
priv
->
ieee
->
sec
.
flags
|=
SEC_ENABLED
;
priv
->
ieee
->
sec
.
enabled
=
sec
->
enabled
;
priv
->
status
|=
STATUS_SECURITY_UPDATED
;
force_update
=
1
;
}
if
(
sec
->
flags
&
SEC_LEVEL
&&
priv
->
sec
.
level
!=
sec
->
level
)
{
priv
->
sec
.
level
=
sec
->
level
;
priv
->
sec
.
flags
|=
SEC_LEVEL
;
if
(
sec
->
flags
&
SEC_ENCRYPT
)
priv
->
ieee
->
sec
.
encrypt
=
sec
->
encrypt
;
if
(
sec
->
flags
&
SEC_LEVEL
&&
priv
->
ieee
->
sec
.
level
!=
sec
->
level
)
{
priv
->
ieee
->
sec
.
level
=
sec
->
level
;
priv
->
ieee
->
sec
.
flags
|=
SEC_LEVEL
;
priv
->
status
|=
STATUS_SECURITY_UPDATED
;
}
IPW_DEBUG_WEP
(
"Security flags: %c %c%c%c%c %c%c%c%c
\n
"
,
priv
->
sec
.
flags
&
(
1
<<
8
)
?
'1'
:
'0'
,
priv
->
sec
.
flags
&
(
1
<<
7
)
?
'1'
:
'0'
,
priv
->
sec
.
flags
&
(
1
<<
6
)
?
'1'
:
'0'
,
priv
->
sec
.
flags
&
(
1
<<
5
)
?
'1'
:
'0'
,
priv
->
sec
.
flags
&
(
1
<<
4
)
?
'1'
:
'0'
,
priv
->
sec
.
flags
&
(
1
<<
3
)
?
'1'
:
'0'
,
priv
->
sec
.
flags
&
(
1
<<
2
)
?
'1'
:
'0'
,
priv
->
sec
.
flags
&
(
1
<<
1
)
?
'1'
:
'0'
,
priv
->
sec
.
flags
&
(
1
<<
0
)
?
'1'
:
'0'
);
priv
->
ieee
->
sec
.
flags
&
(
1
<<
8
)
?
'1'
:
'0'
,
priv
->
ieee
->
sec
.
flags
&
(
1
<<
7
)
?
'1'
:
'0'
,
priv
->
ieee
->
sec
.
flags
&
(
1
<<
6
)
?
'1'
:
'0'
,
priv
->
ieee
->
sec
.
flags
&
(
1
<<
5
)
?
'1'
:
'0'
,
priv
->
ieee
->
sec
.
flags
&
(
1
<<
4
)
?
'1'
:
'0'
,
priv
->
ieee
->
sec
.
flags
&
(
1
<<
3
)
?
'1'
:
'0'
,
priv
->
ieee
->
sec
.
flags
&
(
1
<<
2
)
?
'1'
:
'0'
,
priv
->
ieee
->
sec
.
flags
&
(
1
<<
1
)
?
'1'
:
'0'
,
priv
->
ieee
->
sec
.
flags
&
(
1
<<
0
)
?
'1'
:
'0'
);
/* As a temporary work around to enable WPA until we figure out why
* wpa_supplicant toggles the security capability of the driver, which
...
...
@@ -5995,17 +5998,19 @@ static int ipw2100_wpa_set_encryption(struct net_device *dev,
return
-
EINVAL
;
}
sec
.
flags
|=
SEC_ENABLED
|
SEC_ENCRYPT
;
if
(
strcmp
(
param
->
u
.
crypt
.
alg
,
"none"
)
==
0
)
{
if
(
crypt
)
{
sec
.
enabled
=
0
;
sec
.
encrypt
=
0
;
sec
.
level
=
SEC_LEVEL_0
;
sec
.
flags
|=
SEC_
ENABLED
|
SEC_
LEVEL
;
sec
.
flags
|=
SEC_LEVEL
;
ieee80211_crypt_delayed_deinit
(
ieee
,
crypt
);
}
goto
done
;
}
sec
.
enabled
=
1
;
sec
.
flags
|=
SEC_ENABLED
;
sec
.
encrypt
=
1
;
ops
=
ieee80211_get_crypto_ops
(
param
->
u
.
crypt
.
alg
);
if
(
ops
==
NULL
&&
strcmp
(
param
->
u
.
crypt
.
alg
,
"WEP"
)
==
0
)
{
...
...
@@ -8029,7 +8034,7 @@ static int ipw2100_wx_get_auth(struct net_device *dev,
break
;
case
IW_AUTH_80211_AUTH_ALG
:
param
->
value
=
priv
->
sec
.
auth_mode
;
param
->
value
=
priv
->
ieee
->
sec
.
auth_mode
;
break
;
case
IW_AUTH_WPA_ENABLED
:
...
...
drivers/net/wireless/ipw2100.h
浏览文件 @
25b645be
...
...
@@ -524,8 +524,6 @@ struct ipw2100_priv {
int
power_mode
;
/* WEP data */
struct
ieee80211_security
sec
;
int
messages_sent
;
int
short_retry_limit
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录