Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
38c09159
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看板
提交
38c09159
编写于
3月 07, 2011
作者:
J
John W. Linville
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
mac80211: implement support for cfg80211_ops->{get,set}_ringparam
Signed-off-by:
N
John W. Linville
<
linville@tuxdriver.com
>
上级
3677713b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
102 addition
and
0 deletion
+102
-0
include/net/mac80211.h
include/net/mac80211.h
+7
-0
net/mac80211/cfg.c
net/mac80211/cfg.c
+17
-0
net/mac80211/driver-ops.h
net/mac80211/driver-ops.h
+26
-0
net/mac80211/driver-trace.h
net/mac80211/driver-trace.h
+52
-0
未找到文件。
include/net/mac80211.h
浏览文件 @
38c09159
...
...
@@ -1804,6 +1804,10 @@ enum ieee80211_ampdu_mlme_action {
* return value is 1, then the @remain_on_channel will be used with a
* regular transmission (if supported.)
* @offchannel_tx_cancel_wait: cancel wait associated with offchannel TX
*
* @set_ringparam: Set tx and rx ring sizes.
*
* @get_ringparam: Get tx and rx ring current and maximum sizes.
*/
struct
ieee80211_ops
{
void
(
*
tx
)(
struct
ieee80211_hw
*
hw
,
struct
sk_buff
*
skb
);
...
...
@@ -1888,6 +1892,9 @@ struct ieee80211_ops {
enum
nl80211_channel_type
channel_type
,
unsigned
int
wait
);
int
(
*
offchannel_tx_cancel_wait
)(
struct
ieee80211_hw
*
hw
);
int
(
*
set_ringparam
)(
struct
ieee80211_hw
*
hw
,
u32
tx
,
u32
rx
);
void
(
*
get_ringparam
)(
struct
ieee80211_hw
*
hw
,
u32
*
tx
,
u32
*
tx_max
,
u32
*
rx
,
u32
*
rx_max
);
};
/**
...
...
net/mac80211/cfg.c
浏览文件 @
38c09159
...
...
@@ -2012,6 +2012,21 @@ static int ieee80211_get_antenna(struct wiphy *wiphy, u32 *tx_ant, u32 *rx_ant)
return
drv_get_antenna
(
local
,
tx_ant
,
rx_ant
);
}
static
int
ieee80211_set_ringparam
(
struct
wiphy
*
wiphy
,
u32
tx
,
u32
rx
)
{
struct
ieee80211_local
*
local
=
wiphy_priv
(
wiphy
);
return
drv_set_ringparam
(
local
,
tx
,
rx
);
}
static
void
ieee80211_get_ringparam
(
struct
wiphy
*
wiphy
,
u32
*
tx
,
u32
*
tx_max
,
u32
*
rx
,
u32
*
rx_max
)
{
struct
ieee80211_local
*
local
=
wiphy_priv
(
wiphy
);
drv_get_ringparam
(
local
,
tx
,
tx_max
,
rx
,
rx_max
);
}
struct
cfg80211_ops
mac80211_config_ops
=
{
.
add_virtual_intf
=
ieee80211_add_iface
,
.
del_virtual_intf
=
ieee80211_del_iface
,
...
...
@@ -2069,4 +2084,6 @@ struct cfg80211_ops mac80211_config_ops = {
.
mgmt_frame_register
=
ieee80211_mgmt_frame_register
,
.
set_antenna
=
ieee80211_set_antenna
,
.
get_antenna
=
ieee80211_get_antenna
,
.
set_ringparam
=
ieee80211_set_ringparam
,
.
get_ringparam
=
ieee80211_get_ringparam
,
};
net/mac80211/driver-ops.h
浏览文件 @
38c09159
...
...
@@ -526,4 +526,30 @@ static inline int drv_offchannel_tx_cancel_wait(struct ieee80211_local *local)
return
ret
;
}
static
inline
int
drv_set_ringparam
(
struct
ieee80211_local
*
local
,
u32
tx
,
u32
rx
)
{
int
ret
=
-
ENOTSUPP
;
might_sleep
();
trace_drv_set_ringparam
(
local
,
tx
,
rx
);
if
(
local
->
ops
->
set_ringparam
)
ret
=
local
->
ops
->
set_ringparam
(
&
local
->
hw
,
tx
,
rx
);
trace_drv_return_int
(
local
,
ret
);
return
ret
;
}
static
inline
void
drv_get_ringparam
(
struct
ieee80211_local
*
local
,
u32
*
tx
,
u32
*
tx_max
,
u32
*
rx
,
u32
*
rx_max
)
{
might_sleep
();
trace_drv_get_ringparam
(
local
,
tx
,
tx_max
,
rx
,
rx_max
);
if
(
local
->
ops
->
get_ringparam
)
local
->
ops
->
get_ringparam
(
&
local
->
hw
,
tx
,
tx_max
,
rx
,
rx_max
);
trace_drv_return_void
(
local
);
}
#endif
/* __MAC80211_DRIVER_OPS */
net/mac80211/driver-trace.h
浏览文件 @
38c09159
...
...
@@ -912,6 +912,58 @@ TRACE_EVENT(drv_offchannel_tx,
)
);
TRACE_EVENT
(
drv_set_ringparam
,
TP_PROTO
(
struct
ieee80211_local
*
local
,
u32
tx
,
u32
rx
),
TP_ARGS
(
local
,
tx
,
rx
),
TP_STRUCT__entry
(
LOCAL_ENTRY
__field
(
u32
,
tx
)
__field
(
u32
,
rx
)
),
TP_fast_assign
(
LOCAL_ASSIGN
;
__entry
->
tx
=
tx
;
__entry
->
rx
=
rx
;
),
TP_printk
(
LOCAL_PR_FMT
" tx:%d rx %d"
,
LOCAL_PR_ARG
,
__entry
->
tx
,
__entry
->
rx
)
);
TRACE_EVENT
(
drv_get_ringparam
,
TP_PROTO
(
struct
ieee80211_local
*
local
,
u32
*
tx
,
u32
*
tx_max
,
u32
*
rx
,
u32
*
rx_max
),
TP_ARGS
(
local
,
tx
,
tx_max
,
rx
,
rx_max
),
TP_STRUCT__entry
(
LOCAL_ENTRY
__field
(
u32
,
tx
)
__field
(
u32
,
tx_max
)
__field
(
u32
,
rx
)
__field
(
u32
,
rx_max
)
),
TP_fast_assign
(
LOCAL_ASSIGN
;
__entry
->
tx
=
*
tx
;
__entry
->
tx_max
=
*
tx_max
;
__entry
->
rx
=
*
rx
;
__entry
->
rx_max
=
*
rx_max
;
),
TP_printk
(
LOCAL_PR_FMT
" tx:%d tx_max %d rx %d rx_max %d"
,
LOCAL_PR_ARG
,
__entry
->
tx
,
__entry
->
tx_max
,
__entry
->
rx
,
__entry
->
rx_max
)
);
DEFINE_EVENT
(
local_only_evt
,
drv_offchannel_tx_cancel_wait
,
TP_PROTO
(
struct
ieee80211_local
*
local
),
TP_ARGS
(
local
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录