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
8cab24f0
Commit
8cab24f0
authored
Apr 08, 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
69a2bac8
62a40a15
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
8 deletions
+19
-8
net/mac80211/iface.c
net/mac80211/iface.c
+19
-8
No files found.
net/mac80211/iface.c
View file @
8cab24f0
...
...
@@ -78,7 +78,7 @@ void ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata)
ieee80211_bss_info_change_notify
(
sdata
,
BSS_CHANGED_TXPOWER
);
}
u32
ieee80211_idle_off
(
struct
ieee80211_local
*
local
)
static
u32
__
ieee80211_idle_off
(
struct
ieee80211_local
*
local
)
{
if
(
!
(
local
->
hw
.
conf
.
flags
&
IEEE80211_CONF_IDLE
))
return
0
;
...
...
@@ -87,7 +87,7 @@ u32 ieee80211_idle_off(struct ieee80211_local *local)
return
IEEE80211_CONF_CHANGE_IDLE
;
}
static
u32
ieee80211_idle_on
(
struct
ieee80211_local
*
local
)
static
u32
__
ieee80211_idle_on
(
struct
ieee80211_local
*
local
)
{
if
(
local
->
hw
.
conf
.
flags
&
IEEE80211_CONF_IDLE
)
return
0
;
...
...
@@ -98,16 +98,18 @@ static u32 ieee80211_idle_on(struct ieee80211_local *local)
return
IEEE80211_CONF_CHANGE_IDLE
;
}
void
ieee80211_recalc_idle
(
struct
ieee80211_local
*
local
)
static
u32
__ieee80211_recalc_idle
(
struct
ieee80211_local
*
local
,
bool
force_active
)
{
bool
working
=
false
,
scanning
,
active
;
unsigned
int
led_trig_start
=
0
,
led_trig_stop
=
0
;
struct
ieee80211_roc_work
*
roc
;
u32
change
;
lockdep_assert_held
(
&
local
->
mtx
);
active
=
!
list_empty
(
&
local
->
chanctx_list
)
||
local
->
monitors
;
active
=
force_active
||
!
list_empty
(
&
local
->
chanctx_list
)
||
local
->
monitors
;
if
(
!
local
->
ops
->
remain_on_channel
)
{
list_for_each_entry
(
roc
,
&
local
->
roc_list
,
list
)
{
...
...
@@ -132,9 +134,18 @@ void ieee80211_recalc_idle(struct ieee80211_local *local)
ieee80211_mod_tpt_led_trig
(
local
,
led_trig_start
,
led_trig_stop
);
if
(
working
||
scanning
||
active
)
change
=
ieee80211_idle_off
(
local
);
else
change
=
ieee80211_idle_on
(
local
);
return
__ieee80211_idle_off
(
local
);
return
__ieee80211_idle_on
(
local
);
}
u32
ieee80211_idle_off
(
struct
ieee80211_local
*
local
)
{
return
__ieee80211_recalc_idle
(
local
,
true
);
}
void
ieee80211_recalc_idle
(
struct
ieee80211_local
*
local
)
{
u32
change
=
__ieee80211_recalc_idle
(
local
,
false
);
if
(
change
)
ieee80211_hw_config
(
local
,
change
);
}
...
...
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