瀏覽代碼

qcacld-3.0: Remove hdd_drv_ops_inactivity_timer

The HDD driver operation inactivity timer has been rendered obsolete by
the addition and integration of the Driver Synchronization feature.
Remove the HDD driver operation inactivity timer.

Change-Id: I9c4f555f02edd9350cf44477c3ba6c84b61b09f7
CRs-Fixed: 2419307
Dustin Brown 6 年之前
父節點
當前提交
b7487688fd
共有 3 個文件被更改,包括 4 次插入136 次删除
  1. 0 38
      core/hdd/inc/wlan_hdd_main.h
  2. 3 10
      core/hdd/src/wlan_hdd_driver_ops.c
  3. 1 88
      core/hdd/src/wlan_hdd_main.c

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

@@ -1929,21 +1929,6 @@ struct hdd_channel_info {
 	u_int8_t vht_center_freq_seg1;
 };
 
-/*
- * @HDD_DRV_OP_PROBE: Refers to .probe operation
- * @HDD_DRV_OP_REMOVE: Refers to .remove operation
- * @HDD_DRV_OP_SHUTDOWN: Refers to .shutdown operation
- * @HDD_DRV_OP_REINIT: Refers to .reinit operation
- * @HDD_DRV_OP_IFF_UP: Refers to IFF_UP operation
- */
-enum {
-	HDD_DRV_OP_PROBE = 0,
-	HDD_DRV_OP_REMOVE,
-	HDD_DRV_OP_SHUTDOWN,
-	HDD_DRV_OP_REINIT,
-	HDD_DRV_OP_IFF_UP
-};
-
 /*
  * Function declarations and documentation
  */
@@ -3289,29 +3274,6 @@ void hdd_dp_trace_init(struct hdd_config *config) {}
 
 void hdd_set_rx_mode_rps(bool enable);
 
-/**
- * hdd_drv_ops_inactivity_handler() - Timeout handler for driver ops
- * inactivity timer
- *
- * Return: None
- */
-void hdd_drv_ops_inactivity_handler(void);
-
-/**
- * hdd_start_driver_ops_timer() - Starts driver ops inactivity timer
- * @drv_op: Enum indicating driver op
- *
- * Return: none
- */
-void hdd_start_driver_ops_timer(int drv_op);
-
-/**
- * hdd_stop_driver_ops_timer() - Stops driver ops inactivity timer
- *
- * Return: none
- */
-void hdd_stop_driver_ops_timer(void);
-
 /**
  * hdd_limit_max_per_index_score() -check if per index score doesn't exceed 100%
  * (0x64). If it exceed make it 100%

+ 3 - 10
core/hdd/src/wlan_hdd_driver_ops.c

@@ -357,10 +357,9 @@ static int check_for_probe_defer(int ret)
 }
 #endif
 
-static void hdd_soc_load_lock(struct device *dev, int load_op)
+static void hdd_soc_load_lock(struct device *dev)
 {
 	mutex_lock(&hdd_init_deinit_lock);
-	hdd_start_driver_ops_timer(load_op);
 	hdd_prevent_suspend(WIFI_POWER_EVENT_WAKELOCK_DRIVER_INIT);
 	hdd_request_pm_qos(dev, DISABLE_KRAIT_IDLE_PS_VAL);
 }
@@ -369,7 +368,6 @@ static void hdd_soc_load_unlock(struct device *dev)
 {
 	hdd_remove_pm_qos(dev);
 	hdd_allow_suspend(WIFI_POWER_EVENT_WAKELOCK_DRIVER_INIT);
-	hdd_stop_driver_ops_timer();
 	mutex_unlock(&hdd_init_deinit_lock);
 }
 
@@ -384,7 +382,7 @@ static int __hdd_soc_probe(struct device *dev,
 
 	hdd_info("probing driver");
 
-	hdd_soc_load_lock(dev, HDD_DRV_OP_PROBE);
+	hdd_soc_load_lock(dev);
 	cds_set_load_in_progress(true);
 	cds_set_driver_in_bad_state(false);
 	cds_set_recovery_in_progress(false);
@@ -490,7 +488,7 @@ static int __hdd_soc_recovery_reinit(struct device *dev,
 
 	hdd_info("re-probing driver");
 
-	hdd_soc_load_lock(dev, HDD_DRV_OP_REINIT);
+	hdd_soc_load_lock(dev);
 	cds_set_driver_in_bad_state(false);
 
 	errno = hdd_init_qdf_ctx(dev, bdev, bus_type, bid);
@@ -582,7 +580,6 @@ static void __hdd_soc_remove(struct device *dev)
 		hdd_warn("Debugfs threads are still active attempting driver unload anyway");
 
 	mutex_lock(&hdd_init_deinit_lock);
-	hdd_start_driver_ops_timer(HDD_DRV_OP_REMOVE);
 	if (hdd_get_conparam() == QDF_GLOBAL_EPPING_MODE) {
 		hdd_wlan_stop_modules(hdd_ctx, false);
 		epping_disable();
@@ -593,7 +590,6 @@ static void __hdd_soc_remove(struct device *dev)
 
 	hdd_context_destroy(hdd_ctx);
 
-	hdd_stop_driver_ops_timer();
 	mutex_unlock(&hdd_init_deinit_lock);
 
 	cds_set_driver_in_bad_state(false);
@@ -718,7 +714,6 @@ static void __hdd_soc_recovery_shutdown(void)
 	hdd_psoc_idle_timer_stop(hdd_ctx);
 
 	mutex_lock(&hdd_init_deinit_lock);
-	hdd_start_driver_ops_timer(HDD_DRV_OP_SHUTDOWN);
 
 	/* nothing to do if the soc is already unloaded */
 	if (hdd_ctx->driver_status == DRIVER_MODULES_CLOSED) {
@@ -753,13 +748,11 @@ static void __hdd_soc_recovery_shutdown(void)
 		hdd_wlan_shutdown();
 	}
 
-	hdd_stop_driver_ops_timer();
 	mutex_unlock(&hdd_init_deinit_lock);
 
 	return;
 
 unlock:
-	hdd_stop_driver_ops_timer();
 	mutex_unlock(&hdd_init_deinit_lock);
 }
 

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

@@ -219,13 +219,6 @@ static struct attribute *attrs[] = {
 #endif
 #endif
 
-#define HDD_OPS_INACTIVITY_TIMEOUT (120000)
-#define MAX_OPS_NAME_STRING_SIZE 20
-
-static qdf_timer_t hdd_drv_ops_inactivity_timer;
-static struct task_struct *hdd_drv_ops_task;
-static char drv_ops_string[MAX_OPS_NAME_STRING_SIZE];
-
 /* the Android framework expects this param even though we don't use it */
 #define BUF_LEN 20
 static char fwpath_buffer[BUF_LEN];
@@ -3120,7 +3113,6 @@ static int __hdd_open(struct net_device *dev)
 	}
 
 	mutex_lock(&hdd_init_deinit_lock);
-	hdd_start_driver_ops_timer(HDD_DRV_OP_IFF_UP);
 
 	/*
 	 * This scenario can be hit in cases where in the wlan driver after
@@ -3171,12 +3163,11 @@ static int __hdd_open(struct net_device *dev)
 	hdd_lpass_notify_start(hdd_ctx, adapter);
 
 err_hdd_hdd_init_deinit_lock:
-	hdd_stop_driver_ops_timer();
 	mutex_unlock(&hdd_init_deinit_lock);
+
 	return ret;
 }
 
-
 /**
  * hdd_open() - Wrapper function for __hdd_open to protect it from SSR
  * @net_dev: Pointer to net_device structure
@@ -12947,10 +12938,6 @@ int hdd_init(void)
 	wlan_logging_sock_init_svc();
 #endif
 
-	qdf_timer_init(NULL, &hdd_drv_ops_inactivity_timer,
-		(void *)hdd_drv_ops_inactivity_handler, NULL,
-		QDF_TIMER_TYPE_SW);
-
 	hdd_trace_init();
 	hdd_register_debug_callback();
 	wlan_roam_debug_init();
@@ -12968,7 +12955,6 @@ int hdd_init(void)
 void hdd_deinit(void)
 {
 	wlan_roam_debug_deinit();
-	qdf_timer_free(&hdd_drv_ops_inactivity_timer);
 
 #ifdef WLAN_LOGGING_SOCK_SVC_ENABLE
 	wlan_logging_sock_deinit_svc();
@@ -15037,79 +15023,6 @@ int hdd_reset_limit_off_chan(struct hdd_adapter *adapter)
 	return ret;
 }
 
-/**
- * hdd_start_driver_ops_timer() - Starts driver ops inactivity timer
- * @drv_op: Enum indicating driver op
- *
- * Return: none
- */
-void hdd_start_driver_ops_timer(int drv_op)
-{
-	memset(drv_ops_string, 0, MAX_OPS_NAME_STRING_SIZE);
-	switch (drv_op) {
-	case HDD_DRV_OP_PROBE:
-		memcpy(drv_ops_string, "probe", sizeof("probe"));
-		break;
-	case HDD_DRV_OP_REMOVE:
-		memcpy(drv_ops_string, "remove", sizeof("remove"));
-		break;
-	case HDD_DRV_OP_SHUTDOWN:
-		memcpy(drv_ops_string, "shutdown", sizeof("shutdown"));
-		break;
-	case HDD_DRV_OP_REINIT:
-		memcpy(drv_ops_string, "reinit", sizeof("reinit"));
-		break;
-	case HDD_DRV_OP_IFF_UP:
-		memcpy(drv_ops_string, "iff_up", sizeof("iff_up"));
-		break;
-	}
-
-	hdd_drv_ops_task = current;
-	qdf_timer_start(&hdd_drv_ops_inactivity_timer,
-			HDD_OPS_INACTIVITY_TIMEOUT);
-}
-
-/**
- * hdd_stop_driver_ops_timer() - Stops driver ops inactivity timer
- *
- * Return: none
- */
-void hdd_stop_driver_ops_timer(void)
-{
-	qdf_timer_sync_cancel(&hdd_drv_ops_inactivity_timer);
-}
-
-/**
- * hdd_drv_ops_inactivity_handler() - Timeout handler for driver ops
- * inactivity timer
- *
- * Return: None
- */
-void hdd_drv_ops_inactivity_handler(void)
-{
-	hdd_err("WLAN_BUG_RCA %s: %d Sec timer expired while in .%s",
-		__func__, HDD_OPS_INACTIVITY_TIMEOUT/1000, drv_ops_string);
-
-	if (hdd_drv_ops_task) {
-		printk("Call stack for \"%s\"\n", hdd_drv_ops_task->comm);
-		qdf_print_thread_trace(hdd_drv_ops_task);
-	} else {
-		hdd_err("hdd_drv_ops_task is null");
-	}
-
-	/* Driver shutdown is stuck, no recovery possible at this point */
-	if (0 == qdf_mem_cmp(&drv_ops_string[0], "shutdown",
-		sizeof("shutdown")))
-		QDF_BUG(0);
-
-	if (cds_is_fw_down()) {
-		hdd_err("FW is down");
-		return;
-	}
-
-	cds_trigger_recovery(QDF_REASON_UNSPECIFIED);
-}
-
 /**
  * hdd_set_rx_mode_rps() - Enable/disable RPS in SAP mode
  * @struct hdd_context *hdd_ctx