Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
290eddc4
L
linux
项目概览
xiphi1978
/
linux
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
290eddc4
编写于
10月 17, 2012
作者:
J
John W. Linville
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-john' of
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
上级
8f7b8db6
3a40414f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
35 addition
and
24 deletion
+35
-24
include/net/cfg80211.h
include/net/cfg80211.h
+1
-0
net/mac80211/mlme.c
net/mac80211/mlme.c
+23
-12
net/mac80211/wpa.c
net/mac80211/wpa.c
+8
-3
net/wireless/mlme.c
net/wireless/mlme.c
+3
-9
未找到文件。
include/net/cfg80211.h
浏览文件 @
290eddc4
...
@@ -1218,6 +1218,7 @@ struct cfg80211_deauth_request {
...
@@ -1218,6 +1218,7 @@ struct cfg80211_deauth_request {
const
u8
*
ie
;
const
u8
*
ie
;
size_t
ie_len
;
size_t
ie_len
;
u16
reason_code
;
u16
reason_code
;
bool
local_state_change
;
};
};
/**
/**
...
...
net/mac80211/mlme.c
浏览文件 @
290eddc4
...
@@ -3099,22 +3099,32 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata,
...
@@ -3099,22 +3099,32 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata,
ht_cfreq
,
ht_oper
->
primary_chan
,
ht_cfreq
,
ht_oper
->
primary_chan
,
cbss
->
channel
->
band
);
cbss
->
channel
->
band
);
ht_oper
=
NULL
;
ht_oper
=
NULL
;
}
else
{
channel_type
=
NL80211_CHAN_HT20
;
}
}
}
}
if
(
ht_oper
)
{
if
(
ht_oper
&&
sband
->
ht_cap
.
cap
&
IEEE80211_HT_CAP_SUP_WIDTH_20_40
)
{
channel_type
=
NL80211_CHAN_HT20
;
/*
* cfg80211 already verified that the channel itself can
* be used, but it didn't check that we can do the right
* HT type, so do that here as well. If HT40 isn't allowed
* on this channel, disable 40 MHz operation.
*/
if
(
sband
->
ht_cap
.
cap
&
IEEE80211_HT_CAP_SUP_WIDTH_20_40
)
{
switch
(
ht_oper
->
ht_param
&
IEEE80211_HT_PARAM_CHA_SEC_OFFSET
)
{
switch
(
ht_oper
->
ht_param
&
case
IEEE80211_HT_PARAM_CHA_SEC_ABOVE
:
IEEE80211_HT_PARAM_CHA_SEC_OFFSET
)
{
if
(
cbss
->
channel
->
flags
&
IEEE80211_CHAN_NO_HT40PLUS
)
case
IEEE80211_HT_PARAM_CHA_SEC_ABOVE
:
ifmgd
->
flags
|=
IEEE80211_STA_DISABLE_40MHZ
;
else
channel_type
=
NL80211_CHAN_HT40PLUS
;
channel_type
=
NL80211_CHAN_HT40PLUS
;
break
;
break
;
case
IEEE80211_HT_PARAM_CHA_SEC_BELOW
:
case
IEEE80211_HT_PARAM_CHA_SEC_BELOW
:
if
(
cbss
->
channel
->
flags
&
IEEE80211_CHAN_NO_HT40MINUS
)
ifmgd
->
flags
|=
IEEE80211_STA_DISABLE_40MHZ
;
else
channel_type
=
NL80211_CHAN_HT40MINUS
;
channel_type
=
NL80211_CHAN_HT40MINUS
;
break
;
break
;
}
}
}
}
}
...
@@ -3549,6 +3559,7 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
...
@@ -3549,6 +3559,7 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
{
{
struct
ieee80211_if_managed
*
ifmgd
=
&
sdata
->
u
.
mgd
;
struct
ieee80211_if_managed
*
ifmgd
=
&
sdata
->
u
.
mgd
;
u8
frame_buf
[
IEEE80211_DEAUTH_FRAME_LEN
];
u8
frame_buf
[
IEEE80211_DEAUTH_FRAME_LEN
];
bool
tx
=
!
req
->
local_state_change
;
mutex_lock
(
&
ifmgd
->
mtx
);
mutex_lock
(
&
ifmgd
->
mtx
);
...
@@ -3565,12 +3576,12 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
...
@@ -3565,12 +3576,12 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
if
(
ifmgd
->
associated
&&
if
(
ifmgd
->
associated
&&
ether_addr_equal
(
ifmgd
->
associated
->
bssid
,
req
->
bssid
))
{
ether_addr_equal
(
ifmgd
->
associated
->
bssid
,
req
->
bssid
))
{
ieee80211_set_disassoc
(
sdata
,
IEEE80211_STYPE_DEAUTH
,
ieee80211_set_disassoc
(
sdata
,
IEEE80211_STYPE_DEAUTH
,
req
->
reason_code
,
t
rue
,
frame_buf
);
req
->
reason_code
,
t
x
,
frame_buf
);
}
else
{
}
else
{
drv_mgd_prepare_tx
(
sdata
->
local
,
sdata
);
drv_mgd_prepare_tx
(
sdata
->
local
,
sdata
);
ieee80211_send_deauth_disassoc
(
sdata
,
req
->
bssid
,
ieee80211_send_deauth_disassoc
(
sdata
,
req
->
bssid
,
IEEE80211_STYPE_DEAUTH
,
IEEE80211_STYPE_DEAUTH
,
req
->
reason_code
,
t
rue
,
req
->
reason_code
,
t
x
,
frame_buf
);
frame_buf
);
}
}
...
...
net/mac80211/wpa.c
浏览文件 @
290eddc4
...
@@ -546,14 +546,19 @@ ieee80211_crypto_ccmp_decrypt(struct ieee80211_rx_data *rx)
...
@@ -546,14 +546,19 @@ ieee80211_crypto_ccmp_decrypt(struct ieee80211_rx_data *rx)
static
void
bip_aad
(
struct
sk_buff
*
skb
,
u8
*
aad
)
static
void
bip_aad
(
struct
sk_buff
*
skb
,
u8
*
aad
)
{
{
__le16
mask_fc
;
struct
ieee80211_hdr
*
hdr
=
(
struct
ieee80211_hdr
*
)
skb
->
data
;
/* BIP AAD: FC(masked) || A1 || A2 || A3 */
/* BIP AAD: FC(masked) || A1 || A2 || A3 */
/* FC type/subtype */
/* FC type/subtype */
aad
[
0
]
=
skb
->
data
[
0
];
/* Mask FC Retry, PwrMgt, MoreData flags to zero */
/* Mask FC Retry, PwrMgt, MoreData flags to zero */
aad
[
1
]
=
skb
->
data
[
1
]
&
~
(
BIT
(
4
)
|
BIT
(
5
)
|
BIT
(
6
));
mask_fc
=
hdr
->
frame_control
;
mask_fc
&=
~
cpu_to_le16
(
IEEE80211_FCTL_RETRY
|
IEEE80211_FCTL_PM
|
IEEE80211_FCTL_MOREDATA
);
put_unaligned
(
mask_fc
,
(
__le16
*
)
&
aad
[
0
]);
/* A1 || A2 || A3 */
/* A1 || A2 || A3 */
memcpy
(
aad
+
2
,
skb
->
data
+
4
,
3
*
ETH_ALEN
);
memcpy
(
aad
+
2
,
&
hdr
->
addr1
,
3
*
ETH_ALEN
);
}
}
...
...
net/wireless/mlme.c
浏览文件 @
290eddc4
...
@@ -457,20 +457,14 @@ int __cfg80211_mlme_deauth(struct cfg80211_registered_device *rdev,
...
@@ -457,20 +457,14 @@ int __cfg80211_mlme_deauth(struct cfg80211_registered_device *rdev,
.
reason_code
=
reason
,
.
reason_code
=
reason
,
.
ie
=
ie
,
.
ie
=
ie
,
.
ie_len
=
ie_len
,
.
ie_len
=
ie_len
,
.
local_state_change
=
local_state_change
,
};
};
ASSERT_WDEV_LOCK
(
wdev
);
ASSERT_WDEV_LOCK
(
wdev
);
if
(
local_state_change
)
{
if
(
local_state_change
&&
(
!
wdev
->
current_bss
||
if
(
wdev
->
current_bss
&&
!
ether_addr_equal
(
wdev
->
current_bss
->
pub
.
bssid
,
bssid
)))
ether_addr_equal
(
wdev
->
current_bss
->
pub
.
bssid
,
bssid
))
{
cfg80211_unhold_bss
(
wdev
->
current_bss
);
cfg80211_put_bss
(
&
wdev
->
current_bss
->
pub
);
wdev
->
current_bss
=
NULL
;
}
return
0
;
return
0
;
}
return
rdev
->
ops
->
deauth
(
&
rdev
->
wiphy
,
dev
,
&
req
);
return
rdev
->
ops
->
deauth
(
&
rdev
->
wiphy
,
dev
,
&
req
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录