mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-10 04:42:22 -05:00
qcacld-3.0: Keep source of driver hint also
Maintain source of driver as well as 11d hint. Use the source of hint to correctly disable 11d if required. CRs-Fixed: 1093565 Change-Id: Id0ccc44389836b72466b501f5ce024f1be4b5926
This commit is contained in:
parent
dc400d2572
commit
6edf9733ec
6 changed files with 34 additions and 22 deletions
|
|
@ -283,6 +283,7 @@ struct channel_power {
|
|||
* @SOURCE_11D: source 11D
|
||||
*/
|
||||
enum country_src {
|
||||
SOURCE_UNKNOWN,
|
||||
SOURCE_QUERY,
|
||||
SOURCE_CORE,
|
||||
SOURCE_DRIVER,
|
||||
|
|
|
|||
|
|
@ -672,9 +672,10 @@ void hdd_reg_notifier(struct wiphy *wiphy,
|
|||
hdd_ctx->reg.cc_src = SOURCE_CORE;
|
||||
if (is_wiphy_custom_regulatory(wiphy))
|
||||
reset = true;
|
||||
} else if (NL80211_REGDOM_SET_BY_DRIVER == request->initiator)
|
||||
} else if (NL80211_REGDOM_SET_BY_DRIVER == request->initiator) {
|
||||
hdd_ctx->reg.cc_src = SOURCE_DRIVER;
|
||||
else {
|
||||
sme_set_cc_src(hdd_ctx->hHal, SOURCE_DRIVER);
|
||||
} else {
|
||||
hdd_ctx->reg.cc_src = SOURCE_USERSPACE;
|
||||
hdd_restore_custom_reg_settings(wiphy,
|
||||
request->alpha2,
|
||||
|
|
|
|||
|
|
@ -966,8 +966,8 @@ typedef struct sAniSirGlobal {
|
|||
enum auth_tx_ack_status auth_ack_status;
|
||||
uint8_t user_configured_nss;
|
||||
bool sta_prefer_80MHz_over_160MHz;
|
||||
bool is_11d_hint;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
enum country_src reg_hint_src;
|
||||
} tAniSirGlobal;
|
||||
|
||||
typedef enum {
|
||||
|
|
|
|||
|
|
@ -1363,4 +1363,5 @@ QDF_STATUS sme_power_debug_stats_req(tHalHandle hal, void (*callback_fn)
|
|||
(struct power_stats_response *response,
|
||||
void *context), void *power_stats_context);
|
||||
#endif
|
||||
void sme_set_cc_src(tHalHandle hal_handle, enum country_src);
|
||||
#endif /* #if !defined( __SME_API_H ) */
|
||||
|
|
|
|||
|
|
@ -7675,6 +7675,12 @@ QDF_STATUS sme_get_cfg_valid_channels(tHalHandle hHal, uint8_t *aValidChannels,
|
|||
return status;
|
||||
}
|
||||
|
||||
void sme_set_cc_src(tHalHandle hHal, enum country_src cc_src)
|
||||
{
|
||||
tpAniSirGlobal mac_ctx = PMAC_STRUCT(hHal);
|
||||
|
||||
mac_ctx->reg_hint_src = cc_src;
|
||||
}
|
||||
/* ---------------------------------------------------------------------------
|
||||
|
||||
\fn sme_handle_change_country_code
|
||||
|
|
@ -7830,23 +7836,25 @@ sme_handle_generic_change_country_code(tpAniSirGlobal mac_ctx,
|
|||
|
||||
sms_log(mac_ctx, LOG1, FL(" called"));
|
||||
|
||||
if (!mac_ctx->is_11d_hint) {
|
||||
if (user_ctry_priority)
|
||||
mac_ctx->roam.configParam.Is11dSupportEnabled = false;
|
||||
else {
|
||||
if (mac_ctx->roam.configParam.Is11dSupportEnabled &&
|
||||
mac_ctx->scan.countryCode11d[0] != 0) {
|
||||
if (SOURCE_11D != mac_ctx->reg_hint_src) {
|
||||
if (SOURCE_DRIVER != mac_ctx->reg_hint_src) {
|
||||
if (user_ctry_priority)
|
||||
mac_ctx->roam.configParam.Is11dSupportEnabled =
|
||||
false;
|
||||
else {
|
||||
if (mac_ctx->roam.configParam.Is11dSupportEnabled &&
|
||||
mac_ctx->scan.countryCode11d[0] != 0) {
|
||||
|
||||
sms_log(mac_ctx, LOGW,
|
||||
FL("restore 11d"));
|
||||
sms_log(mac_ctx, LOGW,
|
||||
FL("restore 11d"));
|
||||
|
||||
status = csr_get_regulatory_domain_for_country(
|
||||
mac_ctx,
|
||||
mac_ctx->scan.countryCode11d,
|
||||
®_domain_id,
|
||||
SOURCE_11D);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
status = csr_get_regulatory_domain_for_country(
|
||||
mac_ctx,
|
||||
mac_ctx->scan.countryCode11d,
|
||||
®_domain_id,
|
||||
SOURCE_11D);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
@ -7858,7 +7866,6 @@ sme_handle_generic_change_country_code(tpAniSirGlobal mac_ctx,
|
|||
qdf_mem_copy(mac_ctx->scan.countryCode11d,
|
||||
msg->countryCode,
|
||||
WNI_CFG_COUNTRY_CODE_LEN);
|
||||
mac_ctx->is_11d_hint = false;
|
||||
}
|
||||
|
||||
qdf_mem_copy(mac_ctx->scan.countryCodeCurrent,
|
||||
|
|
@ -7883,6 +7890,8 @@ sme_handle_generic_change_country_code(tpAniSirGlobal mac_ctx,
|
|||
*/
|
||||
mac_ctx->scan.curScanType = eSIR_ACTIVE_SCAN;
|
||||
|
||||
mac_ctx->reg_hint_src = SOURCE_UNKNOWN;
|
||||
|
||||
sme_disconnect_connected_sessions(mac_ctx);
|
||||
|
||||
sms_log(mac_ctx, LOG1, FL(" returned"));
|
||||
|
|
|
|||
|
|
@ -3713,7 +3713,7 @@ bool csr_learn_11dcountry_information(tpAniSirGlobal pMac,
|
|||
goto free_ie;
|
||||
}
|
||||
|
||||
pMac->is_11d_hint = true;
|
||||
pMac->reg_hint_src = SOURCE_11D;
|
||||
status = csr_get_regulatory_domain_for_country(pMac,
|
||||
pCountryCodeSelected, &domainId, SOURCE_11D);
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue