summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/hdd/inc/wlan_hdd_main.h3
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c2
-rw-r--r--core/hdd/src/wlan_hdd_hostapd.c13
3 files changed, 12 insertions, 6 deletions
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index 4310755e6a46..c0b37f9879e5 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -1811,7 +1811,8 @@ int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
struct cfg80211_beacon_data *params,
const u8 *ssid, size_t ssid_len,
enum nl80211_hidden_ssid hidden_ssid,
- bool check_for_concurrency);
+ bool check_for_concurrency,
+ bool update_beacon);
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
QDF_STATUS hdd_register_for_sap_restart_with_channel_switch(void);
#else
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 73ed5d764623..b4cede925f2e 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -7004,7 +7004,7 @@ int wlan_hdd_request_pre_cac(uint8_t channel)
status = wlan_hdd_cfg80211_start_bss(pre_cac_adapter, NULL,
PRE_CAC_SSID, qdf_str_len(PRE_CAC_SSID),
- eHIDDEN_SSID_NOT_IN_USE, false);
+ eHIDDEN_SSID_NOT_IN_USE, false, false);
if (QDF_IS_STATUS_ERROR(status)) {
hdd_err("start bss failed");
goto stop_close_pre_cac_adapter;
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index 211aae29cf4e..2f2746951e51 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -7067,7 +7067,8 @@ int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
struct cfg80211_beacon_data *params,
const u8 *ssid, size_t ssid_len,
enum nl80211_hidden_ssid hidden_ssid,
- bool check_for_concurrency)
+ bool check_for_concurrency,
+ bool update_beacon)
{
tsap_Config_t *pConfig;
beacon_data_t *pBeacon = NULL;
@@ -7094,7 +7095,7 @@ int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
ENTER();
- if (cds_is_connection_in_progress()) {
+ if (!update_beacon && cds_is_connection_in_progress()) {
hdd_err("Can't start BSS: connection is in progress");
return -EINVAL;
}
@@ -8083,7 +8084,7 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
wlan_hdd_cfg80211_start_bss(pAdapter,
&params->beacon,
params->ssid, params->ssid_len,
- params->hidden_ssid, true);
+ params->hidden_ssid, true, false);
if (pHddCtx->config->sap_max_inactivity_override) {
sta_inactivity_timer = qdf_mem_malloc(
@@ -8141,6 +8142,7 @@ static int __wlan_hdd_cfg80211_change_beacon(struct wiphy *wiphy,
hdd_context_t *pHddCtx;
beacon_data_t *old, *new;
int status;
+ bool update_beacon;
ENTER();
@@ -8188,8 +8190,11 @@ static int __wlan_hdd_cfg80211_change_beacon(struct wiphy *wiphy,
}
pAdapter->sessionCtx.ap.beacon = new;
+ update_beacon = (pAdapter->device_mode ==
+ QDF_P2P_GO_MODE) ? true : false;
+ hdd_info("update beacon for P2P GO: %d", update_beacon);
status = wlan_hdd_cfg80211_start_bss(pAdapter, params, NULL,
- 0, 0, true);
+ 0, 0, false, update_beacon);
EXIT();
return status;