wlan:Set reg treament as per reg domain change.

Currently when last reg request initiator is user
and current reg request initiator is driver,kernel
gives reg request treatment as REG_REQ_INTERSECT,even
if the country is same for both previous and currennt
request.As a part of fix,made changes such that if
country is same,treatement would be REG_REQ_ALREADY_SET.

Change-Id: I564550df0aeb6214975c6bf3688fdbd6c5fa239c
CRs-Fixed: 767046
Signed-off-by: Kaushik, Sushant <skaushik@codeaurora.org>
This commit is contained in:
Kaushik, Sushant 2014-12-05 15:52:56 +05:30 committed by Gerrit - the friendly Code Review server
parent 29561e63d1
commit 240102fb0f

View file

@ -1384,22 +1384,13 @@ get_reg_request_treatment(struct wiphy *wiphy,
}
return 0;
case NL80211_REGDOM_SET_BY_DRIVER:
if (lr->initiator == NL80211_REGDOM_SET_BY_CORE) {
if (regdom_changes(pending_request->alpha2))
return REG_REQ_OK;
return REG_REQ_ALREADY_SET;
}
/*
* This would happen if you unplug and plug your card
* back in or if you add a new device for which the previously
* loaded card also agrees on the regulatory domain.
*/
if (lr->initiator == NL80211_REGDOM_SET_BY_DRIVER &&
!regdom_changes(pending_request->alpha2))
if (!regdom_changes(pending_request->alpha2))
return REG_REQ_ALREADY_SET;
return REG_REQ_INTERSECT;
if (lr->initiator == NL80211_REGDOM_SET_BY_USER)
return REG_REQ_INTERSECT;
else
return REG_REQ_OK;
case NL80211_REGDOM_SET_BY_USER:
if (reg_request_cell_base(pending_request))
return reg_ignore_cell_hint(pending_request);