Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
12307e42
L
linux
项目概览
xiphi1978
/
linux
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
12307e42
编写于
6月 25, 2014
作者:
J
John W. Linville
浏览文件
操作
浏览文件
下载
差异文件
Merge
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
上级
616a8394
02df00eb
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
16 addition
and
24 deletion
+16
-24
net/mac80211/util.c
net/mac80211/util.c
+3
-2
net/wireless/core.h
net/wireless/core.h
+1
-1
net/wireless/nl80211.c
net/wireless/nl80211.c
+5
-6
net/wireless/reg.c
net/wireless/reg.c
+7
-15
未找到文件。
net/mac80211/util.c
浏览文件 @
12307e42
...
...
@@ -1096,11 +1096,12 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
int
err
;
/* 24 + 6 = header + auth_algo + auth_transaction + status_code */
skb
=
dev_alloc_skb
(
local
->
hw
.
extra_tx_headroom
+
24
+
6
+
extra_len
);
skb
=
dev_alloc_skb
(
local
->
hw
.
extra_tx_headroom
+
IEEE80211_WEP_IV_LEN
+
24
+
6
+
extra_len
+
IEEE80211_WEP_ICV_LEN
);
if
(
!
skb
)
return
;
skb_reserve
(
skb
,
local
->
hw
.
extra_tx_headroom
);
skb_reserve
(
skb
,
local
->
hw
.
extra_tx_headroom
+
IEEE80211_WEP_IV_LEN
);
mgmt
=
(
struct
ieee80211_mgmt
*
)
skb_put
(
skb
,
24
+
6
);
memset
(
mgmt
,
0
,
24
+
6
);
...
...
net/wireless/core.h
浏览文件 @
12307e42
...
...
@@ -424,7 +424,7 @@ static inline unsigned int elapsed_jiffies_msecs(unsigned long start)
if
(
end
>=
start
)
return
jiffies_to_msecs
(
end
-
start
);
return
jiffies_to_msecs
(
end
+
(
MAX_JIFFY_OFFSET
-
start
)
+
1
);
return
jiffies_to_msecs
(
end
+
(
ULONG_MAX
-
start
)
+
1
);
}
void
...
...
net/wireless/nl80211.c
浏览文件 @
12307e42
...
...
@@ -1497,18 +1497,17 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,
}
CMD
(
start_p2p_device
,
START_P2P_DEVICE
);
CMD
(
set_mcast_rate
,
SET_MCAST_RATE
);
#ifdef CONFIG_NL80211_TESTMODE
CMD
(
testmode_cmd
,
TESTMODE
);
#endif
if
(
state
->
split
)
{
CMD
(
crit_proto_start
,
CRIT_PROTOCOL_START
);
CMD
(
crit_proto_stop
,
CRIT_PROTOCOL_STOP
);
if
(
rdev
->
wiphy
.
flags
&
WIPHY_FLAG_HAS_CHANNEL_SWITCH
)
CMD
(
channel_switch
,
CHANNEL_SWITCH
);
}
CMD
(
set_qos_map
,
SET_QOS_MAP
);
#ifdef CONFIG_NL80211_TESTMODE
CMD
(
testmode_cmd
,
TESTMODE
);
#endif
}
/* add into the if now */
#undef CMD
if
(
rdev
->
ops
->
connect
||
rdev
->
ops
->
auth
)
{
...
...
net/wireless/reg.c
浏览文件 @
12307e42
...
...
@@ -935,7 +935,7 @@ freq_reg_info_regd(struct wiphy *wiphy, u32 center_freq,
if
(
!
band_rule_found
)
band_rule_found
=
freq_in_rule_band
(
fr
,
center_freq
);
bw_fits
=
reg_does_bw_fit
(
fr
,
center_freq
,
MHZ_TO_KHZ
(
5
));
bw_fits
=
reg_does_bw_fit
(
fr
,
center_freq
,
MHZ_TO_KHZ
(
20
));
if
(
band_rule_found
&&
bw_fits
)
return
rr
;
...
...
@@ -1019,10 +1019,10 @@ static void chan_reg_rule_print_dbg(const struct ieee80211_regdomain *regd,
}
#endif
/*
Find an ieee80211_reg_rule such that a 5MHz channel with frequency
*
chan->center_freq fits there.
*
If there is no such reg_rule, disable the channel, otherwise set the
*
flags corresponding to the bandwidths allowed in the particular reg_rule
/*
*
Note that right now we assume the desired channel bandwidth
*
is always 20 MHz for each individual channel (HT40 uses 20 MHz
*
per channel, the primary and the extension channel).
*/
static
void
handle_channel
(
struct
wiphy
*
wiphy
,
enum
nl80211_reg_initiator
initiator
,
...
...
@@ -1083,12 +1083,8 @@ static void handle_channel(struct wiphy *wiphy,
if
(
reg_rule
->
flags
&
NL80211_RRF_AUTO_BW
)
max_bandwidth_khz
=
reg_get_max_bandwidth
(
regd
,
reg_rule
);
if
(
max_bandwidth_khz
<
MHZ_TO_KHZ
(
10
))
bw_flags
=
IEEE80211_CHAN_NO_10MHZ
;
if
(
max_bandwidth_khz
<
MHZ_TO_KHZ
(
20
))
bw_flags
|=
IEEE80211_CHAN_NO_20MHZ
;
if
(
max_bandwidth_khz
<
MHZ_TO_KHZ
(
40
))
bw_flags
|
=
IEEE80211_CHAN_NO_HT40
;
bw_flags
=
IEEE80211_CHAN_NO_HT40
;
if
(
max_bandwidth_khz
<
MHZ_TO_KHZ
(
80
))
bw_flags
|=
IEEE80211_CHAN_NO_80MHZ
;
if
(
max_bandwidth_khz
<
MHZ_TO_KHZ
(
160
))
...
...
@@ -1522,12 +1518,8 @@ static void handle_channel_custom(struct wiphy *wiphy,
if
(
reg_rule
->
flags
&
NL80211_RRF_AUTO_BW
)
max_bandwidth_khz
=
reg_get_max_bandwidth
(
regd
,
reg_rule
);
if
(
max_bandwidth_khz
<
MHZ_TO_KHZ
(
10
))
bw_flags
=
IEEE80211_CHAN_NO_10MHZ
;
if
(
max_bandwidth_khz
<
MHZ_TO_KHZ
(
20
))
bw_flags
|=
IEEE80211_CHAN_NO_20MHZ
;
if
(
max_bandwidth_khz
<
MHZ_TO_KHZ
(
40
))
bw_flags
|
=
IEEE80211_CHAN_NO_HT40
;
bw_flags
=
IEEE80211_CHAN_NO_HT40
;
if
(
max_bandwidth_khz
<
MHZ_TO_KHZ
(
80
))
bw_flags
|=
IEEE80211_CHAN_NO_80MHZ
;
if
(
max_bandwidth_khz
<
MHZ_TO_KHZ
(
160
))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录