Currently driver code has data type as char* for NAN related code.
With this change update this data type as const char*.
Also, move NAN related functions under WLAN_FEATURE_NAN feature flag.
Change-ID: I61ad10304be4399a68f32778d01d9a951d7d14bb
CRs-Fixed: 3169168
Currently driver uses iface name to get netdev when it processes
ndp responder request. There is a possibility that framework does
not know the iface name when it sends the error response.
if driver does not receive iface name it fails to get the netdev
and fails to perform the dsc operation, because of which driver
drops the ndp responder request command.
To address this issue, use wdev to get netdev instead of iface name.
Change-Id: Ie230f19dbd895f81a4730160cbc9a2de3cc3179d
CRs-Fixed: 3136089
This reverts commit Idf394f4a22ace8757f947b2ef8e4a7d22e66d65e
which is causing termination of NDP session immediately after
formation.
Change-Id: I88a9c4ab80b727e5bda7a9f9c7e8b48399f98a34
CRs-Fixed: 3133498
Currently driver uses iface name to get netdev when it processes
ndp responder request. There is a possibility that framework does
not know the iface name when it sends the error response.
if driver does not receive iface name it fails to get the netdev
and fails to perform the dsc operation, because of which driver
drops the ndp responder request command.
To address this issue, use wdev to get netdev instead of iface name.
Change-Id: Idf394f4a22ace8757f947b2ef8e4a7d22e66d65e
CRs-Fixed: 3124009
Framework disables p2p before enabling NAN as P2P+NAN concurrency
is not supported. NAN operations happens through wifihal and p2p
operations happen through wpa_supplicant which are two different
userspace components. Wifihal call to enable NAN may come to host
driver before disabling p2p through wpa_supplicant. There are high
chances for p2p scan to be in running state while NAN enable is
received. Firmware NAN state machine goes to inconsistent state
and disables NAN as p2p scan is running in such cases.
So, stop the ongoing p2p scan before enabling NAN as P2P+NAN
concurrency is not supported currently.
Also, forward the pdev to NAN component inorder to iterate through
all P2P vdevs.
Change-Id: Ibe30a5ebe90514aee4f6721cdc5476570524cad8
CRs-Fixed: 3054576
Opportunistic timer gets triggered as soon as a DBS use case
is completed and hw_mode would be set to SMM when the
timer(5 seconds) expires.
Below is an example scenario,
1. DBS is enabled to support STA on 5GHz + SAP on 2.4GHz on
a Helium device.
2. SAP is disabled(to enable NAN as NAN+SAP is not supported on
HL platforms)
3. Opportunistic timer gets triggered with a timeout of 5 seconds
as DBS is not needed anymore.
4. Once the timer expires, WMI_PDEV_SET_HW_MODE_CMDID command
would be sent to firmware to set the hw_mode to SMM.
But if framework enables NAN immediately after disabling SAP,
firmware can't allow it as NAN is not supported in DBS mode in
Helium platforms. Thereby firmware either rejects the NAN enable
or defer it till set_hw_mode command is received(which introduces
a delay of 5 seconds as host sends it after timer expiry).
So, stop the timer and complete corresponding action when a NAN
command is received from framework to avoid this failure/delay.
Change-Id: I50521c0dd5f2314034957a0f65898c737cfe7e2e
CRs-Fixed: 2937407
QCA_NL80211_VENDOR_SUBCMD_NAN_EXT is introduced to carry NAN
command data along with channel info. This channel info is needed
to enable DBS on DBS supported platforms. The command data is sent
to firmware as it on non-DBS platforms.
Userspace is expected to send NAN commands through
QCA_NL80211_VENDOR_SUBCMD_NAN_EXT if it's supported. It can send
QCA_NL80211_VENDOR_SUBCMD_NAN if QCA_NL80211_VENDOR_SUBCMD_NAN_EXT
is not supported, which is expected to happen on older
platforms(non-DBS).
So legacy NAN command QCA_NL80211_VENDOR_SUBCMD_NAN is not allowed
on DBS platforms, as the command is sent to firmware without
enabling DBS.
Event part of QCA_NL80211_VENDOR_SUBCMD_NAN is still intact as it
carries NAN events from firmware to userspace.
Change-Id: Ie1aaf9f7ea051009125c972de4f0de13942448fb
CRs-Fixed: 2699605
According to new changes in kernel 5.4 version onwards, driver has to
provide the policy for a NL command to ve verified against while
registering wiphy to the kernel.
To accommodate these changes, add policy for all the following
vendor commands that are being registered in the driver
QCA_NL80211_VENDOR_SUBCMD_GET_SUPPORTED_FEATURES
QCA_NL80211_VENDOR_SUBCMD_GET_FEATURES
QCA_NL80211_VENDOR_SUBCMD_GET_LOGGER_FEATURE_SET
QCA_NL80211_VENDOR_SUBCMD_GET_WIFI_INFO
QCA_NL80211_VENDOR_SUBCMD_GET_BUS_SIZE
QCA_NL80211_VENDOR_SUBCMD_NO_DFS_FLAG
QCA_NL80211_VENDOR_SUBCMD_LL_STATS_SET
QCA_NL80211_VENDOR_SUBCMD_SET_WIFI_CONFIGURATION
QCA_NL80211_VENDOR_SUBCMD_NAN_EXT
QCA_NL80211_VENDOR_SUBCMD_NDP
QCA_NL80211_VENDOR_SUBCMD_SCANNING_MAC_OUI
QCA_NL80211_VENDOR_SUBCMD_WIFI_LOGGER_START
QCA_NL80211_VENDOR_SUBCMD_LL_STATS_GET
QCA_NL80211_VENDOR_SUBCMD_ROAM
QCA_NL80211_VENDOR_SUBCMD_PACKET_FILTER
QCA_NL80211_VENDOR_SUBCMD_ND_OFFLOAD
QCA_NL80211_VENDOR_SUBCMD_GW_PARAM_CONFIG
QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_SET_KEY
QCA_NL80211_VENDOR_SUBCMD_GET_RING_DATA
QCA_NL80211_VENDOR_SUBCMD_TRIGGER_SCAN
Change-Id: I714c8b21a95144f7ed8ff4c6e038782e469edf3d
CRs-Fixed: 2621308
Currently, NDI and NDP creation is happening only if the
corresponding concurrency is allowed. But NDI should be allowed
to create/delete in all concurrent scenarios. So, don't validate
the other interfaces present on device for NDI creation/deletion
and validate only for NDP requests.
Change-Id: I8e8817ac63f1f94b48fe71a30ddf1d49183d263a
CRs-Fixed: 2552623
NAN Datapath vendor commands include a vendor attribute that
contains interface name string. Only NAN Datapath interface
needs the modules that return vdev object from interface name
and vice versa. Presently these modules are part of in cmn
utils under UMAC. They're accessing OS IF private structures
which is a layering violation. So move these modules to the
NAN OS IF files where they're appropriate.
Move interface name related modules to NAN OS IF files.
Change-Id: I643bf597895e172fa501ada18ebc13ffa2e144e3
CRs-Fixed: 2284200
Flag WLAN_FEATURE_NAN_DATAPATH was added to protect NAN Datapath
related code, while WLAN_FEATURE_NAN_CONVERGENCE was added to
protect the converged code inside NAN Component. Since the
original NAN Discovery related code has now been moved inside
NAN component and NAN Datapath cannot exist without NAN Discovery,
keeping these flags separate doesn't make sense. Combine these
two flags with WLAN_FEATURE_NAN flag which is the original NAN
feature flag.
As a cleanup of NAN code, combine all NAN related flags with
WLAN_FEATURE_NAN flag.
Change-Id: If98ecaace17f8724e9c28325ef61e721f42e1d8f
CRs-Fixed: 2377375
NAN component has been moved to CLD. It includes implementation
of the new NAN command QCA_NL80211_VENDOR_SUBCMD_NAN_EXT.
Change the legacy NAN implementation of vendor cmd
QCA_NL80211_VENDOR_SUBCMD_NAN so that the requests go
through the NAN component. Clean up the legacy path.
Functionality remains unchanged for legacy command.
Route the legacy NAN commands through the NAN component.
Change-Id: I542e5afe832619f8c088220cc4456aa7fe4416fd
CRs-Fixed: 2356772
As part of supporting NAN DBS, new WMI TLVs are defined so
that Host can maintain the status of NAN Discovery in sync
with the Firmware. Add modules that process these events and
updates the NAN states.
Add support for handling the NAN events.
Change-Id: Icfcd9c33cc410d9a65140f63cac69ddd69742306
CRs-Fixed: 2355383
As part of the NAN Discovery DBS support, a new vendor command
- QCA_NL80211_VENDOR_SUBCMD_NAN_EXT - has been defined that can
carry the binary blob encapsulated within an attribute and can
carry additional attributes to enhance the NAN command interface.
Add related data structures in NAN component and add modules in
OSIF to parse and sanitize this new command data and forward
the NAN message to the NAN component.
Add support for the new NAN EXT vendor command.
Change-Id: I0e6bb833b01a8cbd65e4d42700b5b70599f3ef99
CRs-Fixed: 2339029
NAN component is not needed in the CMN repo. To reduce the
unnecessary lines of code, merge the NAN related OS IF files
from CMN into CLD. Subsequently remove these files from the
CMN repo.
Merge NAN related OS IF files from CMN into CLD.
Change-Id: Iba5c367549f135800c6f36a7066829393d62e92b