mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
qcacmn: Add new feature to support protocol tags
With this feature, using appropriate commands, link layer, network layer, transport layer and some of the application protocols can be tagged with the user provided tag values for easier identification of protocols. The supported protocols today are as follows. ARP, DHCPv4, DHCPv6, DNS over TCP (v4), DNS over TCP (v6), DNS over UDP (v4), DNS over UDP (v6), ICMPv4, ICMPv6, TCPv4, TCPv6, UDPv4, UDPv6, IPv4, IPv6, EAP. Receive packets are tagged by hardware. Tags are applied after the first matching rule. Hence it is recommended that the rules are programmed in such a way that tags are configured from application layer to data link layer to get expected results. Change-Id: Ibdc2bd2b78234f482074955e89fb93f05988eaca
This commit is contained in:
parent
c71219ea55
commit
142f9baf47
20 changed files with 631 additions and 12 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2014-2017,2019 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -55,4 +55,23 @@ static inline void qdf_nbuf_ipa_priv_set(qdf_nbuf_t buf, uint32_t priv)
|
|||
__qdf_nbuf_ipa_priv_set(buf, priv);
|
||||
}
|
||||
|
||||
/**
|
||||
* qdf_nbuf_set_rx_protocol_tag()
|
||||
* @buf: Network buffer
|
||||
* @val: Value to be set
|
||||
* Return: void
|
||||
*/
|
||||
static inline void qdf_nbuf_set_rx_protocol_tag(qdf_nbuf_t buf, uint32_t val)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* qdf_nbuf_get_rx_protocol_tag()
|
||||
* @buf: Network buffer
|
||||
* Return: void
|
||||
*/
|
||||
static inline int qdf_nbuf_get_rx_protocol_tag(qdf_nbuf_t buf)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* _QDF_NBUF_M_H */
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2014-2017,2019 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -64,4 +64,26 @@ qdf_nbuf_set_ext_cb(qdf_nbuf_t buf, void *ref)
|
|||
__qdf_nbuf_set_ext_cb(buf, ref);
|
||||
}
|
||||
|
||||
/**
|
||||
* qdf_nbuf_set_rx_protocol_tag() - set given value in protocol_tag
|
||||
* field of buf(skb->cb)
|
||||
* @buf: Network buffer
|
||||
* @val: Value to be set
|
||||
* Return: void
|
||||
*/
|
||||
static inline void qdf_nbuf_set_rx_protocol_tag(qdf_nbuf_t buf, uint32_t val)
|
||||
{
|
||||
__qdf_nbuf_set_rx_protocol_tag(buf, val);
|
||||
}
|
||||
|
||||
/**
|
||||
* qdf_nbuf_get_rx_protocol_tag() - Get the value of protocol_tag
|
||||
* field of buf(skb->cb)
|
||||
* @buf: Network buffer
|
||||
* Return: void
|
||||
*/
|
||||
static inline int qdf_nbuf_get_rx_protocol_tag(qdf_nbuf_t buf)
|
||||
{
|
||||
return __qdf_nbuf_get_rx_protocol_tag(buf);
|
||||
}
|
||||
#endif /* _QDF_NBUF_W_H */
|
||||
|
|
|
|||
|
|
@ -226,6 +226,8 @@
|
|||
* @chan_noise_floor: Channel Noise Floor for the pdev
|
||||
* @data_sequence_control_info_valid: field to indicate validity of seq control
|
||||
* @first_data_seq_ctrl: Sequence ctrl field of first data frame
|
||||
* @rxpcu_filter_pass: Flag which indicates whether RX packets are received in
|
||||
* BSS mode(not in promisc mode)
|
||||
*/
|
||||
struct mon_rx_status {
|
||||
uint64_t tsft;
|
||||
|
|
@ -304,6 +306,7 @@ struct mon_rx_status {
|
|||
uint8_t data_sequence_control_info_valid;
|
||||
uint16_t first_data_seq_ctrl;
|
||||
uint8_t ltf_size;
|
||||
uint8_t rxpcu_filter_pass;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -101,7 +101,10 @@ typedef union {
|
|||
* @rx.dev.priv_cb_w.fctx: ctx to handle special pkts defined by ftype
|
||||
* @rx.dev.priv_cb_w.msdu_len: length of RX packet
|
||||
* @rx.dev.priv_cb_w.peer_id: peer_id for RX packet
|
||||
* @rx.dev.priv_cb_w.reserved1: reserved
|
||||
* @rx.dev.priv_cb_w.protocol_tag: protocol tag set by application for
|
||||
* received packet type
|
||||
* @rx.dev.priv_cb_w.reserved1: reserved for flow tag set by application
|
||||
* for 5 tuples received
|
||||
*
|
||||
* @rx.dev.priv_cb_m.tcp_seq_num: TCP sequence number
|
||||
* @rx.dev.priv_cb_m.tcp_ack_num: TCP ACK number
|
||||
|
|
@ -207,7 +210,8 @@ struct qdf_nbuf_cb {
|
|||
void *fctx;
|
||||
uint16_t msdu_len;
|
||||
uint16_t peer_id;
|
||||
uint32_t reserved1;
|
||||
uint16_t protocol_tag;
|
||||
uint16_t reserved1;
|
||||
} priv_cb_w;
|
||||
struct {
|
||||
/* ipa_owned bit is common between rx
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2014-2019 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -72,6 +72,16 @@
|
|||
#define __qdf_nbuf_get_tx_fctx(skb) \
|
||||
QDF_NBUF_CB_TX_FCTX((skb))
|
||||
|
||||
#define QDF_NBUF_CB_RX_PROTOCOL_TAG(skb) \
|
||||
(((struct qdf_nbuf_cb *) \
|
||||
((skb)->cb))->u.rx.dev.priv_cb_w.protocol_tag)
|
||||
|
||||
#define __qdf_nbuf_set_rx_protocol_tag(skb, val) \
|
||||
((QDF_NBUF_CB_RX_PROTOCOL_TAG((skb))) = val)
|
||||
|
||||
#define __qdf_nbuf_get_rx_protocol_tag(skb) \
|
||||
(QDF_NBUF_CB_RX_PROTOCOL_TAG((skb)))
|
||||
|
||||
/**
|
||||
* qdf_nbuf_cb_update_peer_local_id() - update peer local id in skb cb
|
||||
* @skb: skb pointer whose cb is updated with peer local id information
|
||||
|
|
|
|||
Loading…
Reference in a new issue