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
b95eddbb
Commit
b95eddbb
authored
Feb 28, 2014
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
5e038890
cb664981
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
1 deletion
+32
-1
net/mac80211/mlme.c
net/mac80211/mlme.c
+23
-0
net/wireless/reg.c
net/wireless/reg.c
+9
-1
No files found.
net/mac80211/mlme.c
View file @
b95eddbb
...
...
@@ -222,6 +222,7 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata,
switch
(
vht_oper
->
chan_width
)
{
case
IEEE80211_VHT_CHANWIDTH_USE_HT
:
vht_chandef
.
width
=
chandef
->
width
;
vht_chandef
.
center_freq1
=
chandef
->
center_freq1
;
break
;
case
IEEE80211_VHT_CHANWIDTH_80MHZ
:
vht_chandef
.
width
=
NL80211_CHAN_WIDTH_80
;
...
...
@@ -271,6 +272,28 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata,
ret
=
0
;
out:
/*
* When tracking the current AP, don't do any further checks if the
* new chandef is identical to the one we're currently using for the
* connection. This keeps us from playing ping-pong with regulatory,
* without it the following can happen (for example):
* - connect to an AP with 80 MHz, world regdom allows 80 MHz
* - AP advertises regdom US
* - CRDA loads regdom US with 80 MHz prohibited (old database)
* - the code below detects an unsupported channel, downgrades, and
* we disconnect from the AP in the caller
* - disconnect causes CRDA to reload world regdomain and the game
* starts anew.
* (see https://bugzilla.kernel.org/show_bug.cgi?id=70881)
*
* It seems possible that there are still scenarios with CSA or real
* bandwidth changes where a this could happen, but those cases are
* less common and wouldn't completely prevent using the AP.
*/
if
(
tracking
&&
cfg80211_chandef_identical
(
chandef
,
&
sdata
->
vif
.
bss_conf
.
chandef
))
return
ret
;
/* don't print the message below for VHT mismatch if VHT is disabled */
if
(
ret
&
IEEE80211_STA_DISABLE_VHT
)
vht_chandef
=
*
chandef
;
...
...
net/wireless/reg.c
View file @
b95eddbb
...
...
@@ -2373,6 +2373,7 @@ static int reg_set_rd_country_ie(const struct ieee80211_regdomain *rd,
int
set_regdom
(
const
struct
ieee80211_regdomain
*
rd
)
{
struct
regulatory_request
*
lr
;
bool
user_reset
=
false
;
int
r
;
if
(
!
reg_is_valid_request
(
rd
->
alpha2
))
{
...
...
@@ -2389,6 +2390,7 @@ int set_regdom(const struct ieee80211_regdomain *rd)
break
;
case
NL80211_REGDOM_SET_BY_USER
:
r
=
reg_set_rd_user
(
rd
,
lr
);
user_reset
=
true
;
break
;
case
NL80211_REGDOM_SET_BY_DRIVER
:
r
=
reg_set_rd_driver
(
rd
,
lr
);
...
...
@@ -2402,8 +2404,14 @@ int set_regdom(const struct ieee80211_regdomain *rd)
}
if
(
r
)
{
if
(
r
==
-
EALREADY
)
switch
(
r
)
{
case
-
EALREADY
:
reg_set_request_processed
();
break
;
default:
/* Back to world regulatory in case of errors */
restore_regulatory_settings
(
user_reset
);
}
kfree
(
rd
);
return
r
;
...
...
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