Преглед изворни кода

qcacld-3.0: ndo_select_queue support for 4.19 kernel

In the 4.19 Linux kernel, the ndo_select_queue function signature has
changed. Add support for it under kernel version compilation flag.

Change-Id: Ie396d79ae9642a24d99aeda6f82def310f2115d8
CRs-Fixed: 2389052
Manjunathappa Prakash пре 6 година
родитељ
комит
666898ec74
2 измењених фајлова са 35 додато и 15 уклоњено
  1. 12 7
      core/hdd/inc/wlan_hdd_wmm.h
  2. 23 8
      core/hdd/src/wlan_hdd_wmm.c

+ 12 - 7
core/hdd/inc/wlan_hdd_wmm.h

@@ -251,14 +251,19 @@ QDF_STATUS hdd_wmm_adapter_close(struct hdd_adapter *adapter);
  *
  * Return: Qdisc queue index.
  */
-uint16_t hdd_select_queue(struct net_device *dev, struct sk_buff *skb
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0))
-			  , void *accel_priv
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0))
+uint16_t hdd_select_queue(struct net_device *dev, struct sk_buff *skb,
+			  struct net_device *sb_dev,
+			  select_queue_fallback_t fallback);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
+uint16_t hdd_select_queue(struct net_device *dev, struct sk_buff *skb,
+			  void *accel_priv, select_queue_fallback_t fallback);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0))
+uint16_t hdd_select_queue(struct net_device *dev, struct sk_buff *skb,
+			  void *accel_priv);
+#else
+uint16_t hdd_select_queue(struct net_device *dev, struct sk_buff *skb);
 #endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
-			  , select_queue_fallback_t fallback
-#endif
-);
 
 /**
  * hdd_wmm_acquire_access_required() - Function which will determine

+ 23 - 8
core/hdd/src/wlan_hdd_wmm.c

@@ -1797,17 +1797,32 @@ static uint16_t hdd_wmm_select_queue(struct net_device *dev,
 	return queueIndex;
 }
 
-uint16_t hdd_select_queue(struct net_device *dev, struct sk_buff *skb
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0))
-			  , void *accel_priv
-#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
-			  , select_queue_fallback_t fallback
-#endif
-)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0))
+uint16_t hdd_select_queue(struct net_device *dev, struct sk_buff *skb,
+			  struct net_device *sb_dev,
+			  select_queue_fallback_t fallback)
+{
+	return hdd_wmm_select_queue(dev, skb);
+}
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
+uint16_t hdd_select_queue(struct net_device *dev, struct sk_buff *skb,
+			  void *accel_priv, select_queue_fallback_t fallback)
+{
+	return hdd_wmm_select_queue(dev, skb);
+}
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0))
+uint16_t hdd_select_queue(struct net_device *dev, struct sk_buff *skb,
+			  void *accel_priv)
 {
 	return hdd_wmm_select_queue(dev, skb);
 }
+#else
+uint16_t hdd_select_queue(struct net_device *dev, struct sk_buff *skb)
+{
+	return hdd_wmm_select_queue(dev, skb);
+}
+#endif
+
 
 /**
  * hdd_wmm_acquire_access_required() - Function which will determine