Граф коммитов

1306 Коммитов

Автор SHA1 Сообщение Дата
gaurank kathpalia
575539a9d8 qcacmn: Enable/disable first DFS channel scan through ini
Currently the driver includes all the DFS channels as part of scan
in the scan list, and thus not exclude the DFS channels in the first
scan for faster scan.

Fix is to check the ini, for first DFS channel scan, and then remove
the DFS channels from the scan list if the ini is enabled.

Change-Id: I43d5c87676d4e66706da3cc0029c60559b70d179
CRs-Fixed: 2378805
2019-01-14 21:47:34 -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
Abhishek Singh
00f80b6094 qcacmn: fix out of bound access of memories in wlan_cfg80211_scan
In wlan_cfg80211_scan the number of ssid, ssid length and number of
channels are not checked for max size of array and thus can lead to
Out of bound access of memories.

Fix is to add bound check before copying the params.

Change-Id: Ie6d4e546fb9c884d5988493b611ef7b217f0a95c
CRs-Fixed: 2375217
2019-01-13 11:26:48 -08:00
Abhinav Kumar
f9074e2c09 qcacmn: Cleanup INI CFG_DROP_BCN_ON_CHANNEL_MISMATCH
Initialize drop_bcn_on_chan_mismatch from INI
(CFG_DROP_BCN_ON_CHANNEL_MISMATCH) default value

Change-Id: I55c28aa5656ce6befe9cd3477ab0b14c99641cea
CRs-Fixed: 2375199
2019-01-13 11:26:43 -08:00
Bala Venkatesh
7a5bee08a9 qcacmn: Don't drop the beacon/probe resp if rates IE does not present
Currently, beacon or probe responses are dropped by the scan module
if the rates IE does not present. But, some AP's in 11n mode does not
add the rates IE.
So, it is not mandatory to have the rates IE in the beacon or probe
response.

Change-Id: Id57b2216c012d117cca1a3a2dbce9825d58b67c3
CRs-Fixed: 2376710
2019-01-13 11:26:40 -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
Shaakir Mohamed
beafb2d5b6 qcacmn: Bangradar enhanced command support for secondary segment
Adds support to use bangradarenh command to inject radar on the
secondary segment, if AP is operating in HT80+80 or HT160 mode.

Change-Id: I78ab3d3fcb3ecf5fee274911bf6dc48f74c53818
CRs-Fixed: 2359763
2019-01-02 14:15:14 -08:00
Paul Zhang
d2dad4b5bd qcacmn: Refine spinlock in ucfg_wifi_pos_process_req
Currently, the function causes the system false when
tries to release the spinlock because it holds the
spinlock longer than max_hold_time.

Change-Id: I90c78b7d8530cf3d1c224a693ab9f743f669b730
CRs-Fixed: 2371481
2019-01-02 01:38:06 -08:00
Arif Hussain
273e871dc0 qcacmn: Add Japan W53 channel flag support
Add support to exclude/include Japan W53 channels
in random channel selection.

Change-Id: I359d6bb68e2737b64b77f6f3ad27f83fd33d3da8
CRs-Fixed: 2371013
2019-01-01 17:06:14 -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
Vignesh Mohan
a647c5e032 qcacmn: Reorder function calls when radar found during precac
During Zerowait DFS, when radar is hit, the NOL IE element that
  is being sent to its uplink is prepared after the precac timer
  is turned off, which returns wrong center frequency
  information for secondary segment.
  This center frequency is used to built the list of subchannels to
  be sent to root, which in turn are all 0s.

  Reorder the function calls to prepare the IE before the
  precac timer is turned off when radar is found so that the
  list of subchannels are built properly.

Change-Id: I74e800cbbeb3730c862a72ddbe8f78219592e343
CRs-Fixed: 2373036
2018-12-28 07:13:31 -08:00
Santosh Anbu
ba57c33317 qcacmn: Return if cmd already exists in pending queue
When adding stop command to the serialization queue, if the command is
getting added to the pending queue of the vdev and there already existed
another stop command in the same queue, then return already exists as the
return value after the command is enqueued.
This to avoid notifying the vdev state machine with down event multiple
times though the command already in the pending queue would have notified.

Change-Id: I1830251c6b6c1fa2860f17a3ea8a869e8a3c87ff
CRs-Fixed: 2372563
2018-12-28 07:13:28 -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
Abhishek Singh
2ceaf3729a qcacmn: Disable adaptive dwell time in not connected state
Disable adaptive dwell time for scans in not connected state to
optimize host scans for fast connection.

Change-Id: I28f762c3ee44ffc20a7565ccc1d8e40f16aedb4e
CRs-Fixed: 2357888
2018-12-26 22:46:03 -08:00
Qun Zhang
b3606a896a qcacmn: Add sanity check for wifi_pos priv obj in wifi_pos_main.c
Add sanity check before pointer dereferenced in wifi_pos_main.c

Change-Id: Iaea0c56f0684e2cfc959153b09468811a16ef22e
CRs-Fixed: 2370311
2018-12-26 12:33:35 -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
Priyadarshnee S
ca5c186642 qcacmn: APL9 Regdomain Changes for Korea
The following changes are made on APL9 regdomain:
* Include channel 149 in the supported channel list.
* Change the regulatory tx power for 5150-5250 frequency range to 23dBm.

Change-Id: I2bb01acbf60d814a2bc2c35a86f7f2c30583aad9
CRs-Fixed: 2366774
2018-12-25 00:40:48 -08:00
Qun Zhang
80cc5ab546 qcacmn: Add sanity check before pointer dereferenced
Add sanity check before pointer dereferenced in wifi_pos APIs.

Change-Id: Ib12bab1d7bfbe20689148274941f3c0d86f256c6
CRs-Fixed: 2370311
2018-12-24 05:44:56 -08:00
Visudha Sathurappan
bbd9d427a7 qcacmn: Removed unused DFS function
Remove unused mlme function to get dfs object and replace
it with the dfs equivalent.

Change-Id: I3ffadb77072fa119957469e0bf97fa4a80f99ac9
CRs-Fixed: 2368988
2018-12-24 05:44:53 -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
Paul Zhang
5753f9bbe0 qcacmn: Refactor operatition to hostscan_adaptive_dwell_mode_no_conn INI
Ownership of hostscan_adaptive_dwell_mode_no_conn is changed from HDD to
scan module. So scan module doesn't have to rely on HDD to obtain the
INI setting.

CRs-Fixed: 2357888
Change-Id: If3c3d93f0e1763e778eb6e3e70e23231fb01a67e
2018-12-23 00:01:04 -08:00
Rajeev Kumar Sirasanagandla
cc123bcab3 qcacmn: Ignore default country update during wlan restart
After driver load and interface up, if user changes the country code
and performs the interface down, now if interface change timer expires,
stop modules is invoked. When user again tries to do interface up, as a
part of start modules, update channel list indication comes from FW
with default country info from BDF file which overwrites user specified
country information.

To resolve this issue, if current country is set by user and if
driver gets notification to update channel list from FW with
different country code during restart of wlan modules then ignore
master channel list and send the current user country to FW.

Change-Id: I0a0c57eda03827dc3fef59928569bf2f0bc32634
CRs-Fixed: 2340798
2018-12-21 02:40:57 -08:00
Abhishek Singh
cdcec49770 qcacmn: Cleanup unused scan configs and params
Cleanup unused scan configs and params from scan module.

Change-Id: Icbc6ccf63071606e97d36c7efee65b5fd6c3f5f4
CRs-Fixed: 2369076
2018-12-19 18:52:22 -08:00
Vignesh Mohan
cadbce4bca qcacmn: Fix Enhanced Bangradar in Partial Offload
Fix Enhanced Bangradar to add only the subchannels into NOL
based on its parameters during call, and not the entire set
of current subchannels.

Current implementation of enhanced bangradar sets bangradar entry,
in DFS, to 1. Since bangradar does not use subchannel marking,
enhanced bangradar did not work either.

Introduce a new boolean entry in DFS structure that does not follow
bangradar and does subchannel marking.

Change-Id: Idf44b80a6cae3f1c8a3c7b430a233e3fd29ba0c5
CRs-Fixed: 2368100
2018-12-19 09:32:28 -08:00
Vignesh Mohan
1e3cb514eb qcacmn: Account for gaps in subchannels list
The radar affected subchannels list that is sent along with RCSA
was not built properly due to unreliable (contained 0s) subchannels
list provided by subchannel marking function.
The implementation used a single iterated loop to traverse through the
subchannel array elements, not counting 0s as possible inputs.

Search through each element of the list to find if the subchannel
is present and break if successful.

Change-Id: I5cd5ce7b6a334247c7d8733ee8433f957480c1dd
CRs-Fixed: 2364640
2018-12-18 10:13:11 -08:00
Vignesh Mohan
6eeb76ce92 qcacmn: Remove subchannel marking fail prints in PO
The cfg tool command to enable/disable subchannel
marking called a WMI to be sent to FW without checking
if dfs is offloaded to FW.
This added fail prints in log for partial offload and direct
attach even if subchannel marking was set.

Fix the cfg command to send a WMI to FW only if dfs is offloaded.

Change-Id: Ifae574ed6aeb49c4058d89374fdcc81b8d43a5bc
CRs-Fixed: 2334258
2018-12-18 00:08:11 -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
Sandeep Puligilla
5957f0030a qcacmn: Add concurrent cfg items of scan
Add following scan cfg items:
CFG_ACTIVE_MAX_CHANNEL_TIME_CONC
CFG_MIN_REST_TIME
CFG_REST_TIME_CONC
CFG_PASSIVE_MAX_CHANNEL_TIME_CONC

Change-Id: I5b20ea153269f32b503d6c9cd1667d8086148871
CRs-Fixed: 2364994
2018-12-13 13:21:25 -08:00
Wu Gao
8e0f32b161 qcacmn: Remove TDLS component and related files from hostcmn
TDLS component used in CLD only and needn't in hostcmn. So there
is requirement to move it from hostcmn to CLD. This change removes
policy mgr related files/codes from hostcmn.

Change-Id: Ifeaf1447e74f83a17072d08c4a0ff62a13e91518
CRs-Fixed: 2361584
2018-12-13 02:38:03 -08:00
Rajeev Kumar Sirasanagandla
4db889dfe6 qcacmn: Add regulatory API to check 5Ghz band
Add regulatory API to check whether given frequency belongs to 5GHz
band.

Change-Id: I96147aca4f98563305bbba25c623aa0a37dd284d
CRs-Fixed: 2364934
2018-12-13 00:52:15 -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
Amar Singhal
eec199494e qcacmn: Update regdb with regulatory database version 27
Update regdb with QCA regulatory database version 27.

Modify APL19 with new channels, power and radar pattern.
Change country IN to APL19_ETSIC.
Create new reg-domain ETSI15.
Create new reg-domain pair ETSI15_WORLD.
Move CTRY_SAUDI_ARABIA to ETSI15_WORLD.
Add new country CTRY_MYANMAR.
Change CTRY_CHILE to FCC13_WORLD.
Change CTL value for reg-domain APL8 to 'FCC'.
Enable all bandwidths for country CTRY_COSTA_RICA.
Add new reg-domain pair ETSI10_FCCA.
Move country CTRY_UNITED_STATES to FCC3_FCCA for mobile.
Update regdb version field.
Fix alignments.

Change-Id: I23a7ce98010e15eab606d4910df87bec15abc5ea
CRs-Fixed: 2353872
2018-12-12 01:45:46 -08:00
Amar Singhal
14fedd47cd qcacmn: Rate limit invalid channel number messages
Channel number can be valid when finding out the enumeration for the
channel. Rate limit the messages for the same.

Change-Id: Id8755cffa9030054698f9e5e65c7c30c3155ad1e
CRs-Fixed: 2359311
2018-12-12 01:45:43 -08:00
Wu Gao
9c68825b0b qcacmn: Remove P2P component and related files from CMN
P2P component used in CLD only, and needn't in hostcmn. So move P2P
component from hostcmn to cld. This change remove P2P related/codes
files from hostcmn.

Change-Id: I351ee153588bbcdb62041b4626370d451a3f56bb
CRs-Fixed: 2361487
2018-12-11 17:26:12 -08:00
Visudha Sathurappan
3b5c6e9899 qcacmn: Clean up of DFS functions
Replace mlme functions to get dfs objects by dfs functions.

Change-Id: Ic8432ce3c210a4c1233fe1c715d00f5abb37ba04
CRs-Fixed: 2363068
2018-12-11 01:43:10 -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
Abhishek Singh
502095b236 qcacmn: Add support to enable/disable scan with reason code
Adds support to enable/disable scan for psoc/vdev with reason,
so that multiple clients can enable/disable the scan at same time.

Scan will remain disabled till all clients enable it back.

Change-Id: I8d840b24210095accb56ac9a2697ec26e8a5eb17
CRs-Fixed: 2362093
2018-12-10 23:33:45 -08:00