Commit Graph

762 Commits

Author SHA1 Message Date
Srinivas Pitla
f491953edb qcacmn: Print readable states, event in SM history
This change prints state, event names while printing SM history

Change-Id: I41a9ea429441255380ac6624952a8eff9fdcbc17
CRs-Fixed: 2390042
2019-02-01 12:44:13 -08:00
Bala Venkatesh
246005bcb2 qcacmn: Remove dual mac disable feature from objmgr psoc
Dual mac disable feature is moved to policy manager. Hence remove
this variable from object manager.

Change-Id: I5d83ce0efa9130cc37734f3d7e982def4fe59ac2
CRs-Fixed: 2388459
2019-01-30 18:54:22 -08:00
Vivek
601cb9452f qcacmn: Fix number of active command timers in psoc
In psoc open, driver try to get the number of PDEV and
allocate memory for number of timers. But during psoc open number of
pdev are 0, thus timers are not allocated for non scan active queues.

Now if all scan active queues are full and a non scan command is
activated, it tries to find empty timer, which is not found, as
all timers are used by scan commands. Thus timer is not started for
this command and when this command is aborted the timer destroy API
return failure and thus the command is not removed from the active
queue.

Allocate the timer during psoc enable where pdevs are already created
and driver can get the number of pdev and print error if start timer
fails for a command.

Change-Id: Ia5b22e2849c58992a7d3d4097becc257ac673157
CRs-Fixed: 2389157
2019-01-29 21:47:31 -08:00
Jianmin Zhu
91308cc532 qcacmn: Remove code of CONFIG_SERIALIZATION_V1 part
Remove legacy code of CONFIG_SERIALIZATION_V1 part

Change-Id: I281d6ae911858c9212317c7e3a895db66511699b
CRs-Fixed: 2386843
2019-01-29 16:54:50 -08:00
Vivek
c4eabce922 qcacmn: Use QDF_TRACE with no fl for serialization history
The current serialization history output is printed with
file and line information since the common ser_err is using
the FL variants of trace function.

Add ser_err_no_fl to use non FL variant of the trace function
for printing the serialization history.

Change-Id: Icc0b5d00d50aaa8fd8fb6b072784a26177004219
CRs-Fixed: 2387039
2019-01-29 09:58:09 -08:00
Vivek
d34b7d0d62 qcacmn: Change default log level for serialization
Change default log level of serialization to QDF_TRACE_LEVEL_ERROR
Change error print to debug, when pending queue is empty,
which is a possible expected case.

Change-Id: I21cd6b5f158d5dffbc6e7309c9202e7e2e0162e8
CRs-Fixed: 2387017
2019-01-29 09:58:05 -08:00
Srinivas Pitla
39a9222d27 qcacmn: VDEV MLME SM changes
1) Fixes to enable VDEV MLME SM with legacy code
2) Define/Enable PDEV MLME component object.

Change-Id: Ieb87e5b7b70d6bb593ba0950297894a81c6a4feb
CRs-Fixed: 2384173
2019-01-26 19:58:58 -08:00
Srinivas Pitla
1ff074ce30 qcacmn: Add support for scan and MLME synchronization
Reject scan request, if any VDEV is in START/DFS_CAC/SUSPEND states.

Change-Id: I1047ba510df5ae5debd1e3d5c8a064a57af65fbf
CRs-Fixed: 2384163
2019-01-24 09:59:14 -08:00
Santosh Anbu
cdf3813a9c qcacmn: Fix debug log string
Add change to print debug log without function name and line number.

Change-Id: I0d07c42e5a3b0f6e5e17d77b94c1dc70d52fa744
CRs-Fixed: 2382526
2019-01-24 09:59:11 -08:00
Vivek
20209b5300 qcacmn: Move to next rx handler when nbuf clone fails
When calling registered mgmt rx handlers,
we iterate through all handlers,
and for each handler, clone the nbuf and if cloned successfully,
we call the corresponding handler.

In case of clone failure, we would simply continue, and not move to the
next rx handler, and would possibly attempt cloning for large number
of iterations. Instead, when clone fails,
we should move to the next rx handler

Change-Id: Ia752a2e7699f6fd92fe2a363a6ae19ca2e0cc5fe
CRs-Fixed: 2379751
2019-01-23 06:37:35 -08:00
Vivek
0043ad80db qcacmn: Reset cmd_in_use flag when returning cmd_list to free pool
There is an instance where the cmd_in_use flag is not
reset when cmd_list is not returned to the free pool

Need to reset the cmd_in_use every time the cmd_list is
returned to the free pool

Change-Id: I1fae24dc691779c6c372936d2963f11f98898750
CRs-Fixed: 2379448
2019-01-23 06:37:33 -08:00
Santosh Anbu
6e2fed8f5f qcacmn: Add scheduler mq handler for mlme
Add mlme message queue handler as the call back for non scan commands
getting activated in the scheduler context.
Add cmd already exists enum to be returned if the command already exists
in the serialization queue.

Change-Id: I24fe453ffddbd4341459874458f11688adebc740
CRs-Fixed: 2377219
2019-01-22 05:06:24 -08:00
Abhishek Singh
6c962c7ac0 qcacmn: Remove unused commands from serialization
Remove unused commands from serialization.

Change-Id: I7fedbc028b2bdc8b7176d074855b62dc3e411767
CRs-Fixed: 2384370
2019-01-22 00:18:44 -08:00
Ashok Kumar
509aeeb4b5 qcacmn: Fix warning in crypto
Fix warning for uninitialized variable

Change-Id: I7ac7b96d7097ec74264926bdf321f9d406681271
CRs-Fixed: 2363632
2019-01-20 23:26:29 -08:00
Nandha Kishore Easwaran
ea9c2de208 qcacmn: Componentize qwrap
Remove dependency of qwrap on VAP layer and radio(ic) layer data
structure. Added flags to detect qwrap specific features in vdev
structure.

Change-Id: I5bb951ce8c813928b9ab189a77bf4da2ac6258d6
2019-01-19 01:10:28 -08:00
Pavankumar Nandeshwar
2702aeeb0a qcacmn: keep objmgr_peer alive until txrx peer is freed
Make sure the objmgr_peer is not deleted before
dp peer is deleted, which will avoid the access
of already freed objmgr_peer for connected sta peers.

Change-Id: Ib931dcd0c5650fea5284e9dd53dae9e41f662c56
CRs-Fixed: 2359645
2019-01-18 21:28:50 -08:00
Ashok Kumar
6f8b924d64 qcacmn: Add support for pmksa handling
Added support for pmksa handling in crypto to
support add_pmksa, del_pmksa and
flush_pmksa function calls from cfg80211.
Added support for adding pmkid in rsnie.

Change-Id: Ic8add9635c2e7fd73da21b1305467e6500f6d73c
CRs-Fixed: 2363632
2019-01-17 22:20:42 -08:00
Abhishek Singh
e88c0e8ffa qcacmn: Refactor the prints for rx management frames
Refactor the prints for rx management frames. Do not print beacon,
probe resp and probe req frames in txrx module.
Also remove the beacon print from wlan_cfg80211_inform_bss_frame.

Change-Id: I1dbfcec1614b9465d97c010fa4c386f3a1612f5f
CRs-Fixed: 2381796
2019-01-17 10:49:15 -08:00
Arif Hussain
c1e7877ff5 qcacmn: Add wapi bkid count in crypto module
Add wapi bkid count in crypto module.

Change-Id: Ia242eaefc24fde0fdd25c10e127e6b85f233ade3
CRs-Fixed: 2379886
2019-01-14 17:32:52 -08:00
Abhishek Singh
b46a753f63 qcacmn: Fix race while accessing the serialization timer cmd pointer
If two threads T1 and T2 are trying to stop the serialization timer,
both can get the timer while holding lock. Timer cmd pointer is set
to NULL after releasing lock.

Now if a third thread T3 is trying to start the timer at same time,
it may get the timer as soon as T1 make cmd NULL and adds its cmd
pointer to the timer in the list.

But T2, which was also trying to stop the timer can stop the timer
and set cmd back to NULL again.  Thus T3 will not have the timer in
the timer list.

Now when driver try to abort/flush the command it will not find the
timer and In case timer is not found the command is not freed, leading
to vdev ref leak.

To fix this stop and update the timer while holding lock.

Change-Id: I363a4d36181328be310c7c980c981302501a9453
CRs-Fixed: 2376733
2019-01-13 18:46:04 -08:00
Kiran Kumar Lokere
25531c4717 qcacmn: Add support for SET KEY convergence
Make changes to the cmn driver to support SET KEY
convergence feature

Change-Id: I17b5f368a1f735eb394ea70f9b61cc033c3eb20a
CRs-Fixed: 2358796
2019-01-08 18:21:17 -08:00
Abhishek Singh
5f9e815870 qcacmn: Avoid looping twice to find peers for beacon frames
Driver first try to find peer for beacon frames with addr2,
and if no peer is found it loop through peer list 2nd time
for addr1. For beacon addr1 is broadcast address and thus
peer will never be found with broadcast address.

Thus use addr1 to find peer only if addr1 is not broadcast
address.

Change-Id: I7e5c221ec7f93f878981f4eafb69935aafd64174
CRs-Fixed: 2373793
2019-01-03 09:04:27 -08:00
Abhishek Singh
0a71d5a1f5 qcacmn: Remove serialization vdev destroy handler
Each cmd in serialization list holds a vdev ref by
I8d573ff5a25e6dff928b2708e51ad7b97e292277. When vdev is
destroyed physically, it means vdev ref count is 0, all
serialization cmds of this vdev are released, don't need purge
in vdev destroy handler.

Change-Id: Iea75707c88154e1e3e87369285b82d1288523e22
CRs-Fixed: 2367242
2019-01-01 03:58:27 -08:00
Srinivas Dasari
2f6d368c6e qcacmn: Add OSEN AKM support for HS-2.0
OSEN is a new AKM to support HS-2.0.

Change-Id: I43efc34d754c51c9a16584495523629d32c16c5e
CRs-Fixed: 2361375
2018-12-31 21:29:36 -08:00
Santosh Anbu
a334af9437 qcacmn: Reset command list status flag after use
When the command is released from the queue, it is added back to the global
pool. Reset the status flag of the command before releasing it back to the
global pool.

Change-Id: I3e51fc6aa0ffc0dafe87b838a5a256fc65d12d09
CRs-Fixed: 2372562
2018-12-28 04:38:23 -08:00
Santosh Anbu
f9ba21e503 qcacmn: Clean active serialization timers on vdev destroy
In the current implementation, if there are any active commands
in the vdev queues then on vdev destroy we remove the commands from
the respective queue and return the command to the global pool.
We should also stop the timers for the corresponding active commands,
otherwise the timeout cb may be called after the destroy is executed.

Change-Id: I51a1049e952073d83b5caee3835e4f9adca2bb9e
CRs-Fixed: 2365411
2018-12-28 04:38:20 -08:00
Shashikala Prabhu
7eb2d08e3b qcacmn: Add INI support to disable spectral feature
Add INI support to disable spectral feature and do not process the spectral
user commands if spectral feature is  disabled.

Change-Id: Id353131675454652d59fd5d5f8fd3d732a07b777
Acked-by: Shashikala Prabhu <pshashik@codeaurora.org>
CRs-Fixed: 2343947
2018-12-27 13:28:00 -08:00
Rachit Kankane
6adabaf78a qcacmn: define FT_8021X and FT_PSK suites
Define WLAN_AKM_SUITE_FT_8021X and WLAN_AKM_SUITE_FT_PSK for kernel version
less then 4.14.

Change-Id: Id5518511bc4f639fff6d1e20bcf0aad973d9ab46
CRs-Fixed: 2362888
2018-12-26 07:47:50 -08:00
Disha Das
df10f65cb7 qcacmn: Move out Crypto files
Move only-win-specific crypto files from cmn_dev to
component dev

Change-Id: I55c2c44100d3a9c0799ccbafd2ce31aa242d3e71
2018-12-25 22:18:43 -08:00
Wu Gao
49bd1b5fa5 qcacmn: Check mgmt txrx desc element status before put to free list
To avoid double add to free list, check mgmt txrx desc element status
firstly.

Change-Id: Ib8f6f719016e19a76cc4fd1007800abf59ebf872
CRs-Fixed: 2348587
2018-12-25 05:21:07 -08:00
Yeshwanth Sriram Guntuka
c4a14ea149 qcacmn: Add host support for db2dbm RSSI changes
Add host support for db2dbm RSSI changes. Firmware
indicates this capability when underlying hardware
has RSSI reporting feature. Based on this capability
host will know if firmware sends SNR or RSSI. If no
capablity is present then host will convert SNR to
rssi using a fixed offset of -96. If capability is
present host will directly use the rssi as it is.

Change-Id: I9058f16c6280d466feb96cf88a8a0d8cd7b02032
CRs-Fixed: 2364025
2018-12-24 03:33:04 -08:00
Vivek
50f2998dfa qcacmn: Address review comments for activation cb reason change
There were minor review comments for the change
for adding activation reason also to activation sb
which was not addressed in the changeset
since it had all the necessaary approvals and it
was in path for merge.

Addressed all the comments as part of this change.

Change-Id: I8035adf2dce152e60eef1494aa7f100c2d567f41
CRs-Fixed: 2361327
2018-12-14 16:06:27 -08:00
Vivek
40d1bc8914 qcacmn: Add activation reason to serialization cmd structure
Add field for activation reason to serialization cmd structure
Also modified the other boolean fields to a bit field for optimization

The new field added to serialization command structure will be used
to update the activation reason about how the command was activated,
either directly from active queue or as part of movement of
pending to active queue.

Change-Id: I8a1da79b7ef60e8d8a739ae2f265418418e2c859
CRs-Fixed: 2361327
2018-12-14 16:06:24 -08:00
Vivek
6a84a1c328 qcacmn: Add serialization API to update timers
Add a new API to update serialization timer value for a
give command in the active queue.

Change-Id: I725a35822e881facd9e2f4a51e41ea5ee8d6bbd8
CRs-Fixed: 2352317
2018-12-14 16:06:21 -08:00
Vivek
c4f335719b qcacmn: Add API to peek vdev active queue
Add API to peek into the vdev active queue
and return the command type present in the
active queue of a given vdev

Change-Id: I4a4dc419f4a51645cc7e611ffb7053a8c8240381
CRs-Fixed: 2354133
2018-12-14 16:06:18 -08:00
Vivek
0f993fe32f qcacmn: Disbale serialization vdev queues on demand
Add new attribute to the serialization command
structure to disable the vdev queues on queuing
the given command.

The serialization command attribute to disable queues
is only used for non scan commands.

After the queues are disabled, new serialization requests
applicable for the given vdev will not be allowed.

Change-Id: I29e6330413e9b16c7d3e96ad0eb004515061db88
CRs-Fixed: 2349901
2018-12-14 16:06:15 -08:00
Vivek
c3357683fa qcacmn: Avoid active command removal until activation completes
With the current implementation, the removal of a command
is allowed  before the activation cb returns.

So if a command is removed before the activation returns,
and the activation returns failure, we attempt to access
the command buffer after the cmd is removed happen.

This is now protected by a new flag where if a removal is
attempted before a commands activation cb is completed
the removal request just marks the CMD_MARKED_FOR_REMOVAL
flag and when the activation cb returns, we check if a
commands removal had been attempted. If yes, remove the command
from the active queue.

Change-Id: I53af6706010b50640ea7248085e9fc85908056fa
CRs-Fixed: 2356813
2018-12-14 16:06:11 -08:00
Vivek
883e4c1d79 qcacmn: Additional checks for moving command to active queue
The current implementation was not checking for pending
queue status before adding command to pending queue.

This was causing an issue, when,  after removal of an active
command, we were preepmted and a new request came, it made
it to the active queue. Now when the previous thread resumed,
and we attempted to move pending to active, it failed.

Added the following new checks:

1. When adding command to active queue, make sure there is no
commands in the pending queue

2. When moving from pending to active, make sure it is allowed
to add commands to the active queue.

Change-Id: Ief16c22f6f7e2cdc105e24f164e5891bfe806662
CRs-Fixed: 2356719
2018-12-14 16:06:09 -08:00
Wu Gao
c38f0e89f0 qcacmn: Remove policy mgr component and related files from hostcmn
Policy mgr component used in CLD only and needn't in hostcmn. So there
is requirement to move policy mgr component from hostcmn to cld. This
change removes policy mgr related files/codes from hostcmn.

Change-Id: Ie774d526cd4aa91b16afe6e01919141b570324c4
CRs-Fixed: 2361566
2018-12-12 03:51:58 -08:00
Santosh Anbu
9c61c1fb03 qcacmn: Add interface APIs b/w mlme and serialization
Add the interface layers APIs that will be utilized by the mlme
module to interface with the serialization module.
Also add a serialization command cancel option to cancel cmds of a vdev
belonging to a given command type and define the vdev mlme legacy callback
function that will be used by the mlme-serialization interface APIs

Change-Id: I6a376465ef2929f15c6464bbd29c0250251696d8
CRs-Fixed: 2312821
2018-12-10 23:33:49 -08:00
gaurank kathpalia
0f9f019505 qcacmn: Fix memory allocation latency in beacon process
Currently if the number of APs in the STA environment
are many, then the STA will receive many beacons, whose
beacon process path can take long time, in the kernel
work queue, hence the other processes have to wait
for them to complete, and may get timeout, if the
the time to process the beaocns is larger than their
process timeout.

Fix is to :-
1. Add rate limit to failure conditions of memory
not allocated
2. Make memory allocation in path of beacon process
atomic.

Change-Id: I0b15fd4924bb7d696a33adeb1875f1f9c277db18
CRs-Fixed: 2360624
2018-12-07 13:04:33 -08:00
Krunal Soni
de218d60aa qcacmn: Move few INIs's ownership from HDD to Policy manager
INIs
1) g_mark_sap_indoor_as_disable
2) g_sta_sap_scc_on_lte_coex_chan
3) gEnableSAPManadatoryChanList
4) gForce1x1Exception
4) g_sta_sap_scc_on_dfs_chan
5) gDualMacFeatureDisable
6) gEnableOverLapCh
7) gAllowMCCGODiffBI

Ownership of above INIs belong to policy manager, move them from
HDD to Policy manager.

CRs-Fixed: 2350969
Change-Id: I6fe502697cdb9a259b8215ce5b4ad5354cb645fd
2018-12-06 17:51:21 -08:00
Hariharan Basuthkar
738320eef9 qcacmn: Bring Up STA without dissociation when AP switches to DFS Channel
AP is configured to operate in Channel 100(HT80), and Zero Wait DFS
is enabled. Once PreCAC is complete on DFS Channels,inject radar in
Channel 100 and AP moves to another DFS channel 116 and beacons
immediately but station associated to AP still does a scan again.
When the station receives the Channel Switch Announcement from AP, it
dissociates from the AP and scans again.

Maximum Switch time Information Element can be used by the Station to
to know if the AP has done PreCAC on target channel. Maximum Switch Time
IE is part of AP's beacon and is the sum of CAC timeout on the target
channel and 1 beacon interval.

If PreCAC is done on target channel, the CAC timeout is zero and Maximum
Switch time IE is equal to 1 beacon interval. This element is sent to
Station along with Channel Switch Announcement. The Station receives the
maximum channel switch time element. If the value of maximum channel switch
time element is less then or equal to beacon interval, the station
associates with the AP seamlessly without dissociation. If the value of
the Maximum Channel Switch Time IE is greater than 1 beacon interval, then,
the Station has to dissociate from the AP since, ZeroCAC has not been done
by the AP.

Change-Id: I0301a68c1731cc268b9a6900258261034476446b
CRs-Fixed: 2330817
2018-12-05 03:57:51 -08:00
gaurank kathpalia
079ec73fbc qcacmn: Fix Supported rates max length
Currently the driver checks for the supported rates IE,
and if the length of the IE is greater than 8, the driver
rejects the IE, according to spec.
But some APs supports 12 rates hence are not scanned.

Fix is to have a supported rates IE length check of 12 instead
of 8.

Change-Id: Ib0e25c94e781ccd44b7f08ea3db6109ad8d6ad22
CRs-Fixed: 2360709
2018-12-04 22:27:53 -08:00
Jianmin Zhu
3b50e73e0f qcacmn: Avoid leak and double free in serialization object
When wlan_serialization_pdev_create_handle return failed,  need
free all resources before return,
wlan_serialization_pdev_destroy_handler has no chance to be
called any more, same for psoc, pdev handlers.

Optimized destroy handlers to avoid double free and leak.

Change-Id: Iae2b7c2fa221502742cbe565b27bcb16b7fc56ed
CRs-Fixed: 2353795
2018-11-29 18:12:27 -08:00
Paul Zhang
da522d8f7c qcacmn: Ignore destroy callback if creating fail
objmgr should not call destroy callbacks for components
that have not successfully completed the creating callback.
Or the function wlan_objmgr_xxx_obj_destroy returns with
QDF_STATUS_E_FAILURE and doesn't call wlan_objmgr_xxx_obj_free
to free the psoc/pdev/vdev/peer.

Change-Id: I1ba5a6afd98254cbed4571d5fb1cd24543e1db54
CRs-Fixed: 2318184
2018-11-29 18:12:18 -08:00
Kiran Kumar Lokere
605e7a710b qcacmn: Add new crypto serivce apis for security checks
Add new crypto component service apis to check the security
match.

Change-Id: I66336c4924b2a2c203d6ba197ab649725f960ef8
CRs-Fixed: 2337195
2018-11-22 00:43:41 -08:00
Bala Venkatesh
b966910cb6 qcacmn: Add BSS peer for P2P client mode
Set bss peer for both STA and P2P client mode.

Change-Id: Ic25e48930511ff6c6e3af8c9bbdb9425ec654f04
CRs-Fixed: 2332938
2018-11-17 01:59:13 -08:00
Vivek
4f60ed9111 qcacmn: Log history of serialization commands
Capture the addition and removal of commands
to the serialization queues and the associated
action that resulted in queue changes.

Provide an interface to dump the commands
in either active and pending of scan or non scan
queues and the history of commands that moved in
and out of the serialization queues

Change-Id: I87291f3649f27cc1cb84709d24c0cf8403a41a65
CRs-Fixed: 2334156
2018-11-08 05:44:42 -08:00
Sandeep Puligilla
08d71d6ae5 qcacmn: Reduce VDEV manager log level
Reduce log level of VDEV manager debug messages
to avoid clogging of kernel console log.

Change-Id: I20cf6ef9d7870bb69696fa533d0351ae3c19a979
CRs-Fixed: 2342961
2018-11-08 01:30:54 -08:00