Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
4db89e14
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看板
提交
4db89e14
编写于
10月 14, 2013
作者:
J
John W. Linville
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-john' of
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
上级
4978705d
d86aa4f8
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
35 addition
and
3 deletion
+35
-3
net/mac80211/ieee80211_i.h
net/mac80211/ieee80211_i.h
+3
-0
net/mac80211/scan.c
net/mac80211/scan.c
+19
-0
net/mac80211/util.c
net/mac80211/util.c
+4
-0
net/wireless/core.c
net/wireless/core.c
+0
-2
net/wireless/core.h
net/wireless/core.h
+3
-0
net/wireless/radiotap.c
net/wireless/radiotap.c
+6
-1
未找到文件。
net/mac80211/ieee80211_i.h
浏览文件 @
4db89e14
...
@@ -893,6 +893,8 @@ struct tpt_led_trigger {
...
@@ -893,6 +893,8 @@ struct tpt_led_trigger {
* that the scan completed.
* that the scan completed.
* @SCAN_ABORTED: Set for our scan work function when the driver reported
* @SCAN_ABORTED: Set for our scan work function when the driver reported
* a scan complete for an aborted scan.
* a scan complete for an aborted scan.
* @SCAN_HW_CANCELLED: Set for our scan work function when the scan is being
* cancelled.
*/
*/
enum
{
enum
{
SCAN_SW_SCANNING
,
SCAN_SW_SCANNING
,
...
@@ -900,6 +902,7 @@ enum {
...
@@ -900,6 +902,7 @@ enum {
SCAN_ONCHANNEL_SCANNING
,
SCAN_ONCHANNEL_SCANNING
,
SCAN_COMPLETED
,
SCAN_COMPLETED
,
SCAN_ABORTED
,
SCAN_ABORTED
,
SCAN_HW_CANCELLED
,
};
};
/**
/**
...
...
net/mac80211/scan.c
浏览文件 @
4db89e14
...
@@ -238,6 +238,9 @@ static bool ieee80211_prep_hw_scan(struct ieee80211_local *local)
...
@@ -238,6 +238,9 @@ static bool ieee80211_prep_hw_scan(struct ieee80211_local *local)
enum
ieee80211_band
band
;
enum
ieee80211_band
band
;
int
i
,
ielen
,
n_chans
;
int
i
,
ielen
,
n_chans
;
if
(
test_bit
(
SCAN_HW_CANCELLED
,
&
local
->
scanning
))
return
false
;
do
{
do
{
if
(
local
->
hw_scan_band
==
IEEE80211_NUM_BANDS
)
if
(
local
->
hw_scan_band
==
IEEE80211_NUM_BANDS
)
return
false
;
return
false
;
...
@@ -940,7 +943,23 @@ void ieee80211_scan_cancel(struct ieee80211_local *local)
...
@@ -940,7 +943,23 @@ void ieee80211_scan_cancel(struct ieee80211_local *local)
if
(
!
local
->
scan_req
)
if
(
!
local
->
scan_req
)
goto
out
;
goto
out
;
/*
* We have a scan running and the driver already reported completion,
* but the worker hasn't run yet or is stuck on the mutex - mark it as
* cancelled.
*/
if
(
test_bit
(
SCAN_HW_SCANNING
,
&
local
->
scanning
)
&&
test_bit
(
SCAN_COMPLETED
,
&
local
->
scanning
))
{
set_bit
(
SCAN_HW_CANCELLED
,
&
local
->
scanning
);
goto
out
;
}
if
(
test_bit
(
SCAN_HW_SCANNING
,
&
local
->
scanning
))
{
if
(
test_bit
(
SCAN_HW_SCANNING
,
&
local
->
scanning
))
{
/*
* Make sure that __ieee80211_scan_completed doesn't trigger a
* scan on another band.
*/
set_bit
(
SCAN_HW_CANCELLED
,
&
local
->
scanning
);
if
(
local
->
ops
->
cancel_hw_scan
)
if
(
local
->
ops
->
cancel_hw_scan
)
drv_cancel_hw_scan
(
local
,
drv_cancel_hw_scan
(
local
,
rcu_dereference_protected
(
local
->
scan_sdata
,
rcu_dereference_protected
(
local
->
scan_sdata
,
...
...
net/mac80211/util.c
浏览文件 @
4db89e14
...
@@ -2238,6 +2238,10 @@ u64 ieee80211_calculate_rx_timestamp(struct ieee80211_local *local,
...
@@ -2238,6 +2238,10 @@ u64 ieee80211_calculate_rx_timestamp(struct ieee80211_local *local,
}
}
rate
=
cfg80211_calculate_bitrate
(
&
ri
);
rate
=
cfg80211_calculate_bitrate
(
&
ri
);
if
(
WARN_ONCE
(
!
rate
,
"Invalid bitrate: flags=0x%x, idx=%d, vht_nss=%d
\n
"
,
status
->
flag
,
status
->
rate_idx
,
status
->
vht_nss
))
return
0
;
/* rewind from end of MPDU */
/* rewind from end of MPDU */
if
(
status
->
flag
&
RX_FLAG_MACTIME_END
)
if
(
status
->
flag
&
RX_FLAG_MACTIME_END
)
...
...
net/wireless/core.c
浏览文件 @
4db89e14
...
@@ -958,8 +958,6 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb,
...
@@ -958,8 +958,6 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb,
case
NETDEV_PRE_UP
:
case
NETDEV_PRE_UP
:
if
(
!
(
wdev
->
wiphy
->
interface_modes
&
BIT
(
wdev
->
iftype
)))
if
(
!
(
wdev
->
wiphy
->
interface_modes
&
BIT
(
wdev
->
iftype
)))
return
notifier_from_errno
(
-
EOPNOTSUPP
);
return
notifier_from_errno
(
-
EOPNOTSUPP
);
if
(
rfkill_blocked
(
rdev
->
rfkill
))
return
notifier_from_errno
(
-
ERFKILL
);
ret
=
cfg80211_can_add_interface
(
rdev
,
wdev
->
iftype
);
ret
=
cfg80211_can_add_interface
(
rdev
,
wdev
->
iftype
);
if
(
ret
)
if
(
ret
)
return
notifier_from_errno
(
ret
);
return
notifier_from_errno
(
ret
);
...
...
net/wireless/core.h
浏览文件 @
4db89e14
...
@@ -411,6 +411,9 @@ static inline int
...
@@ -411,6 +411,9 @@ static inline int
cfg80211_can_add_interface
(
struct
cfg80211_registered_device
*
rdev
,
cfg80211_can_add_interface
(
struct
cfg80211_registered_device
*
rdev
,
enum
nl80211_iftype
iftype
)
enum
nl80211_iftype
iftype
)
{
{
if
(
rfkill_blocked
(
rdev
->
rfkill
))
return
-
ERFKILL
;
return
cfg80211_can_change_interface
(
rdev
,
NULL
,
iftype
);
return
cfg80211_can_change_interface
(
rdev
,
NULL
,
iftype
);
}
}
...
...
net/wireless/radiotap.c
浏览文件 @
4db89e14
...
@@ -97,6 +97,10 @@ int ieee80211_radiotap_iterator_init(
...
@@ -97,6 +97,10 @@ int ieee80211_radiotap_iterator_init(
struct
ieee80211_radiotap_header
*
radiotap_header
,
struct
ieee80211_radiotap_header
*
radiotap_header
,
int
max_length
,
const
struct
ieee80211_radiotap_vendor_namespaces
*
vns
)
int
max_length
,
const
struct
ieee80211_radiotap_vendor_namespaces
*
vns
)
{
{
/* check the radiotap header can actually be present */
if
(
max_length
<
sizeof
(
struct
ieee80211_radiotap_header
))
return
-
EINVAL
;
/* Linux only supports version 0 radiotap format */
/* Linux only supports version 0 radiotap format */
if
(
radiotap_header
->
it_version
)
if
(
radiotap_header
->
it_version
)
return
-
EINVAL
;
return
-
EINVAL
;
...
@@ -131,7 +135,8 @@ int ieee80211_radiotap_iterator_init(
...
@@ -131,7 +135,8 @@ int ieee80211_radiotap_iterator_init(
*/
*/
if
((
unsigned
long
)
iterator
->
_arg
-
if
((
unsigned
long
)
iterator
->
_arg
-
(
unsigned
long
)
iterator
->
_rtheader
>
(
unsigned
long
)
iterator
->
_rtheader
+
sizeof
(
uint32_t
)
>
(
unsigned
long
)
iterator
->
_max_length
)
(
unsigned
long
)
iterator
->
_max_length
)
return
-
EINVAL
;
return
-
EINVAL
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录