Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
a1751b22
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a1751b22
编写于
11月 15, 2011
作者:
S
Stanislaw Gruszka
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
iwlegacy: merge iwl-4965-{tx,rx}.c into 4965-mac.c
Signed-off-by:
N
Stanislaw Gruszka
<
sgruszka@redhat.com
>
上级
eb3cdfb7
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
1478 addition
and
1588 deletion
+1478
-1588
drivers/net/wireless/iwlegacy/4965-mac.c
drivers/net/wireless/iwlegacy/4965-mac.c
+1477
-0
drivers/net/wireless/iwlegacy/Makefile
drivers/net/wireless/iwlegacy/Makefile
+1
-2
drivers/net/wireless/iwlegacy/iwl-4965-rx.c
drivers/net/wireless/iwlegacy/iwl-4965-rx.c
+0
-215
drivers/net/wireless/iwlegacy/iwl-4965-tx.c
drivers/net/wireless/iwlegacy/iwl-4965-tx.c
+0
-1371
未找到文件。
drivers/net/wireless/iwlegacy/4965-mac.c
浏览文件 @
a1751b22
此差异已折叠。
点击以展开。
drivers/net/wireless/iwlegacy/Makefile
浏览文件 @
a1751b22
...
...
@@ -9,8 +9,7 @@ iwl-legacy-objs += $(iwl-legacy-m)
# 4965
obj-$(CONFIG_IWL4965)
+=
iwl4965.o
iwl4965-objs
:=
4965.o 4965-mac.o iwl-4965-rs.o
iwl4965-objs
+=
iwl-4965-tx.o
iwl4965-objs
+=
iwl-4965-lib.o iwl-4965-rx.o iwl-4965-calib.o
iwl4965-objs
+=
iwl-4965-lib.o iwl-4965-calib.o
iwl4965-$(CONFIG_IWLEGACY_DEBUGFS)
+=
iwl-4965-debugfs.o
# 3945
...
...
drivers/net/wireless/iwlegacy/iwl-4965-rx.c
已删除
100644 → 0
浏览文件 @
eb3cdfb7
/******************************************************************************
*
* GPL LICENSE SUMMARY
*
* Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
* USA
*
* The full GNU General Public License is included in this distribution
* in the file called LICENSE.GPL.
*
* Contact Information:
* Intel Linux Wireless <ilw@linux.intel.com>
* Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
*
*****************************************************************************/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/sched.h>
#include "iwl-dev.h"
#include "iwl-core.h"
#include "iwl-4965-calib.h"
#include "iwl-sta.h"
#include "iwl-io.h"
#include "iwl-helpers.h"
#include "iwl-4965-hw.h"
#include "iwl-4965.h"
void
il4965_rx_missed_beacon_notif
(
struct
il_priv
*
il
,
struct
il_rx_buf
*
rxb
)
{
struct
il_rx_pkt
*
pkt
=
rxb_addr
(
rxb
);
struct
il_missed_beacon_notif
*
missed_beacon
;
missed_beacon
=
&
pkt
->
u
.
missed_beacon
;
if
(
le32_to_cpu
(
missed_beacon
->
consecutive_missed_beacons
)
>
il
->
missed_beacon_threshold
)
{
D_CALIB
(
"missed bcn cnsq %d totl %d rcd %d expctd %d
\n
"
,
le32_to_cpu
(
missed_beacon
->
consecutive_missed_beacons
),
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
(
STATUS_SCANNING
,
&
il
->
status
))
il4965_init_sensitivity
(
il
);
}
}
/* Calculate noise level, based on measurements during network silence just
* before arriving beacon. This measurement can be done only if we know
* exactly when to expect beacons, therefore only when we're associated. */
static
void
il4965_rx_calc_noise
(
struct
il_priv
*
il
)
{
struct
stats_rx_non_phy
*
rx_info
;
int
num_active_rx
=
0
;
int
total_silence
=
0
;
int
bcn_silence_a
,
bcn_silence_b
,
bcn_silence_c
;
int
last_rx_noise
;
rx_info
=
&
(
il
->
_4965
.
stats
.
rx
.
general
);
bcn_silence_a
=
le32_to_cpu
(
rx_info
->
beacon_silence_rssi_a
)
&
IN_BAND_FILTER
;
bcn_silence_b
=
le32_to_cpu
(
rx_info
->
beacon_silence_rssi_b
)
&
IN_BAND_FILTER
;
bcn_silence_c
=
le32_to_cpu
(
rx_info
->
beacon_silence_rssi_c
)
&
IN_BAND_FILTER
;
if
(
bcn_silence_a
)
{
total_silence
+=
bcn_silence_a
;
num_active_rx
++
;
}
if
(
bcn_silence_b
)
{
total_silence
+=
bcn_silence_b
;
num_active_rx
++
;
}
if
(
bcn_silence_c
)
{
total_silence
+=
bcn_silence_c
;
num_active_rx
++
;
}
/* Average among active antennas */
if
(
num_active_rx
)
last_rx_noise
=
(
total_silence
/
num_active_rx
)
-
107
;
else
last_rx_noise
=
IL_NOISE_MEAS_NOT_AVAILABLE
;
D_CALIB
(
"inband silence a %u, b %u, c %u, dBm %d
\n
"
,
bcn_silence_a
,
bcn_silence_b
,
bcn_silence_c
,
last_rx_noise
);
}
#ifdef CONFIG_IWLEGACY_DEBUGFS
/*
* based on the assumption of all stats counter are in DWORD
* FIXME: This function is for debugging, do not deal with
* the case of counters roll-over.
*/
static
void
il4965_accumulative_stats
(
struct
il_priv
*
il
,
__le32
*
stats
)
{
int
i
,
size
;
__le32
*
prev_stats
;
u32
*
accum_stats
;
u32
*
delta
,
*
max_delta
;
struct
stats_general_common
*
general
,
*
accum_general
;
struct
stats_tx
*
tx
,
*
accum_tx
;
prev_stats
=
(
__le32
*
)
&
il
->
_4965
.
stats
;
accum_stats
=
(
u32
*
)
&
il
->
_4965
.
accum_stats
;
size
=
sizeof
(
struct
il_notif_stats
);
general
=
&
il
->
_4965
.
stats
.
general
.
common
;
accum_general
=
&
il
->
_4965
.
accum_stats
.
general
.
common
;
tx
=
&
il
->
_4965
.
stats
.
tx
;
accum_tx
=
&
il
->
_4965
.
accum_stats
.
tx
;
delta
=
(
u32
*
)
&
il
->
_4965
.
delta_stats
;
max_delta
=
(
u32
*
)
&
il
->
_4965
.
max_delta
;
for
(
i
=
sizeof
(
__le32
);
i
<
size
;
i
+=
sizeof
(
__le32
),
stats
++
,
prev_stats
++
,
delta
++
,
max_delta
++
,
accum_stats
++
)
{
if
(
le32_to_cpu
(
*
stats
)
>
le32_to_cpu
(
*
prev_stats
))
{
*
delta
=
(
le32_to_cpu
(
*
stats
)
-
le32_to_cpu
(
*
prev_stats
));
*
accum_stats
+=
*
delta
;
if
(
*
delta
>
*
max_delta
)
*
max_delta
=
*
delta
;
}
}
/* reset accumulative stats for "no-counter" type stats */
accum_general
->
temperature
=
general
->
temperature
;
accum_general
->
ttl_timestamp
=
general
->
ttl_timestamp
;
}
#endif
#define REG_RECALIB_PERIOD (60)
void
il4965_rx_stats
(
struct
il_priv
*
il
,
struct
il_rx_buf
*
rxb
)
{
int
change
;
struct
il_rx_pkt
*
pkt
=
rxb_addr
(
rxb
);
D_RX
(
"Statistics notification received (%d vs %d).
\n
"
,
(
int
)
sizeof
(
struct
il_notif_stats
),
le32_to_cpu
(
pkt
->
len_n_flags
)
&
FH_RSCSR_FRAME_SIZE_MSK
);
change
=
((
il
->
_4965
.
stats
.
general
.
common
.
temperature
!=
pkt
->
u
.
stats
.
general
.
common
.
temperature
)
||
((
il
->
_4965
.
stats
.
flag
&
STATISTICS_REPLY_FLG_HT40_MODE_MSK
)
!=
(
pkt
->
u
.
stats
.
flag
&
STATISTICS_REPLY_FLG_HT40_MODE_MSK
)));
#ifdef CONFIG_IWLEGACY_DEBUGFS
il4965_accumulative_stats
(
il
,
(
__le32
*
)
&
pkt
->
u
.
stats
);
#endif
/* TODO: reading some of stats is unneeded */
memcpy
(
&
il
->
_4965
.
stats
,
&
pkt
->
u
.
stats
,
sizeof
(
il
->
_4965
.
stats
));
set_bit
(
STATUS_STATISTICS
,
&
il
->
status
);
/* Reschedule the stats timer to occur in
* REG_RECALIB_PERIOD seconds to ensure we get a
* thermal update even if the uCode doesn't give
* us one */
mod_timer
(
&
il
->
stats_periodic
,
jiffies
+
msecs_to_jiffies
(
REG_RECALIB_PERIOD
*
1000
));
if
(
unlikely
(
!
test_bit
(
STATUS_SCANNING
,
&
il
->
status
))
&&
(
pkt
->
hdr
.
cmd
==
STATISTICS_NOTIFICATION
))
{
il4965_rx_calc_noise
(
il
);
queue_work
(
il
->
workqueue
,
&
il
->
run_time_calib_work
);
}
if
(
il
->
cfg
->
ops
->
lib
->
temp_ops
.
temperature
&&
change
)
il
->
cfg
->
ops
->
lib
->
temp_ops
.
temperature
(
il
);
}
void
il4965_reply_stats
(
struct
il_priv
*
il
,
struct
il_rx_buf
*
rxb
)
{
struct
il_rx_pkt
*
pkt
=
rxb_addr
(
rxb
);
if
(
le32_to_cpu
(
pkt
->
u
.
stats
.
flag
)
&
UCODE_STATISTICS_CLEAR_MSK
)
{
#ifdef CONFIG_IWLEGACY_DEBUGFS
memset
(
&
il
->
_4965
.
accum_stats
,
0
,
sizeof
(
struct
il_notif_stats
));
memset
(
&
il
->
_4965
.
delta_stats
,
0
,
sizeof
(
struct
il_notif_stats
));
memset
(
&
il
->
_4965
.
max_delta
,
0
,
sizeof
(
struct
il_notif_stats
));
#endif
D_RX
(
"Statistics have been cleared
\n
"
);
}
il4965_rx_stats
(
il
,
rxb
);
}
drivers/net/wireless/iwlegacy/iwl-4965-tx.c
已删除
100644 → 0
浏览文件 @
eb3cdfb7
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录