qcacld-3.0: converge STA and SAP ndo_select_queue net_device_ops

Converge on STA and SAP ndo_select_queue net_device_ops implementation.

Change-Id: Ia8d5177be3718a52d5c2eabaf83212c3a864d679
CRs-Fixed: 2389052
This commit is contained in:
Manjunathappa Prakash
2019-01-31 09:40:23 -08:00
committed by nshrivas
父節點 3abf57b44e
當前提交 7114007b35
共有 4 個文件被更改,包括 26 次插入87 次删除

查看文件

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011-2012,2016-2018 The Linux Foundation. All rights reserved. * Copyright (c) 2011-2012,2016-2019 The Linux Foundation. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -242,31 +242,21 @@ QDF_STATUS hdd_wmm_adapter_init(struct hdd_adapter *adapter);
QDF_STATUS hdd_wmm_adapter_close(struct hdd_adapter *adapter); QDF_STATUS hdd_wmm_adapter_close(struct hdd_adapter *adapter);
/** /**
* hdd_wmm_select_queue() - Function which will classify the packet * hdd_select_queue() - Return queue to be used.
* according to linux qdisc expectation. * @dev: Pointer to the WLAN device.
* @skb: Pointer to OS packet (sk_buff).
* *
* @dev: [in] pointer to net_device structure * This function is registered with the Linux OS for network
* @skb: [in] pointer to os packet * core to decide which queue to use for the skb.
* *
* Return: Qdisc queue index * Return: Qdisc queue index.
*/ */
uint16_t hdd_wmm_select_queue(struct net_device *dev, struct sk_buff *skb); uint16_t hdd_select_queue(struct net_device *dev, struct sk_buff *skb
/**
* hdd_hostapd_select_queue() - Function which will classify the packet
* according to linux qdisc expectation.
*
* @dev: [in] pointer to net_device structure
* @skb: [in] pointer to os packet
*
* Return: Qdisc queue index
*/
uint16_t hdd_hostapd_select_queue(struct net_device *dev, struct sk_buff *skb
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0))
, void *accel_priv , void *accel_priv
#endif #endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
, select_queue_fallback_t fallback , select_queue_fallback_t fallback
#endif #endif
); );

查看文件

@@ -3085,7 +3085,7 @@ const struct net_device_ops net_ops_struct = {
.ndo_set_mac_address = hdd_hostapd_set_mac_address, .ndo_set_mac_address = hdd_hostapd_set_mac_address,
.ndo_do_ioctl = hdd_ioctl, .ndo_do_ioctl = hdd_ioctl,
.ndo_change_mtu = hdd_hostapd_change_mtu, .ndo_change_mtu = hdd_hostapd_change_mtu,
.ndo_select_queue = hdd_hostapd_select_queue, .ndo_select_queue = hdd_select_queue,
}; };
void hdd_set_ap_ops(struct net_device *dev) void hdd_set_ap_ops(struct net_device *dev)

查看文件

@@ -3736,28 +3736,6 @@ static void hdd_set_multicast_list(struct net_device *dev)
cds_ssr_unprotect(__func__); cds_ssr_unprotect(__func__);
} }
/**
* hdd_select_queue() - used by Linux OS to decide which queue to use first
* @dev: Pointer to the WLAN device.
* @skb: Pointer to OS packet (sk_buff).
*
* This function is registered with the Linux OS for network
* core to decide which queue to use first.
*
* Return: ac, Queue Index/access category corresponding to UP in IP header
*/
static 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
)
{
return hdd_wmm_select_queue(dev, skb);
}
static const struct net_device_ops wlan_drv_ops = { static const struct net_device_ops wlan_drv_ops = {
.ndo_open = hdd_open, .ndo_open = hdd_open,
.ndo_stop = hdd_stop, .ndo_stop = hdd_stop,

查看文件

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2013-2018 The Linux Foundation. All rights reserved. * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -1745,48 +1745,6 @@ uint16_t hdd_get_queue_index(uint16_t up, bool is_eapol)
} }
#endif #endif
/**
* hdd_hostapd_select_queue() - Function which will classify the packet
* according to linux qdisc expectation.
*
* @dev: [in] pointer to net_device structure
* @skb: [in] pointer to os packet
*
* Return: Qdisc queue index
*/
uint16_t hdd_hostapd_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
)
{
enum sme_qos_wmmuptype up = SME_QOS_WMM_UP_BE;
uint16_t queueIndex;
struct hdd_adapter *adapter = (struct hdd_adapter *) netdev_priv(dev);
struct hdd_context *hddctx = WLAN_HDD_GET_CTX(adapter);
bool is_eapol = false;
int status = 0;
status = wlan_hdd_validate_context(hddctx);
if (status != 0) {
skb->priority = SME_QOS_WMM_UP_BE;
return HDD_LINUX_AC_BE;
}
/* Get the user priority from IP header */
hdd_wmm_classify_pkt(adapter, skb, &up, &is_eapol);
skb->priority = up;
queueIndex = hdd_get_queue_index(skb->priority, is_eapol);
return queueIndex;
}
/** /**
* hdd_wmm_select_queue() - Function which will classify the packet * hdd_wmm_select_queue() - Function which will classify the packet
* according to linux qdisc expectation. * according to linux qdisc expectation.
@@ -1796,7 +1754,8 @@ uint16_t hdd_hostapd_select_queue(struct net_device *dev, struct sk_buff *skb
* *
* Return: Qdisc queue index * Return: Qdisc queue index
*/ */
uint16_t hdd_wmm_select_queue(struct net_device *dev, struct sk_buff *skb) static uint16_t hdd_wmm_select_queue(struct net_device *dev,
struct sk_buff *skb)
{ {
enum sme_qos_wmmuptype up = SME_QOS_WMM_UP_BE; enum sme_qos_wmmuptype up = SME_QOS_WMM_UP_BE;
uint16_t queueIndex; uint16_t queueIndex;
@@ -1838,6 +1797,18 @@ uint16_t hdd_wmm_select_queue(struct net_device *dev, struct sk_buff *skb)
return queueIndex; 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
)
{
return hdd_wmm_select_queue(dev, skb);
}
/** /**
* hdd_wmm_acquire_access_required() - Function which will determine * hdd_wmm_acquire_access_required() - Function which will determine
* acquire admittance for a WMM AC is required or not based on psb configuration * acquire admittance for a WMM AC is required or not based on psb configuration