Jelajahi Sumber

Merge "qcacmn: Fix pdev_id used in WMI_PDEV_SUSPEND_CMDID command"

Linux Build Service Account 7 tahun lalu
induk
melakukan
6435046078
3 mengubah file dengan 36 tambahan dan 14 penghapusan
  1. 5 5
      os_if/linux/qca_vendor.h
  2. 28 9
      qdf/linux/src/i_qdf_timer.h
  3. 3 0
      wmi/src/wmi_unified_tlv.c

+ 5 - 5
os_if/linux/qca_vendor.h

@@ -3261,9 +3261,9 @@ enum qca_iface_type {
  * @QCA_WLAN_VENDOR_ATTR_PCL_CONFIG_WEIGHT: pcl channel weight
  */
 enum qca_wlan_vendor_attr_pcl_config {
-	QCA_WLAN_VENDOR_ATTR_PCL_CONFIG_INVALID = 0,
-	QCA_WLAN_VENDOR_ATTR_PCL_CONFIG_CHANNEL = 1,
-	QCA_WLAN_VENDOR_ATTR_PCL_CONFIG_WEIGHT = 2,
+	QCA_WLAN_VENDOR_ATTR_PCL_INVALID = 0,
+	QCA_WLAN_VENDOR_ATTR_PCL_CHANNEL = 1,
+	QCA_WLAN_VENDOR_ATTR_PCL_WEIGHT = 2,
 };
 
 enum qca_set_band {
@@ -4693,8 +4693,8 @@ enum qca_wlan_vendor_attr_external_acs_channels {
 	QCA_WLAN_VENDOR_ATTR_EXTERNAL_ACS_CHANNEL_INVALID = 0,
 
 	QCA_WLAN_VENDOR_ATTR_EXTERNAL_ACS_CHANNEL_REASON = 1,
-	QCA_WLAN_VENDOR_ATTR_EXTERNAL_ACS_CHANNEL_COUNT = 2,
-	QCA_WLAN_VENDOR_ATTR_EXTERNAL_ACS_CHANNEL_LIST = 3,
+	QCA_WLAN_VENDOR_ATTR_EXTERNAL_ACS_CHANNEL_LIST = 2,
+	QCA_WLAN_VENDOR_ATTR_EXTERNAL_ACS_CHANNEL_BAND = 3,
 	QCA_WLAN_VENDOR_ATTR_EXTERNAL_ACS_CHANNEL_PRIMARY = 4,
 	QCA_WLAN_VENDOR_ATTR_EXTERNAL_ACS_CHANNEL_SECONDARY = 5,
 	QCA_WLAN_VENDOR_ATTR_EXTERNAL_ACS_CHANNEL_CENTER_SEG0 = 6,

+ 28 - 9
qdf/linux/src/i_qdf_timer.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -39,6 +39,11 @@
 #include <linux/jiffies.h>
 #include <qdf_types.h>
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
+#define setup_deferrable_timer(timer, fn, data)                                \
+	__setup_timer((timer), (fn), (data), TIMER_DEFERRABLE)
+#endif
+
 /* timer data type */
 typedef struct timer_list __qdf_timer_t;
 
@@ -64,12 +69,24 @@ static inline QDF_STATUS __qdf_timer_init(qdf_handle_t hdl,
 					  qdf_timer_func_t func, void *arg,
 					  QDF_TIMER_TYPE type)
 {
-	if (QDF_TIMER_TYPE_SW == type)
-		init_timer_deferrable(timer);
-	else
-		init_timer(timer);
-	timer->function = (qdf_dummy_timer_func_t) func;
-	timer->data = (unsigned long)arg;
+	if (type == QDF_TIMER_TYPE_SW) {
+		if (object_is_on_stack(timer))
+			setup_deferrable_timer_on_stack(
+			    timer, (qdf_dummy_timer_func_t)func,
+			    (unsigned long)arg);
+		else
+			setup_deferrable_timer(timer,
+					       (qdf_dummy_timer_func_t)func,
+					       (unsigned long)arg);
+	} else {
+		if (object_is_on_stack(timer))
+			setup_timer_on_stack(timer,
+					     (qdf_dummy_timer_func_t)func,
+					     (unsigned long)arg);
+		else
+			setup_timer(timer, (qdf_dummy_timer_func_t)func,
+				    (unsigned long)arg);
+	}
 
 	return QDF_STATUS_SUCCESS;
 }
@@ -124,12 +141,14 @@ static inline bool __qdf_timer_stop(struct timer_list *timer)
  * __qdf_timer_free() - free a qdf timer
  * @timer: Pointer to timer object
  *
- * Return: true if timer was cancelled and deactived,
- * false if timer was cancelled but already got fired.
+ * Return: None
  */
 static inline void __qdf_timer_free(struct timer_list *timer)
 {
 	del_timer_sync(timer);
+
+	if (object_is_on_stack(timer))
+		destroy_timer_on_stack(timer);
 }
 
 /**

+ 3 - 0
wmi/src/wmi_unified_tlv.c

@@ -1187,6 +1187,9 @@ static QDF_STATUS send_suspend_cmd_tlv(wmi_unified_t wmi_handle,
 		cmd->suspend_opt = WMI_PDEV_SUSPEND_AND_DISABLE_INTR;
 	else
 		cmd->suspend_opt = WMI_PDEV_SUSPEND;
+
+	cmd->pdev_id = wmi_handle->ops->convert_pdev_id_host_to_target(mac_id);
+
 	ret = wmi_unified_cmd_send(wmi_handle, wmibuf, len,
 				 WMI_PDEV_SUSPEND_CMDID);
 	if (ret) {