mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
qcacld-3.0: Add vendor cmd attribute to upgrade UDP QoS
Add the vendor command attribute to upgrade the QoS for all UDP packets having priority less than the current setting. Change-Id: I1269018396e163c1a2b02a7ab1cfb3fabfd0af94 CRs-Fixed: 2724041
This commit is contained in:
parent
f5f6cb8ed9
commit
197e33420a
3 changed files with 51 additions and 0 deletions
|
|
@ -438,6 +438,17 @@ void hdd_event_eapol_log(struct sk_buff *skb, enum qdf_proto_dir dir)
|
|||
{}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* hdd_set_udp_qos_upgrade_config() - Set the threshold for UDP packet
|
||||
* QoS upgrade.
|
||||
* @adapter: adapter for which this configuration is to be applied
|
||||
* @priority: the threshold priority
|
||||
*
|
||||
* Returns: 0 on success, -EINVAL on failure
|
||||
*/
|
||||
int hdd_set_udp_qos_upgrade_config(struct hdd_adapter *adapter,
|
||||
uint8_t priority);
|
||||
|
||||
/*
|
||||
* As of the 4.7 kernel, net_device->trans_start is removed. Create shims to
|
||||
* support compiling against older versions of the kernel.
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@
|
|||
#include "wlan_hdd_main.h"
|
||||
#include "wlan_hdd_power.h"
|
||||
#include "wlan_hdd_trace.h"
|
||||
#include "wlan_hdd_tx_rx.h"
|
||||
#include "qdf_str.h"
|
||||
#include "qdf_trace.h"
|
||||
#include "qdf_types.h"
|
||||
|
|
@ -6723,6 +6724,8 @@ const struct nla_policy wlan_hdd_wifi_config_policy[
|
|||
[QCA_WLAN_VENDOR_ATTR_CONFIG_CHANNEL_WIDTH] = {.type = NLA_U8 },
|
||||
[QCA_WLAN_VENDOR_ATTR_CONFIG_DYNAMIC_BW] = {.type = NLA_U8 },
|
||||
[QCA_WLAN_VENDOR_ATTR_CONFIG_NSS] = {.type = NLA_U8 },
|
||||
[QCA_WLAN_VENDOR_ATTR_CONFIG_UDP_QOS_UPGRADE] = {
|
||||
.type = NLA_U8 },
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -7639,6 +7642,22 @@ static int hdd_config_scan_enable(struct hdd_adapter *adapter,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_config_udp_qos_upgrade_threshold() - NL attribute handler to parse
|
||||
* priority upgrade threshold value.
|
||||
* @adapter: adapter for which this configuration is to be applied
|
||||
* @attr: NL attribute
|
||||
*
|
||||
* Returns: 0 on success, -EINVAL on failure
|
||||
*/
|
||||
static int hdd_config_udp_qos_upgrade_threshold(struct hdd_adapter *adapter,
|
||||
const struct nlattr *attr)
|
||||
{
|
||||
uint8_t priority = nla_get_u8(attr);
|
||||
|
||||
return hdd_set_udp_qos_upgrade_config(adapter, priority);
|
||||
}
|
||||
|
||||
static int hdd_config_power(struct hdd_adapter *adapter,
|
||||
const struct nlattr *attr)
|
||||
{
|
||||
|
|
@ -8496,6 +8515,8 @@ static const struct independent_setters independent_setters[] = {
|
|||
hdd_set_nss},
|
||||
{QCA_WLAN_VENDOR_ATTR_CONFIG_OPTIMIZED_POWER_MANAGEMENT,
|
||||
hdd_config_power},
|
||||
{QCA_WLAN_VENDOR_ATTR_CONFIG_UDP_QOS_UPGRADE,
|
||||
hdd_config_udp_qos_upgrade_threshold},
|
||||
};
|
||||
|
||||
#ifdef WLAN_FEATURE_ELNA
|
||||
|
|
|
|||
|
|
@ -469,6 +469,25 @@ void hdd_event_eapol_log(struct sk_buff *skb, enum qdf_proto_dir dir)
|
|||
}
|
||||
#endif /* FEATURE_WLAN_DIAG_SUPPORT */
|
||||
|
||||
int hdd_set_udp_qos_upgrade_config(struct hdd_adapter *adapter,
|
||||
uint8_t priority)
|
||||
{
|
||||
if (adapter->device_mode != QDF_STA_MODE) {
|
||||
hdd_info_rl("Data priority upgrade only allowed in STA mode:%d",
|
||||
adapter->device_mode);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (priority >= QCA_WLAN_AC_ALL) {
|
||||
hdd_err_rl("Invlid data priority: %d", priority);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
adapter->upgrade_udp_qos_threshold = priority;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* wlan_hdd_classify_pkt() - classify packet
|
||||
* @skb - sk buff
|
||||
|
|
|
|||
Loading…
Reference in a new issue