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
Kirill Smelkov
linux
Commits
d5aedd7e
Commit
d5aedd7e
authored
Nov 25, 2013
by
John W. Linville
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-john' of
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
parents
517543fd
24d47300
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
101 additions
and
63 deletions
+101
-63
drivers/net/wireless/mac80211_hwsim.c
drivers/net/wireless/mac80211_hwsim.c
+12
-4
net/mac80211/cfg.c
net/mac80211/cfg.c
+11
-4
net/mac80211/ieee80211_i.h
net/mac80211/ieee80211_i.h
+1
-0
net/mac80211/iface.c
net/mac80211/iface.c
+0
-1
net/mac80211/main.c
net/mac80211/main.c
+3
-0
net/mac80211/mesh.c
net/mac80211/mesh.c
+12
-8
net/mac80211/mlme.c
net/mac80211/mlme.c
+2
-0
net/mac80211/rc80211_minstrel_ht.c
net/mac80211/rc80211_minstrel_ht.c
+4
-3
net/mac80211/rx.c
net/mac80211/rx.c
+2
-1
net/mac80211/scan.c
net/mac80211/scan.c
+1
-1
net/mac80211/spectmgmt.c
net/mac80211/spectmgmt.c
+2
-0
net/mac80211/util.c
net/mac80211/util.c
+2
-9
net/wireless/core.c
net/wireless/core.c
+3
-0
net/wireless/ibss.c
net/wireless/ibss.c
+9
-9
net/wireless/nl80211.c
net/wireless/nl80211.c
+37
-23
No files found.
drivers/net/wireless/mac80211_hwsim.c
View file @
d5aedd7e
...
@@ -383,6 +383,14 @@ struct hwsim_radiotap_hdr {
...
@@ -383,6 +383,14 @@ struct hwsim_radiotap_hdr {
__le16
rt_chbitmask
;
__le16
rt_chbitmask
;
}
__packed
;
}
__packed
;
struct
hwsim_radiotap_ack_hdr
{
struct
ieee80211_radiotap_header
hdr
;
u8
rt_flags
;
u8
pad
;
__le16
rt_channel
;
__le16
rt_chbitmask
;
}
__packed
;
/* MAC80211_HWSIM netlinf family */
/* MAC80211_HWSIM netlinf family */
static
struct
genl_family
hwsim_genl_family
=
{
static
struct
genl_family
hwsim_genl_family
=
{
.
id
=
GENL_ID_GENERATE
,
.
id
=
GENL_ID_GENERATE
,
...
@@ -500,7 +508,7 @@ static void mac80211_hwsim_monitor_ack(struct ieee80211_channel *chan,
...
@@ -500,7 +508,7 @@ static void mac80211_hwsim_monitor_ack(struct ieee80211_channel *chan,
const
u8
*
addr
)
const
u8
*
addr
)
{
{
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
struct
hwsim_radiotap_hdr
*
hdr
;
struct
hwsim_radiotap_
ack_
hdr
*
hdr
;
u16
flags
;
u16
flags
;
struct
ieee80211_hdr
*
hdr11
;
struct
ieee80211_hdr
*
hdr11
;
...
@@ -511,14 +519,14 @@ static void mac80211_hwsim_monitor_ack(struct ieee80211_channel *chan,
...
@@ -511,14 +519,14 @@ static void mac80211_hwsim_monitor_ack(struct ieee80211_channel *chan,
if
(
skb
==
NULL
)
if
(
skb
==
NULL
)
return
;
return
;
hdr
=
(
struct
hwsim_radiotap_hdr
*
)
skb_put
(
skb
,
sizeof
(
*
hdr
));
hdr
=
(
struct
hwsim_radiotap_
ack_
hdr
*
)
skb_put
(
skb
,
sizeof
(
*
hdr
));
hdr
->
hdr
.
it_version
=
PKTHDR_RADIOTAP_VERSION
;
hdr
->
hdr
.
it_version
=
PKTHDR_RADIOTAP_VERSION
;
hdr
->
hdr
.
it_pad
=
0
;
hdr
->
hdr
.
it_pad
=
0
;
hdr
->
hdr
.
it_len
=
cpu_to_le16
(
sizeof
(
*
hdr
));
hdr
->
hdr
.
it_len
=
cpu_to_le16
(
sizeof
(
*
hdr
));
hdr
->
hdr
.
it_present
=
cpu_to_le32
((
1
<<
IEEE80211_RADIOTAP_FLAGS
)
|
hdr
->
hdr
.
it_present
=
cpu_to_le32
((
1
<<
IEEE80211_RADIOTAP_FLAGS
)
|
(
1
<<
IEEE80211_RADIOTAP_CHANNEL
));
(
1
<<
IEEE80211_RADIOTAP_CHANNEL
));
hdr
->
rt_flags
=
0
;
hdr
->
rt_flags
=
0
;
hdr
->
rt_rate
=
0
;
hdr
->
pad
=
0
;
hdr
->
rt_channel
=
cpu_to_le16
(
chan
->
center_freq
);
hdr
->
rt_channel
=
cpu_to_le16
(
chan
->
center_freq
);
flags
=
IEEE80211_CHAN_2GHZ
;
flags
=
IEEE80211_CHAN_2GHZ
;
hdr
->
rt_chbitmask
=
cpu_to_le16
(
flags
);
hdr
->
rt_chbitmask
=
cpu_to_le16
(
flags
);
...
@@ -1230,7 +1238,7 @@ static void mac80211_hwsim_bss_info_changed(struct ieee80211_hw *hw,
...
@@ -1230,7 +1238,7 @@ static void mac80211_hwsim_bss_info_changed(struct ieee80211_hw *hw,
HRTIMER_MODE_REL
);
HRTIMER_MODE_REL
);
}
else
if
(
!
info
->
enable_beacon
)
{
}
else
if
(
!
info
->
enable_beacon
)
{
unsigned
int
count
=
0
;
unsigned
int
count
=
0
;
ieee80211_iterate_active_interfaces
(
ieee80211_iterate_active_interfaces
_atomic
(
data
->
hw
,
IEEE80211_IFACE_ITER_NORMAL
,
data
->
hw
,
IEEE80211_IFACE_ITER_NORMAL
,
mac80211_hwsim_bcn_en_iter
,
&
count
);
mac80211_hwsim_bcn_en_iter
,
&
count
);
wiphy_debug
(
hw
->
wiphy
,
" beaconing vifs remaining: %u"
,
wiphy_debug
(
hw
->
wiphy
,
" beaconing vifs remaining: %u"
,
...
...
net/mac80211/cfg.c
View file @
d5aedd7e
...
@@ -1368,7 +1368,7 @@ static int sta_apply_parameters(struct ieee80211_local *local,
...
@@ -1368,7 +1368,7 @@ static int sta_apply_parameters(struct ieee80211_local *local,
changed
|=
changed
|=
ieee80211_mps_set_sta_local_pm
(
sta
,
ieee80211_mps_set_sta_local_pm
(
sta
,
params
->
local_pm
);
params
->
local_pm
);
ieee80211_bss_info_change_notify
(
sdata
,
changed
);
ieee80211_
m
bss_info_change_notify
(
sdata
,
changed
);
#endif
#endif
}
}
...
@@ -2488,8 +2488,7 @@ static int ieee80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev,
...
@@ -2488,8 +2488,7 @@ static int ieee80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev,
struct
ieee80211_sub_if_data
*
sdata
=
IEEE80211_DEV_TO_SUB_IF
(
dev
);
struct
ieee80211_sub_if_data
*
sdata
=
IEEE80211_DEV_TO_SUB_IF
(
dev
);
struct
ieee80211_local
*
local
=
wdev_priv
(
dev
->
ieee80211_ptr
);
struct
ieee80211_local
*
local
=
wdev_priv
(
dev
->
ieee80211_ptr
);
if
(
sdata
->
vif
.
type
!=
NL80211_IFTYPE_STATION
&&
if
(
sdata
->
vif
.
type
!=
NL80211_IFTYPE_STATION
)
sdata
->
vif
.
type
!=
NL80211_IFTYPE_MESH_POINT
)
return
-
EOPNOTSUPP
;
return
-
EOPNOTSUPP
;
if
(
!
(
local
->
hw
.
flags
&
IEEE80211_HW_SUPPORTS_PS
))
if
(
!
(
local
->
hw
.
flags
&
IEEE80211_HW_SUPPORTS_PS
))
...
@@ -3120,9 +3119,17 @@ static int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
...
@@ -3120,9 +3119,17 @@ static int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
params
->
chandef
.
chan
->
band
)
params
->
chandef
.
chan
->
band
)
return
-
EINVAL
;
return
-
EINVAL
;
ifmsh
->
chsw_init
=
true
;
if
(
!
ifmsh
->
pre_value
)
ifmsh
->
pre_value
=
1
;
else
ifmsh
->
pre_value
++
;
err
=
ieee80211_mesh_csa_beacon
(
sdata
,
params
,
true
);
err
=
ieee80211_mesh_csa_beacon
(
sdata
,
params
,
true
);
if
(
err
<
0
)
if
(
err
<
0
)
{
ifmsh
->
chsw_init
=
false
;
return
err
;
return
err
;
}
break
;
break
;
#endif
#endif
default:
default:
...
...
net/mac80211/ieee80211_i.h
View file @
d5aedd7e
...
@@ -1228,6 +1228,7 @@ struct ieee80211_csa_ie {
...
@@ -1228,6 +1228,7 @@ struct ieee80211_csa_ie {
u8
mode
;
u8
mode
;
u8
count
;
u8
count
;
u8
ttl
;
u8
ttl
;
u16
pre_value
;
};
};
/* Parsed Information Elements */
/* Parsed Information Elements */
...
...
net/mac80211/iface.c
View file @
d5aedd7e
...
@@ -1325,7 +1325,6 @@ static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata,
...
@@ -1325,7 +1325,6 @@ static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata,
sdata
->
vif
.
bss_conf
.
bssid
=
NULL
;
sdata
->
vif
.
bss_conf
.
bssid
=
NULL
;
break
;
break
;
case
NL80211_IFTYPE_AP_VLAN
:
case
NL80211_IFTYPE_AP_VLAN
:
break
;
case
NL80211_IFTYPE_P2P_DEVICE
:
case
NL80211_IFTYPE_P2P_DEVICE
:
sdata
->
vif
.
bss_conf
.
bssid
=
sdata
->
vif
.
addr
;
sdata
->
vif
.
bss_conf
.
bssid
=
sdata
->
vif
.
addr
;
break
;
break
;
...
...
net/mac80211/main.c
View file @
d5aedd7e
...
@@ -940,6 +940,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
...
@@ -940,6 +940,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
wiphy_debug
(
local
->
hw
.
wiphy
,
"Failed to initialize wep: %d
\n
"
,
wiphy_debug
(
local
->
hw
.
wiphy
,
"Failed to initialize wep: %d
\n
"
,
result
);
result
);
local
->
hw
.
conf
.
flags
=
IEEE80211_CONF_IDLE
;
ieee80211_led_init
(
local
);
ieee80211_led_init
(
local
);
rtnl_lock
();
rtnl_lock
();
...
@@ -1047,6 +1049,7 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw)
...
@@ -1047,6 +1049,7 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw)
cancel_work_sync
(
&
local
->
restart_work
);
cancel_work_sync
(
&
local
->
restart_work
);
cancel_work_sync
(
&
local
->
reconfig_filter
);
cancel_work_sync
(
&
local
->
reconfig_filter
);
flush_work
(
&
local
->
sched_scan_stopped_work
);
ieee80211_clear_tx_pending
(
local
);
ieee80211_clear_tx_pending
(
local
);
rate_control_deinitialize
(
local
);
rate_control_deinitialize
(
local
);
...
...
net/mac80211/mesh.c
View file @
d5aedd7e
...
@@ -943,14 +943,19 @@ ieee80211_mesh_process_chnswitch(struct ieee80211_sub_if_data *sdata,
...
@@ -943,14 +943,19 @@ ieee80211_mesh_process_chnswitch(struct ieee80211_sub_if_data *sdata,
params
.
chandef
.
chan
->
center_freq
);
params
.
chandef
.
chan
->
center_freq
);
params
.
block_tx
=
csa_ie
.
mode
&
WLAN_EID_CHAN_SWITCH_PARAM_TX_RESTRICT
;
params
.
block_tx
=
csa_ie
.
mode
&
WLAN_EID_CHAN_SWITCH_PARAM_TX_RESTRICT
;
if
(
beacon
)
if
(
beacon
)
{
ifmsh
->
chsw_ttl
=
csa_ie
.
ttl
-
1
;
ifmsh
->
chsw_ttl
=
csa_ie
.
ttl
-
1
;
else
if
(
ifmsh
->
pre_value
>=
csa_ie
.
pre_value
)
ifmsh
->
chsw_ttl
=
0
;
return
false
;
ifmsh
->
pre_value
=
csa_ie
.
pre_value
;
}
if
(
ifmsh
->
chsw_ttl
>
0
)
if
(
ifmsh
->
chsw_ttl
<
ifmsh
->
mshcfg
.
dot11MeshTTL
)
{
if
(
ieee80211_mesh_csa_beacon
(
sdata
,
&
params
,
false
)
<
0
)
if
(
ieee80211_mesh_csa_beacon
(
sdata
,
&
params
,
false
)
<
0
)
return
false
;
return
false
;
}
else
{
return
false
;
}
sdata
->
csa_radar_required
=
params
.
radar_required
;
sdata
->
csa_radar_required
=
params
.
radar_required
;
...
@@ -1163,7 +1168,6 @@ static int mesh_fwd_csa_frame(struct ieee80211_sub_if_data *sdata,
...
@@ -1163,7 +1168,6 @@ static int mesh_fwd_csa_frame(struct ieee80211_sub_if_data *sdata,
offset_ttl
=
(
len
<
42
)
?
7
:
10
;
offset_ttl
=
(
len
<
42
)
?
7
:
10
;
*
(
pos
+
offset_ttl
)
-=
1
;
*
(
pos
+
offset_ttl
)
-=
1
;
*
(
pos
+
offset_ttl
+
1
)
&=
~
WLAN_EID_CHAN_SWITCH_PARAM_INITIATOR
;
*
(
pos
+
offset_ttl
+
1
)
&=
~
WLAN_EID_CHAN_SWITCH_PARAM_INITIATOR
;
sdata
->
u
.
mesh
.
chsw_ttl
=
*
(
pos
+
offset_ttl
);
memcpy
(
mgmt_fwd
,
mgmt
,
len
);
memcpy
(
mgmt_fwd
,
mgmt
,
len
);
eth_broadcast_addr
(
mgmt_fwd
->
da
);
eth_broadcast_addr
(
mgmt_fwd
->
da
);
...
@@ -1182,7 +1186,7 @@ static void mesh_rx_csa_frame(struct ieee80211_sub_if_data *sdata,
...
@@ -1182,7 +1186,7 @@ static void mesh_rx_csa_frame(struct ieee80211_sub_if_data *sdata,
u16
pre_value
;
u16
pre_value
;
bool
fwd_csa
=
true
;
bool
fwd_csa
=
true
;
size_t
baselen
;
size_t
baselen
;
u8
*
pos
,
ttl
;
u8
*
pos
;
if
(
mgmt
->
u
.
action
.
u
.
measurement
.
action_code
!=
if
(
mgmt
->
u
.
action
.
u
.
measurement
.
action_code
!=
WLAN_ACTION_SPCT_CHL_SWITCH
)
WLAN_ACTION_SPCT_CHL_SWITCH
)
...
@@ -1193,8 +1197,8 @@ static void mesh_rx_csa_frame(struct ieee80211_sub_if_data *sdata,
...
@@ -1193,8 +1197,8 @@ static void mesh_rx_csa_frame(struct ieee80211_sub_if_data *sdata,
u
.
action
.
u
.
chan_switch
.
variable
);
u
.
action
.
u
.
chan_switch
.
variable
);
ieee802_11_parse_elems
(
pos
,
len
-
baselen
,
false
,
&
elems
);
ieee802_11_parse_elems
(
pos
,
len
-
baselen
,
false
,
&
elems
);
ttl
=
elems
.
mesh_chansw_params_ie
->
mesh_ttl
;
ifmsh
->
chsw_
ttl
=
elems
.
mesh_chansw_params_ie
->
mesh_ttl
;
if
(
!--
ttl
)
if
(
!--
ifmsh
->
chsw_
ttl
)
fwd_csa
=
false
;
fwd_csa
=
false
;
pre_value
=
le16_to_cpu
(
elems
.
mesh_chansw_params_ie
->
mesh_pre_value
);
pre_value
=
le16_to_cpu
(
elems
.
mesh_chansw_params_ie
->
mesh_pre_value
);
...
...
net/mac80211/mlme.c
View file @
d5aedd7e
...
@@ -1910,6 +1910,8 @@ static void ieee80211_mgd_probe_ap(struct ieee80211_sub_if_data *sdata,
...
@@ -1910,6 +1910,8 @@ static void ieee80211_mgd_probe_ap(struct ieee80211_sub_if_data *sdata,
if
(
ifmgd
->
flags
&
IEEE80211_STA_CONNECTION_POLL
)
if
(
ifmgd
->
flags
&
IEEE80211_STA_CONNECTION_POLL
)
already
=
true
;
already
=
true
;
ifmgd
->
flags
|=
IEEE80211_STA_CONNECTION_POLL
;
mutex_unlock
(
&
sdata
->
local
->
mtx
);
mutex_unlock
(
&
sdata
->
local
->
mtx
);
if
(
already
)
if
(
already
)
...
...
net/mac80211/rc80211_minstrel_ht.c
View file @
d5aedd7e
...
@@ -226,7 +226,7 @@ minstrel_ht_calc_tp(struct minstrel_ht_sta *mi, int group, int rate)
...
@@ -226,7 +226,7 @@ minstrel_ht_calc_tp(struct minstrel_ht_sta *mi, int group, int rate)
nsecs
=
1000
*
mi
->
overhead
/
MINSTREL_TRUNC
(
mi
->
avg_ampdu_len
);
nsecs
=
1000
*
mi
->
overhead
/
MINSTREL_TRUNC
(
mi
->
avg_ampdu_len
);
nsecs
+=
minstrel_mcs_groups
[
group
].
duration
[
rate
];
nsecs
+=
minstrel_mcs_groups
[
group
].
duration
[
rate
];
tp
=
1000000
*
((
mr
->
probability
*
1000
)
/
nsecs
);
tp
=
1000000
*
((
prob
*
1000
)
/
nsecs
);
mr
->
cur_tp
=
MINSTREL_TRUNC
(
tp
);
mr
->
cur_tp
=
MINSTREL_TRUNC
(
tp
);
}
}
...
@@ -277,13 +277,15 @@ minstrel_ht_update_stats(struct minstrel_priv *mp, struct minstrel_ht_sta *mi)
...
@@ -277,13 +277,15 @@ minstrel_ht_update_stats(struct minstrel_priv *mp, struct minstrel_ht_sta *mi)
if
(
!
(
mg
->
supported
&
BIT
(
i
)))
if
(
!
(
mg
->
supported
&
BIT
(
i
)))
continue
;
continue
;
index
=
MCS_GROUP_RATES
*
group
+
i
;
/* initialize rates selections starting indexes */
/* initialize rates selections starting indexes */
if
(
!
mg_rates_valid
)
{
if
(
!
mg_rates_valid
)
{
mg
->
max_tp_rate
=
mg
->
max_tp_rate2
=
mg
->
max_tp_rate
=
mg
->
max_tp_rate2
=
mg
->
max_prob_rate
=
i
;
mg
->
max_prob_rate
=
i
;
if
(
!
mi_rates_valid
)
{
if
(
!
mi_rates_valid
)
{
mi
->
max_tp_rate
=
mi
->
max_tp_rate2
=
mi
->
max_tp_rate
=
mi
->
max_tp_rate2
=
mi
->
max_prob_rate
=
i
;
mi
->
max_prob_rate
=
i
ndex
;
mi_rates_valid
=
true
;
mi_rates_valid
=
true
;
}
}
mg_rates_valid
=
true
;
mg_rates_valid
=
true
;
...
@@ -291,7 +293,6 @@ minstrel_ht_update_stats(struct minstrel_priv *mp, struct minstrel_ht_sta *mi)
...
@@ -291,7 +293,6 @@ minstrel_ht_update_stats(struct minstrel_priv *mp, struct minstrel_ht_sta *mi)
mr
=
&
mg
->
rates
[
i
];
mr
=
&
mg
->
rates
[
i
];
mr
->
retry_updated
=
false
;
mr
->
retry_updated
=
false
;
index
=
MCS_GROUP_RATES
*
group
+
i
;
minstrel_calc_rate_ewma
(
mr
);
minstrel_calc_rate_ewma
(
mr
);
minstrel_ht_calc_tp
(
mi
,
group
,
i
);
minstrel_ht_calc_tp
(
mi
,
group
,
i
);
...
...
net/mac80211/rx.c
View file @
d5aedd7e
...
@@ -911,7 +911,8 @@ static void ieee80211_rx_reorder_ampdu(struct ieee80211_rx_data *rx,
...
@@ -911,7 +911,8 @@ static void ieee80211_rx_reorder_ampdu(struct ieee80211_rx_data *rx,
u16
sc
;
u16
sc
;
u8
tid
,
ack_policy
;
u8
tid
,
ack_policy
;
if
(
!
ieee80211_is_data_qos
(
hdr
->
frame_control
))
if
(
!
ieee80211_is_data_qos
(
hdr
->
frame_control
)
||
is_multicast_ether_addr
(
hdr
->
addr1
))
goto
dont_reorder
;
goto
dont_reorder
;
/*
/*
...
...
net/mac80211/scan.c
View file @
d5aedd7e
...
@@ -1088,6 +1088,6 @@ void ieee80211_sched_scan_stopped(struct ieee80211_hw *hw)
...
@@ -1088,6 +1088,6 @@ void ieee80211_sched_scan_stopped(struct ieee80211_hw *hw)
trace_api_sched_scan_stopped
(
local
);
trace_api_sched_scan_stopped
(
local
);
ieee80211_queue_work
(
&
local
->
hw
,
&
local
->
sched_scan_stopped_work
);
schedule_work
(
&
local
->
sched_scan_stopped_work
);
}
}
EXPORT_SYMBOL
(
ieee80211_sched_scan_stopped
);
EXPORT_SYMBOL
(
ieee80211_sched_scan_stopped
);
net/mac80211/spectmgmt.c
View file @
d5aedd7e
...
@@ -78,6 +78,8 @@ int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata,
...
@@ -78,6 +78,8 @@ int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata,
if
(
elems
->
mesh_chansw_params_ie
)
{
if
(
elems
->
mesh_chansw_params_ie
)
{
csa_ie
->
ttl
=
elems
->
mesh_chansw_params_ie
->
mesh_ttl
;
csa_ie
->
ttl
=
elems
->
mesh_chansw_params_ie
->
mesh_ttl
;
csa_ie
->
mode
=
elems
->
mesh_chansw_params_ie
->
mesh_flags
;
csa_ie
->
mode
=
elems
->
mesh_chansw_params_ie
->
mesh_flags
;
csa_ie
->
pre_value
=
le16_to_cpu
(
elems
->
mesh_chansw_params_ie
->
mesh_pre_value
);
}
}
new_freq
=
ieee80211_channel_to_frequency
(
new_chan_no
,
new_band
);
new_freq
=
ieee80211_channel_to_frequency
(
new_chan_no
,
new_band
);
...
...
net/mac80211/util.c
View file @
d5aedd7e
...
@@ -2278,17 +2278,15 @@ void ieee80211_dfs_radar_detected_work(struct work_struct *work)
...
@@ -2278,17 +2278,15 @@ void ieee80211_dfs_radar_detected_work(struct work_struct *work)
{
{
struct
ieee80211_local
*
local
=
struct
ieee80211_local
*
local
=
container_of
(
work
,
struct
ieee80211_local
,
radar_detected_work
);
container_of
(
work
,
struct
ieee80211_local
,
radar_detected_work
);
struct
cfg80211_chan_def
chandef
;
struct
cfg80211_chan_def
chandef
=
local
->
hw
.
conf
.
chandef
;
ieee80211_dfs_cac_cancel
(
local
);
ieee80211_dfs_cac_cancel
(
local
);
if
(
local
->
use_chanctx
)
if
(
local
->
use_chanctx
)
/* currently not handled */
/* currently not handled */
WARN_ON
(
1
);
WARN_ON
(
1
);
else
{
else
chandef
=
local
->
hw
.
conf
.
chandef
;
cfg80211_radar_event
(
local
->
hw
.
wiphy
,
&
chandef
,
GFP_KERNEL
);
cfg80211_radar_event
(
local
->
hw
.
wiphy
,
&
chandef
,
GFP_KERNEL
);
}
}
}
void
ieee80211_radar_detected
(
struct
ieee80211_hw
*
hw
)
void
ieee80211_radar_detected
(
struct
ieee80211_hw
*
hw
)
...
@@ -2459,14 +2457,9 @@ int ieee80211_send_action_csa(struct ieee80211_sub_if_data *sdata,
...
@@ -2459,14 +2457,9 @@ int ieee80211_send_action_csa(struct ieee80211_sub_if_data *sdata,
WLAN_EID_CHAN_SWITCH_PARAM_TX_RESTRICT
:
0x00
;
WLAN_EID_CHAN_SWITCH_PARAM_TX_RESTRICT
:
0x00
;
put_unaligned_le16
(
WLAN_REASON_MESH_CHAN
,
pos
);
/* Reason Cd */
put_unaligned_le16
(
WLAN_REASON_MESH_CHAN
,
pos
);
/* Reason Cd */
pos
+=
2
;
pos
+=
2
;
if
(
!
ifmsh
->
pre_value
)
ifmsh
->
pre_value
=
1
;
else
ifmsh
->
pre_value
++
;
pre_value
=
cpu_to_le16
(
ifmsh
->
pre_value
);
pre_value
=
cpu_to_le16
(
ifmsh
->
pre_value
);
memcpy
(
pos
,
&
pre_value
,
2
);
/* Precedence Value */
memcpy
(
pos
,
&
pre_value
,
2
);
/* Precedence Value */
pos
+=
2
;
pos
+=
2
;
ifmsh
->
chsw_init
=
true
;
}
}
ieee80211_tx_skb
(
sdata
,
skb
);
ieee80211_tx_skb
(
sdata
,
skb
);
...
...
net/wireless/core.c
View file @
d5aedd7e
...
@@ -451,6 +451,9 @@ int wiphy_register(struct wiphy *wiphy)
...
@@ -451,6 +451,9 @@ int wiphy_register(struct wiphy *wiphy)
int
i
;
int
i
;
u16
ifmodes
=
wiphy
->
interface_modes
;
u16
ifmodes
=
wiphy
->
interface_modes
;
/* support for 5/10 MHz is broken due to nl80211 API mess - disable */
wiphy
->
flags
&=
~
WIPHY_FLAG_SUPPORTS_5_10_MHZ
;
#ifdef CONFIG_PM
#ifdef CONFIG_PM
if
(
WARN_ON
(
wiphy
->
wowlan
&&
if
(
WARN_ON
(
wiphy
->
wowlan
&&
(
wiphy
->
wowlan
->
flags
&
WIPHY_WOWLAN_GTK_REKEY_FAILURE
)
&&
(
wiphy
->
wowlan
->
flags
&
WIPHY_WOWLAN_GTK_REKEY_FAILURE
)
&&
...
...
net/wireless/ibss.c
View file @
d5aedd7e
...
@@ -262,7 +262,7 @@ int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev,
...
@@ -262,7 +262,7 @@ int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev,
/* try to find an IBSS channel if none requested ... */
/* try to find an IBSS channel if none requested ... */
if
(
!
wdev
->
wext
.
ibss
.
chandef
.
chan
)
{
if
(
!
wdev
->
wext
.
ibss
.
chandef
.
chan
)
{
wdev
->
wext
.
ibss
.
chandef
.
width
=
NL80211_CHAN_WIDTH_20_NOHT
;
struct
ieee80211_channel
*
new_chan
=
NULL
;
for
(
band
=
0
;
band
<
IEEE80211_NUM_BANDS
;
band
++
)
{
for
(
band
=
0
;
band
<
IEEE80211_NUM_BANDS
;
band
++
)
{
struct
ieee80211_supported_band
*
sband
;
struct
ieee80211_supported_band
*
sband
;
...
@@ -278,18 +278,19 @@ int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev,
...
@@ -278,18 +278,19 @@ int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev,
continue
;
continue
;
if
(
chan
->
flags
&
IEEE80211_CHAN_DISABLED
)
if
(
chan
->
flags
&
IEEE80211_CHAN_DISABLED
)
continue
;
continue
;
wdev
->
wext
.
ibss
.
chandef
.
chan
=
chan
;
new_chan
=
chan
;
wdev
->
wext
.
ibss
.
chandef
.
center_freq1
=
chan
->
center_freq
;
break
;
break
;
}
}
if
(
wdev
->
wext
.
ibss
.
chandef
.
chan
)
if
(
new_
chan
)
break
;
break
;
}
}
if
(
!
wdev
->
wext
.
ibss
.
chandef
.
chan
)
if
(
!
new_
chan
)
return
-
EINVAL
;
return
-
EINVAL
;
cfg80211_chandef_create
(
&
wdev
->
wext
.
ibss
.
chandef
,
new_chan
,
NL80211_CHAN_NO_HT
);
}
}
/* don't join -- SSID is not there */
/* don't join -- SSID is not there */
...
@@ -363,9 +364,8 @@ int cfg80211_ibss_wext_siwfreq(struct net_device *dev,
...
@@ -363,9 +364,8 @@ int cfg80211_ibss_wext_siwfreq(struct net_device *dev,
return
err
;
return
err
;
if
(
chan
)
{
if
(
chan
)
{
wdev
->
wext
.
ibss
.
chandef
.
chan
=
chan
;
cfg80211_chandef_create
(
&
wdev
->
wext
.
ibss
.
chandef
,
chan
,
wdev
->
wext
.
ibss
.
chandef
.
width
=
NL80211_CHAN_WIDTH_20_NOHT
;
NL80211_CHAN_NO_HT
);
wdev
->
wext
.
ibss
.
chandef
.
center_freq1
=
freq
;
wdev
->
wext
.
ibss
.
channel_fixed
=
true
;
wdev
->
wext
.
ibss
.
channel_fixed
=
true
;
}
else
{
}
else
{
/* cfg80211_ibss_wext_join will pick one if needed */
/* cfg80211_ibss_wext_join will pick one if needed */
...
...
net/wireless/nl80211.c
View file @
d5aedd7e
...
@@ -2687,7 +2687,7 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info)
...
@@ -2687,7 +2687,7 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info)
hdr
=
nl80211hdr_put
(
msg
,
info
->
snd_portid
,
info
->
snd_seq
,
0
,
hdr
=
nl80211hdr_put
(
msg
,
info
->
snd_portid
,
info
->
snd_seq
,
0
,
NL80211_CMD_NEW_KEY
);
NL80211_CMD_NEW_KEY
);
if
(
!
hdr
)
if
(
!
hdr
)
return
-
ENOBUFS
;
goto
nla_put_failure
;
cookie
.
msg
=
msg
;
cookie
.
msg
=
msg
;
cookie
.
idx
=
key_idx
;
cookie
.
idx
=
key_idx
;
...
@@ -5349,6 +5349,10 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info)
...
@@ -5349,6 +5349,10 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info)
err
=
-
EINVAL
;
err
=
-
EINVAL
;
goto
out_free
;
goto
out_free
;
}
}
if
(
!
wiphy
->
bands
[
band
])
continue
;
err
=
ieee80211_get_ratemask
(
wiphy
->
bands
[
band
],
err
=
ieee80211_get_ratemask
(
wiphy
->
bands
[
band
],
nla_data
(
attr
),
nla_data
(
attr
),
nla_len
(
attr
),
nla_len
(
attr
),
...
@@ -9633,8 +9637,9 @@ static int nl80211_add_scan_req(struct sk_buff *msg,
...
@@ -9633,8 +9637,9 @@ static int nl80211_add_scan_req(struct sk_buff *msg,
nla_put
(
msg
,
NL80211_ATTR_IE
,
req
->
ie_len
,
req
->
ie
))
nla_put
(
msg
,
NL80211_ATTR_IE
,
req
->
ie_len
,
req
->
ie
))
goto
nla_put_failure
;
goto
nla_put_failure
;
if
(
req
->
flags
)
if
(
req
->
flags
&&
nla_put_u32
(
msg
,
NL80211_ATTR_SCAN_FLAGS
,
req
->
flags
);
nla_put_u32
(
msg
,
NL80211_ATTR_SCAN_FLAGS
,
req
->
flags
))
goto
nla_put_failure
;
return
0
;
return
0
;
nla_put_failure:
nla_put_failure:
...
@@ -11093,6 +11098,8 @@ void cfg80211_report_wowlan_wakeup(struct wireless_dev *wdev,
...
@@ -11093,6 +11098,8 @@ void cfg80211_report_wowlan_wakeup(struct wireless_dev *wdev,
struct
nlattr
*
reasons
;
struct
nlattr
*
reasons
;
reasons
=
nla_nest_start
(
msg
,
NL80211_ATTR_WOWLAN_TRIGGERS
);
reasons
=
nla_nest_start
(
msg
,
NL80211_ATTR_WOWLAN_TRIGGERS
);
if
(
!
reasons
)
goto
free_msg
;
if
(
wakeup
->
disconnect
&&
if
(
wakeup
->
disconnect
&&
nla_put_flag
(
msg
,
NL80211_WOWLAN_TRIG_DISCONNECT
))
nla_put_flag
(
msg
,
NL80211_WOWLAN_TRIG_DISCONNECT
))
...
@@ -11118,16 +11125,18 @@ void cfg80211_report_wowlan_wakeup(struct wireless_dev *wdev,
...
@@ -11118,16 +11125,18 @@ void cfg80211_report_wowlan_wakeup(struct wireless_dev *wdev,
wakeup
->
pattern_idx
))
wakeup
->
pattern_idx
))
goto
free_msg
;
goto
free_msg
;
if
(
wakeup
->
tcp_match
)
if
(
wakeup
->
tcp_match
&&
nla_put_flag
(
msg
,
NL80211_WOWLAN_TRIG_WAKEUP_TCP_MATCH
);
nla_put_flag
(
msg
,
NL80211_WOWLAN_TRIG_WAKEUP_TCP_MATCH
))
goto
free_msg
;
if
(
wakeup
->
tcp_connlost
)
if
(
wakeup
->
tcp_connlost
&&
nla_put_flag
(
msg
,
nla_put_flag
(
msg
,
NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST
))
NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST
)
;
goto
free_msg
;
if
(
wakeup
->
tcp_nomoretokens
)
if
(
wakeup
->
tcp_nomoretokens
&&
nla_put_flag
(
msg
,
nla_put_flag
(
msg
,
NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS
);
NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS
))
goto
free_msg
;
if
(
wakeup
->
packet
)
{
if
(
wakeup
->
packet
)
{
u32
pkt_attr
=
NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211
;
u32
pkt_attr
=
NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211
;
...
@@ -11263,24 +11272,29 @@ void cfg80211_ft_event(struct net_device *netdev,
...
@@ -11263,24 +11272,29 @@ void cfg80211_ft_event(struct net_device *netdev,
return
;
return
;
hdr
=
nl80211hdr_put
(
msg
,
0
,
0
,
0
,
NL80211_CMD_FT_EVENT
);
hdr
=
nl80211hdr_put
(
msg
,
0
,
0
,
0
,
NL80211_CMD_FT_EVENT
);
if
(
!
hdr
)
{
if
(
!
hdr
)
nlmsg_free
(
msg
);
goto
out
;
return
;
}
nla_put_u32
(
msg
,
NL80211_ATTR_WIPHY
,
rdev
->
wiphy_idx
);
if
(
nla_put_u32
(
msg
,
NL80211_ATTR_WIPHY
,
rdev
->
wiphy_idx
)
||
nla_put_u32
(
msg
,
NL80211_ATTR_IFINDEX
,
netdev
->
ifindex
);
nla_put_u32
(
msg
,
NL80211_ATTR_IFINDEX
,
netdev
->
ifindex
)
||
nla_put
(
msg
,
NL80211_ATTR_MAC
,
ETH_ALEN
,
ft_event
->
target_ap
);
nla_put
(
msg
,
NL80211_ATTR_MAC
,
ETH_ALEN
,
ft_event
->
target_ap
))
if
(
ft_event
->
ies
)
goto
out
;
nla_put
(
msg
,
NL80211_ATTR_IE
,
ft_event
->
ies_len
,
ft_event
->
ies
);
if
(
ft_event
->
ric_ies
)
if
(
ft_event
->
ies
&&
nla_put
(
msg
,
NL80211_ATTR_IE
,
ft_event
->
ies_len
,
ft_event
->
ies
))
goto
out
;
if
(
ft_event
->
ric_ies
&&
nla_put
(
msg
,
NL80211_ATTR_IE_RIC
,
ft_event
->
ric_ies_len
,
nla_put
(
msg
,
NL80211_ATTR_IE_RIC
,
ft_event
->
ric_ies_len
,
ft_event
->
ric_ies
);
ft_event
->
ric_ies
))
goto
out
;
genlmsg_end
(
msg
,
hdr
);
genlmsg_end
(
msg
,
hdr
);
genlmsg_multicast_netns
(
&
nl80211_fam
,
wiphy_net
(
&
rdev
->
wiphy
),
msg
,
0
,
genlmsg_multicast_netns
(
&
nl80211_fam
,
wiphy_net
(
&
rdev
->
wiphy
),
msg
,
0
,
NL80211_MCGRP_MLME
,
GFP_KERNEL
);
NL80211_MCGRP_MLME
,
GFP_KERNEL
);
return
;
out:
nlmsg_free
(
msg
);
}
}
EXPORT_SYMBOL
(
cfg80211_ft_event
);
EXPORT_SYMBOL
(
cfg80211_ft_event
);
...
...
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