Procházet zdrojové kódy

qcacld-3.0: Send mode change event after addkey

On STA connection, mode change event is sent to
userspace after association is complete. This causes
delay in processing of M1 frame at supplicant due to
latency associated with nl80211_get_wiphy_index
function as part of processing mode change vendor event.

Fix is to send mode change event for STA after key
is added.

Change-Id: Id403bfdd26ed3a47449ba3f2967f4b4322ad5da6
CRs-Fixed: 2257117
Yeshwanth Sriram Guntuka před 6 roky
rodič
revize
4fe30bdde0

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

@@ -1412,6 +1412,7 @@ struct hdd_adapter {
 
 	/* rcpi information */
 	struct rcpi_info rcpi;
+	bool send_mode_change;
 };
 
 #define WLAN_HDD_GET_STATION_CTX_PTR(adapter) (&(adapter)->session.station)

+ 1 - 0
core/hdd/src/wlan_hdd_assoc.c

@@ -1849,6 +1849,7 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter,
 	    (QDF_P2P_CLIENT_MODE == adapter->device_mode)) {
 		sme_ps_disable_auto_ps_timer(mac_handle,
 					     adapter->session_id);
+		adapter->send_mode_change = true;
 	}
 	wlan_hdd_clear_link_layer_stats(adapter);
 

+ 5 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -16487,6 +16487,11 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy,
 			return -EINVAL;
 		}
 
+		if (adapter->send_mode_change) {
+			wlan_hdd_send_mode_change_event();
+			adapter->send_mode_change = false;
+		}
+
 		/* in case of IBSS as there was no information
 		 * available about WEP keys during IBSS join, group
 		 * key initialized with NULL key, so re-initialize

+ 1 - 0
core/hdd/src/wlan_hdd_main.c

@@ -3673,6 +3673,7 @@ static struct hdd_adapter *hdd_alloc_station_adapter(struct hdd_context *hdd_ctx
 		adapter->offloads_configured = false;
 		adapter->is_link_up_service_needed = false;
 		adapter->disconnection_in_progress = false;
+		adapter->send_mode_change = true;
 		/* Init the net_device structure */
 		strlcpy(dev->name, name, IFNAMSIZ);