cfg80211: unblock user hint when cfg80211_regdom is intersected
If the driver is loaded when cfg80211_regdom is intersected then user hint will fail for the first time since cfg80211 does not have a check to see if cfg80211_regdom is intersected. Add a check to see if cf80211_regdom is intersected and allow the user hint to be processed. Change-Id: Iba9cdd32470e29d35d3bb35012eb404b7c78d601 CRs-Fixed: 639538 Signed-off-by: Mihir Shete <smihir@codeaurora.org>
This commit is contained in:
parent
90609828ec
commit
3d5422c873
1 changed files with 13 additions and 3 deletions
|
@ -425,6 +425,11 @@ static bool is_user_regdom_saved(void)
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool is_cfg80211_regdom_intersected(void)
|
||||
{
|
||||
return is_intersected_alpha2(get_cfg80211_regdom()->alpha2);
|
||||
}
|
||||
|
||||
static const struct ieee80211_regdomain *
|
||||
reg_copy_regd(const struct ieee80211_regdomain *src_regd)
|
||||
{
|
||||
|
@ -1977,9 +1982,14 @@ __reg_process_hint_user(struct regulatory_request *user_request)
|
|||
*/
|
||||
if ((lr->initiator == NL80211_REGDOM_SET_BY_CORE ||
|
||||
lr->initiator == NL80211_REGDOM_SET_BY_DRIVER ||
|
||||
lr->initiator == NL80211_REGDOM_SET_BY_USER) &&
|
||||
regdom_changes(lr->alpha2))
|
||||
return REG_REQ_IGNORE;
|
||||
lr->initiator == NL80211_REGDOM_SET_BY_USER)) {
|
||||
if (lr->intersect) {
|
||||
if (!is_cfg80211_regdom_intersected())
|
||||
return REG_REQ_IGNORE;
|
||||
} else if (regdom_changes(lr->alpha2)) {
|
||||
return REG_REQ_IGNORE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!regdom_changes(user_request->alpha2))
|
||||
return REG_REQ_ALREADY_SET;
|
||||
|
|
Loading…
Add table
Reference in a new issue