Commit Graph

158 Commits

Author SHA1 Message Date
Gururaj Pandurangi
98ca3dac37 qcacld-3.0: Acquire mutex lock within MCC policy mgr api
Currently, the mutex lock is acquired in the caller
functions before calling policy mgr api to check MCC.
Remove it and add the mutex lock within the policy
manager API instead.

Change-Id: I7be6081ed12c1882b808d3ca4e92392d175349e7
CRs-Fixed: 2732055
2020-07-14 13:19:48 -07:00
Srinivas Dasari
440a823073 qcacld-3.0: Update policy mgr table if nan_conc control is supported
Currently, policy mgr table entries correspond to NAN/NDI are
updated only if nan_dbs is supported. Update/access the
policy mgr table even when nan_conc_control is supported by host.
This allows the host to take care of NAN cuncurrencies through
policy mgr on the non-DBS platforms.
Process NAN enable request in host if nan_conc_control is
supported, which updates the NAN entry to policy mgr table.

Change-Id: Id6e58a9bfde6ceb66a8a0b33136880f75e36090f
CRs-Fixed: 2729995
2020-07-12 07:31:19 -07:00
Srinivas Dasari
c6551b04b0 qcacld-3.0: Add NAN/NDI entries to non-dbs pcl table
Currently, non-dbs pcl tables don't have entries for
NAN/NDI when the target doesn't support DBS. Firmware takes care
of the NAN concurrencies in such targets.
But host has to take care of the NAN concurrencies when firmware
allows host to do so through WMI_SERVICE_NAN_DISABLE_SUPPORT.
So add entries in non-dbs pcl table to allow/block different
concurrencies in host.

Change-Id: I0c4c59065a2fbc3beae13b1217673e8290c1baa8
CRs-Fixed: 2729992
2020-07-12 07:31:16 -07:00
Srinivas Dasari
b63d131e44 qcacld-3.0: Change uint8_t to qdf_freq_t to hold NAN frequency
Currently, SAP has to be moved to NAN channel once NAN enable is
successful. The frequency is copied to a uint8_t variable but
it can't hold the frequency as the value would be more than 2412.
It was initially declared to hold channel number. Change the
variable to qdf_freq_t to hold the frequency.
Also, move the SAP to NAN 2.4GHz channel in non-DBS platforms.

Change-Id: I27186c3a5915db549336537702287ee67cdce011
CRs-Fixed: 2729991
2020-07-11 22:39:34 -07:00
Srinivas Dasari
8e493f081d qcacld-3.0: Handle SAP+NAN concurrency when NAN_DBS isn't supported
When nan_sap and nan_disable are supported but nan_dbs is not
supported,
1. Allow SAP+NAN concurrency if force SCC is supported
2. Disable NAN if SAP comes up on a different band and force SCC is
   not supported
3. Reject NAN enable if SAP is already on a different band and force SCC is
   not supported

Change-Id: Ic53eedcda2e5b314f9be2a4bd913d5e63f6613a2
CRs-Fixed: 2729986
2020-07-11 22:39:29 -07:00
Abhishek Singh
4b9273d712 qcacld-3.0: use crypto from vdev to fill the scan filter
use crypto from vdev to fill the scan filter.

Change-Id: I2c4bd9b85d9dac14c4d331a84cc7f3307d06818d
CRs-Fixed: 2718080
2020-07-08 00:09:34 -07:00
Pragaspathi Thilagaraj
750e889d9e qcacld-3.0: Send vdev pcl command when STA + STA roaming is active
Send Vdev pcl command on both connected STA vdev when sta+sta
roaming is enabled. Handle below cases:
1. When 1st STA is connected send PDEV pcl command for the
first sta. Set pcl_vdev_cmd_active false.
2. When 2nd STA comes up, Set pcl_vdev_cmd_active to true,
send vdev PCL for 1st sta before enabling roaming(disabled
as part of the connect on 2nd STA).
3. For second STA force dbs connection when
enable_dual_sta_roam_offload ini is enabled. Set the channels
of the 1st connected STA band as invalid and remove these
channels from the scan filter.
4. On disconnection of 2nd STA connection, clear the vdev
PCL sent for 1st STA and then send PDEV pcl command.

Also make changes to send set PCL command after roam init
is done before RSO start is done at firmware to avoid assert.
Post set pcl command from sme/csr through lim/wma/wmi to avoid
the above condition.
Disable roaming on the vdev before sending set PCL command to
avoid roaming on undesirable band & channels.

Change-Id: I6bd869015b7248fe5c5c90b6e2fa0174995be197
CRs-Fixed: 2725360
2020-07-07 16:23:06 -07:00
Lincoln Tran
d8a2fcc25d qcacld-3.0: Fix set band cases failed
Recent changes to hdd_regulatory_dyn_cbk broke WWAN n79 and
WIFI 5 GHz co-existence, failure:
1. AGO won't switch channel to 2G even 5G channel disabled.
2. SAP can switch to 2G if 5G disabled, but won't restore back
to 5G when 5G re-enable.

Update callback to call the proper function so that band for
SAP or P2P GO is updated accordingly.

Change-Id: I4087466c9a05250921159d5daff077a8ea7ea495
CRs-fixed: 2718339
2020-07-01 07:50:40 -07:00
Utkarsh Bhatnagar
2847ec9b74 qcacld-3.0: Overide the value of sta sap SCC DFS ini
Currently the driver allows standalone SAP and
STA+SAP SCC even if the dfs master mode is 0
and the ini g_sta_sap_scc_on_dfs_chan if
configured 2 assumes that the dfs master mode is
enabled.
If the user configures master mode as 0 then the
ini g_sta_sap_scc_on_dfs_chan should not be 2
since standlaone SAP can come up on DFS channel
according to the implementation.

Fix is to overide the value of g_sta_sap_scc_on_dfs_chan
to zero if the master mode is disabled.

Change-Id: Ife02a3545a5df7dfa7855feea7965628a1f513a3
CRs-Fixed: 2713392
2020-06-26 16:48:41 -07:00
Rachit Kankane
20ae27ea60 qcacld-3.0: For single MAC no-interband MCC
Concurrency related changes for single MAC target which
doesn't support Inter-Band MCC as well.

Change-Id: Id9d02d6353103f21dee8b9e6767d2fc8b1277278
CRs-Fixed: 2711462
2020-06-26 05:37:21 -07:00
Jianmin Zhu
d3f49cbc4b qcacld-3.0: 2nd SAP CSA failed when 5G disabled
Reproduce steps:
 1. SAP+SAP SCC on channel 36
 2. Set band to disable 5G band
Observed Results:
 Only 1 SAP switched to 2G channel 6, another keeps in channel
 36.
 When wlan_hdd_get_channel_for_sap_restart for 1st SAP return
 success, will break from loop, so 2nd SAP won't CSA at all.
Expected Results:
 Both SAP need switch to 2G by CSA.

Change-Id: I67807fb77bfc5a33011576d577b734b038637075
CRs-Fixed: 2718664
2020-06-25 18:13:49 -07:00
Rachit Kankane
da341865d8 qcacld-3.0: PCL table for no-dbs no-interband MCC
New table for 2-port as well as 3-port concurrency combinations
when both DBS and Inter-Band MCC are not supported by target.

Change-Id: Ic43c46cb60f4baa0399373e96078276198509b49
CRs-Fixed: 2711500
2020-06-25 03:49:44 -07:00
Utkarsh Bhatnagar
2a74a1d231 qcacld-3.0: Add check in policy_mgr_dump_channel_list
Add check in policy_mgr_dump_channel_list to restrict the
pcl_channels array index to NUM_CHANNELS & len while printing
2G/5G and 6G channel list as pcl_channels is initialized
with size of NUM_CHANNELS.

Change-Id: I5ca573d1c12970974cbb09c5d25f816e2d6c1de5
CRs-Fixed: 2706882
2020-06-17 12:14:40 -07:00
Ashish Kumar Dhanotiya
9f588185d9 qcacld-3.0: Add connect id for the connection manager
Add connect id in the policy manager for the newly designed
connection manager infrastructure.

Change-Id: Ib7bd08e5326ead04da88175636777bf5dd4e255b
CRs-FIxed: 2705700
2020-06-09 14:30:38 -07:00
Lincoln Tran
e4f18a9065 qcacld-3.0: Add logic to handle country code change
Update the HDD callback to check for phymode change or
channel change when country code updates and stop/restart
the adapter accordingly. Include cases for STA mode,
SAP mode, P2P-CLI mode, and P2P-GO mode.

Add conditional compilation flag for MCC specific API in
qcacmn.

Change-Id: I88edb401146e3cef48d757393f89fa48cb6ac895
CRs-fixed: 2658294
2020-06-07 12:29:02 -07:00
Utkarsh Bhatnagar
f3e4542667 qcacld-3.0: Removed IBSS from wlan_policy_mgr
Removed IBSS feature from wlan policy Manager

Change-Id: If31514e8b67042a798419e29ddda0538e2ebb265
CRs-Fixed: 2681063
2020-05-13 19:17:36 -07:00
Utkarsh Bhatnagar
316ca349b3 qcacld-3.0: Added logs in policy_mgr_is_concurrency_allowed
Increased logging in policy_mgr_is_concurrency_allowed
by adding debug logs in policy_mgr_allow_multiple_sta_connections
and policy_mgr_is_6g_channel_allowed.

Change-Id: Ic285566209b4d63df579913e7390c48891a04855
CRs-Fixed: 2674968
2020-04-30 07:53:33 -07:00
Liangwei Dong
8ed3d20d75 qcacld-3.0: Add API policy_mgr_get_can_skip_radar_event
Dfs radar processing function dfs_process_radar_ind is called
in interrupt context. Add new API policy_mgr_get_can_skip_radar_event
to be called in interrupt context to get radar skip flag.
The policy_mgr_get_dfs_master_dynamic_enabled will acquire mutex and can't
be called in interrupt context.

Change-Id: I1a3ce8536465d6f6da86b0cf7312e6430ea8ec89
CRs-Fixed: 2672701
2020-04-28 21:22:47 -07:00
bings
ea4abd6819 qcacld-3.0: Refine gEnableMCCAdaptiveScheduler as bool
It is more proper to define gEnableMCCAdaptiveScheduler as bool. Then
enable_mcc_adaptive_sch in struct policy_mgr_cfg should be defined as
bool.

Change-Id: I97e2c708e413f86722192b80de39d336e219b3fa
CRs-Fixed: 2656591
2020-04-27 21:31:55 -07:00
Gururaj Pandurangi
b638f6b5a6 qcacld-3.0: Validate intf_ch_freq before using it
Validate intf_ch_freq before dereferencing it

Change-Id: Ie30da1f85a77680a6eb4f40e5c6f18f5dddd3153
CRs-Fixed: 2669297
2020-04-27 19:51:21 -07:00
gaurank kathpalia
4d769c247d qcacld-3.0: Use correct hw mode switch reason
Currently the driver uses the reason code
POLICY_MGR_UPDATE_REASON_CHANNEL_SWITCH for
chanenl switch for P2P-CLI which is same
reason code used for hw mode change in case
of SAP, so after the hw mode is changed the
VDEV-SM does call the callback of SAP CSA
also.

Fix is to use a different reason code for
SAP CSA.

Change-Id: I16b0521d5a21391e642f29e86037f9eb4fd2af62
CRs-Fixed: 2663915
2020-04-18 19:18:40 -07:00
Bapiraju Alla
6cddfae45a qcacld-3.0: Wait for sme_soc_set_dual_mac_config to get complete
SAP turn on is getting stuck for longer time due to vdev is getting
deleted logically before response for sme_soc_set_dual_mac_config comes.

To resolve this, add wait in wlan_hdd_update_dbs_scan_and_fw_mode_config
to confirm sme_soc_set_dual_mac_config completion.

Change-Id: I9408713fcf828d24688ecc45290d8c90a8d54c22
CRs-Fixed: 2663509
2020-04-16 21:57:48 -07:00
bings
ae6ab55517 qcacld-3.0: Allow sap start in dfs channel if sta in 2g for DBS mode
If DBS mode is supported, when station is connected in 2g channel, sap
should be able to start in dfs channel.

Allow sap start in dfs channel if sta is connected in 2g for DBS mode.

Change-Id: I189651785982b0f08a286da9f5dbe8c91b1f16c4
CRs-Fixed: 2654949
2020-04-09 16:16:41 -07:00
bings
46d6db59ec qcacld-3.0: Configure chan time quota basing on Miracast on/off
If Miracast is on, driver should send WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID
to FW. Currently this wmi is blocked because gEnableMCCAdaptiveScheduler is
set as 1, which is incorrect.

Add a new dynamic_mcc_adaptive_sched flag to allow wmi command
WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID for Miracast case.

Change-Id: I18e713b75a8cafc1b631bf5a1884a9b0123e5dba
CRs-Fixed: 2652271
2020-04-03 16:07:50 -07:00
gaurank kathpalia
82511bc630 qcacld-3.0: Add support for STA+NAN+NDI+NDI
Add support for four port concurrency for
STA+NAN discovery + NDI + NDI.

Change-Id: I7d6d3f482a61bef7f3d0a31eee3fdfe5e5e9d879
CRs-Fixed: 2633982
2020-04-01 10:46:22 -07:00
gaurank kathpalia
fd254c58e8 qcacld-3.0: Correct condition for DBS required
In the API policy_mgr_checkn_update_hw_mode_single_mac_mode
the driver checks that if the bands are different, then go
for DBS and single mac mode is not required.
In the case of STA on 5ghz and SAP now coming up on 6ghz
the bands would be different but the hw mode needed
would be single MAC mode and not DBS, but according to the
check mentioned above the driver would still return and
the final hw mode would be stuck into DBS which would
lead to unnecessary power consumption because of the second
MAC being still swithched on having no vdev attached to it.

Fix is to check whether DBS is required and avoid the condition
mentioned above.

Change-Id: I91d91894dde1a3b84c22f9de59c83a5f0b727315
CRs-Fixed: 2651178
2020-03-31 00:43:10 -07:00
Chaoli Zhou
fdb7949d27 qcacld-3.0: Update policy manage table for GO+SAP+SAP case
Table pm_next_action_three_connection_dbs_2x2_table currently
doesn't support NeGo/Auto 5G + SAP 5G + SAP 2.4G case, which
cause the third connection for 2.4G SAP start failure, so update
the policy manage table to support it.

Change-Id: I4bed516f2ac31387d94c1753a7d539cc07d9814e
2020-03-30 15:28:43 -07:00
bings
9e2de44e7f qcacld-3.0: Init channel avoidance in policy manager
Currenly only hdd initializes channel avoidance from platform.
Policy manager should also initialize channel avoidance from platform.

Change-Id: Iefcaae5ff4789d7d334ab2cab693f5dedfd2ca46
CRs-Fixed: 2645512
2020-03-27 02:51:26 -07:00
Qun Zhang
3a8d34c8cb qcacld-3.0: Make sure NULL pm_ctx pointer not be accessed before initialization
Make sure NULL pm_ctx pointer not be accessed before initialization.
Before initialization, __policy_mgr_check_sta_ap_concurrent_ch_intf
return directly when meet error condition.

Change-Id: I4a96ca7c18d7c524969b8ea95d3bc717cfb0862c
CRs-Fixed: 2642567
2020-03-26 02:00:29 -07:00
Qun Zhang
b4e2c33bab qcacld-3.0: Replace QDF_MAX_NUM_CHAN/POLICY_MGR_MAX_CHANNEL_LIST with NUM_CHANNELS
Currently QDF_MAX_NUM_CHAN/POLICY_MGR_MAX_CHANNEL_LIST aren't aligned with
NUM_CHANNELS, these unalignment may cause some potential OOB access.
So replace QDF_MAX_NUM_CHAN/POLICY_MGR_MAX_CHANNEL_LIST with NUM_CHANNELS
to keep unified.

Change-Id: Ib6c81a3979f2fd29ba1ec678f018a6704b599385
CRs-Fixed: 2644066
2020-03-25 07:08:36 -07:00
Jianmin Zhu
d682eb4e28 qcacld-3.0: Compare mac id for ap-sta force scc
Consider SBS mode and 6GHZ, can't force scc only by band.
for example: 1 port on 5G, another on 6G,  they may be on same
MAC, may be not. Just compare mac id from connection list
directly.

Change-Id: I5bfc9cd14b058a6a4f402c0e2d2f9ae7da8287fb
CRs-Fixed: 2646499
2020-03-23 00:23:56 -07:00
bings
6d1783211f qcacld-3.0: Do not set hw mode if it is not needed for DBS1 and DBS2
policy_mgr_pdev_set_hw_mode returns failure if there is interface doing
CAC, which causes other interfaces start failure.
Check mode action are needed or not can help reduce interface starting
failure.

Change-Id: I165f9287d0a674d907712817a7363a77504c245f
CRs-Fixed: 2625868
2020-03-20 00:15:11 -07:00
Jianmin Zhu
159c7d8bad qcacld-3.0: Check whether SAP need restart
If there is no STA/P2P CLI on same MAC of SAP/P2P GO,
SAP/P2P Go needn't switch channel to force scc.

Change-Id: I529a57f73f529e41b8c0097fccabbe3e0e516993
CRs-Fixed: 2643106
2020-03-19 10:45:05 -07:00
Abhishek Ambure
48b790c62d qcacld-3.0: Add INI support to disable STA roaming
Use INI "sta_disable_roam" to disable roaming on STA interface if
connection on other interfaces ex. p2p, ndp comes up. Each bit of
the INI "sta_disable_roam" represents an interface.
ex. LFR3_STA_ROAM_DISABLE_BY_P2P BIT(0)
    LFR3_STA_ROAM_DISABLE_BY_NAN BIT(1)

As INI "sta_disable_roam" is generic for all the interfaces, cleanup
for INI "p2p_disable_roam" done.

Change-Id: Icd05a97c640ca07978d9960a33de036ed6fe38df
CRs-Fixed: 2637555
2020-03-13 19:22:14 -07:00
Pragaspathi Thilagaraj
cb33b74888 qcacld-3.0: Disable simultaneous scan from upper layers
The default value of ini gDualMacFeatureDisable is 0 and this
enables DBS scan with simultaneous scan from upper layer to
firmware. P2P scans get priority over sta scans and when
continuoes p2p scans are issues from some userspace application,
STA doesn't get scan time and APs in the environment are not
seen the scan results on STA interface.

To avoid this, change the default value of the gDualMacFeatureDisable
to 6, which disables simultaneous scans from upper layer to the
firmware.

Change-Id: I7ea3ed521270fc50acba30f84749d35ee60fcaa0
CRs-Fixed: 2632562
2020-03-11 11:03:59 -07:00
Jianmin Zhu
898c426f55 qcacld-3.0: Support Go for 4th connection
When 4th port of Go started, PCL should be same as SAP.

Change-Id: I84557b90a834cc44fd56070b966e5f2bb42d4836
CRs-Fixed: 2629769
2020-03-11 03:49:01 -07:00
Alok Kumar
5f09287be2 qcacld-3.0: Disable GRO/LRO for PM_NDI_MODE
Disable GRO/LRO when NDP session is established and
enable it back after tear down of last NDP session.
Enable back GRO/LRO only if there is no active session
or there is no concurrency with STA MODE.

Change-Id: I322888fa18e8bef19844b626c94efac201550b0c
CRs-Fixed: 2631044
2020-03-06 22:06:17 -08:00
hqu
0742c38422 qcacld-3.0: Update PCL table for GC+SAP+SAP case
Bringup 3 ports GC(5G)+SAP(2.4G ACS mode)+SAP(2.4G ACS mode) in
sequence, the second SAP can't get pcl channel, it's wrong.

Fix is to add GC+SAP+SAP configuration items definition to
pm_third_connection_pcl_dbs_2x2_table and
pm_next_action_three_connection_dbs_2x2_table.

Change-Id: I943ed7cdff0bd0920953b60fcb2cfa1f5bf79dc2
CRs-Fixed: 2627832
2020-03-06 16:38:55 -08:00
Abhishek Singh
5c4790677d qcacld-3.0: Optimize logs in policy_mgr_is_concurrency_allowed
Optimize logs in policy_mgr_is_concurrency_allowed.

Change-Id: I299ea6ec8252d52786d08630e1a5fb1987bce9db
CRs-Fixed: 2633500
2020-03-03 22:19:54 -08:00
Huashan Qu
1b3be2948e qcacld-3.0: dynamic channel switch implementation
When dynamic channel switch is enabled, trigger acs and switch to best
channel if wlan interference is found in 5g mac.

Change-Id: I56661f5c42a233a0dc0a6400d75cb8f5c0019706
CRs-Fixed: 2599176
2020-02-28 05:55:45 -08:00
Abhishek Singh
d5712927b2 qcacld-3.0: Improve logging in driver
Improve logging in driver by avoiding unnecessary error prints
and combining logs.

Change-Id: Ibab9067aa1bce992f36fca22a5aed88e8d85ba25
CRs-Fixed: 2627549
2020-02-26 11:39:28 -08:00
Jianmin Zhu
b4c5783d46 qcacld-3.0: Fix wrong channel freq API issue
Call channel API with frequency parameters wrongly

Change-Id: Ib810887ddc7eab3e1fa84de50720e2fe2a56bee7
CRs-Fixed: 2627531
2020-02-25 03:01:05 -08:00
Amruta Kulkarni
1967ff92ff qcacld-3.0: Log enhancement for policy mgr
Enhance logs in policy mgr module to remove duplicate
or unwanted prints and keep only useful logs to debug.

Change-Id: Ifd585256955aceec29286d82838be0c588228c32
CRs-Fixed: 2614763
2020-02-19 11:31:04 -08:00
Abhishek Singh
c332b3eba0 qcacld-3.0: Optimize CSA logs for SAP and STA
Optimize CSA logs for SAP and STA.

Change-Id: I1bd00821a2b8cbc41d530eda1aba1e7ecdd9cb7b
CRs-Fixed: 2623007
2020-02-18 04:52:20 -08:00
Abhishek Singh
48175fd4f7 qcacld-3.0: Optimize logs in scan path
Remove redundant logs and optimize the logs in scan path.

Change-Id: Ie6ff84b1a832a29d5fe01c649be4b8143bd13c94
CRs-Fixed: 2612637
2020-02-04 14:15:54 -08:00
gaurank kathpalia
e0334a5e1d qcacld-3.0: Set connection update in success only
Currently the driver sets the connection update
flag in case of the hw mode cb when the set
hw mode is done, irrespective of the status
code sent by the FW. This leads to the completion
for wait for event and the caller to the current
connection update would get a wrong expectation
that the hw mode requested by it was set, which
would not be the case when the hw mode is not set
according to the user or the set hw mode was
rejected by the target itself.

Fix is to set the connection mode only when the
status is success or already the HW mode is set.

Change-Id: Ic7257b0be5a4bcdaecffb788cf3394b06ddfd5e5
CRs-Fixed: 2604062
2020-01-23 03:41:33 -08:00
Arun Kumar Khandavalli
f4ed406089 qcacld-3.0: Selectively reduce the policymgr logs
Reduce certain logs of policymgr from info to debug.

Change-Id: Idb2817c20f97d5a8888cbe685bdc3b1eaf77662e
CRs-Fixed: 2607035
2020-01-22 23:02:18 -08:00
Li Feng
ab5a5ccf2b qcacld-3.0: Enable p2p go gc force scc
Enable p2p go gc force scc by adding logic to check the connected
p2p gc when checking concurrent channel interfering and restart p2p
go if needed.

Change-Id: Idd01fbc2a358b463568844a420e1132355c1de4e
CRs-Fixed: 2604955
2020-01-19 05:00:04 -08:00
Tushnim Bhattacharyya
fbe8533613 qcacld-3.0: Allow SAP to be on DFS channel with dfs_scc 2
Allow SAP to be on DFS channel if g_sta_sap_scc_on_dfs_chan
is set to 2.

Change-Id: Ifd8ae1d487c8538b2870c69ba420242719756859
CRs-Fixed: 2604548
2020-01-16 23:46:51 -08:00
Liangwei Dong
f9a0512cae qcacld-3.0: Check SBS supported or not before set hw mode
If the request is SBS action and the HW doesn't support SBS,
return QDF_STATUS_E_NOSUPPORT. The caller will continue to
connect/start_ap instead of failure when
policy_mgr_current_connections_update return
QDF_STATUS_E_NOSUPPORT.

Change-Id: I158f90c13e2685697b82c874a247883f21f013cb
CRs-Fixed: 2602194
2020-01-14 19:42:12 -08:00