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
nexedi
linux
Commits
a6766ccd
Commit
a6766ccd
authored
Nov 15, 2011
by
Stanislaw Gruszka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iwlegacy: s/STATUS_/S_/
Signed-off-by:
Stanislaw Gruszka
<
sgruszka@redhat.com
>
parent
6bbb1370
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
245 additions
and
245 deletions
+245
-245
drivers/net/wireless/iwlegacy/3945-mac.c
drivers/net/wireless/iwlegacy/3945-mac.c
+49
-49
drivers/net/wireless/iwlegacy/3945.c
drivers/net/wireless/iwlegacy/3945.c
+5
-5
drivers/net/wireless/iwlegacy/4965-mac.c
drivers/net/wireless/iwlegacy/4965-mac.c
+67
-67
drivers/net/wireless/iwlegacy/4965.c
drivers/net/wireless/iwlegacy/4965.c
+9
-9
drivers/net/wireless/iwlegacy/iwl-core.c
drivers/net/wireless/iwlegacy/iwl-core.c
+20
-20
drivers/net/wireless/iwlegacy/iwl-core.h
drivers/net/wireless/iwlegacy/iwl-core.h
+25
-25
drivers/net/wireless/iwlegacy/iwl-debugfs.c
drivers/net/wireless/iwlegacy/iwl-debugfs.c
+33
-33
drivers/net/wireless/iwlegacy/iwl-hcmd.c
drivers/net/wireless/iwlegacy/iwl-hcmd.c
+7
-7
drivers/net/wireless/iwlegacy/iwl-helpers.h
drivers/net/wireless/iwlegacy/iwl-helpers.h
+2
-2
drivers/net/wireless/iwlegacy/iwl-led.c
drivers/net/wireless/iwlegacy/iwl-led.c
+1
-1
drivers/net/wireless/iwlegacy/iwl-power.c
drivers/net/wireless/iwlegacy/iwl-power.c
+3
-3
drivers/net/wireless/iwlegacy/iwl-rx.c
drivers/net/wireless/iwlegacy/iwl-rx.c
+1
-1
drivers/net/wireless/iwlegacy/iwl-scan.c
drivers/net/wireless/iwlegacy/iwl-scan.c
+21
-21
drivers/net/wireless/iwlegacy/iwl-tx.c
drivers/net/wireless/iwlegacy/iwl-tx.c
+2
-2
No files found.
drivers/net/wireless/iwlegacy/3945-mac.c
View file @
a6766ccd
...
@@ -827,17 +827,17 @@ static void il3945_rx_card_state_notif(struct il_priv *il,
...
@@ -827,17 +827,17 @@ static void il3945_rx_card_state_notif(struct il_priv *il,
CSR_UCODE_DRV_GP1_BIT_CMD_BLOCKED
);
CSR_UCODE_DRV_GP1_BIT_CMD_BLOCKED
);
if
(
flags
&
HW_CARD_DISABLED
)
if
(
flags
&
HW_CARD_DISABLED
)
set_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
);
set_bit
(
S_RF_KILL_HW
,
&
il
->
status
);
else
else
clear_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
);
clear_bit
(
S_RF_KILL_HW
,
&
il
->
status
);
il_scan_cancel
(
il
);
il_scan_cancel
(
il
);
if
((
test_bit
(
S
TATUS
_RF_KILL_HW
,
&
status
)
!=
if
((
test_bit
(
S_RF_KILL_HW
,
&
status
)
!=
test_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
)))
test_bit
(
S_RF_KILL_HW
,
&
il
->
status
)))
wiphy_rfkill_set_hw_state
(
il
->
hw
->
wiphy
,
wiphy_rfkill_set_hw_state
(
il
->
hw
->
wiphy
,
test_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
));
test_bit
(
S_RF_KILL_HW
,
&
il
->
status
));
else
else
wake_up
(
&
il
->
wait_command_queue
);
wake_up
(
&
il
->
wait_command_queue
);
}
}
...
@@ -1537,7 +1537,7 @@ static void il3945_irq_tasklet(struct il_priv *il)
...
@@ -1537,7 +1537,7 @@ static void il3945_irq_tasklet(struct il_priv *il)
/* Re-enable all interrupts */
/* Re-enable all interrupts */
/* only Re-enable if disabled by irq */
/* only Re-enable if disabled by irq */
if
(
test_bit
(
S
TATUS
_INT_ENABLED
,
&
il
->
status
))
if
(
test_bit
(
S_INT_ENABLED
,
&
il
->
status
))
il_enable_interrupts
(
il
);
il_enable_interrupts
(
il
);
#ifdef CONFIG_IWLEGACY_DEBUG
#ifdef CONFIG_IWLEGACY_DEBUG
...
@@ -2213,7 +2213,7 @@ static void il3945_alive_start(struct il_priv *il)
...
@@ -2213,7 +2213,7 @@ static void il3945_alive_start(struct il_priv *il)
D_INFO
(
"RFKILL status: 0x%x
\n
"
,
rfkill
);
D_INFO
(
"RFKILL status: 0x%x
\n
"
,
rfkill
);
if
(
rfkill
&
0x1
)
{
if
(
rfkill
&
0x1
)
{
clear_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
);
clear_bit
(
S_RF_KILL_HW
,
&
il
->
status
);
/* if RFKILL is not on, then wait for thermal
/* if RFKILL is not on, then wait for thermal
* sensor in adapter to kick in */
* sensor in adapter to kick in */
while
(
il3945_hw_get_temperature
(
il
)
==
0
)
{
while
(
il3945_hw_get_temperature
(
il
)
==
0
)
{
...
@@ -2225,10 +2225,10 @@ static void il3945_alive_start(struct il_priv *il)
...
@@ -2225,10 +2225,10 @@ static void il3945_alive_start(struct il_priv *il)
D_INFO
(
"Thermal calibration took %dus
\n
"
,
D_INFO
(
"Thermal calibration took %dus
\n
"
,
thermal_spin
*
10
);
thermal_spin
*
10
);
}
else
}
else
set_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
);
set_bit
(
S_RF_KILL_HW
,
&
il
->
status
);
/* After the ALIVE response, we can send commands to 3945 uCode */
/* After the ALIVE response, we can send commands to 3945 uCode */
set_bit
(
S
TATUS
_ALIVE
,
&
il
->
status
);
set_bit
(
S_ALIVE
,
&
il
->
status
);
/* Enable watchdog to monitor the driver tx queues */
/* Enable watchdog to monitor the driver tx queues */
il_setup_watchdog
(
il
);
il_setup_watchdog
(
il
);
...
@@ -2256,7 +2256,7 @@ static void il3945_alive_start(struct il_priv *il)
...
@@ -2256,7 +2256,7 @@ static void il3945_alive_start(struct il_priv *il)
/* Configure Bluetooth device coexistence support */
/* Configure Bluetooth device coexistence support */
il_send_bt_config
(
il
);
il_send_bt_config
(
il
);
set_bit
(
S
TATUS
_READY
,
&
il
->
status
);
set_bit
(
S_READY
,
&
il
->
status
);
/* Configure the adapter for unassociated operation */
/* Configure the adapter for unassociated operation */
il3945_commit_rxon
(
il
,
ctx
);
il3945_commit_rxon
(
il
,
ctx
);
...
@@ -2283,9 +2283,9 @@ static void __il3945_down(struct il_priv *il)
...
@@ -2283,9 +2283,9 @@ static void __il3945_down(struct il_priv *il)
il_scan_cancel_timeout
(
il
,
200
);
il_scan_cancel_timeout
(
il
,
200
);
exit_pending
=
test_and_set_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
);
exit_pending
=
test_and_set_bit
(
S_EXIT_PENDING
,
&
il
->
status
);
/* Stop TX queues watchdog. We need to have S
TATUS
_EXIT_PENDING bit set
/* Stop TX queues watchdog. We need to have S_EXIT_PENDING bit set
* to prevent rearm timer */
* to prevent rearm timer */
del_timer_sync
(
&
il
->
watchdog
);
del_timer_sync
(
&
il
->
watchdog
);
...
@@ -2300,7 +2300,7 @@ static void __il3945_down(struct il_priv *il)
...
@@ -2300,7 +2300,7 @@ static void __il3945_down(struct il_priv *il)
/* Wipe out the EXIT_PENDING status bit if we are not actually
/* Wipe out the EXIT_PENDING status bit if we are not actually
* exiting the module */
* exiting the module */
if
(
!
exit_pending
)
if
(
!
exit_pending
)
clear_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
);
clear_bit
(
S_EXIT_PENDING
,
&
il
->
status
);
/* stop and reset the on-board processor */
/* stop and reset the on-board processor */
_il_wr
(
il
,
CSR_RESET
,
CSR_RESET_REG_FLAG_NEVO_RESET
);
_il_wr
(
il
,
CSR_RESET
,
CSR_RESET_REG_FLAG_NEVO_RESET
);
...
@@ -2317,25 +2317,25 @@ static void __il3945_down(struct il_priv *il)
...
@@ -2317,25 +2317,25 @@ static void __il3945_down(struct il_priv *il)
/* If we have not previously called il3945_init() then
/* If we have not previously called il3945_init() then
* clear all bits but the RF Kill bits and return */
* clear all bits but the RF Kill bits and return */
if
(
!
il_is_init
(
il
))
{
if
(
!
il_is_init
(
il
))
{
il
->
status
=
test_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
)
<<
il
->
status
=
test_bit
(
S_RF_KILL_HW
,
&
il
->
status
)
<<
S
TATUS
_RF_KILL_HW
|
S_RF_KILL_HW
|
test_bit
(
S
TATUS
_GEO_CONFIGURED
,
&
il
->
status
)
<<
test_bit
(
S_GEO_CONFIGURED
,
&
il
->
status
)
<<
S
TATUS
_GEO_CONFIGURED
|
S_GEO_CONFIGURED
|
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
)
<<
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
)
<<
S
TATUS
_EXIT_PENDING
;
S_EXIT_PENDING
;
goto
exit
;
goto
exit
;
}
}
/* ...otherwise clear out all the status bits but the RF Kill
/* ...otherwise clear out all the status bits but the RF Kill
* bit and continue taking the NIC down. */
* bit and continue taking the NIC down. */
il
->
status
&=
test_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
)
<<
il
->
status
&=
test_bit
(
S_RF_KILL_HW
,
&
il
->
status
)
<<
S
TATUS
_RF_KILL_HW
|
S_RF_KILL_HW
|
test_bit
(
S
TATUS
_GEO_CONFIGURED
,
&
il
->
status
)
<<
test_bit
(
S_GEO_CONFIGURED
,
&
il
->
status
)
<<
S
TATUS
_GEO_CONFIGURED
|
S_GEO_CONFIGURED
|
test_bit
(
S
TATUS
_FW_ERROR
,
&
il
->
status
)
<<
test_bit
(
S_FW_ERROR
,
&
il
->
status
)
<<
S
TATUS
_FW_ERROR
|
S_FW_ERROR
|
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
)
<<
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
)
<<
S
TATUS
_EXIT_PENDING
;
S_EXIT_PENDING
;
il3945_hw_txq_ctx_stop
(
il
);
il3945_hw_txq_ctx_stop
(
il
);
il3945_hw_rxq_stop
(
il
);
il3945_hw_rxq_stop
(
il
);
...
@@ -2400,7 +2400,7 @@ static int __il3945_up(struct il_priv *il)
...
@@ -2400,7 +2400,7 @@ static int __il3945_up(struct il_priv *il)
if
(
rc
)
if
(
rc
)
return
rc
;
return
rc
;
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
{
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
{
IL_WARN
(
"Exit pending; will not bring the NIC up
\n
"
);
IL_WARN
(
"Exit pending; will not bring the NIC up
\n
"
);
return
-
EIO
;
return
-
EIO
;
}
}
...
@@ -2413,9 +2413,9 @@ static int __il3945_up(struct il_priv *il)
...
@@ -2413,9 +2413,9 @@ static int __il3945_up(struct il_priv *il)
/* If platform's RF_KILL switch is NOT set to KILL */
/* If platform's RF_KILL switch is NOT set to KILL */
if
(
_il_rd
(
il
,
CSR_GP_CNTRL
)
&
if
(
_il_rd
(
il
,
CSR_GP_CNTRL
)
&
CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW
)
CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW
)
clear_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
);
clear_bit
(
S_RF_KILL_HW
,
&
il
->
status
);
else
{
else
{
set_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
);
set_bit
(
S_RF_KILL_HW
,
&
il
->
status
);
IL_WARN
(
"Radio disabled by HW RF Kill switch
\n
"
);
IL_WARN
(
"Radio disabled by HW RF Kill switch
\n
"
);
return
-
ENODEV
;
return
-
ENODEV
;
}
}
...
@@ -2448,7 +2448,7 @@ static int __il3945_up(struct il_priv *il)
...
@@ -2448,7 +2448,7 @@ static int __il3945_up(struct il_priv *il)
il
->
ucode_data
.
len
);
il
->
ucode_data
.
len
);
/* We return success when we resume from suspend and rf_kill is on. */
/* We return success when we resume from suspend and rf_kill is on. */
if
(
test_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
))
if
(
test_bit
(
S_RF_KILL_HW
,
&
il
->
status
))
return
0
;
return
0
;
for
(
i
=
0
;
i
<
MAX_HW_RESTARTS
;
i
++
)
{
for
(
i
=
0
;
i
<
MAX_HW_RESTARTS
;
i
++
)
{
...
@@ -2472,9 +2472,9 @@ static int __il3945_up(struct il_priv *il)
...
@@ -2472,9 +2472,9 @@ static int __il3945_up(struct il_priv *il)
return
0
;
return
0
;
}
}
set_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
);
set_bit
(
S_EXIT_PENDING
,
&
il
->
status
);
__il3945_down
(
il
);
__il3945_down
(
il
);
clear_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
);
clear_bit
(
S_EXIT_PENDING
,
&
il
->
status
);
/* tried to restart and config the device for as long as our
/* tried to restart and config the device for as long as our
* patience could withstand */
* patience could withstand */
...
@@ -2495,7 +2495,7 @@ static void il3945_bg_init_alive_start(struct work_struct *data)
...
@@ -2495,7 +2495,7 @@ static void il3945_bg_init_alive_start(struct work_struct *data)
container_of
(
data
,
struct
il_priv
,
init_alive_start
.
work
);
container_of
(
data
,
struct
il_priv
,
init_alive_start
.
work
);
mutex_lock
(
&
il
->
mutex
);
mutex_lock
(
&
il
->
mutex
);
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
goto
out
;
goto
out
;
il3945_init_alive_start
(
il
);
il3945_init_alive_start
(
il
);
...
@@ -2509,7 +2509,7 @@ static void il3945_bg_alive_start(struct work_struct *data)
...
@@ -2509,7 +2509,7 @@ static void il3945_bg_alive_start(struct work_struct *data)
container_of
(
data
,
struct
il_priv
,
alive_start
.
work
);
container_of
(
data
,
struct
il_priv
,
alive_start
.
work
);
mutex_lock
(
&
il
->
mutex
);
mutex_lock
(
&
il
->
mutex
);
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
goto
out
;
goto
out
;
il3945_alive_start
(
il
);
il3945_alive_start
(
il
);
...
@@ -2527,15 +2527,15 @@ static void il3945_rfkill_poll(struct work_struct *data)
...
@@ -2527,15 +2527,15 @@ static void il3945_rfkill_poll(struct work_struct *data)
{
{
struct
il_priv
*
il
=
struct
il_priv
*
il
=
container_of
(
data
,
struct
il_priv
,
_3945
.
rfkill_poll
.
work
);
container_of
(
data
,
struct
il_priv
,
_3945
.
rfkill_poll
.
work
);
bool
old_rfkill
=
test_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
);
bool
old_rfkill
=
test_bit
(
S_RF_KILL_HW
,
&
il
->
status
);
bool
new_rfkill
=
!
(
_il_rd
(
il
,
CSR_GP_CNTRL
)
bool
new_rfkill
=
!
(
_il_rd
(
il
,
CSR_GP_CNTRL
)
&
CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW
);
&
CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW
);
if
(
new_rfkill
!=
old_rfkill
)
{
if
(
new_rfkill
!=
old_rfkill
)
{
if
(
new_rfkill
)
if
(
new_rfkill
)
set_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
);
set_bit
(
S_RF_KILL_HW
,
&
il
->
status
);
else
else
clear_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
);
clear_bit
(
S_RF_KILL_HW
,
&
il
->
status
);
wiphy_rfkill_set_hw_state
(
il
->
hw
->
wiphy
,
new_rfkill
);
wiphy_rfkill_set_hw_state
(
il
->
hw
->
wiphy
,
new_rfkill
);
...
@@ -2682,10 +2682,10 @@ int il3945_request_scan(struct il_priv *il, struct ieee80211_vif *vif)
...
@@ -2682,10 +2682,10 @@ int il3945_request_scan(struct il_priv *il, struct ieee80211_vif *vif)
cmd
.
data
=
scan
;
cmd
.
data
=
scan
;
scan
->
len
=
cpu_to_le16
(
cmd
.
len
);
scan
->
len
=
cpu_to_le16
(
cmd
.
len
);
set_bit
(
S
TATUS
_SCAN_HW
,
&
il
->
status
);
set_bit
(
S_SCAN_HW
,
&
il
->
status
);
ret
=
il_send_cmd_sync
(
il
,
&
cmd
);
ret
=
il_send_cmd_sync
(
il
,
&
cmd
);
if
(
ret
)
if
(
ret
)
clear_bit
(
S
TATUS
_SCAN_HW
,
&
il
->
status
);
clear_bit
(
S_SCAN_HW
,
&
il
->
status
);
return
ret
;
return
ret
;
}
}
...
@@ -2705,10 +2705,10 @@ static void il3945_bg_restart(struct work_struct *data)
...
@@ -2705,10 +2705,10 @@ static void il3945_bg_restart(struct work_struct *data)
{
{
struct
il_priv
*
il
=
container_of
(
data
,
struct
il_priv
,
restart
);
struct
il_priv
*
il
=
container_of
(
data
,
struct
il_priv
,
restart
);
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
return
;
return
;
if
(
test_and_clear_bit
(
S
TATUS
_FW_ERROR
,
&
il
->
status
))
{
if
(
test_and_clear_bit
(
S_FW_ERROR
,
&
il
->
status
))
{
mutex_lock
(
&
il
->
mutex
);
mutex_lock
(
&
il
->
mutex
);
il
->
ctx
.
vif
=
NULL
;
il
->
ctx
.
vif
=
NULL
;
il
->
is_open
=
0
;
il
->
is_open
=
0
;
...
@@ -2719,7 +2719,7 @@ static void il3945_bg_restart(struct work_struct *data)
...
@@ -2719,7 +2719,7 @@ static void il3945_bg_restart(struct work_struct *data)
il3945_down
(
il
);
il3945_down
(
il
);
mutex_lock
(
&
il
->
mutex
);
mutex_lock
(
&
il
->
mutex
);
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
{
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
{
mutex_unlock
(
&
il
->
mutex
);
mutex_unlock
(
&
il
->
mutex
);
return
;
return
;
}
}
...
@@ -2735,7 +2735,7 @@ static void il3945_bg_rx_replenish(struct work_struct *data)
...
@@ -2735,7 +2735,7 @@ static void il3945_bg_rx_replenish(struct work_struct *data)
container_of
(
data
,
struct
il_priv
,
rx_replenish
);
container_of
(
data
,
struct
il_priv
,
rx_replenish
);
mutex_lock
(
&
il
->
mutex
);
mutex_lock
(
&
il
->
mutex
);
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
goto
out
;
goto
out
;
il3945_rx_replenish
(
il
);
il3945_rx_replenish
(
il
);
...
@@ -2755,7 +2755,7 @@ void il3945_post_associate(struct il_priv *il)
...
@@ -2755,7 +2755,7 @@ void il3945_post_associate(struct il_priv *il)
D_ASSOC
(
"Associated as %d to: %pM
\n
"
,
D_ASSOC
(
"Associated as %d to: %pM
\n
"
,
ctx
->
vif
->
bss_conf
.
aid
,
ctx
->
active
.
bssid_addr
);
ctx
->
vif
->
bss_conf
.
aid
,
ctx
->
active
.
bssid_addr
);
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
return
;
return
;
il_scan_cancel_timeout
(
il
,
200
);
il_scan_cancel_timeout
(
il
,
200
);
...
@@ -2847,10 +2847,10 @@ static int il3945_mac_start(struct ieee80211_hw *hw)
...
@@ -2847,10 +2847,10 @@ static int il3945_mac_start(struct ieee80211_hw *hw)
/* Wait for START_ALIVE from ucode. Otherwise callbacks from
/* Wait for START_ALIVE from ucode. Otherwise callbacks from
* mac80211 will not be run successfully. */
* mac80211 will not be run successfully. */
ret
=
wait_event_timeout
(
il
->
wait_command_queue
,
ret
=
wait_event_timeout
(
il
->
wait_command_queue
,
test_bit
(
S
TATUS
_READY
,
&
il
->
status
),
test_bit
(
S_READY
,
&
il
->
status
),
UCODE_READY_TIMEOUT
);
UCODE_READY_TIMEOUT
);
if
(
!
ret
)
{
if
(
!
ret
)
{
if
(
!
test_bit
(
S
TATUS
_READY
,
&
il
->
status
))
{
if
(
!
test_bit
(
S_READY
,
&
il
->
status
))
{
IL_ERR
(
IL_ERR
(
"Wait for START_ALIVE timeout after %dms.
\n
"
,
"Wait for START_ALIVE timeout after %dms.
\n
"
,
jiffies_to_msecs
(
UCODE_READY_TIMEOUT
));
jiffies_to_msecs
(
UCODE_READY_TIMEOUT
));
...
@@ -2918,7 +2918,7 @@ void il3945_config_ap(struct il_priv *il)
...
@@ -2918,7 +2918,7 @@ void il3945_config_ap(struct il_priv *il)
struct
ieee80211_vif
*
vif
=
ctx
->
vif
;
struct
ieee80211_vif
*
vif
=
ctx
->
vif
;
int
rc
=
0
;
int
rc
=
0
;
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
return
;
return
;
/* The following should be done only at AP bring up */
/* The following should be done only at AP bring up */
...
@@ -3870,7 +3870,7 @@ static void __devexit il3945_pci_remove(struct pci_dev *pdev)
...
@@ -3870,7 +3870,7 @@ static void __devexit il3945_pci_remove(struct pci_dev *pdev)
il_dbgfs_unregister
(
il
);
il_dbgfs_unregister
(
il
);
set_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
);
set_bit
(
S_EXIT_PENDING
,
&
il
->
status
);
il_leds_exit
(
il
);
il_leds_exit
(
il
);
...
...
drivers/net/wireless/iwlegacy/3945.c
View file @
a6766ccd
...
@@ -1008,7 +1008,7 @@ int il3945_hw_nic_init(struct il_priv *il)
...
@@ -1008,7 +1008,7 @@ int il3945_hw_nic_init(struct il_priv *il)
if
(
rc
)
if
(
rc
)
return
rc
;
return
rc
;
set_bit
(
S
TATUS
_INIT
,
&
il
->
status
);
set_bit
(
S_INIT
,
&
il
->
status
);
return
0
;
return
0
;
}
}
...
@@ -1394,7 +1394,7 @@ static int il3945_send_tx_power(struct il_priv *il)
...
@@ -1394,7 +1394,7 @@ static int il3945_send_tx_power(struct il_priv *il)
};
};
u16
chan
;
u16
chan
;
if
(
WARN_ONCE
(
test_bit
(
S
TATUS
_SCAN_HW
,
&
il
->
status
),
if
(
WARN_ONCE
(
test_bit
(
S_SCAN_HW
,
&
il
->
status
),
"TX Power requested while scanning!
\n
"
))
"TX Power requested while scanning!
\n
"
))
return
-
EAGAIN
;
return
-
EAGAIN
;
...
@@ -1571,7 +1571,7 @@ static int il3945_hw_reg_comp_txpower_temp(struct il_priv *il)
...
@@ -1571,7 +1571,7 @@ static int il3945_hw_reg_comp_txpower_temp(struct il_priv *il)
int
temperature
=
il
->
temperature
;
int
temperature
=
il
->
temperature
;
if
(
il
->
disable_tx_power_cal
||
if
(
il
->
disable_tx_power_cal
||
test_bit
(
S
TATUS
_SCANNING
,
&
il
->
status
))
{
test_bit
(
S_SCANNING
,
&
il
->
status
))
{
/* do not perform tx power calibration */
/* do not perform tx power calibration */
return
0
;
return
0
;
}
}
...
@@ -1726,7 +1726,7 @@ int il3945_commit_rxon(struct il_priv *il, struct il_rxon_context *ctx)
...
@@ -1726,7 +1726,7 @@ int il3945_commit_rxon(struct il_priv *il, struct il_rxon_context *ctx)
int
rc
=
0
;
int
rc
=
0
;
bool
new_assoc
=
!!
(
staging_rxon
->
filter_flags
&
RXON_FILTER_ASSOC_MSK
);
bool
new_assoc
=
!!
(
staging_rxon
->
filter_flags
&
RXON_FILTER_ASSOC_MSK
);
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
return
-
EINVAL
;
return
-
EINVAL
;
if
(
!
il_is_alive
(
il
))
if
(
!
il_is_alive
(
il
))
...
@@ -1885,7 +1885,7 @@ static void il3945_bg_reg_txpower_periodic(struct work_struct *work)
...
@@ -1885,7 +1885,7 @@ static void il3945_bg_reg_txpower_periodic(struct work_struct *work)
struct
il_priv
*
il
=
container_of
(
work
,
struct
il_priv
,
struct
il_priv
*
il
=
container_of
(
work
,
struct
il_priv
,
_3945
.
thermal_periodic
.
work
);
_3945
.
thermal_periodic
.
work
);
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
return
;
return
;
mutex_lock
(
&
il
->
mutex
);
mutex_lock
(
&
il
->
mutex
);
...
...
drivers/net/wireless/iwlegacy/4965-mac.c
View file @
a6766ccd
This diff is collapsed.
Click to expand it.
drivers/net/wireless/iwlegacy/4965.c
View file @
a6766ccd
...
@@ -1349,7 +1349,7 @@ static int il4965_send_tx_power(struct il_priv *il)
...
@@ -1349,7 +1349,7 @@ static int il4965_send_tx_power(struct il_priv *il)
u8
ctrl_chan_high
=
0
;
u8
ctrl_chan_high
=
0
;
struct
il_rxon_context
*
ctx
=
&
il
->
ctx
;
struct
il_rxon_context
*
ctx
=
&
il
->
ctx
;
if
(
WARN_ONCE
(
test_bit
(
S
TATUS
_SCAN_HW
,
&
il
->
status
),
if
(
WARN_ONCE
(
test_bit
(
S_SCAN_HW
,
&
il
->
status
),
"TX Power requested while scanning!
\n
"
))
"TX Power requested while scanning!
\n
"
))
return
-
EAGAIN
;
return
-
EAGAIN
;
...
@@ -1441,7 +1441,7 @@ static int il4965_commit_rxon(struct il_priv *il, struct il_rxon_context *ctx)
...
@@ -1441,7 +1441,7 @@ static int il4965_commit_rxon(struct il_priv *il, struct il_rxon_context *ctx)
* receive commit_rxon request
* receive commit_rxon request
* abort any previous channel switch if still in process
* abort any previous channel switch if still in process
*/
*/
if
(
test_bit
(
S
TATUS
_CHANNEL_SWITCH_PENDING
,
&
il
->
status
)
&&
if
(
test_bit
(
S_CHANNEL_SWITCH_PENDING
,
&
il
->
status
)
&&
il
->
switch_channel
!=
ctx
->
staging
.
channel
)
{
il
->
switch_channel
!=
ctx
->
staging
.
channel
)
{
D_11H
(
"abort channel switch on %d
\n
"
,
D_11H
(
"abort channel switch on %d
\n
"
,
le16_to_cpu
(
il
->
switch_channel
));
le16_to_cpu
(
il
->
switch_channel
));
...
@@ -1673,7 +1673,7 @@ static int il4965_hw_get_temperature(struct il_priv *il)
...
@@ -1673,7 +1673,7 @@ static int il4965_hw_get_temperature(struct il_priv *il)
s32
R1
,
R2
,
R3
;
s32
R1
,
R2
,
R3
;
u32
R4
;
u32
R4
;
if
(
test_bit
(
S
TATUS
_TEMPERATURE
,
&
il
->
status
)
&&
if
(
test_bit
(
S_TEMPERATURE
,
&
il
->
status
)
&&
(
il
->
_4965
.
stats
.
flag
&
(
il
->
_4965
.
stats
.
flag
&
STATISTICS_REPLY_FLG_HT40_MODE_MSK
))
{
STATISTICS_REPLY_FLG_HT40_MODE_MSK
))
{
D_TEMP
(
"Running HT40 temperature calibration
\n
"
);
D_TEMP
(
"Running HT40 temperature calibration
\n
"
);
...
@@ -1696,7 +1696,7 @@ static int il4965_hw_get_temperature(struct il_priv *il)
...
@@ -1696,7 +1696,7 @@ static int il4965_hw_get_temperature(struct il_priv *il)
* with an updated temperature, use R4 provided to us in the
* with an updated temperature, use R4 provided to us in the
* "initialize" ALIVE response.
* "initialize" ALIVE response.
*/
*/
if
(
!
test_bit
(
S
TATUS
_TEMPERATURE
,
&
il
->
status
))
if
(
!
test_bit
(
S_TEMPERATURE
,
&
il
->
status
))
vt
=
sign_extend32
(
R4
,
23
);
vt
=
sign_extend32
(
R4
,
23
);
else
else
vt
=
sign_extend32
(
le32_to_cpu
(
il
->
_4965
.
stats
.
vt
=
sign_extend32
(
le32_to_cpu
(
il
->
_4965
.
stats
.
...
@@ -1737,7 +1737,7 @@ static int il4965_is_temp_calib_needed(struct il_priv *il)
...
@@ -1737,7 +1737,7 @@ static int il4965_is_temp_calib_needed(struct il_priv *il)
{
{
int
temp_diff
;
int
temp_diff
;
if
(
!
test_bit
(
S
TATUS
_STATISTICS
,
&
il
->
status
))
{
if
(
!
test_bit
(
S_STATISTICS
,
&
il
->
status
))
{
D_TEMP
(
"Temperature not updated -- no stats.
\n
"
);
D_TEMP
(
"Temperature not updated -- no stats.
\n
"
);
return
0
;
return
0
;
}
}
...
@@ -1784,10 +1784,10 @@ static void il4965_temperature_calib(struct il_priv *il)
...
@@ -1784,10 +1784,10 @@ static void il4965_temperature_calib(struct il_priv *il)
}
}
il
->
temperature
=
temp
;
il
->
temperature
=
temp
;
set_bit
(
S
TATUS
_TEMPERATURE
,
&
il
->
status
);
set_bit
(
S_TEMPERATURE
,
&
il
->
status
);
if
(
!
il
->
disable_tx_power_cal
&&
if
(
!
il
->
disable_tx_power_cal
&&
unlikely
(
!
test_bit
(
S
TATUS
_SCANNING
,
&
il
->
status
))
&&
unlikely
(
!
test_bit
(
S_SCANNING
,
&
il
->
status
))
&&
il4965_is_temp_calib_needed
(
il
))
il4965_is_temp_calib_needed
(
il
))
queue_work
(
il
->
workqueue
,
&
il
->
txpower_work
);
queue_work
(
il
->
workqueue
,
&
il
->
txpower_work
);
}
}
...
@@ -2179,7 +2179,7 @@ static void il4965_post_associate(struct il_priv *il)
...
@@ -2179,7 +2179,7 @@ static void il4965_post_associate(struct il_priv *il)
if
(
!
vif
||
!
il
->
is_open
)
if
(
!
vif
||
!
il
->
is_open
)
return
;
return
;
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
return
;
return
;
il_scan_cancel_timeout
(
il
,
200
);
il_scan_cancel_timeout
(
il
,
200
);
...
@@ -2254,7 +2254,7 @@ static void il4965_config_ap(struct il_priv *il)
...
@@ -2254,7 +2254,7 @@ static void il4965_config_ap(struct il_priv *il)
lockdep_assert_held
(
&
il
->
mutex
);
lockdep_assert_held
(
&
il
->
mutex
);
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
return
;
return
;
/* The following should be done only at AP bring up */
/* The following should be done only at AP bring up */
...
...
drivers/net/wireless/iwlegacy/iwl-core.c
View file @
a6766ccd
...
@@ -165,7 +165,7 @@ int il_init_geos(struct il_priv *il)
...
@@ -165,7 +165,7 @@ int il_init_geos(struct il_priv *il)
if
(
il
->
bands
[
IEEE80211_BAND_2GHZ
].
n_bitrates
||
if
(
il
->
bands
[
IEEE80211_BAND_2GHZ
].
n_bitrates
||
il
->
bands
[
IEEE80211_BAND_5GHZ
].
n_bitrates
)
{
il
->
bands
[
IEEE80211_BAND_5GHZ
].
n_bitrates
)
{
D_INFO
(
"Geography modes already initialized.
\n
"
);
D_INFO
(
"Geography modes already initialized.
\n
"
);
set_bit
(
S
TATUS
_GEO_CONFIGURED
,
&
il
->
status
);
set_bit
(
S_GEO_CONFIGURED
,
&
il
->
status
);
return
0
;
return
0
;
}
}
...
@@ -264,7 +264,7 @@ int il_init_geos(struct il_priv *il)
...
@@ -264,7 +264,7 @@ int il_init_geos(struct il_priv *il)
il
->
bands
[
IEEE80211_BAND_2GHZ
].
n_channels
,
il
->
bands
[
IEEE80211_BAND_2GHZ
].
n_channels
,
il
->
bands
[
IEEE80211_BAND_5GHZ
].
n_channels
);
il
->
bands
[
IEEE80211_BAND_5GHZ
].
n_channels
);
set_bit
(
S
TATUS
_GEO_CONFIGURED
,
&
il
->
status
);
set_bit
(
S_GEO_CONFIGURED
,
&
il
->
status
);
return
0
;
return
0
;
}
}
...
@@ -277,7 +277,7 @@ void il_free_geos(struct il_priv *il)
...
@@ -277,7 +277,7 @@ void il_free_geos(struct il_priv *il)
{
{
kfree
(
il
->
ieee_channels
);
kfree
(
il
->
ieee_channels
);
kfree
(
il
->
ieee_rates
);
kfree
(
il
->
ieee_rates
);
clear_bit
(
S
TATUS
_GEO_CONFIGURED
,
&
il
->
status
);
clear_bit
(
S_GEO_CONFIGURED
,
&
il
->
status
);
}
}
EXPORT_SYMBOL
(
il_free_geos
);
EXPORT_SYMBOL
(
il_free_geos
);
...
@@ -839,10 +839,10 @@ void il_chswitch_done(struct il_priv *il, bool is_success)
...
@@ -839,10 +839,10 @@ void il_chswitch_done(struct il_priv *il, bool is_success)
{
{
struct
il_rxon_context
*
ctx
=
&
il
->
ctx
;
struct
il_rxon_context
*
ctx
=
&
il
->
ctx
;
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
return
;
return
;
if
(
test_and_clear_bit
(
S
TATUS
_CHANNEL_SWITCH_PENDING
,
&
il
->
status
))
if
(
test_and_clear_bit
(
S_CHANNEL_SWITCH_PENDING
,
&
il
->
status
))
ieee80211_chswitch_done
(
ctx
->
vif
,
is_success
);
ieee80211_chswitch_done
(
ctx
->
vif
,
is_success
);
}
}
EXPORT_SYMBOL
(
il_chswitch_done
);
EXPORT_SYMBOL
(
il_chswitch_done
);
...
@@ -855,7 +855,7 @@ void il_rx_csa(struct il_priv *il, struct il_rx_buf *rxb)
...
@@ -855,7 +855,7 @@ void il_rx_csa(struct il_priv *il, struct il_rx_buf *rxb)
struct
il_rxon_context
*
ctx
=
&
il
->
ctx
;
struct
il_rxon_context
*
ctx
=
&
il
->
ctx
;
struct
il_rxon_cmd
*
rxon
=
(
void
*
)
&
ctx
->
active
;
struct
il_rxon_cmd
*
rxon
=
(
void
*
)
&
ctx
->
active
;
if
(
!
test_bit
(
S
TATUS
_CHANNEL_SWITCH_PENDING
,
&
il
->
status
))
if
(
!
test_bit
(
S_CHANNEL_SWITCH_PENDING
,
&
il
->
status
))
return
;
return
;
if
(
!
le32_to_cpu
(
csa
->
status
)
&&
csa
->
channel
==
il
->
switch_channel
)
{
if
(
!
le32_to_cpu
(
csa
->
status
)
&&
csa
->
channel
==
il
->
switch_channel
)
{
...
@@ -903,10 +903,10 @@ EXPORT_SYMBOL(il_print_rx_config_cmd);
...
@@ -903,10 +903,10 @@ EXPORT_SYMBOL(il_print_rx_config_cmd);
void
il_irq_handle_error
(
struct
il_priv
*
il
)
void
il_irq_handle_error
(
struct
il_priv
*
il
)
{
{
/* Set the FW error flag -- cleared on il_down */
/* Set the FW error flag -- cleared on il_down */
set_bit
(
S
TATUS
_FW_ERROR
,
&
il
->
status
);
set_bit
(
S_FW_ERROR
,
&
il
->
status
);
/* Cancel currently queued command. */
/* Cancel currently queued command. */
clear_bit
(
S
TATUS
_HCMD_ACTIVE
,
&
il
->
status
);
clear_bit
(
S_HCMD_ACTIVE
,
&
il
->
status
);
IL_ERR
(
"Loaded firmware version: %s
\n
"
,
IL_ERR
(
"Loaded firmware version: %s
\n
"
,
il
->
hw
->
wiphy
->
fw_version
);
il
->
hw
->
wiphy
->
fw_version
);
...
@@ -924,9 +924,9 @@ void il_irq_handle_error(struct il_priv *il)
...
@@ -924,9 +924,9 @@ void il_irq_handle_error(struct il_priv *il)
/* Keep the restart process from trying to send host
/* Keep the restart process from trying to send host
* commands by clearing the INIT status bit */
* commands by clearing the INIT status bit */
clear_bit
(
S
TATUS
_READY
,
&
il
->
status
);
clear_bit
(
S_READY
,
&
il
->
status
);
if
(
!
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
{
if
(
!
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
{
IL_DBG
(
IL_DL_FW_ERRORS
,
IL_DBG
(
IL_DL_FW_ERRORS
,
"Restarting adapter due to uCode error.
\n
"
);
"Restarting adapter due to uCode error.
\n
"
);
...
@@ -1127,7 +1127,7 @@ int il_set_tx_power(struct il_priv *il, s8 tx_power, bool force)
...
@@ -1127,7 +1127,7 @@ int il_set_tx_power(struct il_priv *il, s8 tx_power, bool force)
il
->
tx_power_next
=
tx_power
;
il
->
tx_power_next
=
tx_power
;
/* do not set tx power when scanning or channel changing */
/* do not set tx power when scanning or channel changing */
defer
=
test_bit
(
S
TATUS
_SCANNING
,
&
il
->
status
)
||
defer
=
test_bit
(
S_SCANNING
,
&
il
->
status
)
||
memcmp
(
&
ctx
->
active
,
&
ctx
->
staging
,
sizeof
(
ctx
->
staging
));
memcmp
(
&
ctx
->
active
,
&
ctx
->
staging
,
sizeof
(
ctx
->
staging
));
if
(
defer
&&
!
force
)
{
if
(
defer
&&
!
force
)
{
D_INFO
(
"Deferring tx power set
\n
"
);
D_INFO
(
"Deferring tx power set
\n
"
);
...
@@ -1678,7 +1678,7 @@ int il_force_reset(struct il_priv *il, bool external)
...
@@ -1678,7 +1678,7 @@ int il_force_reset(struct il_priv *il, bool external)
{
{
struct
il_force_reset
*
force_reset
;
struct
il_force_reset
*
force_reset
;
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
return
-
EINVAL
;
return
-
EINVAL
;
force_reset
=
&
il
->
force_reset
;
force_reset
=
&
il
->
force_reset
;
...
@@ -1713,13 +1713,13 @@ int il_force_reset(struct il_priv *il, bool external)
...
@@ -1713,13 +1713,13 @@ int il_force_reset(struct il_priv *il, bool external)
IL_ERR
(
"On demand firmware reload
\n
"
);
IL_ERR
(
"On demand firmware reload
\n
"
);
/* Set the FW error flag -- cleared on il_down */
/* Set the FW error flag -- cleared on il_down */
set_bit
(
S
TATUS
_FW_ERROR
,
&
il
->
status
);
set_bit
(
S_FW_ERROR
,
&
il
->
status
);
wake_up
(
&
il
->
wait_command_queue
);
wake_up
(
&
il
->
wait_command_queue
);
/*
/*
* Keep the restart process from trying to send host
* Keep the restart process from trying to send host
* commands by clearing the INIT status bit
* commands by clearing the INIT status bit
*/
*/
clear_bit
(
S
TATUS
_READY
,
&
il
->
status
);
clear_bit
(
S_READY
,
&
il
->
status
);
queue_work
(
il
->
workqueue
,
&
il
->
restart
);
queue_work
(
il
->
workqueue
,
&
il
->
restart
);
return
0
;
return
0
;
...
@@ -1826,7 +1826,7 @@ void il_bg_watchdog(unsigned long data)
...
@@ -1826,7 +1826,7 @@ void il_bg_watchdog(unsigned long data)
int
cnt
;
int
cnt
;
unsigned
long
timeout
;
unsigned
long
timeout
;
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
return
;
return
;
timeout
=
il
->
cfg
->
base_params
->
wd_timeout
;
timeout
=
il
->
cfg
->
base_params
->
wd_timeout
;
...
@@ -1960,9 +1960,9 @@ int il_pci_resume(struct device *device)
...
@@ -1960,9 +1960,9 @@ int il_pci_resume(struct device *device)
hw_rfkill
=
true
;
hw_rfkill
=
true
;
if
(
hw_rfkill
)
if
(
hw_rfkill
)
set_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
);
set_bit
(
S_RF_KILL_HW
,
&
il
->
status
);
else
else
clear_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
);
clear_bit
(
S_RF_KILL_HW
,
&
il
->
status
);
wiphy_rfkill_set_hw_state
(
il
->
hw
->
wiphy
,
hw_rfkill
);
wiphy_rfkill_set_hw_state
(
il
->
hw
->
wiphy
,
hw_rfkill
);
...
@@ -1985,7 +1985,7 @@ EXPORT_SYMBOL(il_pm_ops);
...
@@ -1985,7 +1985,7 @@ EXPORT_SYMBOL(il_pm_ops);
static
void
static
void
il_update_qos
(
struct
il_priv
*
il
,
struct
il_rxon_context
*
ctx
)
il_update_qos
(
struct
il_priv
*
il
,
struct
il_rxon_context
*
ctx
)
{
{
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
return
;
return
;
if
(
!
ctx
->
is_active
)
if
(
!
ctx
->
is_active
)
...
@@ -2034,7 +2034,7 @@ int il_mac_config(struct ieee80211_hw *hw, u32 changed)
...
@@ -2034,7 +2034,7 @@ int il_mac_config(struct ieee80211_hw *hw, u32 changed)
D_MAC80211
(
"enter to channel %d changed 0x%X
\n
"
,
D_MAC80211
(
"enter to channel %d changed 0x%X
\n
"
,
channel
->
hw_value
,
changed
);
channel
->
hw_value
,
changed
);
if
(
unlikely
(
test_bit
(
S
TATUS
_SCANNING
,
&
il
->
status
)))
{
if
(
unlikely
(
test_bit
(
S_SCANNING
,
&
il
->
status
)))
{
scan_active
=
1
;
scan_active
=
1
;
D_MAC80211
(
"scan active
\n
"
);
D_MAC80211
(
"scan active
\n
"
);
}
}
...
@@ -2566,7 +2566,7 @@ irqreturn_t il_isr(int irq, void *data)
...
@@ -2566,7 +2566,7 @@ irqreturn_t il_isr(int irq, void *data)
none:
none:
/* re-enable interrupts here since we don't have anything to service. */
/* re-enable interrupts here since we don't have anything to service. */
/* only Re-enable if disabled by irq */
/* only Re-enable if disabled by irq */
if
(
test_bit
(
S
TATUS
_INT_ENABLED
,
&
il
->
status
))
if
(
test_bit
(
S_INT_ENABLED
,
&
il
->
status
))
il_enable_interrupts
(
il
);
il_enable_interrupts
(
il
);
spin_unlock_irqrestore
(
&
il
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
il
->
lock
,
flags
);
return
IRQ_NONE
;
return
IRQ_NONE
;
...
...
drivers/net/wireless/iwlegacy/iwl-core.h
View file @
a6766ccd
...
@@ -533,47 +533,47 @@ void il_free_geos(struct il_priv *il);
...
@@ -533,47 +533,47 @@ void il_free_geos(struct il_priv *il);
/*************** DRIVER STATUS FUNCTIONS *****/
/*************** DRIVER STATUS FUNCTIONS *****/
#define S
TATUS
_HCMD_ACTIVE 0
/* host command in progress */
#define S_HCMD_ACTIVE 0
/* host command in progress */
/* 1 is unused (used to be S
TATUS
_HCMD_SYNC_ACTIVE) */
/* 1 is unused (used to be S_HCMD_SYNC_ACTIVE) */
#define S
TATUS
_INT_ENABLED 2
#define S_INT_ENABLED 2
#define S
TATUS
_RF_KILL_HW 3
#define S_RF_KILL_HW 3
#define S
TATUS
_CT_KILL 4
#define S_CT_KILL 4
#define S
TATUS
_INIT 5
#define S_INIT 5
#define S
TATUS
_ALIVE 6
#define S_ALIVE 6
#define S
TATUS
_READY 7
#define S_READY 7
#define S
TATUS
_TEMPERATURE 8
#define S_TEMPERATURE 8
#define S
TATUS
_GEO_CONFIGURED 9
#define S_GEO_CONFIGURED 9
#define S
TATUS
_EXIT_PENDING 10
#define S_EXIT_PENDING 10
#define S
TATUS
_STATISTICS 12
#define S_STATISTICS 12
#define S
TATUS
_SCANNING 13
#define S_SCANNING 13
#define S
TATUS
_SCAN_ABORTING 14
#define S_SCAN_ABORTING 14
#define S
TATUS
_SCAN_HW 15
#define S_SCAN_HW 15
#define S
TATUS
_POWER_PMI 16
#define S_POWER_PMI 16
#define S
TATUS
_FW_ERROR 17
#define S_FW_ERROR 17
#define S
TATUS
_CHANNEL_SWITCH_PENDING 18
#define S_CHANNEL_SWITCH_PENDING 18
static
inline
int
il_is_ready
(
struct
il_priv
*
il
)
static
inline
int
il_is_ready
(
struct
il_priv
*
il
)
{
{
/* The adapter is 'ready' if READY and GEO_CONFIGURED bits are
/* The adapter is 'ready' if READY and GEO_CONFIGURED bits are
* set but EXIT_PENDING is not */
* set but EXIT_PENDING is not */
return
test_bit
(
S
TATUS
_READY
,
&
il
->
status
)
&&
return
test_bit
(
S_READY
,
&
il
->
status
)
&&
test_bit
(
S
TATUS
_GEO_CONFIGURED
,
&
il
->
status
)
&&
test_bit
(
S_GEO_CONFIGURED
,
&
il
->
status
)
&&
!
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
);
!
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
);
}
}
static
inline
int
il_is_alive
(
struct
il_priv
*
il
)
static
inline
int
il_is_alive
(
struct
il_priv
*
il
)
{
{
return
test_bit
(
S
TATUS
_ALIVE
,
&
il
->
status
);
return
test_bit
(
S_ALIVE
,
&
il
->
status
);
}
}
static
inline
int
il_is_init
(
struct
il_priv
*
il
)
static
inline
int
il_is_init
(
struct
il_priv
*
il
)
{
{
return
test_bit
(
S
TATUS
_INIT
,
&
il
->
status
);
return
test_bit
(
S_INIT
,
&
il
->
status
);
}
}
static
inline
int
il_is_rfkill_hw
(
struct
il_priv
*
il
)
static
inline
int
il_is_rfkill_hw
(
struct
il_priv
*
il
)
{
{
return
test_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
);
return
test_bit
(
S_RF_KILL_HW
,
&
il
->
status
);
}
}
static
inline
int
il_is_rfkill
(
struct
il_priv
*
il
)
static
inline
int
il_is_rfkill
(
struct
il_priv
*
il
)
...
@@ -583,7 +583,7 @@ static inline int il_is_rfkill(struct il_priv *il)
...
@@ -583,7 +583,7 @@ static inline int il_is_rfkill(struct il_priv *il)
static
inline
int
il_is_ctkill
(
struct
il_priv
*
il
)
static
inline
int
il_is_ctkill
(
struct
il_priv
*
il
)
{
{
return
test_bit
(
S
TATUS
_CT_KILL
,
&
il
->
status
);
return
test_bit
(
S_CT_KILL
,
&
il
->
status
);
}
}
static
inline
int
il_is_ready_rf
(
struct
il_priv
*
il
)
static
inline
int
il_is_ready_rf
(
struct
il_priv
*
il
)
...
...
drivers/net/wireless/iwlegacy/iwl-debugfs.c
View file @
a6766ccd
...
@@ -402,7 +402,7 @@ il_dbgfs_channels_read(struct file *file, char __user *user_buf,
...
@@ -402,7 +402,7 @@ il_dbgfs_channels_read(struct file *file, char __user *user_buf,
char
*
buf
;
char
*
buf
;
ssize_t
ret
;
ssize_t
ret
;
if
(
!
test_bit
(
S
TATUS
_GEO_CONFIGURED
,
&
il
->
status
))
if
(
!
test_bit
(
S_GEO_CONFIGURED
,
&
il
->
status
))
return
-
EAGAIN
;
return
-
EAGAIN
;
buf
=
kzalloc
(
bufsz
,
GFP_KERNEL
);
buf
=
kzalloc
(
bufsz
,
GFP_KERNEL
);
...
@@ -471,38 +471,38 @@ static ssize_t il_dbgfs_status_read(struct file *file,
...
@@ -471,38 +471,38 @@ static ssize_t il_dbgfs_status_read(struct file *file,
int
pos
=
0
;
int
pos
=
0
;
const
size_t
bufsz
=
sizeof
(
buf
);
const
size_t
bufsz
=
sizeof
(
buf
);
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_HCMD_ACTIVE:
\t
%d
\n
"
,
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_HCMD_ACTIVE:
\t
%d
\n
"
,
test_bit
(
S
TATUS
_HCMD_ACTIVE
,
&
il
->
status
));
test_bit
(
S_HCMD_ACTIVE
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_INT_ENABLED:
\t
%d
\n
"
,
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_INT_ENABLED:
\t
%d
\n
"
,
test_bit
(
S
TATUS
_INT_ENABLED
,
&
il
->
status
));
test_bit
(
S_INT_ENABLED
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_RF_KILL_HW:
\t
%d
\n
"
,
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_RF_KILL_HW:
\t
%d
\n
"
,
test_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
));
test_bit
(
S_RF_KILL_HW
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_CT_KILL:
\t\t
%d
\n
"
,
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_CT_KILL:
\t\t
%d
\n
"
,
test_bit
(
S
TATUS
_CT_KILL
,
&
il
->
status
));
test_bit
(
S_CT_KILL
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_INIT:
\t\t
%d
\n
"
,
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_INIT:
\t\t
%d
\n
"
,
test_bit
(
S
TATUS
_INIT
,
&
il
->
status
));
test_bit
(
S_INIT
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_ALIVE:
\t\t
%d
\n
"
,
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_ALIVE:
\t\t
%d
\n
"
,
test_bit
(
S
TATUS
_ALIVE
,
&
il
->
status
));
test_bit
(
S_ALIVE
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_READY:
\t\t
%d
\n
"
,
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_READY:
\t\t
%d
\n
"
,
test_bit
(
S
TATUS
_READY
,
&
il
->
status
));
test_bit
(
S_READY
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_TEMPERATURE:
\t
%d
\n
"
,
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_TEMPERATURE:
\t
%d
\n
"
,
test_bit
(
S
TATUS
_TEMPERATURE
,
&
il
->
status
));
test_bit
(
S_TEMPERATURE
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_GEO_CONFIGURED:
\t
%d
\n
"
,
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_GEO_CONFIGURED:
\t
%d
\n
"
,
test_bit
(
S
TATUS
_GEO_CONFIGURED
,
&
il
->
status
));
test_bit
(
S_GEO_CONFIGURED
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_EXIT_PENDING:
\t
%d
\n
"
,
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_EXIT_PENDING:
\t
%d
\n
"
,
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
));
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_STATISTICS:
\t
%d
\n
"
,
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_STATISTICS:
\t
%d
\n
"
,
test_bit
(
S
TATUS
_STATISTICS
,
&
il
->
status
));
test_bit
(
S_STATISTICS
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_SCANNING:
\t
%d
\n
"
,
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_SCANNING:
\t
%d
\n
"
,
test_bit
(
S
TATUS
_SCANNING
,
&
il
->
status
));
test_bit
(
S_SCANNING
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_SCAN_ABORTING:
\t
%d
\n
"
,
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_SCAN_ABORTING:
\t
%d
\n
"
,
test_bit
(
S
TATUS
_SCAN_ABORTING
,
&
il
->
status
));
test_bit
(
S_SCAN_ABORTING
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_SCAN_HW:
\t\t
%d
\n
"
,
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_SCAN_HW:
\t\t
%d
\n
"
,
test_bit
(
S
TATUS
_SCAN_HW
,
&
il
->
status
));
test_bit
(
S_SCAN_HW
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_POWER_PMI:
\t
%d
\n
"
,
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_POWER_PMI:
\t
%d
\n
"
,
test_bit
(
S
TATUS
_POWER_PMI
,
&
il
->
status
));
test_bit
(
S_POWER_PMI
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_FW_ERROR:
\t
%d
\n
"
,
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_FW_ERROR:
\t
%d
\n
"
,
test_bit
(
S
TATUS
_FW_ERROR
,
&
il
->
status
));
test_bit
(
S_FW_ERROR
,
&
il
->
status
));
return
simple_read_from_buffer
(
user_buf
,
count
,
ppos
,
buf
,
pos
);
return
simple_read_from_buffer
(
user_buf
,
count
,
ppos
,
buf
,
pos
);
}
}
...
...
drivers/net/wireless/iwlegacy/iwl-hcmd.c
View file @
a6766ccd
...
@@ -128,7 +128,7 @@ il_send_cmd_async(struct il_priv *il, struct il_host_cmd *cmd)
...
@@ -128,7 +128,7 @@ il_send_cmd_async(struct il_priv *il, struct il_host_cmd *cmd)
if
(
!
cmd
->
callback
)
if
(
!
cmd
->
callback
)
cmd
->
callback
=
il_generic_cmd_callback
;
cmd
->
callback
=
il_generic_cmd_callback
;
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
return
-
EBUSY
;
return
-
EBUSY
;
ret
=
il_enqueue_hcmd
(
il
,
cmd
);
ret
=
il_enqueue_hcmd
(
il
,
cmd
);
...
@@ -155,7 +155,7 @@ int il_send_cmd_sync(struct il_priv *il, struct il_host_cmd *cmd)
...
@@ -155,7 +155,7 @@ int il_send_cmd_sync(struct il_priv *il, struct il_host_cmd *cmd)
D_INFO
(
"Attempting to send sync command %s
\n
"
,
D_INFO
(
"Attempting to send sync command %s
\n
"
,
il_get_cmd_string
(
cmd
->
id
));
il_get_cmd_string
(
cmd
->
id
));
set_bit
(
S
TATUS
_HCMD_ACTIVE
,
&
il
->
status
);
set_bit
(
S_HCMD_ACTIVE
,
&
il
->
status
);
D_INFO
(
"Setting HCMD_ACTIVE for command %s
\n
"
,
D_INFO
(
"Setting HCMD_ACTIVE for command %s
\n
"
,
il_get_cmd_string
(
cmd
->
id
));
il_get_cmd_string
(
cmd
->
id
));
...
@@ -168,16 +168,16 @@ int il_send_cmd_sync(struct il_priv *il, struct il_host_cmd *cmd)
...
@@ -168,16 +168,16 @@ int il_send_cmd_sync(struct il_priv *il, struct il_host_cmd *cmd)
}
}
ret
=
wait_event_timeout
(
il
->
wait_command_queue
,
ret
=
wait_event_timeout
(
il
->
wait_command_queue
,
!
test_bit
(
S
TATUS
_HCMD_ACTIVE
,
&
il
->
status
),
!
test_bit
(
S_HCMD_ACTIVE
,
&
il
->
status
),
HOST_COMPLETE_TIMEOUT
);
HOST_COMPLETE_TIMEOUT
);
if
(
!
ret
)
{
if
(
!
ret
)
{
if
(
test_bit
(
S
TATUS
_HCMD_ACTIVE
,
&
il
->
status
))
{
if
(
test_bit
(
S_HCMD_ACTIVE
,
&
il
->
status
))
{
IL_ERR
(
IL_ERR
(
"Error sending %s: time out after %dms.
\n
"
,
"Error sending %s: time out after %dms.
\n
"
,
il_get_cmd_string
(
cmd
->
id
),
il_get_cmd_string
(
cmd
->
id
),
jiffies_to_msecs
(
HOST_COMPLETE_TIMEOUT
));
jiffies_to_msecs
(
HOST_COMPLETE_TIMEOUT
));
clear_bit
(
S
TATUS
_HCMD_ACTIVE
,
&
il
->
status
);
clear_bit
(
S_HCMD_ACTIVE
,
&
il
->
status
);
D_INFO
(
D_INFO
(
"Clearing HCMD_ACTIVE for command %s
\n
"
,
"Clearing HCMD_ACTIVE for command %s
\n
"
,
il_get_cmd_string
(
cmd
->
id
));
il_get_cmd_string
(
cmd
->
id
));
...
@@ -186,13 +186,13 @@ int il_send_cmd_sync(struct il_priv *il, struct il_host_cmd *cmd)
...
@@ -186,13 +186,13 @@ int il_send_cmd_sync(struct il_priv *il, struct il_host_cmd *cmd)
}
}
}
}
if
(
test_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
))
{
if
(
test_bit
(
S_RF_KILL_HW
,
&
il
->
status
))
{
IL_ERR
(
"Command %s aborted: RF KILL Switch
\n
"
,
IL_ERR
(
"Command %s aborted: RF KILL Switch
\n
"
,
il_get_cmd_string
(
cmd
->
id
));
il_get_cmd_string
(
cmd
->
id
));
ret
=
-
ECANCELED
;
ret
=
-
ECANCELED
;
goto
fail
;
goto
fail
;
}
}
if
(
test_bit
(
S
TATUS
_FW_ERROR
,
&
il
->
status
))
{
if
(
test_bit
(
S_FW_ERROR
,
&
il
->
status
))
{
IL_ERR
(
"Command %s failed: FW Error
\n
"
,
IL_ERR
(
"Command %s failed: FW Error
\n
"
,
il_get_cmd_string
(
cmd
->
id
));
il_get_cmd_string
(
cmd
->
id
));
ret
=
-
EIO
;
ret
=
-
EIO
;
...
...
drivers/net/wireless/iwlegacy/iwl-helpers.h
View file @
a6766ccd
...
@@ -146,7 +146,7 @@ static inline void il_stop_queue(struct il_priv *il,
...
@@ -146,7 +146,7 @@ static inline void il_stop_queue(struct il_priv *il,
static
inline
void
il_disable_interrupts
(
struct
il_priv
*
il
)
static
inline
void
il_disable_interrupts
(
struct
il_priv
*
il
)
{
{
clear_bit
(
S
TATUS
_INT_ENABLED
,
&
il
->
status
);
clear_bit
(
S_INT_ENABLED
,
&
il
->
status
);
/* disable interrupts from uCode/NIC to host */
/* disable interrupts from uCode/NIC to host */
_il_wr
(
il
,
CSR_INT_MASK
,
0x00000000
);
_il_wr
(
il
,
CSR_INT_MASK
,
0x00000000
);
...
@@ -167,7 +167,7 @@ static inline void il_enable_rfkill_int(struct il_priv *il)
...
@@ -167,7 +167,7 @@ static inline void il_enable_rfkill_int(struct il_priv *il)
static
inline
void
il_enable_interrupts
(
struct
il_priv
*
il
)
static
inline
void
il_enable_interrupts
(
struct
il_priv
*
il
)
{
{
D_ISR
(
"Enabling interrupts
\n
"
);
D_ISR
(
"Enabling interrupts
\n
"
);
set_bit
(
S
TATUS
_INT_ENABLED
,
&
il
->
status
);
set_bit
(
S_INT_ENABLED
,
&
il
->
status
);
_il_wr
(
il
,
CSR_INT_MASK
,
il
->
inta_mask
);
_il_wr
(
il
,
CSR_INT_MASK
,
il
->
inta_mask
);
}
}
...
...
drivers/net/wireless/iwlegacy/iwl-led.c
View file @
a6766ccd
...
@@ -107,7 +107,7 @@ static int il_led_cmd(struct il_priv *il,
...
@@ -107,7 +107,7 @@ static int il_led_cmd(struct il_priv *il,
};
};
int
ret
;
int
ret
;
if
(
!
test_bit
(
S
TATUS
_READY
,
&
il
->
status
))
if
(
!
test_bit
(
S_READY
,
&
il
->
status
))
return
-
EBUSY
;
return
-
EBUSY
;
if
(
il
->
blink_on
==
on
&&
il
->
blink_off
==
off
)
if
(
il
->
blink_on
==
on
&&
il
->
blink_off
==
off
)
...
...
drivers/net/wireless/iwlegacy/iwl-power.c
View file @
a6766ccd
...
@@ -113,18 +113,18 @@ il_power_set_mode(struct il_priv *il, struct il_powertable_cmd *cmd,
...
@@ -113,18 +113,18 @@ il_power_set_mode(struct il_priv *il, struct il_powertable_cmd *cmd,
/* scan complete use sleep_power_next, need to be updated */
/* scan complete use sleep_power_next, need to be updated */
memcpy
(
&
il
->
power_data
.
sleep_cmd_next
,
cmd
,
sizeof
(
*
cmd
));
memcpy
(
&
il
->
power_data
.
sleep_cmd_next
,
cmd
,
sizeof
(
*
cmd
));
if
(
test_bit
(
S
TATUS
_SCANNING
,
&
il
->
status
)
&&
!
force
)
{
if
(
test_bit
(
S_SCANNING
,
&
il
->
status
)
&&
!
force
)
{
D_INFO
(
"Defer power set mode while scanning
\n
"
);
D_INFO
(
"Defer power set mode while scanning
\n
"
);
return
0
;
return
0
;
}
}
if
(
cmd
->
flags
&
IL_POWER_DRIVER_ALLOW_SLEEP_MSK
)
if
(
cmd
->
flags
&
IL_POWER_DRIVER_ALLOW_SLEEP_MSK
)
set_bit
(
S
TATUS
_POWER_PMI
,
&
il
->
status
);
set_bit
(
S_POWER_PMI
,
&
il
->
status
);
ret
=
il_set_power
(
il
,
cmd
);
ret
=
il_set_power
(
il
,
cmd
);
if
(
!
ret
)
{
if
(
!
ret
)
{
if
(
!
(
cmd
->
flags
&
IL_POWER_DRIVER_ALLOW_SLEEP_MSK
))
if
(
!
(
cmd
->
flags
&
IL_POWER_DRIVER_ALLOW_SLEEP_MSK
))
clear_bit
(
S
TATUS
_POWER_PMI
,
&
il
->
status
);
clear_bit
(
S_POWER_PMI
,
&
il
->
status
);
if
(
il
->
cfg
->
ops
->
lib
->
update_chain_flags
&&
update_chains
)
if
(
il
->
cfg
->
ops
->
lib
->
update_chain_flags
&&
update_chains
)
il
->
cfg
->
ops
->
lib
->
update_chain_flags
(
il
);
il
->
cfg
->
ops
->
lib
->
update_chain_flags
(
il
);
...
...
drivers/net/wireless/iwlegacy/iwl-rx.c
View file @
a6766ccd
...
@@ -137,7 +137,7 @@ il_rx_queue_update_write_ptr(struct il_priv *il,
...
@@ -137,7 +137,7 @@ il_rx_queue_update_write_ptr(struct il_priv *il,
goto
exit_unlock
;
goto
exit_unlock
;
/* If power-saving is in use, make sure device is awake */
/* If power-saving is in use, make sure device is awake */
if
(
test_bit
(
S
TATUS
_POWER_PMI
,
&
il
->
status
))
{
if
(
test_bit
(
S_POWER_PMI
,
&
il
->
status
))
{
reg
=
_il_rd
(
il
,
CSR_UCODE_DRV_GP1
);
reg
=
_il_rd
(
il
,
CSR_UCODE_DRV_GP1
);
if
(
reg
&
CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP
)
{
if
(
reg
&
CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP
)
{
...
...
drivers/net/wireless/iwlegacy/iwl-scan.c
View file @
a6766ccd
...
@@ -66,11 +66,11 @@ static int il_send_scan_abort(struct il_priv *il)
...
@@ -66,11 +66,11 @@ static int il_send_scan_abort(struct il_priv *il)
/* Exit instantly with error when device is not ready
/* Exit instantly with error when device is not ready
* to receive scan abort command or it does not perform
* to receive scan abort command or it does not perform
* hardware scan currently */
* hardware scan currently */
if
(
!
test_bit
(
S
TATUS
_READY
,
&
il
->
status
)
||
if
(
!
test_bit
(
S_READY
,
&
il
->
status
)
||
!
test_bit
(
S
TATUS
_GEO_CONFIGURED
,
&
il
->
status
)
||
!
test_bit
(
S_GEO_CONFIGURED
,
&
il
->
status
)
||
!
test_bit
(
S
TATUS
_SCAN_HW
,
&
il
->
status
)
||
!
test_bit
(
S_SCAN_HW
,
&
il
->
status
)
||
test_bit
(
S
TATUS
_FW_ERROR
,
&
il
->
status
)
||
test_bit
(
S_FW_ERROR
,
&
il
->
status
)
||
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
return
-
EIO
;
return
-
EIO
;
ret
=
il_send_cmd_sync
(
il
,
&
cmd
);
ret
=
il_send_cmd_sync
(
il
,
&
cmd
);
...
@@ -109,15 +109,15 @@ void il_force_scan_end(struct il_priv *il)
...
@@ -109,15 +109,15 @@ void il_force_scan_end(struct il_priv *il)
{
{
lockdep_assert_held
(
&
il
->
mutex
);
lockdep_assert_held
(
&
il
->
mutex
);
if
(
!
test_bit
(
S
TATUS
_SCANNING
,
&
il
->
status
))
{
if
(
!
test_bit
(
S_SCANNING
,
&
il
->
status
))
{
D_SCAN
(
"Forcing scan end while not scanning
\n
"
);
D_SCAN
(
"Forcing scan end while not scanning
\n
"
);
return
;
return
;
}
}
D_SCAN
(
"Forcing scan end
\n
"
);
D_SCAN
(
"Forcing scan end
\n
"
);
clear_bit
(
S
TATUS
_SCANNING
,
&
il
->
status
);
clear_bit
(
S_SCANNING
,
&
il
->
status
);
clear_bit
(
S
TATUS
_SCAN_HW
,
&
il
->
status
);
clear_bit
(
S_SCAN_HW
,
&
il
->
status
);
clear_bit
(
S
TATUS
_SCAN_ABORTING
,
&
il
->
status
);
clear_bit
(
S_SCAN_ABORTING
,
&
il
->
status
);
il_complete_scan
(
il
,
true
);
il_complete_scan
(
il
,
true
);
}
}
...
@@ -127,12 +127,12 @@ static void il_do_scan_abort(struct il_priv *il)
...
@@ -127,12 +127,12 @@ static void il_do_scan_abort(struct il_priv *il)
lockdep_assert_held
(
&
il
->
mutex
);
lockdep_assert_held
(
&
il
->
mutex
);
if
(
!
test_bit
(
S
TATUS
_SCANNING
,
&
il
->
status
))
{
if
(
!
test_bit
(
S_SCANNING
,
&
il
->
status
))
{
D_SCAN
(
"Not performing scan to abort
\n
"
);
D_SCAN
(
"Not performing scan to abort
\n
"
);
return
;
return
;
}
}
if
(
test_and_set_bit
(
S
TATUS
_SCAN_ABORTING
,
&
il
->
status
))
{
if
(
test_and_set_bit
(
S_SCAN_ABORTING
,
&
il
->
status
))
{
D_SCAN
(
"Scan abort in progress
\n
"
);
D_SCAN
(
"Scan abort in progress
\n
"
);
return
;
return
;
}
}
...
@@ -172,12 +172,12 @@ int il_scan_cancel_timeout(struct il_priv *il, unsigned long ms)
...
@@ -172,12 +172,12 @@ int il_scan_cancel_timeout(struct il_priv *il, unsigned long ms)
il_do_scan_abort
(
il
);
il_do_scan_abort
(
il
);
while
(
time_before_eq
(
jiffies
,
timeout
))
{
while
(
time_before_eq
(
jiffies
,
timeout
))
{
if
(
!
test_bit
(
S
TATUS
_SCAN_HW
,
&
il
->
status
))
if
(
!
test_bit
(
S_SCAN_HW
,
&
il
->
status
))
break
;
break
;
msleep
(
20
);
msleep
(
20
);
}
}
return
test_bit
(
S
TATUS
_SCAN_HW
,
&
il
->
status
);
return
test_bit
(
S_SCAN_HW
,
&
il
->
status
);
}
}
EXPORT_SYMBOL
(
il_scan_cancel_timeout
);
EXPORT_SYMBOL
(
il_scan_cancel_timeout
);
...
@@ -251,7 +251,7 @@ static void il_rx_scan_complete_notif(struct il_priv *il,
...
@@ -251,7 +251,7 @@ static void il_rx_scan_complete_notif(struct il_priv *il,
scan_notif
->
tsf_high
,
scan_notif
->
status
);
scan_notif
->
tsf_high
,
scan_notif
->
status
);
/* The HW is no longer scanning */
/* The HW is no longer scanning */
clear_bit
(
S
TATUS
_SCAN_HW
,
&
il
->
status
);
clear_bit
(
S_SCAN_HW
,
&
il
->
status
);
D_SCAN
(
"Scan on %sGHz took %dms
\n
"
,
D_SCAN
(
"Scan on %sGHz took %dms
\n
"
,
(
il
->
scan_band
==
IEEE80211_BAND_2GHZ
)
?
"2.4"
:
"5.2"
,
(
il
->
scan_band
==
IEEE80211_BAND_2GHZ
)
?
"2.4"
:
"5.2"
,
...
@@ -341,25 +341,25 @@ static int il_scan_initiate(struct il_priv *il,
...
@@ -341,25 +341,25 @@ static int il_scan_initiate(struct il_priv *il,
return
-
EIO
;
return
-
EIO
;
}
}
if
(
test_bit
(
S
TATUS
_SCAN_HW
,
&
il
->
status
))
{
if
(
test_bit
(
S_SCAN_HW
,
&
il
->
status
))
{
D_SCAN
(
D_SCAN
(
"Multiple concurrent scan requests in parallel.
\n
"
);
"Multiple concurrent scan requests in parallel.
\n
"
);
return
-
EBUSY
;
return
-
EBUSY
;
}
}
if
(
test_bit
(
S
TATUS
_SCAN_ABORTING
,
&
il
->
status
))
{
if
(
test_bit
(
S_SCAN_ABORTING
,
&
il
->
status
))
{
D_SCAN
(
"Scan request while abort pending.
\n
"
);
D_SCAN
(
"Scan request while abort pending.
\n
"
);
return
-
EBUSY
;
return
-
EBUSY
;
}
}
D_SCAN
(
"Starting scan...
\n
"
);
D_SCAN
(
"Starting scan...
\n
"
);
set_bit
(
S
TATUS
_SCANNING
,
&
il
->
status
);
set_bit
(
S_SCANNING
,
&
il
->
status
);
il
->
scan_start
=
jiffies
;
il
->
scan_start
=
jiffies
;
ret
=
il
->
cfg
->
ops
->
utils
->
request_scan
(
il
,
vif
);
ret
=
il
->
cfg
->
ops
->
utils
->
request_scan
(
il
,
vif
);
if
(
ret
)
{
if
(
ret
)
{
clear_bit
(
S
TATUS
_SCANNING
,
&
il
->
status
);
clear_bit
(
S_SCANNING
,
&
il
->
status
);
return
ret
;
return
ret
;
}
}
...
@@ -383,7 +383,7 @@ int il_mac_hw_scan(struct ieee80211_hw *hw,
...
@@ -383,7 +383,7 @@ int il_mac_hw_scan(struct ieee80211_hw *hw,
mutex_lock
(
&
il
->
mutex
);
mutex_lock
(
&
il
->
mutex
);
if
(
test_bit
(
S
TATUS
_SCANNING
,
&
il
->
status
))
{
if
(
test_bit
(
S_SCANNING
,
&
il
->
status
))
{
D_SCAN
(
"Scan already in progress.
\n
"
);
D_SCAN
(
"Scan already in progress.
\n
"
);
ret
=
-
EAGAIN
;
ret
=
-
EAGAIN
;
goto
out_unlock
;
goto
out_unlock
;
...
@@ -494,11 +494,11 @@ static void il_bg_scan_completed(struct work_struct *work)
...
@@ -494,11 +494,11 @@ static void il_bg_scan_completed(struct work_struct *work)
mutex_lock
(
&
il
->
mutex
);
mutex_lock
(
&
il
->
mutex
);
aborted
=
test_and_clear_bit
(
S
TATUS
_SCAN_ABORTING
,
&
il
->
status
);
aborted
=
test_and_clear_bit
(
S_SCAN_ABORTING
,
&
il
->
status
);
if
(
aborted
)
if
(
aborted
)
D_SCAN
(
"Aborted scan completed.
\n
"
);
D_SCAN
(
"Aborted scan completed.
\n
"
);
if
(
!
test_and_clear_bit
(
S
TATUS
_SCANNING
,
&
il
->
status
))
{
if
(
!
test_and_clear_bit
(
S_SCANNING
,
&
il
->
status
))
{
D_SCAN
(
"Scan already completed.
\n
"
);
D_SCAN
(
"Scan already completed.
\n
"
);
goto
out_settings
;
goto
out_settings
;
}
}
...
...
drivers/net/wireless/iwlegacy/iwl-tx.c
View file @
a6766ccd
...
@@ -51,7 +51,7 @@ il_txq_update_write_ptr(struct il_priv *il, struct il_tx_queue *txq)
...
@@ -51,7 +51,7 @@ il_txq_update_write_ptr(struct il_priv *il, struct il_tx_queue *txq)
return
;
return
;
/* if we're trying to save power */
/* if we're trying to save power */
if
(
test_bit
(
S
TATUS
_POWER_PMI
,
&
il
->
status
))
{
if
(
test_bit
(
S_POWER_PMI
,
&
il
->
status
))
{
/* wake up nic if it's powered down ...
/* wake up nic if it's powered down ...
* uCode will wake up, and interrupt us again, so next
* uCode will wake up, and interrupt us again, so next
* time we'll skip this part. */
* time we'll skip this part. */
...
@@ -641,7 +641,7 @@ il_tx_cmd_complete(struct il_priv *il, struct il_rx_buf *rxb)
...
@@ -641,7 +641,7 @@ il_tx_cmd_complete(struct il_priv *il, struct il_rx_buf *rxb)
il_hcmd_queue_reclaim
(
il
,
txq_id
,
idx
,
cmd_idx
);
il_hcmd_queue_reclaim
(
il
,
txq_id
,
idx
,
cmd_idx
);
if
(
!
(
meta
->
flags
&
CMD_ASYNC
))
{
if
(
!
(
meta
->
flags
&
CMD_ASYNC
))
{
clear_bit
(
S
TATUS
_HCMD_ACTIVE
,
&
il
->
status
);
clear_bit
(
S_HCMD_ACTIVE
,
&
il
->
status
);
D_INFO
(
"Clearing HCMD_ACTIVE for command %s
\n
"
,
D_INFO
(
"Clearing HCMD_ACTIVE for command %s
\n
"
,
il_get_cmd_string
(
cmd
->
hdr
.
cmd
));
il_get_cmd_string
(
cmd
->
hdr
.
cmd
));
wake_up
(
&
il
->
wait_command_queue
);
wake_up
(
&
il
->
wait_command_queue
);
...
...
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