Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
4db89e14
Commit
4db89e14
authored
Oct 14, 2013
by
John W. Linville
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-john' of
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
parents
4978705d
d86aa4f8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
3 deletions
+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
No files found.
net/mac80211/ieee80211_i.h
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment