summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinay Gannevaram <quic_vganneva@quicinc.com>2019-09-04 16:36:25 +0530
committerJimmy Chen <jimmycmchen@google.com>2019-09-12 10:21:37 +0800
commit7f51da62839029839fc0c3d3a11306f95d1c4942 (patch)
tree1866aacdfcf5b0ba84a50a4f63ae06bbcdcd3768
parent2657180aee689f75f09fd3519a345f5e97c28c1c (diff)
downloadqcacld-7f51da62839029839fc0c3d3a11306f95d1c4942.tar.gz
qcacld-3.0: Mark SRD channels as passiveandroid-10.0.0_r0.28android-10.0.0_r0.26
Currently the driver does not mark the SRD channels as passive which leads to hostapd starting P2P-GO on a SRD channel, but since driver does not allow the same, P2P-GO fails. Fix is to inform the wiphy about the SRD channels by making them as passive so that the hostpad does not give the command to start the P2P-GO on the particular SRD channel. Change-Id: I5eaa457b8819d7a22d2e592d1b79fff15b364f40 CRs-Fixed: 2491045 Bug: 138939517 Signed-off-by: Vinay Gannevaram <quic_vganneva@quicinc.com>
-rw-r--r--core/hdd/src/wlan_hdd_main.c2
-rw-r--r--core/hdd/src/wlan_hdd_regulatory.c15
2 files changed, 11 insertions, 6 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 439bbe6c41..f40622db36 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -9897,8 +9897,6 @@ static int hdd_pre_enable_configure(hdd_context_t *hdd_ctx)
goto out;
}
- cds_fill_and_send_ctl_to_fw(&hdd_ctx->reg);
-
status = hdd_set_sme_chan_list(hdd_ctx);
if (status != QDF_STATUS_SUCCESS) {
hdd_err("Failed to init channel list: %d", status);
diff --git a/core/hdd/src/wlan_hdd_regulatory.c b/core/hdd/src/wlan_hdd_regulatory.c
index 8e3ac04961..59733fec8c 100644
--- a/core/hdd/src/wlan_hdd_regulatory.c
+++ b/core/hdd/src/wlan_hdd_regulatory.c
@@ -621,9 +621,18 @@ static void hdd_process_regulatory_data(hdd_context_t *hdd_ctx,
} else {
cds_chan->state = CHANNEL_STATE_ENABLE;
}
+ /* This check is to mark SRD as passive if ini is 0 */
+ if (!hdd_ctx->config->etsi_srd_chan_in_master_mode &&
+ cds_is_etsi13_regdmn_srd_chan(
+ wiphy_chan->center_freq)) {
+ hdd_debug("freq %d is SRD, marked as passive",
+ wiphy_chan->center_freq);
+ wiphy_chan->flags |=
+ IEEE80211_CHAN_PASSIVE_SCAN;
+ cds_chan->state = CHANNEL_STATE_DFS;
+ }
cds_chan->pwr_limit = wiphy_chan->max_power;
cds_chan->flags = wiphy_chan->flags;
-
}
}
@@ -809,7 +818,7 @@ int hdd_apply_cached_country_info(hdd_context_t *hdd_ctx)
ret_val = hdd_update_regulatory_info(hdd_ctx);
if (ret_val)
return ret_val;
-
+ cds_fill_and_send_ctl_to_fw(&hdd_ctx->reg);
hdd_process_regulatory_data(hdd_ctx, hdd_ctx->wiphy,
hdd_ctx->reg.reset);
@@ -938,8 +947,6 @@ void hdd_reg_notifier(struct wiphy *wiphy,
sme_generic_change_country_code(hdd_ctx->hHal,
hdd_ctx->reg.alpha2);
- cds_fill_and_send_ctl_to_fw(&hdd_ctx->reg);
-
cds_get_dfs_region(&dfs_reg);
cds_set_wma_dfs_region(dfs_reg);
break;