Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
70180659
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
70180659
编写于
10月 18, 2007
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fixes-davem' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6
上级
85ef3e5c
67a4cce4
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
9 addition
and
46 deletion
+9
-46
net/mac80211/ieee80211_sta.c
net/mac80211/ieee80211_sta.c
+9
-46
未找到文件。
net/mac80211/ieee80211_sta.c
浏览文件 @
70180659
...
...
@@ -108,14 +108,11 @@ struct ieee802_11_elems {
u8
wmm_param_len
;
};
enum
ParseRes
{
ParseOK
=
0
,
ParseUnknown
=
1
,
ParseFailed
=
-
1
};
static
enum
ParseRes
ieee802_11_parse_elems
(
u8
*
start
,
size_t
len
,
struct
ieee802_11_elems
*
elems
)
static
void
ieee802_11_parse_elems
(
u8
*
start
,
size_t
len
,
struct
ieee802_11_elems
*
elems
)
{
size_t
left
=
len
;
u8
*
pos
=
start
;
int
unknown
=
0
;
memset
(
elems
,
0
,
sizeof
(
*
elems
));
...
...
@@ -126,15 +123,8 @@ static enum ParseRes ieee802_11_parse_elems(u8 *start, size_t len,
elen
=
*
pos
++
;
left
-=
2
;
if
(
elen
>
left
)
{
#if 0
if (net_ratelimit())
printk(KERN_DEBUG "IEEE 802.11 element parse "
"failed (id=%d elen=%d left=%d)\n",
id, elen, left);
#endif
return
ParseFailed
;
}
if
(
elen
>
left
)
return
;
switch
(
id
)
{
case
WLAN_EID_SSID
:
...
...
@@ -201,28 +191,15 @@ static enum ParseRes ieee802_11_parse_elems(u8 *start, size_t len,
elems
->
ext_supp_rates_len
=
elen
;
break
;
default:
#if 0
printk(KERN_DEBUG "IEEE 802.11 element parse ignored "
"unknown element (id=%d elen=%d)\n",
id, elen);
#endif
unknown
++
;
break
;
}
left
-=
elen
;
pos
+=
elen
;
}
/* Do not trigger error if left == 1 as Apple Airport base stations
* send AssocResps that are one spurious byte too long. */
return
unknown
?
ParseUnknown
:
ParseOK
;
}
static
int
ecw2cw
(
int
ecw
)
{
int
cw
=
1
;
...
...
@@ -931,12 +908,7 @@ static void ieee80211_auth_challenge(struct net_device *dev,
printk
(
KERN_DEBUG
"%s: replying to auth challenge
\n
"
,
dev
->
name
);
pos
=
mgmt
->
u
.
auth
.
variable
;
if
(
ieee802_11_parse_elems
(
pos
,
len
-
(
pos
-
(
u8
*
)
mgmt
),
&
elems
)
==
ParseFailed
)
{
printk
(
KERN_DEBUG
"%s: failed to parse Auth(challenge)
\n
"
,
dev
->
name
);
return
;
}
ieee802_11_parse_elems
(
pos
,
len
-
(
pos
-
(
u8
*
)
mgmt
),
&
elems
);
if
(
!
elems
.
challenge
)
{
printk
(
KERN_DEBUG
"%s: no challenge IE in shared key auth "
"frame
\n
"
,
dev
->
name
);
...
...
@@ -1230,12 +1202,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct net_device *dev,
aid
&=
~
(
BIT
(
15
)
|
BIT
(
14
));
pos
=
mgmt
->
u
.
assoc_resp
.
variable
;
if
(
ieee802_11_parse_elems
(
pos
,
len
-
(
pos
-
(
u8
*
)
mgmt
),
&
elems
)
==
ParseFailed
)
{
printk
(
KERN_DEBUG
"%s: failed to parse AssocResp
\n
"
,
dev
->
name
);
return
;
}
ieee802_11_parse_elems
(
pos
,
len
-
(
pos
-
(
u8
*
)
mgmt
),
&
elems
);
if
(
!
elems
.
supp_rates
)
{
printk
(
KERN_DEBUG
"%s: no SuppRates element in AssocResp
\n
"
,
...
...
@@ -1459,7 +1426,7 @@ static void ieee80211_rx_bss_info(struct net_device *dev,
struct
ieee80211_local
*
local
=
wdev_priv
(
dev
->
ieee80211_ptr
);
struct
ieee802_11_elems
elems
;
size_t
baselen
;
int
channel
,
invalid
=
0
,
clen
;
int
channel
,
clen
;
struct
ieee80211_sta_bss
*
bss
;
struct
sta_info
*
sta
;
struct
ieee80211_sub_if_data
*
sdata
=
IEEE80211_DEV_TO_SUB_IF
(
dev
);
...
...
@@ -1505,9 +1472,7 @@ static void ieee80211_rx_bss_info(struct net_device *dev,
#endif
/* CONFIG_MAC80211_IBSS_DEBUG */
}
if
(
ieee802_11_parse_elems
(
mgmt
->
u
.
beacon
.
variable
,
len
-
baselen
,
&
elems
)
==
ParseFailed
)
invalid
=
1
;
ieee802_11_parse_elems
(
mgmt
->
u
.
beacon
.
variable
,
len
-
baselen
,
&
elems
);
if
(
sdata
->
type
==
IEEE80211_IF_TYPE_IBSS
&&
elems
.
supp_rates
&&
memcmp
(
mgmt
->
bssid
,
sdata
->
u
.
sta
.
bssid
,
ETH_ALEN
)
==
0
&&
...
...
@@ -1724,9 +1689,7 @@ static void ieee80211_rx_mgmt_beacon(struct net_device *dev,
if
(
baselen
>
len
)
return
;
if
(
ieee802_11_parse_elems
(
mgmt
->
u
.
beacon
.
variable
,
len
-
baselen
,
&
elems
)
==
ParseFailed
)
return
;
ieee802_11_parse_elems
(
mgmt
->
u
.
beacon
.
variable
,
len
-
baselen
,
&
elems
);
if
(
elems
.
erp_info
&&
elems
.
erp_info_len
>=
1
)
ieee80211_handle_erp_ie
(
dev
,
elems
.
erp_info
[
0
]);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录