Commit Graph

762 Commits

Author SHA1 Message Date
Abhinav Kumar
55229dfcec qcacmn: Possible Out of bound read in policy_mgr_get_channel_list
To prepare the channel list suggestion for a new connection,
policy_mgr_get_channel_list invokes policy_mgr_get_valid_chans to
get the number of valid channels. Driver uses returned num channel
and iterates channel list to divide the list into 2.4 & 5 GHz
lists. In case if, num of valid channel returned by
policy_mgr_get_valid_chans is greater than the maximum number of
channel supported in the channel list, QDF_MAX_NUM_CHAN(128),
possible OOB read occurs.

Validate the value of chan_index of channel list in
policy_mgr_get_channel_list against the maximum number of
channels supported in the channel list.

Change-Id: I6beb9231aaef491731557434d1ae210ac0bdb036
CRs-Fixed: 2346125
2018-11-07 21:17:43 -08:00
Abhishek Singh
d22c097aaa qcacmn: cleanup the unused serialization commands
Cleanup the serialization commands that are not used now.

Change-Id: I3b2dd5021476bc59669029f536e4e0b804f01555
CRs-Fixed: 2344571
2018-11-07 01:35:58 -08:00
Liangwei Dong
a903e9330a qcacmn: Increase Max HW mode number
Increase Max HW mode Number to 3 for
dual dbs mode hw.

Change-Id: I7cf37f854027470cd1decdccc5bd2cd5919ac486
CRs-Fixed: 2340756
2018-11-06 22:40:08 -08:00
Yeshwanth Sriram Guntuka
d8ee7699e6 qcacmn: Reduce scan time when in GO+STA MCC
Scan on STA interface is taking around 10 secs to
complete. There is a 7secs expiry time used in nl
which could result in scan results received for
the first 3secs, which are from 2G channels, to
be flushed.

Fix is to not set offchannel simultaneous feature
capability, decrease the active dwell time for 2G
channels to 40msecs and increase burst duration
to 240msecs when GO is active.

Change-Id: If014b2115048018432943d863bbe184beb498408
CRs-Fixed: 2340516
2018-11-06 22:40:03 -08:00
Liangwei Dong
d25d11780f qcacmn: Add chan change HW mode change
Add policy_mgr_get_current_pref_hw_mode_dual_dbs
API for dual dbs HW. In Dual DBS mode HW, it
decides the actual DBS mode when DBS required.

Change-Id: Ic45b09fa49e1ff923f1a2dad50a3ce7e4007a3fd
CRs-Fixed: 2338105
2018-10-24 23:00:17 -07:00
Liangwei Dong
4bf807e8f4 qcacmn: Add DBS to DBS switch for vdev Down
Add DBS to DBS switch in opportunistic timer
handler when vdev prioritization enabled.

Change-Id: I902316d7f64427bcadf1131cc0b822d23fc172fa
CRs-Fixed: 2338092
2018-10-24 14:40:12 -07:00
Vivek
287fb84e2c qcacmn: Remove unwanted debug logs in serialization
With the enhancements to the serialization component
many debug prints were additionally added.

The new debug prints were adding up to the text size
of the serialization object files.
Removed few unwanted prints in the new serialization code.

Change-Id: I366228618fe07f7637ff3bae96abab27b3b04b87
CRs-Fixed: 2333170
2018-10-24 04:49:45 -07:00
Linux Build Service Account
ea8c5466eb Merge "qcacmn: Add original vdev info for NSS update API" 2018-10-22 22:03:17 -07:00
Vivek
595e6ee390 qcacmn: Additional flag to mark cmds both for activation and cancel
Adding additional flag for commands which has been marked
for activation and for which cancel has been received.

After the commands marked for activation and also marked for cancel
really gets active, we remove the command from the active queue.

Change-Id: I5eb42459e216ad8cbcee15ce9a7572dec7f776a2
CRs-Fixed: 2326639
2018-10-22 07:00:11 -07:00
Liangwei Dong
35501bf452 qcacmn: Add original vdev info for NSS update API
Add original hw mode change request vdev id to
NSS update APIs, so that the correct vdev to be
used to do post processing after hw mode change,
such as doing connect for hidden SSID case.

Change-Id: Ie7f7b55a100ec4e23be2fc710d9b0d83cb33088d
CRs-Fixed: 2336439
2018-10-22 01:15:38 -04:00
Abhishek Singh
63f7067831 qcacmn: Select non SRD channel for SAP in STA+SAP
Currently the driver selects the first channel available
in the PCL channel-list which could be STA channel itself,
and it may happen that this STA channel is not valid for SAP
bringup(SRD).

Fix is to select a non SRD channel from PCL channel-list
for SAP.

Change-Id: Ia9d3bfc0534e28972a6ddb0d588b62a55e3f6e23
CRs-Fixed: 2308072
2018-10-19 13:09:58 -07:00
Krunal Soni
72548e3680 qcacmn: Refactor operation related to gEnableStaConnectionIn5Ghz INI
Ownership of gEnableStaConnectionIn5Ghz is changed from HDD to
Policy manager. So policy manager doesn't have to rely on HDD to
obtain the INI setting.

CRs-Fixed: 2324395
Change-Id: I894467bab4b0bddf309463802b98904ef1150536
2018-10-17 14:28:27 -07:00
Krunal Soni
b3e8cd86f3 qcacmn: Refactor operation related to gEnableMCCAdaptiveScheduler INI
Ownership of gEnableMCCAdaptiveScheduler is changed from HDD to
Policy manager. So policy manager doesn't have to rely on HDD to
obtain the INI setting.

CRs-Fixed: 2324395
Change-Id: Ib86004c4ee753b37b392de69551c777e3e9011de
2018-10-17 14:28:25 -07:00
Krunal Soni
499efbab56 qcacmn: Refactor operation related to DBS/vdev/channel selection INIs
Ownership of dbs_selection_policy, vdev_priority_list,
channel_select_logic_conc INIs' are changed from HDD to
Policy manager. So policy manager doesn't have to rely on HDD to
obtain the INI setting.

CRs-Fixed: 2324395
Change-Id: I8b38916d92931ef9cd1727481740bc61cad8f808
2018-10-17 14:28:22 -07:00
Krunal Soni
887bcc1c17 qcacmn: Refactor operation related to INI gMaxConcurrentActiveSessions
Ownership of gMaxConcurrentActiveSessions is changed from HDD to
Policy manager. So policy manager doesn't have to rely on HDD to
obtain the INI setting.

CRs-Fixed: 2324395
Change-Id: Iac1451fc457d9bceee73596affdae54895917040
2018-10-17 14:28:19 -07:00
Krunal Soni
f936eaa6de qcacmn: Refactor operation related to INI gSystemPref
Ownership of gSystemPref is changed from HDD to
Policy manager. So policy manager doesn't have to rely on HDD to
obtain the INI setting.

CRs-Fixed: 2324395
Change-Id: Ia586896ea55c6e71d8dcff705bf0e74879931dbb
2018-10-17 14:28:16 -07:00
Krunal Soni
f7afa9351e qcacmn: Refactor operation related to INI gWlanMccToSccSwitchMode
Ownership of gWlanMccToSccSwitchMode is changed from HDD to
Policy manager. So policy manager doesn't have to rely on HDD to
obtain the INI setting.

CRs-Fixed: 2324395
Change-Id: Id8bdee52ebf83b1c8b3c8f9132a2fc74b28f42a0
2018-10-17 14:28:13 -07:00
Krunal Soni
f7ba0ea589 qcacmn: Add new INI/CFG infrastructure for Policy Manager
Policy Manager component needs to adopt a new INI/CFG
infrastructure

Provide a new infrastructure and remove old INI/CFGs related
to policy manager component.

CRs-Fixed: 2324395
Change-Id: Ia16845c2aef3c5877b0b164fcef13fe7cd41c736
2018-10-17 14:28:11 -07:00
Vivek
b2af62b892 qcacmn: Make API's generic for moving cmds from pending to active
The movement of serialization non scan commands from pending to active
could be one or multiple commands, and it could be done by looking up
the vdev or pdev serialization non scan queues.

There were separate API's implemented for these movement
and activating the commands, moved to active queue as
part of the movement.

Implement a generic API for the movement of non scan commands from
pending to active, instead of having multiple API's either for either
single or multiple commands and do the lookup either from pdev
or vdev queues based on required checks.

Change-Id: I39864611cf019757e44f35d1e267458d35243cc2
CRs-Fixed: 2327461
2018-10-16 06:25:32 -07:00
Santosh Anbu
4059554db0 qcacmn: Add unit test framework for serialization module
This change provides support for unit testing the serialization module
using the test framework.

Change-Id: I62bc2e20120d5fa73b147aef84ad22c64c100706
CRs-Fixed: 2308317
2018-10-16 00:31:47 -07:00
Vivek
994f98b951 qcacmn: Change log levels for obj manager leak detection API's
The default log level for Object Manager is set to QDF_TRACE_LEVEL_FATAL.
However the prints in the leak detection API's of the objects
are printing with log level QDF_TRACE_LEVEL_ERROR.

So to be able to dump the logs in case of leaks detected
for any pobjects, we are changing the log level to
QDF_TRACE_LEVEL_FATAL in the leak detection API's.

Change-Id: I203865390b910176686b5096fa951879c513d7b8
CRs-Fixed: 2331074
2018-10-15 04:53:57 -07:00
Varun Reddy Yeturu
b356013b23 qcacmn: Make policy_mgr_set_pcl_for_existing_combo as public API
Make policy_mgr_set_pcl_for_existing_combo as public API
Move policy_mgr_pdev_set_pcl to policy manager internal header file

Change-Id: I6ef45fb34c4bc4bc0c07cad6f546a777922fde9d
CRs-Fixed: 2331254
2018-10-11 19:31:23 -07:00
Tushnim Bhattacharyya
a13d706459 qcacmn: Fix OOB in __policy_mgr_check_sta_ap_concurrent_ch_intf
Fix out of bound array access for operating_channel[] in
__policy_mgr_check_sta_ap_concurrent_ch_intf.

Change-Id: I3945d2fd5b1e3d02a9e827ba4a907b48b4170fd2
CRs-Fixed: 2329332
2018-10-09 14:43:13 -07:00
Subrat Mishra
d95bfa449c qcacmn: Fix FILS IE parsing issue
Fix FILS IE parsing issue in assoc response frame.

Change-Id: I45b554c215280533ae6831d51526b8b98bc46c94
CRs-Fixed: 2329206
2018-10-09 12:37:37 -07:00
gaurank kathpalia
6d113e258a qcacmn: Fix BSS scoring params
Currently the driver calculates the nss score
based upon the max capability of the AP, and not the
hw_mde config which would be there after connection
for example, the driver calculates the score for a
2x2 11n AP, and 1x1 VHT (11ac) AP, it connects to the
11n AP in 1x1 mode, if a concurrent connection is
present, which affects throughput

Fix is to check whether the current AP channel results
in DBS or not, if yes then change the NSS to 1 instead of
2

Change-Id: I80e2af00044b760325eb1a51b09a45189d58a417
CRs-Fixed: 2271976
2018-10-05 17:39:46 -07:00
Vivek
b5eee614ee qcacmn: Use wlan_serialization_find_api to find matching command
With the new serialization code, the older instances of code,
where the queue traversal to find matching cmd was done
from the public API was replaced with wlan_serialization_find_cmd API.

However, there was an instance where the list traversal was done from
the public API and is now replaced with wlan_serialization_find_cmd API.

Change-Id: Idc37f2bdd52cedc578b30a71517c9e57453f25d0
CRs-Fixed: 2312992
2018-10-05 15:46:55 -07:00
Vivek
068d14f8e1 qcacmn: Validate qdf_nbuf_clone return before calling mgmt rx cb
For more than one registered mgmt rx callbacks, we clone the
mgmt rx buf and call each rx handler. We need to check the return
type of qdf_nbuf_clone before we call the regsitered handlers.

Change-Id: Ic8513fc51954fb88c80ae6822e0fa45e34bcf12c
CRs-Fixed: 2322631
2018-10-04 03:37:06 -07:00
Amar Singhal
49ba607741 qcacmn: Rate limit the mgmt frame error messages
Management frame error messages can occur quite frequently.
Therefore rate limit them.

Change-Id: I9caa71031e41f3aca2d2bed787c4f5b72d516ded
CRs-Fixed: 2326294
2018-10-04 03:37:03 -07:00
Abhinav Kumar
90c7d6b010 qcacmn: Add SRD channel check in restart SAP
Currently the driver doesn't have a check to bring
up a SAP on STA SCC channel if its a SRD channel
and does force SCC on it, even if SRD master mode
is not supported.

Fix is to check the SRD ini before SAP bringup
on the STA channel.

Change-Id: I850d8b252afb20d9e4374e1fb4932d7ef17f3e51
CRs-Fixed: 2302742
2018-10-03 20:24:22 -07:00
Rohan Dutta
0bdfabfecd qcacmn: Add support to check peer has mcast cipher
Add support to check if peer has MCAST cipher set

Change-Id: I9eb2983c33583b4af39d07a5793993a56b7d27ad
2018-10-03 05:10:56 -07:00
Tushnim Bhattacharyya
e269fc71f2 qcacmn: Protect sap restart work for driver unload
Protect sap restart work handler from SSR to avoid accessing
data structures which are freed already.

Change-Id: I75d2032b022aa68817ec102cbe65f635a627eb82
CRs-Fixed: 2325966
2018-10-02 13:48:35 -07:00
Harprit Chhabada
ff17327ad5 qcacmn: Add bound check for desc_id
Add bound check for desc_id in tgt_mgmt_txrx_tx_completion_handler()
to check OOB issue.

Change-Id: Ib28852a1c1ccf06af14004bf4001ce0938391f3d
CRs-Fixed: 2318632
2018-10-01 18:38:25 -07:00
Abhishek Singh
3e940d1376 qcacmn: Fix purging of active command during sme close session
In wlan_serialization_purge_cmd_list, driver stops the active cmd timer
and destroy it and thus in wlan_ser_cancel_non_scan_cmd as driver is
not able to get the timer the active cmd is not removed.

As wlan_ser_cancel_non_scan_cmd already takes care of the stopping and
destroying the timer and remove the logic from
wlan_serialization_purge_cmd_list.

Also update the active command bitmask and active/pending blocking
flags when an command is flushed.

Change-Id: Ie206f08920c2830c935d0aacb204dc4ee2676c91
CRs-Fixed: 2324890
2018-09-29 03:26:55 -07:00
Hariharan Basuthkar
f8da572209 qcacmn: Print Optimization
Came up with changes to replace “qdf_print” with crypto_err/
crypto_debug/crypto_info implementing QDF_TRACE in crypto
component, to avoid flooding of error prints on the console.

Change-Id: I411efd78f808f7c893ece9096ebc429c8753fc82
CRs-Fixed: 2299590
2018-09-28 09:06:35 -07:00
Abhishek Singh
97d6a98c03 qcacmn: Fix compilation error in vdev state machine
Fix the compilation error in vdev state machine and make state
transition logs from debug to info.

Change-Id: I7d7975931232f041206bdb64c639456bf9327b3f
CRs-Fixed: 2321726
2018-09-27 18:54:20 -07:00
Jianmin Zhu
e4dc0494f6 qcacmn: Release pdev pending list instead of active list wrongly
When destry pdev, need release serialization active list if it
is not empty, but release pending list by mistake, assert will
happen.

Change-Id: I83be2cb512f3a832d03c0c33c8ea63243d745a54
CRs-Fixed: 2323512
2018-09-27 15:00:47 -07:00
Varun Reddy Yeturu
defbdb4f0a qcacmn: Make policy_mgr_pdev_set_pcl as public API
Make policy_mgr_pdev_set_pcl as public API
Remove SET PCL for STA vdev from policy manager as it
is being done now from the roaming start cmd core
function which is csr_roam_offload_scan()

Change-Id: I3fc0eb4d37278a67a1f18579cec7d65e491bd967
CRs-Fixed: 2320734
2018-09-27 15:00:44 -07:00
Amir Patel
20a0efabb1 qcacmn: Add qdf_platform source file to qdf/Kbuild
Add qdf_platform source file to qdf/Kbuild and
clean-up WAR introduced in change
I8172f3dbe0716be24a4dda739afb49f94528a4f6

Change-Id: Icb76d53544590b8bcace275ef52870606fb5d826
2018-09-24 18:55:20 -07:00
bings
747b176c98 qcacmn: Replace wlan_phy_ch_width with phy_ch_width
Delete enum wlan_phy_ch_width. Move phy_ch_width definition
from reg_services_public_struct.h to wlan_cmn.h.

Change-Id: I9f2b3ade1b023b9728274ce4edd3b90f562ae02e
CRs-Fixed: 2318356
2018-09-24 17:16:16 -07:00
Vignesh Mohan
9d1c7a223f qcacmn: cleanup crypto component prints
Updated error log from qdf_print to crypto_err/
crypto_debug/crypto_info implementing QDF_TRACE
for files in crypto to avoid console cluttering.

Change-Id: I1f7860373c505f4e1d80909662b6673f8263bdcd
CRs-Fixed: 2299591
2018-09-24 05:07:35 -07:00
Vivek
83b8ffc556 qcacmn: Protect queue access inside activate_multiple_cmds API
The removal of blocking command from active non scan queue,
can result in movement of either single/multiple
blocking/non blocking commands from  pending to active queue,
so the activation of new command(s) moved to active queue
as a result removal of blocking command, is done inside the
wlan_serialization_activate_multiple_cmd where the active
list is traversed and activated, which needs to be protected by the queue
lock to avoid concurrent access and updates to the cmds in the queue
from different contexts.

Change-Id: Ibf3034083d348ef7187bfac9cf2c540c748cd678
CRs-Fixed: 2317626
2018-09-21 03:53:40 -07:00
Jianmin Zhu
035ab54cdc qcacmn: MCL part change after serialization enhancement
1. Keep serialization legacy api not broken.
Serialization enhancement have much changes on internal struct
and API, need re-implement serialization legacy APIs.

2. Set all cmds on MCL platform as blocking type.
MCL dones't support cmd concurrency on multi vdevs, while WIN need
it.

Change-Id: I5d5d6e0e16becb0b0f285fd8ed20982f2819659c
CRs-Fixed: 2315407
2018-09-20 13:10:45 -07:00
Tushnim Bhattacharyya
56eb2ef814 qcacmn: Reduce log level in policy manager
Reduce log level from error to debug in
policy_mgr_convert_device_mode_to_qdf_type,
policy_mgr_get_qdf_mode_from_pm, policy_mgr_decr_active_session,
policy_mgr_decr_session_set_pcl.

Change-Id: I236c6770b87c5a4d4888cb6249aaf128b1cdcb8f
CRs-Fixed: 2317899
2018-09-19 09:59:54 -07:00
Ashok Kumar Ponnaiah
ac40b6beda qcacmn: Add optional cabapilites in WPA ie
Add optional cabapilites in WPA ie.

Change-Id: I9be9e5f79837fe21a109d7e4c881023403297736
2018-09-18 11:10:18 -07:00
Vivek
aa6303e509 qcacmn: Make access to serialization timers atomic
The serialization timers can be accessed from multiple contexts
when adding and removing commands to/from the serialization
queues. So the access to the serialization timers should be
atomic to protect the same timers being used for multiple
commands.

The serialization timers are maintained per psoc and are
protected with psoc timer locks.

Also the serialization lock APIs are updated to take the lock
object pointer as an argument

Change-Id: Ibdb41818fde9318fca6bbc92a536858364639365
CRs-Fixed: 2313039
2018-09-18 07:50:17 -07:00
Vivek
1a71e634a8 qcacmn: Remove redundant check when moving cmd from pending to active
The API wlan_serialization_is_active_cmd_allowed should used
when a serialization request is received and we need to decide
if a command can be moved to active queue or pending queue.

However when moving pending to active, the logic to move pending to
active is implemented in the function itself and is different from
what is implemented in wlan_serialization_is_active_cmd_allowed and thus
should not be used.

Change-Id: If04edf4a0012d9ae6cbbea9606b0e6b962f10b65
CRs-Fixed: 2312991
2018-09-17 04:27:05 -07:00
Srinivas Pitla
90713473d1 qcacmn: Implement VDEV MLME State machine
This change implement VDEV MLME State machine based on design,
and handles valid events in each state and invokes legacy callback
APIs to perform state specific operations

Change-Id: I38a11778cba31276c720bc13c085ade60b1fb0c4
CRs-Fixed: 2307722
2018-09-14 08:16:51 -07:00
Srinivas Pitla
be8dac4d5d qcacmn: Define VDEV MLME component object
This change defines VDEV MLME object, and registers with object manager to
be notified on creation/destroy, and also initializes MLME SM

Change-Id: I75bb7de7326e4bbed21ef9653427c4e0694c3ffc
CRs-Fixed: 2307722
2018-09-14 08:16:48 -07:00
Srinivas Pitla
bc7748c852 qcacmn: Implement State machine framework
This is generic state machine framework, which provides APIs for state
definition, state transition, event posting

Change-Id: Ie7d5a064967098fcb77a663047c479d1d1576595
CRs-Fixed: 2307722
2018-09-14 08:16:44 -07:00
Harprit Chhabada
2a719dc230 qcacmn: Add bound check
Add bound check for desc_id in tgt_mgmt_txrx_get_vdev_id_from_desc_id
and tgt_mgmt_txrx_get_nbuf_from_desc_id

Change-Id: Ie27c473061fb68f1d3486cbfe95c015be77203f9
CRs-Fixed: 2304610
2018-09-13 13:20:49 -07:00