소스 검색

qcacld-3.0: Disable auto ps timer on interface down

Auto ps timer is started as part of the interface up
but not disabled as part of the interface down.
Meanwhile if interface down happen hence sme session
get deleted. But if ps timer expire later then it try
to access invalid sme session and lead to abort.
As a part of fix, Disable auto ps timer on interface down.

Change-Id: If67f7ec66d7dea7b8e7e674dc86efe7124244dde
CRs-Fixed: 2061845
Mukul Sharma 8 년 전
부모
커밋
d16c202da2
1개의 변경된 파일12개의 추가작업 그리고 1개의 파일을 삭제
  1. 12 1
      core/hdd/src/wlan_hdd_main.c

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

@@ -121,6 +121,7 @@
 #include "nan_public_structs.h"
 #include "wlan_reg_ucfg_api.h"
 #include "wlan_hdd_rx_monitor.h"
+#include "sme_power_save_api.h"
 
 #ifdef CNSS_GENL
 #include <net/cnss_nl.h>
@@ -2496,7 +2497,17 @@ static int __hdd_stop(struct net_device *dev)
 
 	/* Make sure the interface is marked as closed */
 	clear_bit(DEVICE_IFACE_OPENED, &adapter->event_flags);
-	hdd_debug("Disabling queues");
+
+	hdd_debug("Disabling Auto Power save timer");
+	sme_ps_disable_auto_ps_timer(
+		WLAN_HDD_GET_HAL_CTX(adapter),
+		adapter->sessionId);
+
+	/*
+	 * Disable TX on the interface, after this hard_start_xmit() will not
+	 * be called on that interface
+	 */
+	hdd_notice("Disabling queues");
 	wlan_hdd_netif_queue_control(adapter,
 				     WLAN_STOP_ALL_NETIF_QUEUE_N_CARRIER,
 				     WLAN_CONTROL_PATH);