QCA vendor command for CoAP offload processing
Add vendor command QCA_NL80211_VENDOR_SUBCMD_COAP_OFFLOAD to enable/disable offload processing in firmware for CoAP messages (RFC7252: The Constrained Application Protocol) or fetch the CoAP messages cached during offload processing. Signed-off-by: Yu Wang <quic_yyuwang@quicinc.com>
This commit is contained in:
parent
3b7bb17f69
commit
159e636132
1 changed files with 407 additions and 0 deletions
|
@ -819,6 +819,15 @@ enum qca_radiotap_vendor_ids {
|
|||
*
|
||||
* The attributes used with this command are defined in
|
||||
* enum qca_wlan_vendor_attr_secure_ranging_ctx.
|
||||
*
|
||||
* @QCA_NL80211_VENDOR_SUBCMD_COAP_OFFLOAD: This vendor subcommand is used to
|
||||
* enable/disable offload processing in firmware during system/runtime
|
||||
* suspend for CoAP messages (see RFC7252: The Constrained Application
|
||||
* Protocol) and fetch information of the CoAP messages cached during
|
||||
* offload processing.
|
||||
*
|
||||
* The attributes used with this command are defined in
|
||||
* enum qca_wlan_vendor_attr_coap_offload.
|
||||
*/
|
||||
enum qca_nl80211_vendor_subcmds {
|
||||
QCA_NL80211_VENDOR_SUBCMD_UNSPEC = 0,
|
||||
|
@ -1019,6 +1028,7 @@ enum qca_nl80211_vendor_subcmds {
|
|||
QCA_NL80211_VENDOR_SUBCMD_DRIVER_READY = 214,
|
||||
QCA_NL80211_VENDOR_SUBCMD_PASN = 215,
|
||||
QCA_NL80211_VENDOR_SUBCMD_SECURE_RANGING_CONTEXT = 216,
|
||||
QCA_NL80211_VENDOR_SUBCMD_COAP_OFFLOAD = 217,
|
||||
};
|
||||
|
||||
/* Compatibility defines for previously used subcmd names.
|
||||
|
@ -12556,4 +12566,401 @@ enum qca_wlan_vendor_attr_secure_ranging_ctx {
|
|||
QCA_WLAN_VENDOR_ATTR_SECURE_RANGING_CTX_AFTER_LAST - 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum qca_wlan_vendor_attr_coap_offload_filter - Attributes used
|
||||
* inside %QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_REPLY_FILTER
|
||||
* nested attribute. The packets that match a filter will be replied with
|
||||
* attributes configured in %QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_REPLY.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_FILTER_DEST_IPV4:
|
||||
* u32 attribute. Destination IPv4 address in network byte order, the
|
||||
* IPv4 packets with different address will be filtered out.
|
||||
* This attribute is optional.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_FILTER_DEST_IPV4_IS_BC:
|
||||
* Flag attribute. If it's present, indicates that
|
||||
* %QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_FILTER_DEST_IPV4 is a broadcast
|
||||
* address; while if not, indicates that the address is a unicast/multicast
|
||||
* address.
|
||||
* This attribute is optional.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_FILTER_DEST_IPV6:
|
||||
* NLA_BINARY attribute, length is 16 bytes.
|
||||
* Destination IPv6 address in network byte order, the IPv6 packets
|
||||
* with different destination address will be filtered out.
|
||||
* This attribute is optional.
|
||||
*
|
||||
* At least one of %QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_FILTER_DEST_IPV4 and
|
||||
* %QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_FILTER_DEST_IPV6 must be configured.
|
||||
* Packets on both IPv4 and IPv6 will be processed if both are configured.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_FILTER_DEST_PORT:
|
||||
* u16 attribute. Destination UDP port, the packets with different destination
|
||||
* UDP port will be filtered out.
|
||||
* This attribute is mandatory.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_FILTER_MATCH_OFFSET:
|
||||
* u32 attribute. Represents the offset (in UDP payload) of the data
|
||||
* to be matched.
|
||||
* This attribute is mandatory.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_FILTER_MATCH_DATA:
|
||||
* NLA_BINARY attribute, the maximum allowed size is 16 bytes.
|
||||
* Binary data that is compared bit-by-bit against the data (specified
|
||||
* by %QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_FILTER_MATCH_OFFSET) in UDP
|
||||
* payload, the packets don't match will be filtered out.
|
||||
* This attribute is mandatory.
|
||||
*/
|
||||
enum qca_wlan_vendor_attr_coap_offload_filter {
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_FILTER_INVALID = 0,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_FILTER_DEST_IPV4 = 1,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_FILTER_DEST_IPV4_IS_BC = 2,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_FILTER_DEST_IPV6 = 3,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_FILTER_DEST_PORT = 4,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_FILTER_MATCH_OFFSET = 5,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_FILTER_MATCH_DATA = 6,
|
||||
|
||||
/* keep last */
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_FILTER_AFTER_LAST,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_FILTER_MAX =
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_FILTER_AFTER_LAST - 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum qca_wlan_vendor_attr_coap_offload_reply - Attributes used
|
||||
* inside %QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_REPLY nested attribute.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_REPLY_SRC_IPV4:
|
||||
* u32 attribute. Source address (in network byte order) for replying
|
||||
* the matching broadcast/multicast IPv4 packets.
|
||||
* This attribute is optional.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_REPLY_SRC_IPV6:
|
||||
* NLA_BINARY attribute, length is 16 bytes.
|
||||
* Source address (in network byte order) for replying the matching
|
||||
* multicast IPv6 packets.
|
||||
* This attribute is optional.
|
||||
*
|
||||
* For broadcast/multicast offload reply, one of
|
||||
* %QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_REPLY_SRC_IPV4 and
|
||||
* %QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_REPLY_SRC_IPV6 or both must be
|
||||
* configured according to version of the IP address(es) configured in
|
||||
* %QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_REPLY_FILTER;
|
||||
* while for unicast case, firmware will take the destination IP address
|
||||
* in the received matching packet as the source address for replying.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_REPLY_FILTER:
|
||||
* Nested attribute. Filter for the received UDP packets, only the matching
|
||||
* packets will be replied and cached.
|
||||
* See enum qca_wlan_vendor_attr_coap_offload_filter for list of supported
|
||||
* attributes.
|
||||
* This attribute is mandatory.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_REPLY_MSG:
|
||||
* NLA_BINARY attribute, the maximum allowed size is 1152 bytes.
|
||||
* CoAP message (UDP payload) to be sent upon receiving matching packets.
|
||||
* Firmware is responsible for adding any necessary protocol headers.
|
||||
* This attribute is mandatory.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_REPLY_CACHE_EXPTIME:
|
||||
* u32 attribute. Expiration time in milliseconds of the cached CoAP messages.
|
||||
* A cached message will be dropped by firmware if it's expired.
|
||||
* This attribute is optional. A default value of 40000 will be used in the
|
||||
* absence of it.
|
||||
*/
|
||||
enum qca_wlan_vendor_attr_coap_offload_reply {
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_REPLY_INVALID = 0,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_REPLY_SRC_IPV4 = 1,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_REPLY_SRC_IPV6 = 2,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_REPLY_FILTER = 3,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_REPLY_MSG = 4,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_REPLY_CACHE_EXPTIME = 5,
|
||||
|
||||
/* keep last */
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_REPLY_AFTER_LAST,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_REPLY_MAX =
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_REPLY_AFTER_LAST - 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum qca_wlan_vendor_attr_coap_offload_tx_ipv4 - Represents parameters for
|
||||
* CoAP message (UDP) transmitting on IPv4.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV4_SRC_ADDR:
|
||||
* u32 attribute. Source address (in network byte order) for transmitting
|
||||
* packets on IPv4.
|
||||
* This attribute is mandatory.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV4_SRC_PORT:
|
||||
* u16 attribute. Source UDP port.
|
||||
* This attribute is optional, a random port is taken if it's not present.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV4_DEST_ADDR:
|
||||
* u32 attribute. Destination IPv4 address (in network byte order).
|
||||
* This attribute is mandatory.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV4_DEST_IS_BC:
|
||||
* Flag attribute. If it's present, indicates that
|
||||
* %QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV4_DEST_ADDR is a broadcast
|
||||
* address; while if not, indicates that the address is unicast/multicast
|
||||
* address.
|
||||
* This attribute is optional.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV4_DEST_PORT:
|
||||
* u16 attribute. Destination UDP port.
|
||||
* This attribute is mandatory.
|
||||
*/
|
||||
enum qca_wlan_vendor_attr_coap_offload_tx_ipv4 {
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV4_INVALID = 0,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV4_SRC_ADDR = 1,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV4_SRC_PORT = 2,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV4_DEST_ADDR = 3,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV4_DEST_IS_BC = 4,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV4_DEST_PORT = 5,
|
||||
|
||||
/* keep last */
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV4_AFTER_LAST,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV4_MAX =
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV4_AFTER_LAST - 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum qca_wlan_vendor_attr_coap_offload_tx_ipv6 - Represents parameters for
|
||||
* CoAP message (UDP) transmitting on IPv6.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV6_SRC_ADDR:
|
||||
* NLA_BINARY attribute, length is 16 bytes.
|
||||
* Source address (in network byte order) for transmitting packets on IPv6.
|
||||
* This attribute is mandatory.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV6_SRC_PORT:
|
||||
* u16 attribute. Source UDP port.
|
||||
* This attribute is optional, a random port is taken if it's not present.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV6_DEST_ADDR:
|
||||
* NLA_BINARY attribute, length is 16 bytes.
|
||||
* Destination IPv6 address (in network byte order).
|
||||
* This attribute is mandatory.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV6_DEST_PORT:
|
||||
* u16 attribute. Destination UDP port.
|
||||
* This attribute is mandatory.
|
||||
*/
|
||||
enum qca_wlan_vendor_attr_coap_offload_tx_ipv6 {
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV6_INVALID = 0,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV6_SRC_ADDR = 1,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV6_SRC_PORT = 2,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV6_DEST_ADDR = 3,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV6_DEST_PORT = 4,
|
||||
|
||||
/* keep last */
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV6_AFTER_LAST,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV6_MAX =
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_TX_IPV6_AFTER_LAST - 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum qca_wlan_vendor_attr_coap_offload_periodic_tx - Attributes used
|
||||
* inside %QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_PERIODIC_TX nested attribute.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_PERIODIC_TX_IPV4:
|
||||
* Nested attribute. The IPv4 source/destination address/port for offload
|
||||
* transmitting. See enum qca_wlan_vendor_attr_coap_offload_tx_ipv4 for the list
|
||||
* of supported attributes.
|
||||
* This attribute is optional.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_PERIODIC_TX_IPV6:
|
||||
* Nested attribute. The IPv6 source/destination address/port for offload
|
||||
* transmitting. See enum qca_wlan_vendor_attr_coap_offload_tx_ipv6 for the list
|
||||
* of supported attributes.
|
||||
* This attribute is optional.
|
||||
*
|
||||
* At least one of %QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_PERIODIC_TX_IPV4 and
|
||||
* %QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_PERIODIC_TX_IPV6 must be configured.
|
||||
* Firmware will transmit the packets on both IPv4 and IPv6 if both are
|
||||
* configured.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_PERIODIC_TX_PERIOD:
|
||||
* u32 attribute. Period in milliseconds for the periodic transmitting.
|
||||
* This attribute is mandatory.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_PERIODIC_TX_MSG:
|
||||
* NLA_BINARY attribute, the maximum allowed size is 1152 bytes.
|
||||
* CoAP message (UDP payload) to be periodically transmitted. Firmware
|
||||
* is responsible for adding any necessary protocol headers.
|
||||
* This attribute is mandatory.
|
||||
*/
|
||||
enum qca_wlan_vendor_attr_coap_offload_periodic_tx {
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_PERIODIC_TX_INVALID = 0,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_PERIODIC_TX_IPV4 = 1,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_PERIODIC_TX_IPV6 = 2,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_PERIODIC_TX_PERIOD = 3,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_PERIODIC_TX_MSG = 4,
|
||||
|
||||
/* keep last */
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_PERIODIC_TX_AFTER_LAST,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_PERIODIC_TX_MAX =
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_PERIODIC_TX_AFTER_LAST - 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum qca_wlan_vendor_attr_coap_offload_cache_info - Attributes used
|
||||
* inside %QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_CACHES nested attribute.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_CACHE_INFO_TS:
|
||||
* u64 attribute. Received time (since system booted in microseconds) of
|
||||
* the cached CoAP message.
|
||||
* This attribute is mandatory.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_CACHE_INFO_SRC_IPV4:
|
||||
* u32 attribute. Source IPv4 address (in network byte order) of the cached
|
||||
* CoAP message.
|
||||
* This attribute is optional.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_CACHE_INFO_SRC_IPV6:
|
||||
* NLA_BINARY attribute, length is 16 bytes.
|
||||
* Source IPv6 address (in network byte order) of the cached CoAP message.
|
||||
* This attribute is optional.
|
||||
*
|
||||
* At most and at least one of
|
||||
* %QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_CACHE_INFO_SRC_IPV4 and
|
||||
* %QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_CACHE_INFO_SRC_IPV6 is given for
|
||||
* an entry.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_CACHE_INFO_MSG:
|
||||
* NLA_BINARY attribute, the maximum allowed size is 1152 bytes.
|
||||
* The cached CoAP message (UDP payload). If the actual message size is
|
||||
* greater than the maximum size, it will be truncated and leaving only
|
||||
* the first 1152 bytes.
|
||||
* This attribute is mandatory.
|
||||
*/
|
||||
enum qca_wlan_vendor_attr_coap_offload_cache_info {
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_CACHE_INFO_INVALID = 0,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_CACHE_INFO_TS = 1,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_CACHE_INFO_SRC_IPV4 = 2,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_CACHE_INFO_SRC_IPV6 = 3,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_CACHE_INFO_MSG = 4,
|
||||
|
||||
/* keep last */
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_CACHE_INFO_AFTER_LAST,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_CACHE_INFO_MAX =
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_CACHE_INFO_AFTER_LAST - 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum qca_wlan_vendor_coap_offload_action - Actions for
|
||||
* vendor command QCA_NL80211_VENDOR_SUBCMD_COAP_OFFLOAD.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_COAP_OFFLOAD_ACTION_REPLY_ENABLE:
|
||||
* Enable CoAP offload reply.
|
||||
* If it's enabled, firmware will start offload processing on each suspend
|
||||
* and stop on each resume.
|
||||
*
|
||||
* Offload reply on match works as follows:
|
||||
* Reply the packets that match the filter with the given CoAP
|
||||
* message (with necessary protocol headers), increase the CoAP message
|
||||
* ID in the given CoAP message by one for the next use after each successful
|
||||
* transmission, and try to store the information of the received packet,
|
||||
* including the received time, source IP address, and CoAP message (UDP
|
||||
* payload).
|
||||
*
|
||||
* Firmware has a limit to the maximum stored entries, it takes the source IP
|
||||
* address as the key of an entry, and keeps at most one entry for each key.
|
||||
* A packet won't be stored if no entry for the same key is present and the
|
||||
* total number of the existing unexpired entries reaches the maximum value.
|
||||
*
|
||||
* If any configured item is changed, user space should disable offload reply
|
||||
* first and then issue a new enable request.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_COAP_OFFLOAD_ACTION_REPLY_DISABLE:
|
||||
* Disable CoAP offload reply and return information of any cached CoAP
|
||||
* messages.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_COAP_OFFLOAD_ACTION_PERIODIC_TX_ENABLE:
|
||||
* Enable CoAP offload periodic transmitting.
|
||||
* If it's enabled, firmware will start offload periodic transmitting on
|
||||
* each suspend and stop on each resume.
|
||||
*
|
||||
* Offload periodic transmitting works as follows:
|
||||
* Send the given CoAP message (with necessary protocol headers) with the given
|
||||
* source/destination IP address/UDP port periodically based on the given
|
||||
* period and increase the CoAP message ID in the given CoAP message by one
|
||||
* for the next use after each successful transmission.
|
||||
*
|
||||
* If any configured item is changed, user space should disable offload
|
||||
* periodic transmitting first and then issue a new enable request.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_COAP_OFFLOAD_ACTION_PERIODIC_TX_DISABLE:
|
||||
* Disable CoAP offload periodic transmitting.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_COAP_OFFLOAD_ACTION_CACHE_GET:
|
||||
* Get information of the CoAP messages cached during offload reply
|
||||
* processing. The cache is cleared after retrieval.
|
||||
*/
|
||||
enum qca_wlan_vendor_coap_offload_action {
|
||||
QCA_WLAN_VENDOR_COAP_OFFLOAD_ACTION_REPLY_ENABLE = 0,
|
||||
QCA_WLAN_VENDOR_COAP_OFFLOAD_ACTION_REPLY_DISABLE = 1,
|
||||
QCA_WLAN_VENDOR_COAP_OFFLOAD_ACTION_PERIODIC_TX_ENABLE = 2,
|
||||
QCA_WLAN_VENDOR_COAP_OFFLOAD_ACTION_PERIODIC_TX_DISABLE = 3,
|
||||
QCA_WLAN_VENDOR_COAP_OFFLOAD_ACTION_CACHE_GET = 4,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum qca_wlan_vendor_attr_coap_offload - Used by the
|
||||
* vendor command QCA_NL80211_VENDOR_SUBCMD_COAP_OFFLOAD.
|
||||
* This is used to set parameters for CoAP offload processing, or get
|
||||
* cached CoAP messages from firmware.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_ACTION:
|
||||
* u32 attribute. Action to take in this vendor command.
|
||||
* See enum qca_wlan_vendor_coap_offload_action for supported actions.
|
||||
* This attribute is mandatory.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_REQ_ID:
|
||||
* u32 attribute. Represents the Request ID for the CoAP offload
|
||||
* configuration, which can help to identify the user entity starting
|
||||
* the CoAP offload processing and accordingly stop the respective
|
||||
* ones/get the cached CoAP messages with the matching ID.
|
||||
* This attribute is mandatory.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_REPLY:
|
||||
* Nested attribute. Parameters for offload reply.
|
||||
* See enum qca_wlan_vendor_attr_coap_offload_reply for the list of
|
||||
* supported attributes.
|
||||
* This attribute is mandatory if %QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_ACTION
|
||||
* is QCA_WLAN_VENDOR_COAP_OFFLOAD_ACTION_REPLY_ENABLE, and is ignored
|
||||
* otherwise.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_PERIODIC_TX:
|
||||
* Nested attribute. Parameters for offload periodic transmitting.
|
||||
* See enum qca_wlan_vendor_attr_coap_offload_periodic_tx for the list of
|
||||
* supported attributes.
|
||||
* This attribute is mandatory if %QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_ACTION is
|
||||
* QCA_WLAN_VENDOR_COAP_OFFLOAD_ACTION_PERIODIC_TX_ENABLE, and is ignored
|
||||
* otherwise.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_CACHES:
|
||||
* Array of nested attributes. Information of the cached CoAP messages,
|
||||
* where each entry is taken from
|
||||
* enum qca_wlan_vendor_attr_coap_offload_cache_info.
|
||||
* This attribute is used for reporting the cached CoAP messages
|
||||
* in reply for command in which %QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_ACTION
|
||||
* is QCA_WLAN_VENDOR_COAP_OFFLOAD_ACTION_CACHE_GET or
|
||||
* QCA_WLAN_VENDOR_COAP_OFFLOAD_ACTION_REPLY_DISABLE. It means there is no
|
||||
* cached item if this attribute is not present.
|
||||
*/
|
||||
enum qca_wlan_vendor_attr_coap_offload {
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_INVALID = 0,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_ACTION = 1,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_REQ_ID = 2,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_REPLY = 3,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_PERIODIC_TX = 4,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_CACHES = 5,
|
||||
|
||||
/* keep last */
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_AFTER_LAST,
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_MAX =
|
||||
QCA_WLAN_VENDOR_ATTR_COAP_OFFLOAD_AFTER_LAST - 1,
|
||||
};
|
||||
|
||||
#endif /* QCA_VENDOR_H */
|
||||
|
|
Loading…
Add table
Reference in a new issue