Commit Graph

33 Commits

Author SHA1 Message Date
Rajeev Kumar Sirasanagandla
02cf4c9c2f qcacld-3.0: Avoid STA plus STA concurrent connections
Add policy manager support to avoid simultaneous connections on
STA plus STA concurrent interfaces when
WMI_SERVICE_STA_PLUS_STA_SUPPORT is not set.

Change-Id: I73e65c56a98908128d56af2f4fba8ced5210fff1
CRs-Fixed: 2427828
2019-04-18 00:28:17 -07:00
Manikandan Mohan
7ba3608afc qcacld-3.0: Add NAN+SAP concurrency config to policy manager
Add NAN+SAP concurrency config in 2x2 DBS table for design constraints.

Change-Id: I89ad35e862c8e0bc9b96dba35d9f2ad66144e5b1
CRs-fixed: 2431539
2019-04-11 01:12:56 -07:00
Manikandan Mohan
ad93a751b5 qcacld-3.0: Add policy manager changes for NAN+SAP concurrency
Add policy manager changes for NAN discovery interface and SAP
mode concurrency setup related constraints. This handles NAN enable,
disable, SAP bringup and PCL related configuration for NAN+SAP
concurrency.

Change-Id: I04564e80e62189e2e6c0f810856b961b61ef70b4
CRs-fixed: 2431539
2019-04-11 01:12:45 -07:00
Harprit Chhabada
74007cf168 qcacld-3.0: Check range for pcl_count in policy_mgr_trim_acs_channel_list
In policy_mgr_trim_acs_channel_list(), check the range for
pcl to ensure it is less than QDF_MAX_NUM_CHAN

Change-Id: I1326e229e93edef6ac5963c7cc48557cc22e76ba
CRs-Fixed: 2424007
2019-04-06 00:16:04 -07:00
Abhishek Singh
3bbf6cb77c qcacld-3.0: Fix wait timeout for existing channel change request
In case of STA+SAP, if STA connect to new channel, driver check
if SAP channel switch is required. Before this it wait if channel
switch is already in progress, if not it continue and check if
channel change is required. While waiting in case where event was
set and channel switch was not in progress, the even gets reset
after waiting.

So if event is not set again, i.e in case SAP channel change is not
required. Any subsequent wait on the event will result in timeout.

Also while changing channel this event is reset and then the
concurrency checks are made and if checks fails the channel change
may not happen leaving event in reset state.

So wait for event only if channel switch is already in progress.
Also reset the event once all concurrency checks have passed and
channel change is started.

Change-Id: Iffcd8b2bf9dc7cbbd7d939983601cc395ef4c515
CRs-Fixed: 2425145
2019-04-02 11:17:16 -07:00
Abhishek Singh
424ca57742 qcacld-3.0: Hold lock while temporary deleting the connection entry
If two thread are trying to access the connection entry and one of them
Is modifying it by temporarily deleting an entry, the other thread may
get the invalid connection entry and decision made using that connection
table will be invalid.

Thus acquire the lock before the entry is temporarily deleted and release
only after its added back.

Change-Id: I83b9d7a77045d8bddd6cf3e4b1af80bded116e2f
CRs-Fixed: 2422611
2019-03-27 06:09:44 -07:00
Dustin Brown
3fdaaf61ad qcacld-3.0: Remove cds_ssr_protect/unprotect
cds_ssr_protect/unprotect is obsolete. Remove them, replacing any
remaining call sites with qdf_op_protect/unprotect.

Change-Id: Ib8e1fc1e16785dfe3c5f8273e4ad8d5d6ecdb6e6
CRs-Fixed: 2418454
2019-03-27 01:25:38 -07:00
Rajasekaran Kalidoss
869bc4af4f qcacld-3.0: LFR2 DBS roam support
During LFR2 roaming, after the preauth with new AP
and disassociation with current AP are successful,
proper HW mode should be set based on the
existing concurrency scenario.

Change-Id: I312ed10bc844712b3dba36680457198a19f1e85c
CRs-Fixed: 2367224
2019-03-26 20:56:02 -07:00
Abhishek Singh
bfaebe3372 qcacld-3.0: Fix opportunistic timer start issue in 2x2 DBS mode
In 2x2 DBS mode once STA/SAP change channel from 2.4Ghz to 5Ghz,
policy_mgr_get_current_pref_hw_mode_ptr never return
PM_SINGLE_MAC_UPGRADE to start the opportunistic timer to switch to
single mac mode.

Fix is to check and start opportunistic timer once connection info are
updated. Also start opportunistic timer before
check for SAP to change channel as when SAP change channel it should
stop opportunistic timer and set required HW mode.
If single mac mode is required after channel switch it will start
opportunistic timer again in channel switch callback.

Change-Id: Id6bbc7ea51ba8147e517e7e7bf2b14931c95ea44
CRs-Fixed: 2419645
2019-03-24 14:54:48 -07:00
Abhishek Singh
bc4261fe8c qcacld-3.0: Send HW mode change while switching STA channel in 2x2 DBS
If DBS 2x2 mode is supported, to operate in 2.4Ghz the driver needs to
be in DBS mode before vdev start/restart is sent on 2.4Ghz channel.
If STA is connected to a 5Ghz channel and the PEER AP switch from 5Ghz
to 2.4Ghz channel, it sends vdev restart without sending the HW mode
change to firmware.

Fix is to set HW mode before the initiating vdev restart if new channel
is 2.4Ghz and 2x2 DBS is supported and current HW mode is not DBS

Change-Id: I6dc57f37e155f0e29b17840e4e246de773f42b3e
CRs-Fixed: 2419642
2019-03-21 23:04:24 -07:00
Jeff Johnson
e79b53c3f7 qcacld-3.0: cmn_services: 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 cmn_services replace any such comparisons with
logical operations performed on the pointer itself.

Change-Id: I7141cd900916bd4bbab1bc8c7a1b90589286582b
CRs-Fixed: 2418402
2019-03-20 10:10:12 -07:00
Rachit Kankane
def2b174a2 qcacld-3.0: Update ACS channel list with PCL
Current ACS logic sometimes selects MCC channel based on its
algo for SAP / GO which results in SAP / GO bring-up failures.
This issue is seen in below concurrency combinations:
1. SAP + SAP
2. SAP + P2P-GO
3. SAP + SAP + SAP
4. SAP + SAP + P2P-GO

So with this change driver restricts ACS scan to intersection of
PCL and ACS channel list.
This implementation will take care of existing STA + SAP case as well,
as PCL will have channels according to 1st connection being STA.

Change-Id: Ic715fb29533c20b63cffda8a82b7317904f0d291
CRs-Fixed: 2407289
2019-03-14 19:27:35 -07:00
Nachiket Kukade
413c5fa36e qcacld-3.0: Add policy mgr changes to support NDI concurrencies
If Firmware supports NDI DBS mode, driver can support NDI
concurrency along with NAN and STA type connecitons. Use
Policy Manager API's to add support for these concurrencies.

Add policy mgr related changes to support NDI concurrencies.

Change-Id: If272be34606c0897d0b145c602b4bc2ba4462cb0
CRs-Fixed: 2384549
2019-03-12 13:58:17 -07:00
Nachiket Kukade
98885bc1b8 qcacld-3.0: Define NDI related definitions in Policy Manager
Policy manager is not aware of NAN Datapath Interface(NDI)
which is used to establish datapath with NAN peers. Define
and enumerate policy manager definitions and tables to
support NDI alongside NAN Discovery and Station interfaces.
Important thing to note is that NDI cannot be active without
presence of a NAN Discovery interface.

Define NAN Datapath related definitions in Policy Manager.

Change-Id: I6ecdf5a89a8161d9c5d671e4e718dd615f46019e
CRs-Fixed: 2407225
2019-03-12 13:58:12 -07:00
Abhishek Singh
a0f55ea6b1 qcacld-3.0: Send HW mode change before switching channel in DBS mode
If DBS 2x2 mode is supported, to operate in 2.4Ghz the driver needs to
be in DBS mode before vdev start/restart is sent on 2.4Ghz channel.
In scenareo with gWlanMccToSccSwitchMode 4, when AP is in 5Ghz and
STA connect to any other channel in 5ghz, it force AP to switch to 2.4 Ghz
channel. Thus AP sends vdev restart without sending the HW mode change
to firmware.

Fix is to set HW mode before the AP start channel switch.

Change-Id: I2a1c176d5f3ed8cc2f62dc24c72959db1afbaae3
CRs-Fixed: 2414034
2019-03-12 08:34:52 -07:00
Bala Venkatesh
00e90dda38 qcacld-3.0: Allow SAP to move from one DFS channel to another DFS
Allow the SAP to move from DFS channel to another DFS channel in
STA+SAP SCC concurrency scenario.

Change-Id: Ie2091bbdd758ed7f3bef1757ff42bbe5034fe908
CRs-Fixed: 2408892
2019-03-04 14:22:30 -08:00
Bala Venkatesh
79fe810190 qcacld-3.0: Check for STA+GO restart only if SAP is active
In function policy_mgr_is_restart_sap_allowed, STA+SAP concurrency is
decided based on return status of policy_mgr_get_concurrency_mode.
It can happen, SAP adapter is opened. But hostapd_open and start_ap
is not done. Then, this api will return SAP bit true even even though
SAP is not active. So, explicitly check if the SAP is active by
checking the SAP connection count along with the concurrency mode.

This can result in GO channel override with STA channel.
Hence check the sap and go mode connection count along
with the concurrency mode.

Change-Id: I672d503f34734d7e16175fedc685d2838e77d8f7
CRs-Fixed: 2405189
2019-02-26 11:29:59 -08:00
Rachit Kankane
ff35d3c8be qcacld-3.0: decrement active sessions count
Decrement active session count to be in sync with total no of
active connection when existing AP is moving to STA's channel
to achieve SCC.

Change-Id: Id1b599bc53768ddf6b62efbd2dc2a3003c0ad0b8
CRs-Fixed: 2400564
2019-02-19 23:31:07 -08:00
Varun Reddy Yeturu
567184febc qcacld-3.0: Fix compiler error in policy mgr
Before updating pcl_list_org & weight_list_org array,
memzero these arrays to length of array passed by caller.

CRs-Fixed: 2395140
Change-Id: I856ceafd8f4d86eeee3401227f5d6f48615098f5
2019-02-12 08:44:58 -08:00
Bala Venkatesh
9391de3b8d qcacld-3.0: Populate dual mac disable feature correctly
Currently, dual mac disable feature is populated from object mgr
psoc. But, this ini is moved to policy mgr. So, populate this ini
from policy mgr context.

Change-Id: I5d83ce0efa9130cc37734f3d7e982def4fe59ac2
CRs-Fixed:
2019-01-30 18:54:11 -08:00
Ashish Kumar Dhanotiya
aa9fdbb777 qcacld-3.0: Add support for new regulatory files
Regulatory component is getting updated to reduce the
code size based on different regulatory features. In this
process new regulatory files are getting added and some
of the files are getting removed.

To compile the newly added files update the required changes
in driver Kbuild file.

Some of the functins which are not supposed to be invoked from
outside the component directly, replace those function calls
with the appropriate wrapper functions.

Change-Id: I31a25268250b99f4f156c4f149966213746d999e
CRs-Fixed: 2373780
2019-01-23 15:14:09 -08:00
Liangwei Dong
77ff66cad4 qcacld-3.0: validate sbs HW mode set
PM_SBS/PM_SBS_DOWNGRADE action should not
be executed again if current hw mode is sbs.

Change-Id: I9bf2666c559dbf6a3ad73aec7ee94db7c50b82a7
CRs-Fixed: 2375652
2019-01-23 06:37:24 -08:00
Jeff Johnson
2449b32e09 qcacld-3.0: Remove sta_sap_scc_on_dfs_chan_allowed
Change Id1333a49d0538eb4ccfaf3c8498e9ca06671de02 ("qcacmn: Allow SAP
to come up on DFS channel in SCC mode") added two separate fields to
track the status of this feature. The sta_sap_scc_on_dfs_chan_allowed
field in struct policy_mgr_psoc_priv_obj was never used, so remove it.

Change-Id: I75fe9129d4df9a70af103d4b75389d75528ad422
CRs-Fixed: 2379072
2019-01-15 18:41:06 -08:00
Jeff Johnson
9a866ec4cf qcacld-3.0: Remove enable_sap_mandatory_chan_list
As part of change I83a13b1fcc6ca4350071a71648c7072c2b2a5191
("qcacld-3.0: Move few INIs's ownership from HDD to Policy manager")
support for the gEnableSAPManadatoryChanList INI item was moved to
Policy Manager, and the sap_mandatory_chnl_enable field in struct
policy_mgr_cfg now reflects the status of this INI item. The prior
mechanism, the enable_sap_mandatory_chan_list field in struct
policy_mgr_psoc_priv_obj, is no longer used, so remove it.

Change-Id: I1675257f2a4aac3ae34e934173415f9a4064618b
CRs-Fixed: 2379071
2019-01-15 18:41:02 -08:00
Liangwei Dong
c79ddc1bff qcacld-3.0: remove unused get config API
Remove below unused policy mgr get config api:
ucfg_policy_mgr_get_dbs_selection_plcy
ucfg_policy_mgr_get_max_conc_cxns
ucfg_policy_mgr_get_vdev_priority_list

Change-Id: Idd5ad140f3739ece1d7c0fe5ae1db1dbe9154c4f
CRs-Fixed: 2373646
2019-01-11 15:58:05 -08:00
Harprit Chhabada
efea6f517c qcacld-3.0: Clean up a policy manager CFG item
Clean WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED CFG item of policy
manager.

Change-Id: Ib73ea3385bedf3a8d35e60f3672950e27b8ed93d
CRs-Fixed: 2373863
2019-01-08 11:42:54 -08:00
Liangwei Dong
b007863932 qcacld-3.0: Handle FW not support SBS
If FW doesn't support SBS, return QDF_STATUS_E_NOSUPPORT
to allow connect request in current HW mode.

Change-Id: Ie960fe993ea95cf40dd43fb56c71edd94efda63b
CRs-Fixed: 2370206
2018-12-27 03:21:07 -08:00
Nachiket Kukade
cf94160805 qcacld-3.0: Add policy mgr changes to manage NAN Discovery
Add NAN Discovery specific modes, modules that manage NAN
Discovery interface. Add cases and exceptions that manage
concurrent operations alongside NAN Discovery.

Add policy manager changes to manage NAN Discovery.

Change-Id: Ib9a10be265c14adf8d1d5f2f2e2b65aa399d6636
CRs-Fixed: 2358183
2018-12-21 12:34:38 -08:00
Paul Zhang
d5c1f25d6b qcacld-3.0: resolve race issue accessing pm_conc_connection_list
While function policy_mgr_set_pcl_for_existing_combo posts event
SIR_HAL_PDEV_SET_PCL_TO_FW and before restores pm_conc_connection_list,
the function policy_mgr_get_valid_chan_weights is invoking and
accessing pm_conc_connection_list then race happens.

To resolve the issue, restore the pm_conc_connection_list before
calling SME function.

CRs-Fixed: 2362839
Change-Id: I8b30dc5084c4aae4bcc4b3b350d19c8be89338a9
2018-12-21 02:40:41 -08:00
Krunal Soni
e64b17e7f0 qcacld-3.0: Driver fails to report gDualMacFeatureDisable val to FW
If DBS is disabled from INI then driver just bails out
in wlan_hdd_update_dbs_scan_and_fw_mode_config() API and never report
it to FW. This creates a confusion when DBS is disable INI but our HW
is capable of doing DBS, i.e. driver thinks that DBS disabled
but FW thinks that DBS is enabled.

Provide a fix that driver should report exact INI setting to FW.
This issue got introduced as part of regression caused by:
Iec2ef7e77e91f332028904c319d24e1ed134306d

ROME platform doesn't support any DBS related commands in FW,
so if driver sends wmi command with dual_mac_config with all params
set to 0 then FW wouldn't respond back and driver would timeout on
waiting for response. This was the original issue for which
Iec2ef7e77e91f332028904c319d24e1ed134306d was added.

Make sure current solution doesn't break backward compatibility.
Add a check to make sure FW supports DBS to eliminate
ROME vs NON-ROME platform.

CRs-Fixed: 2361628
Change-Id: I8a3b795b20e82391ae5d5c86d1e7d814d103ce64
2018-12-19 04:56:55 -08:00
Wu Gao
d6b5e40780 qcacld-3.0: Enable policy mgr component in CLD
Policy mgr component related files moved from hostcmn to CLD, this
change add its initializion functions to CLD framework, change Kbuild
to enable it.

Change-Id: I0a87d93b9cf639aa66a10f9ae55ef8cb1dfbb80e
CRs-Fixed: 2361570
2018-12-11 17:25:59 -08:00
Krunal Soni
1680e4192b qcacld-3.0: Move few INIs's ownership from HDD to Policy manager
This is mirror change for de218d60a

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.

Change-Id: I83a13b1fcc6ca4350071a71648c7072c2b2a5191
CRs-Fixed: 2363060
2018-12-10 23:33:37 -08:00
Linux Build Service Account
478b1fa7a8 Move umac/cmn_services/policy_mgr to components/cmn_services/policy_mgr
Change-Id: Ie67730cd3f1a249c3dcbb2b6eaf95a55cbd08306
2018-12-04 15:59:42 +05:30