Преглед изворни кода

qcacld-3.0: Allow beacon/probe resp update in the middle of p2p connection

Once P2P GO has started, supplicant will update the beacon/probe
response template to include the p2p group information. Host driver
is currenlty igonoring this since the 4-way handshake is not completed.
Due to this the beacon/probe response from the P2P GO is not including
the p2p group information sub-element.

Change-Id: Id645f7fdccbb59e6bf6c77dd73bdbb1c6bf47dcb
CRs-Fixed: 1087513
Archana Ramachandran пре 8 година
родитељ
комит
1a5b604f76
3 измењених фајлова са 12 додато и 6 уклоњено
  1. 2 1
      core/hdd/inc/wlan_hdd_main.h
  2. 1 1
      core/hdd/src/wlan_hdd_cfg80211.c
  3. 9 4
      core/hdd/src/wlan_hdd_hostapd.c

+ 2 - 1
core/hdd/inc/wlan_hdd_main.h

@@ -1786,7 +1786,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

+ 1 - 1
core/hdd/src/wlan_hdd_cfg80211.c

@@ -7010,7 +7010,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;

+ 9 - 4
core/hdd/src/wlan_hdd_hostapd.c

@@ -7066,7 +7066,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;
@@ -7093,7 +7094,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;
 	}
@@ -8079,7 +8080,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(
@@ -8137,6 +8138,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();
 
@@ -8184,8 +8186,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;