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
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
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
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
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
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
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
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
Concurrency related changes for single MAC target which
doesn't support Inter-Band MCC as well.
Change-Id: Id9d02d6353103f21dee8b9e6767d2fc8b1277278
CRs-Fixed: 2711462
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
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
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
Add connect id in the policy manager for the newly designed
connection manager infrastructure.
Change-Id: Ib7bd08e5326ead04da88175636777bf5dd4e255b
CRs-FIxed: 2705700
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
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
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
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
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
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
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
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
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
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
Currenly only hdd initializes channel avoidance from platform.
Policy manager should also initialize channel avoidance from platform.
Change-Id: Iefcaae5ff4789d7d334ab2cab693f5dedfd2ca46
CRs-Fixed: 2645512
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
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
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
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
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
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
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
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
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
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
Improve logging in driver by avoiding unnecessary error prints
and combining logs.
Change-Id: Ibab9067aa1bce992f36fca22a5aed88e8d85ba25
CRs-Fixed: 2627549
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
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
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
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