Browse Source

qcacld-3.0: Disable STA power save before initiating disconnection

Target side STA PS module will only stop when WMI_VDEV_STOP
received, and QoS-null frame is possible to be sent in
the window from DEAUTH TX to WMI_VDEV_STOP.

Disable STA power save before disconnecting process,
to avoid QoS-null in such window.

Change-Id: I3f33fc7ab81f70c22218cd3cc5a4ba934c6bccae
Lin Bai 4 years ago
parent
commit
a9789c4738
1 changed files with 7 additions and 0 deletions
  1. 7 0
      core/hdd/src/wlan_hdd_cfg80211.c

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

@@ -20983,9 +20983,16 @@ int wlan_hdd_disconnect(struct hdd_adapter *adapter, u16 reason,
 	reset_mscs_params(adapter);
 	wlan_hdd_netif_queue_control(adapter,
 		WLAN_STOP_ALL_NETIF_QUEUE_N_CARRIER, WLAN_CONTROL_PATH);
+
+	/* Disable STA power-save mode */
+	if ((adapter->device_mode == QDF_STA_MODE) &&
+	    wlan_hdd_set_powersave(adapter, false, 0))
+		hdd_debug("Not disable PS for STA");
+
 	wlan_rec_conn_info(adapter->vdev_id, DEBUG_CONN_DISCONNECT,
 			   sta_ctx->conn_info.bssid.bytes,
 			   sta_ctx->conn_info.conn_state, mac_reason);
+
 	ret = wlan_hdd_wait_for_disconnect(mac_handle, adapter, reason,
 					   mac_reason);
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)