Commit Graph

762 Commits

Author SHA1 Message Date
Naga
9dad9767b1 qcacmn: Cleanup duplicate fields in vdev_mlme
Add change to cleanup duplicate fields of
of vdev_mlme, which are also in mlme_channel_param
and their dependencies while updating
vdev_start_param. Cleanup unused mlme_cfg_ids.

Change-Id: Ie32971283a337f04692c0c0bc7f41fff75c090c3
CRs-Fixed: 2407953
2019-04-11 01:14:21 -07:00
Santosh Anbu
a3d6f77c62 qcacmn: Add API to validate umac_cmd in serialization command
Since umac cmd is specific to the module adding cmd to serialization
queue, an API is needed to validate the umac_cmd associated with that
serialization context holding the serialization queue lock.

Change-Id: Iadb4deb17ffabd780432a29e7cbd37024fd431fe
CRs-Fixed: 2430764
2019-04-11 01:14:10 -07:00
Akshay Kosigi
48debcb1f6 qcacmn: Move get macaddr API at proper place
Move get macaddr from peer API at appropriate place instead of fetching
it everytime and not using it.

Change-Id: I01349a672215395795cd08cd65d98ad8a08b95b0
CRs-Fixed: 2431163
2019-04-09 11:56:50 -07:00
Min Liu
a3bad2b70e qcacmn: Reject STA with PMF disabled only when PMF is required
In wlan_crypto_rsn_info, only need to reject STA with PMF disabled
when PMF is required.

Change-Id: I7a7d4b2d1a2d44a95d08eb6bfac14540940f0be3
CRs-Fixed: 2424932
2019-04-08 10:50:10 -07:00
Min Liu
bc3bde34bf qcacmn: Add AP mode support for PMKSA
Currently only STA mode is supported in wlan_crypto_set_del_pmksa.
For SAE SAP, need to add AP mode support in this API.

Change-Id: If45a516713e302b3516d163516263bbcbafeaed2
CRs-Fixed: 2424893
2019-04-08 10:50:06 -07:00
Liangwei Dong
51cff6d6e0 qcacmn: Add API for get mgmt cipher
MCL code will need to find the supported mgmt cipher
type from crypto component. Add two api for vdev and
peer for it.

Change-Id: Ic33d4f18a04b48ce4699617569585fd1c2ae6f61
CRs-Fixed: 2421463
2019-04-06 01:54:47 -07:00
Srinivas Girigowda
d8a7efdb29 qcacmn: Add EDCA and QoS element ID and IE max values
Add EDCA and QoS capability element IDs and certain
IE max values.

Change-Id: I25480c1d63d20b4c56637151edcb99bf4739574c
CRs-Fixed: 2427312
2019-04-06 01:54:44 -07:00
Akshay Kosigi
09b50e625d qcacmn: Add psoc id value to debug prints vdev mlme timer APIs
Add psoc id value for the debug prints of, error handling vdev mlme timer
APIs

Change-Id: I7d225114e91ff4b6f898450ca3ef7d2e21be631a
CRs-Fixed: 2427905
2019-04-05 18:45:44 -07:00
Bala Venkatesh
f96d9cf159 qcacmn: Replace duplicate api's of vdev_connected
Currently, the vdev connection status is checked by getting
the bss peer of that vdev, and if the bss peer is in associated
state then vdev connected status is sent as true. It can happen
vdev is present and bss peer is deleted after getting the bss peer
from vdev pointer. Then bss peer can not be dereferenced to get the
its status.

Instead remove all the duplicate api's tdls_is_vdev_connected,
pmo_core_is_vdev_connected, and wlan_vdev_is_connected with
wlan_vdev_is_up. wlan_vdev_is_up gives success status
if associated.

Change-Id: I863c3c0689f329870bd08c813813c16956135209
CRs-Fixed: 2426092
2019-04-05 08:37:35 -07:00
Vivek
740f39f568 qcacmn: Remove assert on serialization timer handler's cmd check
There is an assert inside the serialization timer cb.
This timer cb can also be called in the scheduler context.

So if we get a scan cancel request, it is posted to scheduler
and after that command timesout, the timer  cb is posted
to the scheduler.

So first the cancel is executed and the command is removed.
After that, the timer handler is executed which will find timer->cmd
to NULL.

So, by the time, the timer handler is involved in scheduler context
the command might be cancelled so we return an error when cmd is null
in timer handler cb.

Change-Id: I03651a63de88fe5c6467c5783254ffd006c663d2
CRs-Fixed: 2427323
2019-04-04 10:31:53 -07:00
Liangwei Dong
ca4abcf92f qcacmn: Add PMK field to pmkid cache
In roaming offload, PMK will be sent to firmware.
So,save the PMK to pmkcache when supplicant provide
from os interface.

Change-Id: Ibfd3d354b9150b40755ba2ab1dd90c2e3c6ddbc3
CRs-Fixed: 2420359
2019-04-04 08:51:38 -07:00
Akshay Kosigi
2f7256aa8b qcacmn: Move vdev mlme related code to right file
Move vdev mlme related code from vdev objmgr to vdev mlme files

Change-Id: I4aafdd09376f5cf2ae5c2ad7f0276c9a67ef1d19
CRs-Fixed: 2423319
2019-04-04 08:51:34 -07:00
Santosh Anbu
6ca41ef58f qcacmn: Update ref cnt debug id doc
Add change to update the reference count module id doc.

Change-Id: I4636a4b87f04b8ae608b18c77f9bd18e7fb3ee71
CRs-Fixed: 2426772
2019-04-04 01:52:36 -07:00
Jeff Johnson
f3a2b8918c qcacmn: crypto: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within umac crypto replace any such comparisons with
logical operations performed on the pointer itself.

Change-Id: Id6edc4aa8bf0fef455c1359dacabd74fc7163e44
CRs-Fixed: 2418253
2019-03-28 16:50:36 -07:00
Srinivas Girigowda
2751b6d2b3 qcacmn: Consolidate multiple MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
Consolidate multiple (redundant) MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
CDP_MAC_ADDR_LEN
OL_TXRX_MAC_ADDR_LEN
DP_MAC_ADDR_LEN
HTT_MAC_ADDR_LEN
IEEE80211_ADDR_LEN
DEFRAG_IEEE80211_ADDR_LEN
ETHER_ADDR_LEN
HAL_MAC_ADDR_LEN
WLAN_MACADDR_LEN

CRs-Fixed: 2406591
Change-Id: I4a87f8ff556920c7b341bdbba99ec43c97b873f4
2019-03-28 16:50:32 -07:00
Jeff Johnson
a95ea4f9ee qcacmn: serialization: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within umac serialization replace any such comparisons
with logical operations performed on the pointer itself.

Change-Id: I6b8ff46dacfd2f9a883262f6336f35f5aff499bc
CRs-Fixed: 2420150
2019-03-28 09:04:45 -07:00
Srinivas Pitla
d9ad48d3ff qcacmn: Handle RADAR detect in RESTART state
If MLME gets RADAR detected event while waiting for RESTART response from
FW(RESTART_PROGRESS substate), it sets PDEV RADAR detect deferred flag.

Once VDEV SM moves from START to other state, it invokes MLME SM callback,
which checks whether “RADAR detect defer” is set.

If it is set, SM callback posts message to scheduler to notify all VDEVs on
RADAR detection.(from here, flow goes as regular radar detected event)

Change-Id: Icaa2aee900be60c12c5b38b1d199bb01ba31f722
CRs-Fixed: 2390019
2019-03-28 01:25:24 -07:00
Santosh Anbu
9f4daf55f7 qcacmn: Add change for timeout to be executed in scheduler
When a serialization cmd is activated and activation is process in
scheduler context, it is observed that the timeout for that cmd
occurs and the cmd is released even though the activation in
scheduler context is still in progress.

This will lead to accessing the serialization cmd after free,
leading to memory corruption error.

Add change to avoid this by posting timeout message to scheduler
thread which will help synchronize the cmd execution in scheduler.

Change-Id: Ib2234331844f48d0d219f430f5b585f792282d42
CRs-Fixed: 2419854
2019-03-26 01:24:55 -07:00
Jeff Johnson
dcb2769793 qcacmn: obj_mgr: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within umac obj_mgr replace any such comparisons with
logical operations performed on the pointer itself.

Change-Id: I0f556e8baa9126511420a8d4c1b1a5e4ee220bab
CRs-Fixed: 2420149
2019-03-24 19:27:05 -07:00
Santosh Anbu
e0f17e57bb qcacmn: Add object manager API to iterate psoc list
Add object manager to iterate through all the psoc in
the system and call the provided callback with relevant
arguments

Change-Id: I92f4c1248447ce14413b666076e515c0569385a0
CRs-Fixed: 2413775
2019-03-24 14:55:04 -07:00
Nachiket Kukade
dace806a9d qcacmn: Move wlan utility modules due to layering violation
Modules wlan_util_get_vdev_by_ifname/wlan_util_vdev_get_if_name,
which are part of wlan utility under UMAC, are accessing OS IF
private structure that points to the interface name. This is a
layering violation since OS IF private structure should only be
accessed from OS IF layer. Move these modules in NAN OS IF files
in CLD where they are more appropriate.

Move modules that access os if priv to NAN OS IF files in CLD.

Change-Id: Ie4c2f51cddf3abfccbaa6a80580f38345697cfd1
CRs-Fixed: 2384474
2019-03-24 14:54:58 -07:00
Vivek
90f688d589 qcacmn: Fix error in check against max vdev for a pdev
The current implementation allows one extra vdev
to be created than the max vdevs allowed for a pdev.

Correct the check to allow only max vdevs to be created
for a pdev.

Change-Id: I589ae204abe87f5a727489494a34807a45d501fa
CRs-Fixed: 2415783
2019-03-17 10:43:29 -07:00
Santosh Anbu
3f0962833f qcacmn: Add API to fetch activation status for active cmd
Add change to fetch the activation status for the command in the
active queue of a given vdev.

Change-Id: I2ef87b5423f3749eb68e50147c9a30115492197c
CRs-Fixed: 2415236
2019-03-13 23:21:57 -07:00
Nachiket Kukade
ab9c7479e4 qcacmn: Add modules to support new NDP command and event
Add modules and API's to issue command WMI_NDP_CMDID. This
command, for now, can request Firmware to terminate all NDP's
associated with the given vdev. Add module that extracts
event information from event WMI_NDP_EVENTID. This event acts
as a response to command WMI_NDP_CMDID, and carries NDP
related status information for the host. Extract mac_id from
the updated TLV of NDP confirm and schedule update events.

Add modules and API's to support new NDP command and event.

Change-Id: Ibf6312cb3669b5e62ada3f4ad852be87f14ae09f
CRs-Fixed: 2384535
2019-03-12 13:58:31 -07:00
Santosh Anbu
73f3f09abf qcacmn: Fix type for wlan_serialization_cmd_callback
Fix the type for nan_serialized_cb and remove unnecessary
type casts from other callbacks.

Change-Id: Ie4e45f5a7e9fc17eb1c45fa18160e3bbd47151fe
CRs-Fixed: 2402989
2019-03-12 06:10:08 -07:00
Manoj Ekbote
6db1ddac13 qcacmn: Add pdev level feature flag for MBSS IE
A service bit is used to indicate support for MBSS IE.
This is set as capability in host at psoc level.
In host, we also maintain a flag for user to configure
MBSS support at pdev level. It could be used in future.

Change-Id: I31a27a755fb027de93bfe6c9639fdbda9693bace
CRs-Fixed: 2403030
2019-03-08 12:06:04 -08:00
Vivek
a6dcfa32c0 qcacmn: Format SM history logging
Format the current SM history logging.
Add single header line and merge two
line outputs into one.

Print the SM history in the order the events
are updated in the events circulat buffer.

Change-Id: I2bb2076231cc3ea625938f9ff77d1c601f740b83
CRs-Fixed: 2408488
2019-03-08 06:04:42 -08:00
Madhvapathi Sriram
b73fc282d8 qcacmn: Remove error log for qdf_mem_malloc in umac files
qdf layer already has the error trace

Change-Id: I2ea22fe0e3e59b9d41ac21142615ffb96227abaf
CRs-Fixed: 2376418
2019-03-04 07:30:21 -08:00
Varun Reddy Yeturu
09a3b065f9 qcacmn: Fix WEP functionality in converged set key
Fix WEP security mode issues in converged set key.

Change-Id: Idd4071c8aef141cb45db9006c5773a94b352879a
CRs-Fixed: 2400864
2019-03-03 22:25:23 -08:00
Vivek
963b9daa31 qcacmn: Explicit initialization of vdev id
The vdevid used in the wlan_ser_print_history function
is not initialized by default
and we pass them to subsequent function without initializing
though that would not be used.

Initialize the vdev id by default irrespective of its use.

Change-Id: I0c45528bdfcb8c6e37a40ea9a68f5c56c1cda753
CRs-Fixed: 2407068
2019-03-02 17:45:52 -08:00
Srinivas Pitla
9527e111d0 qcacmn: avoid access sm before NULL check
This change moves accessing sm after NULL check performed

Change-Id: Iad1c0d9ea9c8bb6e79338259ab93f685b78ad26f
CRs-Fixed: 2407091
2019-03-02 13:31:46 -08:00
Bala Venkatesh
fbf6d922d6 qcacmn: Skip DFS channels in p2p scan
Add support for the INI gSkipDfsChannelInP2pSearch
to remove the DFS channels from the given scan list in
p2p scan.

Change-Id: I44a6208ab5f3ee062073550143e23e5800342376
CRs-Fixed: 2405191
2019-02-28 18:35:49 -08:00
Pragaspathi Thilagaraj
17810df306 qcacmn: Add support for FT SAE and FT Suite-B
Previously host driver only supports initial SAE and Suite-B
authentication types and roaming to SAE AP is blocked. The
802.11 specification has introduced the Akm suite 00:0F:AC:9 for
FT-SAE and 00:0F:AC:13 for FT Suite-B akm type. Add support for
FT-SAE and FT-Suite-B.

Extend the enum wlan_auth_type to include WLAN_AUTH_TYPE_FT_SAE,
WLAN_AUTH_TYPE_FT_SUITEB_EAP_SHA384. This enum wlan_auth_type is
the new implementation for akm type in converged scan module
corresponding to the legacy eCsrAuthType enum.

Add changes in scan module filter to support FT-SAE and
FT-Suite-B authentication suites be added to filter->auth_type.
csr_scan_get_result() will translate the legacy eCsrAuthType
to wlan_auth_type and push it to the filter->auth_type.

Change-Id: I74d7b0be74d33ced5d3e528032aec6e057a75ff3
CRs-Fixed: 2400683
2019-02-27 09:56:03 -08:00
Naga
7dd88340fe qcacmn: Enhance and update target_if/mlme/vdev_mgr
Enhance target_if/mlme/vdev_mgr by addressing
review comments and update response handling
APIs to handler timers and response bit maps
as expected

Change-Id: I8a5bf3f2931f0c36a367dfebfc898ed2621f3516
CRs-Fixed: 2397184
2019-02-24 20:04:45 -08:00
Akshay Kosigi
1726ae21c5 qcacmn: Add API to update cmn vdev mlme structures
Add API to update cmn vdev mlme structures,
with the addition of new members to the new mlme
vdev structure,new api's are required to update
those members which will be subsequently used the
new mlme target if layer to send commands to the firmware

Change-Id: I9618613c0ad00f78003cd32951b30b631934ba71
2019-02-24 20:04:41 -08:00
Abhishek Singh
7c1fe52d51 qcacmn: Get vdev_id before releasing ref while flushing active cmd
In wlan_ser_cancel_non_scan_cmd, cmd.vdev pointer is used to get vdev id
after WLAN_SER_CB_RELEASE_MEM_CMD is called. In WLAN_SER_CB_RELEASE_MEM_CMD
the command release the vdev ref count and it may lead to physical
deletion of vdev. Thus getting vdev id from vdev may result in invalid
vdev_id and thus proper bits are not reset in vdev_active_cmd_bitmap
for the vdev.

Thus no new blocking command will be allowed in serialization active queue.

Fix is to get proper vdev_id before WLAN_SER_CB_RELEASE_MEM_CMD is called
and use that to reset the pdev_q->vdev_active_cmd_bitmap bit for vdev_id

Change-Id: I2756f1632a72f086e9d214a437ad794ae08afc45
CRs-Fixed: 2395851
2019-02-23 05:19:07 -08:00
Abhiram Jogadenu
b692339f5a qcacmn: Add umac support for CFR
Add UMAC support for CFR module.

CRs-Fixed: 2372061
Change-Id: Idf5991d2cb43e8165ae4eed12d675f1039f4bc77
2019-02-22 02:50:17 -08:00
Srinivas Pitla
6d0331de8f qcacmn: Add flag for Multi VDEV restart synchronization
In current code, channel number is checked to enable multivdev restart
synchronization, this assumption is not valid as channel width change
can also be requested.

To fix this, used a flag to enable multivdev restart synchronization.

Change-Id: I2633ee42ae7d8c127d8369f36f14e861431a21cc
CRs-Fixed: 2400987
2019-02-21 04:53:04 -08:00
Gurumoorthi Gnanasambandhan
612a906f4e qcacmn: Initialize keydata with 0 in delkey
delkey is using the existing keydata instead of memeset to 0

CR Fixed: 2393644
Change-Id: I7ee6718647d27d31e302e670e2bf12ce0fcdec8e
2019-02-18 05:00:24 -08:00
Arif Hussain
20a228a631 qcacmn: Add BKID only for sta mode
BKID is part of only assosciation and reassociation
request frames, So include it only for sta mode.

Change-Id: Ic43e20b46154a957a7290cdcc70615247949cba7
CRs-Fixed: 2398256
2019-02-14 21:29:29 -08:00
Aditya Sathish
73d452f3d2 qcacmn: Add support for UL_RU26 WMI service
Add support for UL_RU26 WMI service which will notify the host if
the target has allowed UL_RU26

Change-Id: I639c0872f541cf30776c9f76b87c4b950c1e17f4
CRs-Fixed: 2390350
2019-02-12 11:24:37 -08:00
Ashok Kumar
1b91304c4c qcacmn: use bool instead of uint8_t
Replace uint8_t type with bool where only
variable is used for set true or false.

Change-Id: I04592bfc4d0d4b19c67cedafd3b8cb625544cd18
2019-02-12 08:45:15 -08:00
Kiran Kumar Lokere
b4d634fbf2 qcacmn: Fix compilation issue with crypto set key
Fix compilation issue with crypto set key feature.

Change-Id: I82d8220a9fea1f9e48338baa74307c124c98e784
CRs-Fixed: 2381329
2019-02-08 15:40:27 -08:00
Dustin Brown
17f1e26784 qcacmn: Use build config for max pdevs/vdevs
The following are currently hardcoded. Instead, use appropriate build
configuration values if available:
 * WLAN_UMAC_MAX_PDEVS
 * WLAN_UMAC_PSOC_MAX_VDEVS
 * WLAN_UMAC_PDEV_MAX_VDEVS

Change-Id: I78986ea2461ab99543aa617f3c5bf12e9aeb890a
CRs-Fixed: 2393639
2019-02-08 12:37:57 -08:00
gaurank kathpalia
1ff1e28d6a qcacmn: Replace scheduler post msg with scheduler post messsage
Currently many modules use the scheduler_post_msg API which
doesn't allow the driver to know about the src, and destination
modules.

Fix is to call scheduler_post_message which has src, dest, and
the que id.

Change-Id: I6cba6b2f8febb0cb0165af48704de91a893a8b49
CRs-Fixed: 2385912
2019-02-07 07:53:37 -08:00
Srinivas Pitla
604e249bc1 qcacmn: Limit channel compare to num, sec freq2
In current code, full channel pointer is compared.
From testing, it is found that FW can handle different modes on
same frequency, so limiting the check to channel number and sec freq2

Change-Id: Iafb43c911937ee8ae6ebb7d15887a30e6dd43679
CRs-Fixed: 2393554
2019-02-07 00:13:15 -08:00
Shiva Sankar Gajula
9d76260ac9 qcacmn: Fix the KW issue by increasing Max cipher types by 1
Increase the max cipher types by 1 to access WLAN_CRYPTO_CIPHER_NONE
crypto ops.

Change-Id: I7bfa7e9df73dfe7f8836880bfa0e3934e05f0522
2019-02-06 17:12:49 -08:00
gaurank kathpalia
c81b9a3b34 qcacmn: Filter out invalid BSSID from rx MGMT frame
Currently the driver accepts zero BSSID obtained from the
beacon/probe response and also allows to connect to them
by creating a peer, but since connection doesn't go
forward with the peer as BSSID is zero, the driver
deletes the peer, but since the BSSID is zero, the
host doesnt sends the peer delete to FW, which causes
a peer leak.

Fix is to filter out the beacons which has invalid BSSID,
and try to recreate the address from the addr2 which is
the FROM address in the MAC address. In case of AP the
BSSID and FROM address would be same, and hence BSSID
can be copied from the same.

Change-Id: I75842c2d80254aaffc31e689782be2eebc118466
CRs-Fixed: 2391346
2019-02-04 15:36:49 -08:00
Vivek
332df1206f qcacmn: Change log level of a debug message
Add change to decrease the log level from error to debug

Change-Id: Ic07a0dd083e6bd112a7d45af5397330ce4f29890
CRs-Fixed: 2391733
2019-02-04 15:36:45 -08:00
Santosh Anbu
0a46a191fa qcacmn: Add change to export symbol
Export the symbol as it is used across multiple modules

Change-Id: I7dd70bd0cf48b2f24cc10de7fd2e4bdd6bd938c6
CRs-Fixed: 2391939
2019-02-02 08:18:45 -08:00