Update qca_vendor.h with latest NDP vendor attribute definitions
and use those definitions in NAN component.
Change-Id: I43f0457690b1c4027adcd0abe4ef2ac2a8f9b068
CRs-Fixed: 2239047
The qca_wlan_vendor_ndp_policy for the attribute
QCA_WLAN_VENDOR_ATTR_NDP_CONFIG_QOS currently specifies type
NLA_BINARY with a maximum length of NDP_QOS_INFO_LEN (255). However
this attribute is defined to be an unsigned 32 bit value, and
nla_get_u32() is used to read the value, so change the policy to use
type NLA_U32 so that nla_parse() can properly verify that the TLV
payload has (at least) 4 bytes of data.
Change-Id: Iee5b620ef199b731fc6a449d0055db328430921b
CRs-Fixed: 2237660
The qca_wlan_vendor_ndp_policy for the attribute
QCA_WLAN_VENDOR_ATTR_NDP_RESPONSE_CODE currently specifies type
NLA_U16. However this attribute is defined to be an unsigned 32 bit
value, and nla_get_u32() is used to read the value, so change the
policy to use type NLA_U32 so that nla_parse() can properly verify
that the TLV payload has (at least) 4 bytes of data.
Change-Id: I915a94e7449c2bc1abde64e2a7f5df6a58488ed6
CRs-Fixed: 2237659
The current qca_wlan_vendor_ndp_policy for attribute
QCA_WLAN_VENDOR_ATTR_NDP_PEER_DISCOVERY_MAC_ADDR uses type NLA_BINARY.
Unfortunately this type uses the len as a maximum length and not a
minimum length which means that nla_parse() cannot guarantee that 6
bytes of MAC address are present. Change the policy to use type
NLA_UNSPEC so that nla_parse() will ensure that the NDP Discovery MAC
address TLV contains (at least) 6 bytes.
Change-Id: I2c7e1efdb413dbd2f79c36ed1626c006b86e8b5b
CRs-Fixed: 2237658
Re-factor vendor event buffer length calculation for NDP events
to a separate function call.
Change-Id: I6828067d0e81987d7c903fd7f7df05b3a4eadbe3
CRs-Fixed: 2183658
Check for interface name only when ndp response is "accept" from user. In
case of "reject" discard interface name provided and instead use first NDI
available.
CRs-Fixed: 2222041
Change-Id: Ib02fe7d5b93f8e388658e511317664a4999b5fa6
The service layer need not provide the iface name in the
responder request to the driver if the request is being rejected.
The service layer maps the ndp_instance_id only after accepting
the request, if the ndp indication is rejected, the user space
has no knowledge of the iface name on which the NDP would have
gotten mapped if it were successful
CRs-Fixed: 2222041
Change-Id: I94a7de0c98c14dbe2389dd8364b6dd78858a9d0a
The qdf_str APIs have recently been moved from qdf_mem. Reference the
new qdf_str.h header file where appropriate.
Change-Id: If97c9c37a7d720a7b93e50ec228da67a8e980c2e
CRs-Fixed: 2196129
A recent commit changed the return type for qdf_str_len() to size_t from
int32_t. Update call sites for qdf_str_len() to store the return value
as size_t to match.
Change-Id: Ib8bfad2c1fc7de1f6fc601d1be69e734d3a49dcf
CRs-Fixed: 2196858
Refactor NAN target_if to make it wmi-type agnostic. Specifically
do not access wmi structures in NAN target_if. All the access to
wmi structures should happen in tlv and non-tlv specific wmi files.
Change-Id: I944b678fc501723d7cd26c9b21c4cc6ddb7fda4e
CRs-Fixed: 2159876
Avoid possible null pointer dereferece and out of bound access
in NAN component.
Change-Id: I40ba4e340e34e8975c782c0a6329322e3c151326
CRs-Fixed: 2160751
The Linux kernel version 4.12 introduced an API change to nla_parse().
Add conditional compilation to call nla_parse with the correct
parameters based on the version of the linux kernel being compiled
against.
Change-Id: Ie904d217a42a2396f8245251a9c90a15dac2c0c9
CRs-Fixed: 2093354
There were some corner cases reported in which NDIs are getting
created with same name. Providing fix for the same.
Change-Id: I84ea80580faa44809e257d3b17645808637b5d51
CRs-Fixed: 2072509
Enable support for multiple nan data interfaces. The usespace
may need to create multiple NDIs depending on whether it
requires IP isolation or not.
Change-Id: I4391f2efdc6bdede52a73915531d39dd7798c39d
CRs-Fixed: 2072501
The ndp channel config has no meaning if ndp channel itself
is optional. Host will send ndp channel config as "optional"
to FW if it is missing in the ndp command.
Change-Id: I59e245f3fb05ae35aa185fba7bad09608f5334c8
CRs-Fixed: 2072502
Driver truncated the transaction id to 8-bits from 16-bit
value causing the descrepancy in transaction id exchange
during NDI create.
Change-Id: I502f422620411c39bd0e75f06e9b7200bfea24ae
CRs-Fixed: 2072511
Service layer was not allowed to delete NDI if there are active
NDP sessions (peers). Service layer is expected to delete the
active NDP sessions before issuing NDI delete. However, that
is not guaranteed to happen. Hence allowing internal cleanup
to happen by allowing the command to firmware.
Change-Id: Iab9bc3bca431475792c164d16cdd18be2f346188
CRs-Fixed: 2072505
Add Passphrase and Service Name to NDP initiator request and NDP
responder request.
Change-Id: I6a189747760a15393fcbac9dc382847fef789ab1
CRs-Fixed: 2072498
Currently the QCA_WLAN_VENDOR_ATTR_NDP_IFACE_STR nla_policy specifies
a type of NLA_STRING, but the underlying implementation expects a
NUL-terminated string. Update the policy to correctly use a type of
NLA_NUL_STRING with the len updated to remove the allocation needed
for the terminating NUL.
Change-Id: Ic73241511ab73ae63fd7c1a8d6422da91931919c
CRs-Fixed: 2063588
Add NDP command execution framework:
1) Define UCFG apis, that will be called from OS_IF layer
2) Define request proccessing functions to post to scheduler and callback.
3) Define request proccessing functions to post to serializer and callback.
4) Define functions handling activated, cancelled and timed out NDP req.
Change-Id: Ibc6fe32c65f8de0c24e0537f2eb538f806cf5284
CRs-Fixed: 2014795