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
nexedi
linux
Commits
12307e42
Commit
12307e42
authored
Jun 25, 2014
by
John W. Linville
Browse files
Options
Browse Files
Download
Plain Diff
Merge
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
parents
616a8394
02df00eb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
24 deletions
+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
No files found.
net/mac80211/util.c
View file @
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
View file @
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
View file @
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
);
}
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
View file @
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
))
...
...
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