Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
a6766ccd
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a6766ccd
编写于
11月 15, 2011
作者:
S
Stanislaw Gruszka
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
iwlegacy: s/STATUS_/S_/
Signed-off-by:
N
Stanislaw Gruszka
<
sgruszka@redhat.com
>
上级
6bbb1370
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
245 addition
and
245 deletion
+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
未找到文件。
drivers/net/wireless/iwlegacy/3945-mac.c
浏览文件 @
a6766ccd
...
...
@@ -827,17 +827,17 @@ static void il3945_rx_card_state_notif(struct il_priv *il,
CSR_UCODE_DRV_GP1_BIT_CMD_BLOCKED
);
if
(
flags
&
HW_CARD_DISABLED
)
set_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
);
set_bit
(
S_RF_KILL_HW
,
&
il
->
status
);
else
clear_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
);
clear_bit
(
S_RF_KILL_HW
,
&
il
->
status
);
il_scan_cancel
(
il
);
if
((
test_bit
(
S
TATUS
_RF_KILL_HW
,
&
status
)
!=
test_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
)))
if
((
test_bit
(
S_RF_KILL_HW
,
&
status
)
!=
test_bit
(
S_RF_KILL_HW
,
&
il
->
status
)))
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
wake_up
(
&
il
->
wait_command_queue
);
}
...
...
@@ -1537,7 +1537,7 @@ static void il3945_irq_tasklet(struct il_priv *il)
/* Re-enable all interrupts */
/* 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
);
#ifdef CONFIG_IWLEGACY_DEBUG
...
...
@@ -2213,7 +2213,7 @@ static void il3945_alive_start(struct il_priv *il)
D_INFO
(
"RFKILL status: 0x%x
\n
"
,
rfkill
);
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
* sensor in adapter to kick in */
while
(
il3945_hw_get_temperature
(
il
)
==
0
)
{
...
...
@@ -2225,10 +2225,10 @@ static void il3945_alive_start(struct il_priv *il)
D_INFO
(
"Thermal calibration took %dus
\n
"
,
thermal_spin
*
10
);
}
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 */
set_bit
(
S
TATUS
_ALIVE
,
&
il
->
status
);
set_bit
(
S_ALIVE
,
&
il
->
status
);
/* Enable watchdog to monitor the driver tx queues */
il_setup_watchdog
(
il
);
...
...
@@ -2256,7 +2256,7 @@ static void il3945_alive_start(struct il_priv *il)
/* Configure Bluetooth device coexistence support */
il_send_bt_config
(
il
);
set_bit
(
S
TATUS
_READY
,
&
il
->
status
);
set_bit
(
S_READY
,
&
il
->
status
);
/* Configure the adapter for unassociated operation */
il3945_commit_rxon
(
il
,
ctx
);
...
...
@@ -2283,9 +2283,9 @@ static void __il3945_down(struct il_priv *il)
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 */
del_timer_sync
(
&
il
->
watchdog
);
...
...
@@ -2300,7 +2300,7 @@ static void __il3945_down(struct il_priv *il)
/* Wipe out the EXIT_PENDING status bit if we are not actually
* exiting the module */
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 */
_il_wr
(
il
,
CSR_RESET
,
CSR_RESET_REG_FLAG_NEVO_RESET
);
...
...
@@ -2317,25 +2317,25 @@ static void __il3945_down(struct il_priv *il)
/* If we have not previously called il3945_init() then
* clear all bits but the RF Kill bits and return */
if
(
!
il_is_init
(
il
))
{
il
->
status
=
test_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
)
<<
S
TATUS
_RF_KILL_HW
|
test_bit
(
S
TATUS
_GEO_CONFIGURED
,
&
il
->
status
)
<<
S
TATUS
_GEO_CONFIGURED
|
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
)
<<
S
TATUS
_EXIT_PENDING
;
il
->
status
=
test_bit
(
S_RF_KILL_HW
,
&
il
->
status
)
<<
S_RF_KILL_HW
|
test_bit
(
S_GEO_CONFIGURED
,
&
il
->
status
)
<<
S_GEO_CONFIGURED
|
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
)
<<
S_EXIT_PENDING
;
goto
exit
;
}
/* ...otherwise clear out all the status bits but the RF Kill
* bit and continue taking the NIC down. */
il
->
status
&=
test_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
)
<<
S
TATUS
_RF_KILL_HW
|
test_bit
(
S
TATUS
_GEO_CONFIGURED
,
&
il
->
status
)
<<
S
TATUS
_GEO_CONFIGURED
|
test_bit
(
S
TATUS
_FW_ERROR
,
&
il
->
status
)
<<
S
TATUS
_FW_ERROR
|
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
)
<<
S
TATUS
_EXIT_PENDING
;
il
->
status
&=
test_bit
(
S_RF_KILL_HW
,
&
il
->
status
)
<<
S_RF_KILL_HW
|
test_bit
(
S_GEO_CONFIGURED
,
&
il
->
status
)
<<
S_GEO_CONFIGURED
|
test_bit
(
S_FW_ERROR
,
&
il
->
status
)
<<
S_FW_ERROR
|
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
)
<<
S_EXIT_PENDING
;
il3945_hw_txq_ctx_stop
(
il
);
il3945_hw_rxq_stop
(
il
);
...
...
@@ -2400,7 +2400,7 @@ static int __il3945_up(struct il_priv *il)
if
(
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
"
);
return
-
EIO
;
}
...
...
@@ -2413,9 +2413,9 @@ static int __il3945_up(struct il_priv *il)
/* If platform's RF_KILL switch is NOT set to KILL */
if
(
_il_rd
(
il
,
CSR_GP_CNTRL
)
&
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
{
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
"
);
return
-
ENODEV
;
}
...
...
@@ -2448,7 +2448,7 @@ static int __il3945_up(struct il_priv *il)
il
->
ucode_data
.
len
);
/* 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
;
for
(
i
=
0
;
i
<
MAX_HW_RESTARTS
;
i
++
)
{
...
...
@@ -2472,9 +2472,9 @@ static int __il3945_up(struct il_priv *il)
return
0
;
}
set_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
);
set_bit
(
S_EXIT_PENDING
,
&
il
->
status
);
__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
* patience could withstand */
...
...
@@ -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
);
mutex_lock
(
&
il
->
mutex
);
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
goto
out
;
il3945_init_alive_start
(
il
);
...
...
@@ -2509,7 +2509,7 @@ static void il3945_bg_alive_start(struct work_struct *data)
container_of
(
data
,
struct
il_priv
,
alive_start
.
work
);
mutex_lock
(
&
il
->
mutex
);
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
goto
out
;
il3945_alive_start
(
il
);
...
...
@@ -2527,15 +2527,15 @@ static void il3945_rfkill_poll(struct work_struct *data)
{
struct
il_priv
*
il
=
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
)
&
CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW
);
if
(
new_rfkill
!=
old_rfkill
)
{
if
(
new_rfkill
)
set_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
);
set_bit
(
S_RF_KILL_HW
,
&
il
->
status
);
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
);
...
...
@@ -2682,10 +2682,10 @@ int il3945_request_scan(struct il_priv *il, struct ieee80211_vif *vif)
cmd
.
data
=
scan
;
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
);
if
(
ret
)
clear_bit
(
S
TATUS
_SCAN_HW
,
&
il
->
status
);
clear_bit
(
S_SCAN_HW
,
&
il
->
status
);
return
ret
;
}
...
...
@@ -2705,10 +2705,10 @@ static void il3945_bg_restart(struct work_struct *data)
{
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
;
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
);
il
->
ctx
.
vif
=
NULL
;
il
->
is_open
=
0
;
...
...
@@ -2719,7 +2719,7 @@ static void il3945_bg_restart(struct work_struct *data)
il3945_down
(
il
);
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
);
return
;
}
...
...
@@ -2735,7 +2735,7 @@ static void il3945_bg_rx_replenish(struct work_struct *data)
container_of
(
data
,
struct
il_priv
,
rx_replenish
);
mutex_lock
(
&
il
->
mutex
);
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
goto
out
;
il3945_rx_replenish
(
il
);
...
...
@@ -2755,7 +2755,7 @@ void il3945_post_associate(struct il_priv *il)
D_ASSOC
(
"Associated as %d to: %pM
\n
"
,
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
;
il_scan_cancel_timeout
(
il
,
200
);
...
...
@@ -2847,10 +2847,10 @@ static int il3945_mac_start(struct ieee80211_hw *hw)
/* Wait for START_ALIVE from ucode. Otherwise callbacks from
* mac80211 will not be run successfully. */
ret
=
wait_event_timeout
(
il
->
wait_command_queue
,
test_bit
(
S
TATUS
_READY
,
&
il
->
status
),
test_bit
(
S_READY
,
&
il
->
status
),
UCODE_READY_TIMEOUT
);
if
(
!
ret
)
{
if
(
!
test_bit
(
S
TATUS
_READY
,
&
il
->
status
))
{
if
(
!
test_bit
(
S_READY
,
&
il
->
status
))
{
IL_ERR
(
"Wait for START_ALIVE timeout after %dms.
\n
"
,
jiffies_to_msecs
(
UCODE_READY_TIMEOUT
));
...
...
@@ -2918,7 +2918,7 @@ void il3945_config_ap(struct il_priv *il)
struct
ieee80211_vif
*
vif
=
ctx
->
vif
;
int
rc
=
0
;
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
return
;
/* The following should be done only at AP bring up */
...
...
@@ -3870,7 +3870,7 @@ static void __devexit il3945_pci_remove(struct pci_dev *pdev)
il_dbgfs_unregister
(
il
);
set_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
);
set_bit
(
S_EXIT_PENDING
,
&
il
->
status
);
il_leds_exit
(
il
);
...
...
drivers/net/wireless/iwlegacy/3945.c
浏览文件 @
a6766ccd
...
...
@@ -1008,7 +1008,7 @@ int il3945_hw_nic_init(struct il_priv *il)
if
(
rc
)
return
rc
;
set_bit
(
S
TATUS
_INIT
,
&
il
->
status
);
set_bit
(
S_INIT
,
&
il
->
status
);
return
0
;
}
...
...
@@ -1394,7 +1394,7 @@ static int il3945_send_tx_power(struct il_priv *il)
};
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
"
))
return
-
EAGAIN
;
...
...
@@ -1571,7 +1571,7 @@ static int il3945_hw_reg_comp_txpower_temp(struct il_priv *il)
int
temperature
=
il
->
temperature
;
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 */
return
0
;
}
...
...
@@ -1726,7 +1726,7 @@ int il3945_commit_rxon(struct il_priv *il, struct il_rxon_context *ctx)
int
rc
=
0
;
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
;
if
(
!
il_is_alive
(
il
))
...
...
@@ -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
,
_3945
.
thermal_periodic
.
work
);
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
return
;
mutex_lock
(
&
il
->
mutex
);
...
...
drivers/net/wireless/iwlegacy/4965-mac.c
浏览文件 @
a6766ccd
...
...
@@ -90,7 +90,7 @@ void il4965_check_abort_status(struct il_priv *il,
{
if
(
frame_count
==
1
&&
status
==
TX_STATUS_FAIL_RFKILL_FLUSH
)
{
IL_ERR
(
"Tx flush command to flush out all frames
\n
"
);
if
(
!
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
!
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
queue_work
(
il
->
workqueue
,
&
il
->
tx_flush
);
}
}
...
...
@@ -246,7 +246,7 @@ int il4965_hw_nic_init(struct il_priv *il)
}
else
il4965_txq_ctx_reset
(
il
);
set_bit
(
S
TATUS
_INIT
,
&
il
->
status
);
set_bit
(
S_INIT
,
&
il
->
status
);
return
0
;
}
...
...
@@ -966,7 +966,7 @@ int il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif)
scan
->
tx_cmd
.
rate_n_flags
=
il4965_hw_set_rate_n_flags
(
rate
,
rate_flags
);
/* In power save mode use one chain, otherwise use all chains */
if
(
test_bit
(
S
TATUS
_POWER_PMI
,
&
il
->
status
))
{
if
(
test_bit
(
S_POWER_PMI
,
&
il
->
status
))
{
/* rx_ant has been set to all valid chains previously */
active_chains
=
rx_ant
&
((
u8
)(
il
->
chain_noise_data
.
active_chains
));
...
...
@@ -1010,11 +1010,11 @@ int il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif)
cmd
.
data
=
scan
;
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
);
if
(
ret
)
clear_bit
(
S
TATUS
_SCAN_HW
,
&
il
->
status
);
clear_bit
(
S_SCAN_HW
,
&
il
->
status
);
return
ret
;
}
...
...
@@ -1120,7 +1120,7 @@ static u8 il4965_count_chain_bitmap(u32 chain_bitmap)
void
il4965_set_rxon_chain
(
struct
il_priv
*
il
,
struct
il_rxon_context
*
ctx
)
{
bool
is_single
=
il4965_is_single_rx_stream
(
il
);
bool
is_cam
=
!
test_bit
(
S
TATUS
_POWER_PMI
,
&
il
->
status
);
bool
is_cam
=
!
test_bit
(
S_POWER_PMI
,
&
il
->
status
);
u8
idle_rx_cnt
,
active_rx_cnt
,
valid_rx_cnt
;
u32
active_chains
;
u16
rx_chain
;
...
...
@@ -1258,7 +1258,7 @@ void il4965_rx_missed_beacon_notif(struct il_priv *il,
le32_to_cpu
(
missed_beacon
->
total_missed_becons
),
le32_to_cpu
(
missed_beacon
->
num_recvd_beacons
),
le32_to_cpu
(
missed_beacon
->
num_expected_beacons
));
if
(
!
test_bit
(
S
TATUS
_SCANNING
,
&
il
->
status
))
if
(
!
test_bit
(
S_SCANNING
,
&
il
->
status
))
il4965_init_sensitivity
(
il
);
}
}
...
...
@@ -1378,7 +1378,7 @@ void il4965_rx_stats(struct il_priv *il,
memcpy
(
&
il
->
_4965
.
stats
,
&
pkt
->
u
.
stats
,
sizeof
(
il
->
_4965
.
stats
));
set_bit
(
S
TATUS
_STATISTICS
,
&
il
->
status
);
set_bit
(
S_STATISTICS
,
&
il
->
status
);
/* Reschedule the stats timer to occur in
* REG_RECALIB_PERIOD seconds to ensure we get a
...
...
@@ -1387,7 +1387,7 @@ void il4965_rx_stats(struct il_priv *il,
mod_timer
(
&
il
->
stats_periodic
,
jiffies
+
msecs_to_jiffies
(
REG_RECALIB_PERIOD
*
1000
));
if
(
unlikely
(
!
test_bit
(
S
TATUS
_SCANNING
,
&
il
->
status
))
&&
if
(
unlikely
(
!
test_bit
(
S_SCANNING
,
&
il
->
status
))
&&
(
pkt
->
hdr
.
cmd
==
STATISTICS_NOTIFICATION
))
{
il4965_rx_calc_noise
(
il
);
queue_work
(
il
->
workqueue
,
&
il
->
run_time_calib_work
);
...
...
@@ -3809,7 +3809,7 @@ static void il4965_bg_stats_periodic(unsigned long data)
{
struct
il_priv
*
il
=
(
struct
il_priv
*
)
data
;
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
return
;
/* dont send host command if rf-kill is on */
...
...
@@ -3895,17 +3895,17 @@ static void il4965_rx_card_state_notif(struct il_priv *il,
il4965_perform_ct_kill_task
(
il
);
if
(
flags
&
HW_CARD_DISABLED
)
set_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
);
set_bit
(
S_RF_KILL_HW
,
&
il
->
status
);
else
clear_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
);
clear_bit
(
S_RF_KILL_HW
,
&
il
->
status
);
if
(
!
(
flags
&
RXON_CARD_DISABLED
))
il_scan_cancel
(
il
);
if
((
test_bit
(
S
TATUS
_RF_KILL_HW
,
&
status
)
!=
test_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
)))
if
((
test_bit
(
S_RF_KILL_HW
,
&
status
)
!=
test_bit
(
S_RF_KILL_HW
,
&
il
->
status
)))
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
wake_up
(
&
il
->
wait_command_queue
);
}
...
...
@@ -4199,11 +4199,11 @@ static void il4965_irq_tasklet(struct il_priv *il)
* is killed. Hence update the killswitch state here. The
* rfkill handler will care about restarting if needed.
*/
if
(
!
test_bit
(
S
TATUS
_ALIVE
,
&
il
->
status
))
{
if
(
!
test_bit
(
S_ALIVE
,
&
il
->
status
))
{
if
(
hw_rf_kill
)
set_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
);
set_bit
(
S_RF_KILL_HW
,
&
il
->
status
);
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_rf_kill
);
}
...
...
@@ -4272,7 +4272,7 @@ static void il4965_irq_tasklet(struct il_priv *il)
/* Re-enable all interrupts */
/* 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
);
/* Re-enable RF_KILL if it occurred */
else
if
(
handled
&
CSR_INT_BIT_RF_KILL
)
...
...
@@ -5079,7 +5079,7 @@ static void il4965_alive_start(struct il_priv *il)
/* After the ALIVE response, we can send host commands to the uCode */
set_bit
(
S
TATUS
_ALIVE
,
&
il
->
status
);
set_bit
(
S_ALIVE
,
&
il
->
status
);
/* Enable watchdog to monitor the driver tx queues */
il_setup_watchdog
(
il
);
...
...
@@ -5110,7 +5110,7 @@ static void il4965_alive_start(struct il_priv *il)
il4965_reset_run_time_calib
(
il
);
set_bit
(
S
TATUS
_READY
,
&
il
->
status
);
set_bit
(
S_READY
,
&
il
->
status
);
/* Configure the adapter for unassociated operation */
il_commit_rxon
(
il
,
ctx
);
...
...
@@ -5141,9 +5141,9 @@ static void __il4965_down(struct il_priv *il)
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 */
del_timer_sync
(
&
il
->
watchdog
);
...
...
@@ -5157,7 +5157,7 @@ static void __il4965_down(struct il_priv *il)
/* Wipe out the EXIT_PENDING status bit if we are not actually
* exiting the module */
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 */
_il_wr
(
il
,
CSR_RESET
,
CSR_RESET_REG_FLAG_NEVO_RESET
);
...
...
@@ -5174,25 +5174,25 @@ static void __il4965_down(struct il_priv *il)
/* If we have not previously called il_init() then
* clear all bits but the RF Kill bit and return */
if
(
!
il_is_init
(
il
))
{
il
->
status
=
test_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
)
<<
S
TATUS
_RF_KILL_HW
|
test_bit
(
S
TATUS
_GEO_CONFIGURED
,
&
il
->
status
)
<<
S
TATUS
_GEO_CONFIGURED
|
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
)
<<
S
TATUS
_EXIT_PENDING
;
il
->
status
=
test_bit
(
S_RF_KILL_HW
,
&
il
->
status
)
<<
S_RF_KILL_HW
|
test_bit
(
S_GEO_CONFIGURED
,
&
il
->
status
)
<<
S_GEO_CONFIGURED
|
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
)
<<
S_EXIT_PENDING
;
goto
exit
;
}
/* ...otherwise clear out all the status bits but the RF Kill
* bit and continue taking the NIC down. */
il
->
status
&=
test_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
)
<<
S
TATUS
_RF_KILL_HW
|
test_bit
(
S
TATUS
_GEO_CONFIGURED
,
&
il
->
status
)
<<
S
TATUS
_GEO_CONFIGURED
|
test_bit
(
S
TATUS
_FW_ERROR
,
&
il
->
status
)
<<
S
TATUS
_FW_ERROR
|
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
)
<<
S
TATUS
_EXIT_PENDING
;
il
->
status
&=
test_bit
(
S_RF_KILL_HW
,
&
il
->
status
)
<<
S_RF_KILL_HW
|
test_bit
(
S_GEO_CONFIGURED
,
&
il
->
status
)
<<
S_GEO_CONFIGURED
|
test_bit
(
S_FW_ERROR
,
&
il
->
status
)
<<
S_FW_ERROR
|
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
)
<<
S_EXIT_PENDING
;
il4965_txq_ctx_stop
(
il
);
il4965_rxq_stop
(
il
);
...
...
@@ -5283,7 +5283,7 @@ static int __il4965_up(struct il_priv *il)
int
i
;
int
ret
;
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
"
);
return
-
EIO
;
}
...
...
@@ -5309,9 +5309,9 @@ static int __il4965_up(struct il_priv *il)
/* If platform's RF_KILL switch is NOT set to KILL */
if
(
_il_rd
(
il
,
CSR_GP_CNTRL
)
&
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
set_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
);
set_bit
(
S_RF_KILL_HW
,
&
il
->
status
);
if
(
il_is_rfkill
(
il
))
{
wiphy_rfkill_set_hw_state
(
il
->
hw
->
wiphy
,
true
);
...
...
@@ -5372,9 +5372,9 @@ static int __il4965_up(struct il_priv *il)
return
0
;
}
set_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
);
set_bit
(
S_EXIT_PENDING
,
&
il
->
status
);
__il4965_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
* patience could withstand */
...
...
@@ -5395,7 +5395,7 @@ static void il4965_bg_init_alive_start(struct work_struct *data)
container_of
(
data
,
struct
il_priv
,
init_alive_start
.
work
);
mutex_lock
(
&
il
->
mutex
);
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
goto
out
;
il
->
cfg
->
ops
->
lib
->
init_alive_start
(
il
);
...
...
@@ -5409,7 +5409,7 @@ static void il4965_bg_alive_start(struct work_struct *data)
container_of
(
data
,
struct
il_priv
,
alive_start
.
work
);
mutex_lock
(
&
il
->
mutex
);
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
goto
out
;
il4965_alive_start
(
il
);
...
...
@@ -5424,8 +5424,8 @@ static void il4965_bg_run_time_calib_work(struct work_struct *work)
mutex_lock
(
&
il
->
mutex
);
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
)
||
test_bit
(
S
TATUS
_SCANNING
,
&
il
->
status
))
{
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
)
||
test_bit
(
S_SCANNING
,
&
il
->
status
))
{
mutex_unlock
(
&
il
->
mutex
);
return
;
}
...
...
@@ -5444,10 +5444,10 @@ static void il4965_bg_restart(struct work_struct *data)
{
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
;
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
);
il
->
ctx
.
vif
=
NULL
;
il
->
is_open
=
0
;
...
...
@@ -5461,7 +5461,7 @@ static void il4965_bg_restart(struct work_struct *data)
il4965_down
(
il
);
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
);
return
;
}
...
...
@@ -5476,7 +5476,7 @@ static void il4965_bg_rx_replenish(struct work_struct *data)
struct
il_priv
*
il
=
container_of
(
data
,
struct
il_priv
,
rx_replenish
);
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
return
;
mutex_lock
(
&
il
->
mutex
);
...
...
@@ -5582,10 +5582,10 @@ int il4965_mac_start(struct ieee80211_hw *hw)
/* Wait for START_ALIVE from Run Time ucode. Otherwise callbacks from
* mac80211 will not be run successfully. */
ret
=
wait_event_timeout
(
il
->
wait_command_queue
,
test_bit
(
S
TATUS
_READY
,
&
il
->
status
),
test_bit
(
S_READY
,
&
il
->
status
),
UCODE_READY_TIMEOUT
);
if
(
!
ret
)
{
if
(
!
test_bit
(
S
TATUS
_READY
,
&
il
->
status
))
{
if
(
!
test_bit
(
S_READY
,
&
il
->
status
))
{
IL_ERR
(
"START_ALIVE timeout after %dms.
\n
"
,
jiffies_to_msecs
(
UCODE_READY_TIMEOUT
));
return
-
ETIMEDOUT
;
...
...
@@ -5751,7 +5751,7 @@ int il4965_mac_ampdu_action(struct ieee80211_hw *hw,
case
IEEE80211_AMPDU_RX_STOP
:
D_HT
(
"stop Rx
\n
"
);
ret
=
il4965_sta_rx_agg_stop
(
il
,
sta
,
tid
);
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
ret
=
0
;
break
;
case
IEEE80211_AMPDU_TX_START
:
...
...
@@ -5761,7 +5761,7 @@ int il4965_mac_ampdu_action(struct ieee80211_hw *hw,
case
IEEE80211_AMPDU_TX_STOP
:
D_HT
(
"stop Tx
\n
"
);
ret
=
il4965_tx_agg_stop
(
il
,
vif
,
sta
,
tid
);
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
ret
=
0
;
break
;
case
IEEE80211_AMPDU_TX_OPERATIONAL
:
...
...
@@ -5833,9 +5833,9 @@ void il4965_mac_channel_switch(struct ieee80211_hw *hw,
if
(
il_is_rfkill
(
il
))
goto
out
;
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
)
||
test_bit
(
S
TATUS
_SCANNING
,
&
il
->
status
)
||
test_bit
(
S
TATUS
_CHANNEL_SWITCH_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
)
||
test_bit
(
S_SCANNING
,
&
il
->
status
)
||
test_bit
(
S_CHANNEL_SWITCH_PENDING
,
&
il
->
status
))
goto
out
;
if
(
!
il_is_associated_ctx
(
ctx
))
...
...
@@ -5891,10 +5891,10 @@ void il4965_mac_channel_switch(struct ieee80211_hw *hw,
* at this point, staging_rxon has the
* configuration for channel switch
*/
set_bit
(
S
TATUS
_CHANNEL_SWITCH_PENDING
,
&
il
->
status
);
set_bit
(
S_CHANNEL_SWITCH_PENDING
,
&
il
->
status
);
il
->
switch_channel
=
cpu_to_le16
(
ch
);
if
(
il
->
cfg
->
ops
->
lib
->
set_channel_switch
(
il
,
ch_switch
))
{
clear_bit
(
S
TATUS
_CHANNEL_SWITCH_PENDING
,
&
il
->
status
);
clear_bit
(
S_CHANNEL_SWITCH_PENDING
,
&
il
->
status
);
il
->
switch_channel
=
0
;
ieee80211_chswitch_done
(
ctx
->
vif
,
false
);
}
...
...
@@ -5968,8 +5968,8 @@ static void il4965_bg_txpower_work(struct work_struct *work)
* then just return; the stats notification will
* kick off another scheduled work to compensate for
* any temperature delta we missed here. */
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
)
||
test_bit
(
S
TATUS
_SCANNING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
)
||
test_bit
(
S_SCANNING
,
&
il
->
status
))
goto
out
;
/* Regardless of if we are associated, we must reconfigure the
...
...
@@ -6376,12 +6376,12 @@ il4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
/* If platform's RF_KILL switch is NOT set to KILL */
if
(
_il_rd
(
il
,
CSR_GP_CNTRL
)
&
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
set_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
);
set_bit
(
S_RF_KILL_HW
,
&
il
->
status
);
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
));
il_power_initialize
(
il
);
...
...
@@ -6433,9 +6433,9 @@ static void __devexit il4965_pci_remove(struct pci_dev *pdev)
/* ieee80211_unregister_hw call wil cause il_mac_stop to
* to be called and il4965_down since we are removing the device
* we need to set S
TATUS
_EXIT_PENDING bit.
* we need to set S_EXIT_PENDING bit.
*/
set_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
);
set_bit
(
S_EXIT_PENDING
,
&
il
->
status
);
il_leds_exit
(
il
);
...
...
drivers/net/wireless/iwlegacy/4965.c
浏览文件 @
a6766ccd
...
...
@@ -1349,7 +1349,7 @@ static int il4965_send_tx_power(struct il_priv *il)
u8
ctrl_chan_high
=
0
;
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
"
))
return
-
EAGAIN
;
...
...
@@ -1441,7 +1441,7 @@ static int il4965_commit_rxon(struct il_priv *il, struct il_rxon_context *ctx)
* receive commit_rxon request
* 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
)
{
D_11H
(
"abort channel switch on %d
\n
"
,
le16_to_cpu
(
il
->
switch_channel
));
...
...
@@ -1673,7 +1673,7 @@ static int il4965_hw_get_temperature(struct il_priv *il)
s32
R1
,
R2
,
R3
;
u32
R4
;
if
(
test_bit
(
S
TATUS
_TEMPERATURE
,
&
il
->
status
)
&&
if
(
test_bit
(
S_TEMPERATURE
,
&
il
->
status
)
&&
(
il
->
_4965
.
stats
.
flag
&
STATISTICS_REPLY_FLG_HT40_MODE_MSK
))
{
D_TEMP
(
"Running HT40 temperature calibration
\n
"
);
...
...
@@ -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
* "initialize" ALIVE response.
*/
if
(
!
test_bit
(
S
TATUS
_TEMPERATURE
,
&
il
->
status
))
if
(
!
test_bit
(
S_TEMPERATURE
,
&
il
->
status
))
vt
=
sign_extend32
(
R4
,
23
);
else
vt
=
sign_extend32
(
le32_to_cpu
(
il
->
_4965
.
stats
.
...
...
@@ -1737,7 +1737,7 @@ static int il4965_is_temp_calib_needed(struct il_priv *il)
{
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
"
);
return
0
;
}
...
...
@@ -1784,10 +1784,10 @@ static void il4965_temperature_calib(struct il_priv *il)
}
il
->
temperature
=
temp
;
set_bit
(
S
TATUS
_TEMPERATURE
,
&
il
->
status
);
set_bit
(
S_TEMPERATURE
,
&
il
->
status
);
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
))
queue_work
(
il
->
workqueue
,
&
il
->
txpower_work
);
}
...
...
@@ -2179,7 +2179,7 @@ static void il4965_post_associate(struct il_priv *il)
if
(
!
vif
||
!
il
->
is_open
)
return
;
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
return
;
il_scan_cancel_timeout
(
il
,
200
);
...
...
@@ -2254,7 +2254,7 @@ static void il4965_config_ap(struct il_priv *il)
lockdep_assert_held
(
&
il
->
mutex
);
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
return
;
/* The following should be done only at AP bring up */
...
...
drivers/net/wireless/iwlegacy/iwl-core.c
浏览文件 @
a6766ccd
...
...
@@ -165,7 +165,7 @@ int il_init_geos(struct il_priv *il)
if
(
il
->
bands
[
IEEE80211_BAND_2GHZ
].
n_bitrates
||
il
->
bands
[
IEEE80211_BAND_5GHZ
].
n_bitrates
)
{
D_INFO
(
"Geography modes already initialized.
\n
"
);
set_bit
(
S
TATUS
_GEO_CONFIGURED
,
&
il
->
status
);
set_bit
(
S_GEO_CONFIGURED
,
&
il
->
status
);
return
0
;
}
...
...
@@ -264,7 +264,7 @@ int il_init_geos(struct il_priv *il)
il
->
bands
[
IEEE80211_BAND_2GHZ
].
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
;
}
...
...
@@ -277,7 +277,7 @@ void il_free_geos(struct il_priv *il)
{
kfree
(
il
->
ieee_channels
);
kfree
(
il
->
ieee_rates
);
clear_bit
(
S
TATUS
_GEO_CONFIGURED
,
&
il
->
status
);
clear_bit
(
S_GEO_CONFIGURED
,
&
il
->
status
);
}
EXPORT_SYMBOL
(
il_free_geos
);
...
...
@@ -839,10 +839,10 @@ void il_chswitch_done(struct il_priv *il, bool is_success)
{
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
;
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
);
}
EXPORT_SYMBOL
(
il_chswitch_done
);
...
...
@@ -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_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
;
if
(
!
le32_to_cpu
(
csa
->
status
)
&&
csa
->
channel
==
il
->
switch_channel
)
{
...
...
@@ -903,10 +903,10 @@ EXPORT_SYMBOL(il_print_rx_config_cmd);
void
il_irq_handle_error
(
struct
il_priv
*
il
)
{
/* 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. */
clear_bit
(
S
TATUS
_HCMD_ACTIVE
,
&
il
->
status
);
clear_bit
(
S_HCMD_ACTIVE
,
&
il
->
status
);
IL_ERR
(
"Loaded firmware version: %s
\n
"
,
il
->
hw
->
wiphy
->
fw_version
);
...
...
@@ -924,9 +924,9 @@ void il_irq_handle_error(struct il_priv *il)
/* Keep the restart process from trying to send host
* 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
,
"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)
il
->
tx_power_next
=
tx_power
;
/* 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
));
if
(
defer
&&
!
force
)
{
D_INFO
(
"Deferring tx power set
\n
"
);
...
...
@@ -1678,7 +1678,7 @@ int il_force_reset(struct il_priv *il, bool external)
{
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
;
force_reset
=
&
il
->
force_reset
;
...
...
@@ -1713,13 +1713,13 @@ int il_force_reset(struct il_priv *il, bool external)
IL_ERR
(
"On demand firmware reload
\n
"
);
/* 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
);
/*
* Keep the restart process from trying to send host
* 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
);
return
0
;
...
...
@@ -1826,7 +1826,7 @@ void il_bg_watchdog(unsigned long data)
int
cnt
;
unsigned
long
timeout
;
if
(
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
return
;
timeout
=
il
->
cfg
->
base_params
->
wd_timeout
;
...
...
@@ -1960,9 +1960,9 @@ int il_pci_resume(struct device *device)
hw_rfkill
=
true
;
if
(
hw_rfkill
)
set_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
);
set_bit
(
S_RF_KILL_HW
,
&
il
->
status
);
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
);
...
...
@@ -1985,7 +1985,7 @@ EXPORT_SYMBOL(il_pm_ops);
static
void
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
;
if
(
!
ctx
->
is_active
)
...
...
@@ -2034,7 +2034,7 @@ int il_mac_config(struct ieee80211_hw *hw, u32 changed)
D_MAC80211
(
"enter to channel %d changed 0x%X
\n
"
,
channel
->
hw_value
,
changed
);
if
(
unlikely
(
test_bit
(
S
TATUS
_SCANNING
,
&
il
->
status
)))
{
if
(
unlikely
(
test_bit
(
S_SCANNING
,
&
il
->
status
)))
{
scan_active
=
1
;
D_MAC80211
(
"scan active
\n
"
);
}
...
...
@@ -2566,7 +2566,7 @@ irqreturn_t il_isr(int irq, void *data)
none:
/* re-enable interrupts here since we don't have anything to service. */
/* 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
);
spin_unlock_irqrestore
(
&
il
->
lock
,
flags
);
return
IRQ_NONE
;
...
...
drivers/net/wireless/iwlegacy/iwl-core.h
浏览文件 @
a6766ccd
...
...
@@ -533,47 +533,47 @@ void il_free_geos(struct il_priv *il);
/*************** DRIVER STATUS FUNCTIONS *****/
#define S
TATUS
_HCMD_ACTIVE 0
/* host command in progress */
/* 1 is unused (used to be S
TATUS
_HCMD_SYNC_ACTIVE) */
#define S
TATUS
_INT_ENABLED 2
#define S
TATUS
_RF_KILL_HW 3
#define S
TATUS
_CT_KILL 4
#define S
TATUS
_INIT 5
#define S
TATUS
_ALIVE 6
#define S
TATUS
_READY 7
#define S
TATUS
_TEMPERATURE 8
#define S
TATUS
_GEO_CONFIGURED 9
#define S
TATUS
_EXIT_PENDING 10
#define S
TATUS
_STATISTICS 12
#define S
TATUS
_SCANNING 13
#define S
TATUS
_SCAN_ABORTING 14
#define S
TATUS
_SCAN_HW 15
#define S
TATUS
_POWER_PMI 16
#define S
TATUS
_FW_ERROR 17
#define S
TATUS
_CHANNEL_SWITCH_PENDING 18
#define S_HCMD_ACTIVE 0
/* host command in progress */
/* 1 is unused (used to be S_HCMD_SYNC_ACTIVE) */
#define S_INT_ENABLED 2
#define S_RF_KILL_HW 3
#define S_CT_KILL 4
#define S_INIT 5
#define S_ALIVE 6
#define S_READY 7
#define S_TEMPERATURE 8
#define S_GEO_CONFIGURED 9
#define S_EXIT_PENDING 10
#define S_STATISTICS 12
#define S_SCANNING 13
#define S_SCAN_ABORTING 14
#define S_SCAN_HW 15
#define S_POWER_PMI 16
#define S_FW_ERROR 17
#define S_CHANNEL_SWITCH_PENDING 18
static
inline
int
il_is_ready
(
struct
il_priv
*
il
)
{
/* The adapter is 'ready' if READY and GEO_CONFIGURED bits are
* set but EXIT_PENDING is not */
return
test_bit
(
S
TATUS
_READY
,
&
il
->
status
)
&&
test_bit
(
S
TATUS
_GEO_CONFIGURED
,
&
il
->
status
)
&&
!
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
);
return
test_bit
(
S_READY
,
&
il
->
status
)
&&
test_bit
(
S_GEO_CONFIGURED
,
&
il
->
status
)
&&
!
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
);
}
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
)
{
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
)
{
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
)
...
...
@@ -583,7 +583,7 @@ static inline int il_is_rfkill(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
)
...
...
drivers/net/wireless/iwlegacy/iwl-debugfs.c
浏览文件 @
a6766ccd
...
...
@@ -402,7 +402,7 @@ il_dbgfs_channels_read(struct file *file, char __user *user_buf,
char
*
buf
;
ssize_t
ret
;
if
(
!
test_bit
(
S
TATUS
_GEO_CONFIGURED
,
&
il
->
status
))
if
(
!
test_bit
(
S_GEO_CONFIGURED
,
&
il
->
status
))
return
-
EAGAIN
;
buf
=
kzalloc
(
bufsz
,
GFP_KERNEL
);
...
...
@@ -471,38 +471,38 @@ static ssize_t il_dbgfs_status_read(struct file *file,
int
pos
=
0
;
const
size_t
bufsz
=
sizeof
(
buf
);
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_HCMD_ACTIVE:
\t
%d
\n
"
,
test_bit
(
S
TATUS
_HCMD_ACTIVE
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_INT_ENABLED:
\t
%d
\n
"
,
test_bit
(
S
TATUS
_INT_ENABLED
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_RF_KILL_HW:
\t
%d
\n
"
,
test_bit
(
S
TATUS
_RF_KILL_HW
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_CT_KILL:
\t\t
%d
\n
"
,
test_bit
(
S
TATUS
_CT_KILL
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_INIT:
\t\t
%d
\n
"
,
test_bit
(
S
TATUS
_INIT
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_ALIVE:
\t\t
%d
\n
"
,
test_bit
(
S
TATUS
_ALIVE
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_READY:
\t\t
%d
\n
"
,
test_bit
(
S
TATUS
_READY
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_TEMPERATURE:
\t
%d
\n
"
,
test_bit
(
S
TATUS
_TEMPERATURE
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_GEO_CONFIGURED:
\t
%d
\n
"
,
test_bit
(
S
TATUS
_GEO_CONFIGURED
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_EXIT_PENDING:
\t
%d
\n
"
,
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_STATISTICS:
\t
%d
\n
"
,
test_bit
(
S
TATUS
_STATISTICS
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_SCANNING:
\t
%d
\n
"
,
test_bit
(
S
TATUS
_SCANNING
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_SCAN_ABORTING:
\t
%d
\n
"
,
test_bit
(
S
TATUS
_SCAN_ABORTING
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_SCAN_HW:
\t\t
%d
\n
"
,
test_bit
(
S
TATUS
_SCAN_HW
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_POWER_PMI:
\t
%d
\n
"
,
test_bit
(
S
TATUS
_POWER_PMI
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S
TATUS
_FW_ERROR:
\t
%d
\n
"
,
test_bit
(
S
TATUS
_FW_ERROR
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_HCMD_ACTIVE:
\t
%d
\n
"
,
test_bit
(
S_HCMD_ACTIVE
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_INT_ENABLED:
\t
%d
\n
"
,
test_bit
(
S_INT_ENABLED
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_RF_KILL_HW:
\t
%d
\n
"
,
test_bit
(
S_RF_KILL_HW
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_CT_KILL:
\t\t
%d
\n
"
,
test_bit
(
S_CT_KILL
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_INIT:
\t\t
%d
\n
"
,
test_bit
(
S_INIT
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_ALIVE:
\t\t
%d
\n
"
,
test_bit
(
S_ALIVE
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_READY:
\t\t
%d
\n
"
,
test_bit
(
S_READY
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_TEMPERATURE:
\t
%d
\n
"
,
test_bit
(
S_TEMPERATURE
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_GEO_CONFIGURED:
\t
%d
\n
"
,
test_bit
(
S_GEO_CONFIGURED
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_EXIT_PENDING:
\t
%d
\n
"
,
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_STATISTICS:
\t
%d
\n
"
,
test_bit
(
S_STATISTICS
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_SCANNING:
\t
%d
\n
"
,
test_bit
(
S_SCANNING
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_SCAN_ABORTING:
\t
%d
\n
"
,
test_bit
(
S_SCAN_ABORTING
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_SCAN_HW:
\t\t
%d
\n
"
,
test_bit
(
S_SCAN_HW
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_POWER_PMI:
\t
%d
\n
"
,
test_bit
(
S_POWER_PMI
,
&
il
->
status
));
pos
+=
scnprintf
(
buf
+
pos
,
bufsz
-
pos
,
"S_FW_ERROR:
\t
%d
\n
"
,
test_bit
(
S_FW_ERROR
,
&
il
->
status
));
return
simple_read_from_buffer
(
user_buf
,
count
,
ppos
,
buf
,
pos
);
}
...
...
drivers/net/wireless/iwlegacy/iwl-hcmd.c
浏览文件 @
a6766ccd
...
...
@@ -128,7 +128,7 @@ il_send_cmd_async(struct il_priv *il, struct il_host_cmd *cmd)
if
(
!
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
;
ret
=
il_enqueue_hcmd
(
il
,
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
"
,
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
"
,
il_get_cmd_string
(
cmd
->
id
));
...
...
@@ -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
,
!
test_bit
(
S
TATUS
_HCMD_ACTIVE
,
&
il
->
status
),
!
test_bit
(
S_HCMD_ACTIVE
,
&
il
->
status
),
HOST_COMPLETE_TIMEOUT
);
if
(
!
ret
)
{
if
(
test_bit
(
S
TATUS
_HCMD_ACTIVE
,
&
il
->
status
))
{
if
(
test_bit
(
S_HCMD_ACTIVE
,
&
il
->
status
))
{
IL_ERR
(
"Error sending %s: time out after %dms.
\n
"
,
il_get_cmd_string
(
cmd
->
id
),
jiffies_to_msecs
(
HOST_COMPLETE_TIMEOUT
));
clear_bit
(
S
TATUS
_HCMD_ACTIVE
,
&
il
->
status
);
clear_bit
(
S_HCMD_ACTIVE
,
&
il
->
status
);
D_INFO
(
"Clearing HCMD_ACTIVE for command %s
\n
"
,
il_get_cmd_string
(
cmd
->
id
));
...
...
@@ -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_get_cmd_string
(
cmd
->
id
));
ret
=
-
ECANCELED
;
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_get_cmd_string
(
cmd
->
id
));
ret
=
-
EIO
;
...
...
drivers/net/wireless/iwlegacy/iwl-helpers.h
浏览文件 @
a6766ccd
...
...
@@ -146,7 +146,7 @@ static inline void il_stop_queue(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 */
_il_wr
(
il
,
CSR_INT_MASK
,
0x00000000
);
...
...
@@ -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
)
{
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
);
}
...
...
drivers/net/wireless/iwlegacy/iwl-led.c
浏览文件 @
a6766ccd
...
...
@@ -107,7 +107,7 @@ static int il_led_cmd(struct il_priv *il,
};
int
ret
;
if
(
!
test_bit
(
S
TATUS
_READY
,
&
il
->
status
))
if
(
!
test_bit
(
S_READY
,
&
il
->
status
))
return
-
EBUSY
;
if
(
il
->
blink_on
==
on
&&
il
->
blink_off
==
off
)
...
...
drivers/net/wireless/iwlegacy/iwl-power.c
浏览文件 @
a6766ccd
...
...
@@ -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 */
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
"
);
return
0
;
}
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
);
if
(
!
ret
)
{
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
)
il
->
cfg
->
ops
->
lib
->
update_chain_flags
(
il
);
...
...
drivers/net/wireless/iwlegacy/iwl-rx.c
浏览文件 @
a6766ccd
...
...
@@ -137,7 +137,7 @@ il_rx_queue_update_write_ptr(struct il_priv *il,
goto
exit_unlock
;
/* 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
);
if
(
reg
&
CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP
)
{
...
...
drivers/net/wireless/iwlegacy/iwl-scan.c
浏览文件 @
a6766ccd
...
...
@@ -66,11 +66,11 @@ static int il_send_scan_abort(struct il_priv *il)
/* Exit instantly with error when device is not ready
* to receive scan abort command or it does not perform
* hardware scan currently */
if
(
!
test_bit
(
S
TATUS
_READY
,
&
il
->
status
)
||
!
test_bit
(
S
TATUS
_GEO_CONFIGURED
,
&
il
->
status
)
||
!
test_bit
(
S
TATUS
_SCAN_HW
,
&
il
->
status
)
||
test_bit
(
S
TATUS
_FW_ERROR
,
&
il
->
status
)
||
test_bit
(
S
TATUS
_EXIT_PENDING
,
&
il
->
status
))
if
(
!
test_bit
(
S_READY
,
&
il
->
status
)
||
!
test_bit
(
S_GEO_CONFIGURED
,
&
il
->
status
)
||
!
test_bit
(
S_SCAN_HW
,
&
il
->
status
)
||
test_bit
(
S_FW_ERROR
,
&
il
->
status
)
||
test_bit
(
S_EXIT_PENDING
,
&
il
->
status
))
return
-
EIO
;
ret
=
il_send_cmd_sync
(
il
,
&
cmd
);
...
...
@@ -109,15 +109,15 @@ void il_force_scan_end(struct il_priv *il)
{
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
"
);
return
;
}
D_SCAN
(
"Forcing scan end
\n
"
);
clear_bit
(
S
TATUS
_SCANNING
,
&
il
->
status
);
clear_bit
(
S
TATUS
_SCAN_HW
,
&
il
->
status
);
clear_bit
(
S
TATUS
_SCAN_ABORTING
,
&
il
->
status
);
clear_bit
(
S_SCANNING
,
&
il
->
status
);
clear_bit
(
S_SCAN_HW
,
&
il
->
status
);
clear_bit
(
S_SCAN_ABORTING
,
&
il
->
status
);
il_complete_scan
(
il
,
true
);
}
...
...
@@ -127,12 +127,12 @@ static void il_do_scan_abort(struct il_priv *il)
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
"
);
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
"
);
return
;
}
...
...
@@ -172,12 +172,12 @@ int il_scan_cancel_timeout(struct il_priv *il, unsigned long ms)
il_do_scan_abort
(
il
);
while
(
time_before_eq
(
jiffies
,
timeout
))
{
if
(
!
test_bit
(
S
TATUS
_SCAN_HW
,
&
il
->
status
))
if
(
!
test_bit
(
S_SCAN_HW
,
&
il
->
status
))
break
;
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
);
...
...
@@ -251,7 +251,7 @@ static void il_rx_scan_complete_notif(struct il_priv *il,
scan_notif
->
tsf_high
,
scan_notif
->
status
);
/* 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
"
,
(
il
->
scan_band
==
IEEE80211_BAND_2GHZ
)
?
"2.4"
:
"5.2"
,
...
...
@@ -341,25 +341,25 @@ static int il_scan_initiate(struct il_priv *il,
return
-
EIO
;
}
if
(
test_bit
(
S
TATUS
_SCAN_HW
,
&
il
->
status
))
{
if
(
test_bit
(
S_SCAN_HW
,
&
il
->
status
))
{
D_SCAN
(
"Multiple concurrent scan requests in parallel.
\n
"
);
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
"
);
return
-
EBUSY
;
}
D_SCAN
(
"Starting scan...
\n
"
);
set_bit
(
S
TATUS
_SCANNING
,
&
il
->
status
);
set_bit
(
S_SCANNING
,
&
il
->
status
);
il
->
scan_start
=
jiffies
;
ret
=
il
->
cfg
->
ops
->
utils
->
request_scan
(
il
,
vif
);
if
(
ret
)
{
clear_bit
(
S
TATUS
_SCANNING
,
&
il
->
status
);
clear_bit
(
S_SCANNING
,
&
il
->
status
);
return
ret
;
}
...
...
@@ -383,7 +383,7 @@ int il_mac_hw_scan(struct ieee80211_hw *hw,
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
"
);
ret
=
-
EAGAIN
;
goto
out_unlock
;
...
...
@@ -494,11 +494,11 @@ static void il_bg_scan_completed(struct work_struct *work)
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
)
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
"
);
goto
out_settings
;
}
...
...
drivers/net/wireless/iwlegacy/iwl-tx.c
浏览文件 @
a6766ccd
...
...
@@ -51,7 +51,7 @@ il_txq_update_write_ptr(struct il_priv *il, struct il_tx_queue *txq)
return
;
/* 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 ...
* uCode will wake up, and interrupt us again, so next
* time we'll skip this part. */
...
...
@@ -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
);
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
"
,
il_get_cmd_string
(
cmd
->
hdr
.
cmd
));
wake_up
(
&
il
->
wait_command_queue
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录