Commit Graph

85 Commits

Author SHA1 Message Date
Liangwei Dong
1a18faf9e8 qcacmn: Limit concurrency of STA(WAPI)
When STA role is coexisting with other sessions(P2P, SAP or IBSS),
WAPI encryption mode is not allowed.
Add a new API to check if the connection/start request should
be rejected when:
1) A STA with WAPI encryption is to be connected while there
   is at least one concurrent session already running.
2) A new session is to be started while there is already a STA
   connection with WAPI encryption enabled.

Change-Id: Idf0d346138eeda339254535f1f7131fda4a5086a
CRs-Fixed: 2290549
2018-08-09 06:38:46 -07:00
Tushnim Bhattacharyya
c304f8924d qcacmn: Do HW mode change based on all the candidate APs for STA
The driver currently changes the hw_mode based upon
the first candidate found in the scan list, and tries
to connect to it. It may happen that the connection
fails, and the STA then tries to connect to the AP
on same channel as the concurrent adapter.
It would result in hw_mode = DBS, as it is not
updated after  connection success/failure.
Also if the first AP channel is in same band as that
of concurrent adapter, and the connection fails,
and the STA tries to connect to an AP in a different
band, this too is not allowed as hw_mode is not DBS

Fix is to change the hw_mode based upon the scan list.
If the driver finds any scan result which may lead to
DBS connection, the hw_mode should be set to DBS.
Once the connection is done or failed, the driver
can check and update the hw_mode again.

Change-Id: I3c186f47dd5528f0af2598bb02c1b7e297d01548
CRs-Fixed: 2290760
2018-08-07 18:10:38 -07:00
Tushnim Bhattacharyya
2b083b6daa qcacmn: Add ENABLE_DBS_CXN_AND_DISABLE_SIMULTANEOUS_SCAN
Add ENABLE_DBS_CXN_AND_DISABLE_SIMULTANEOUS_SCAN option for the ini
gDualMacFeatureDisable. This is to enable DBS support for the
connection and disable simultaneous scan from upper layer. But DBS
scan remains enabled in FW.

Change-Id: Ic280de2cc63a3775c0d9dd61985ff89df58a4a89
CRs-Fixed: 2291935
2018-08-07 00:29:50 -07:00
Jeff Johnson
95bec5aa19 qcacmn: Remove struct extended_caps
struct extended_caps is unused, so remove it.

Change-Id: I96fd072b7d6b58a9c237165fcba7ed8c8da0eae3
CRs-Fixed: 2289156
2018-08-02 15:00:30 -07:00
Tushnim Bhattacharyya
0351f170cd qcacmn: Do not invoke get_pcl multiple times during set_pcl to FW
Do not invoke get_pcl when calculating weightage of channels sent to FW
as part of set_pcl WMI command.

Change-Id: I62b39aaf0943cf10deab380d8030d1ef08fbbcb3
CRs-Fixed: 2287649
2018-08-01 12:32:03 -07:00
Liangwei Dong
a590ecd80e qcacmn: Add Band selection for NSS Update API
Add parameter to NSS Update API to specify
which Band to downgrade/upgrade.

Change-Id: I57ae4304fbf8de366531154f03d04792c18e176d
CRs-Fixed: 2256803
2018-07-24 04:46:26 -07:00
Liangwei Dong
9ace8a9dd9 qcacmn: Set hw mode Id to FW
Firmware needs HW MODE ID not list index.
Use HW mode ID to set HW MODE WMI command.

Change-Id: I12f9d83daee1c99706c345d85f03781257b492bf
CRs-Fixed: 2256175
2018-07-13 08:27:23 -07:00
Liangwei Dong
e57b6b7417 qcacmn: Extract Hw mode Id and band info
Extract/Save the Hw mode ID and Mac0 band info
to hw mode list.
This helps to identify the 2x2 5G + 1x1 2G and
2x2 2G + 1x1 5G.

Change-Id: I0682337b1a80c1b502c3307e0847aaa99479d2d3
CRs-Fixed: 2256152
2018-07-09 07:03:04 -07:00
Jianmin Zhu
7f6bdd3b9d qcacmn: Move SAP to safe channel after STA disconnection
Standalone SAP is not allowed on lte-coex channel if STA+SAP SCC
enabled on lte-coex channel. So move the SAP to a safe channel
once STA disconnected.

Change-Id: I00682f5bbb3da772e3e26ccd8d08183be28cc9ec
CRs-Fixed: 2265263
2018-07-04 10:22:19 -07:00
Bala Venkatesh
3b3f16f39f qcacmn: Move the SAP to non DFS channel after STA disconnection
Standalone SAP is not allowed on DFS channel if STA+SAP SCC enabled
on DFS channel. So move the SAP to a non DFS channel as soon as STA
gets disconnect.

CRs-Fixed: 2269249
Change-Id: I27d018739f53997641a7113cfc7c844e02bd7e29
2018-07-02 10:59:57 -07:00
Tushnim Bhattacharyya
9b1636dcd4 qcacmn: Don't move SAP if SCC on lte coex channel is allowed
If STA+SAP is doing SCC & g_sta_sap_scc_on_lte_coex_chan is set,
don't move SAP to a different channel when LTE channel avoidance
event comes.

Change-Id: I3dfdbb6d59769a8ff9b3b2e6d828feee94630569
CRs-Fixed: 2268993
2018-06-29 17:27:46 -07:00
Bala Venkatesh
378064b5e0 qcacmn: Defer the channel switch if it is already in progress
When sta+sap scc enabled on dfs channel then SAP cannot operate on
DFS channel in standalone mode. If STA+SAP are operating in SCC mode
on a DFS channel and STA gets disconnected from reference AP then driver
schedules a workqueue to move the SAP from DFS channel to user configured
channel. At this time if STA again connects to reference AP within few ms
then driver again schedules one more workqueue to move the SAP to STA's
channel. Sometimes the second workqueue may fail to switch the channel
if first one is not yet completed. So added event variable to schedule
second workqueue only when first one is complete.

CRs-Fixed: 2267005
Change-Id: Ia6ce4b6264c35f6d2c809e2a3f65f535e930874e
2018-06-26 18:53:35 -07:00
Bala Venkatesh
85b42f4930 qcacmn: Ignore CSA if the channel is DFS or disabled
If MCC to SCC switch is enabled, SAP is active and CSA
received for STA interface, then ignore the CSA if channel
is DFS/disabled.

CRs-Fixed: 2263037
Change-Id: I98b8d957766358ea86cc9f50339725cf4bf0038b
2018-06-26 17:36:11 -07:00
Krunal Soni
637eba547a qcacmn: Check HW mode before sending join request to lower layers
When STA's join req times out on current BSS, SME issues next BSS
internally without checking HW mode for new channel

For example, STA tries to connect SSID="abc",
BSSID="a1:a2:a3:a4:a5:a6", channel=36 and lets say it fails. It
should try few more times to same BSSID and after that it will try
next bss. Lets say next BSS it found has, SSID="abc",
BSSID="b1:b2:b3:b4:b5:b6", channel=1 then it needs to check whether
hardware mode change is required for channel=1. If driver fails in
checking hardware mode then following check will prevent the bad
situation.

CRs-Fixed: 2261129
Change-Id: Ie31ac5b8b90c6e63122148647ad333fccfbf9dbf
2018-06-22 06:01:58 -07:00
Bala Venkatesh
28477d3975 qcacmn: Populate PCL list correctly using channel select logic ini
Currently, PCL list is populated without checking channel select logic
ini. Check for channel select logic ini before selecting the second
connection pcl table.

Change-Id: I5a64d4ff43a7dcc2c70eac75b51d5f87de2903bb
CRs-FIxed: 2237403
2018-06-19 22:42:35 -07:00
Zhu Jianmin
5ac66ef3f7 qcacmn: ini parameter to allow STA+SAP SCC on LTE coex channel
When Force SCC and STA+SAP SCC on LTE coex channel are enabled:
   1. When STA on LTE coex channel, start SAP, select STA
      channel.
   2. When SAP on, connect STA on LTE coex channel, then switch
      SAP channel to STA channel.

Change-Id: I7864e0ab2655c3bee95154ea4dedfb60fe8689e4
CRs-Fixed: 2261226
2018-06-19 21:17:14 -07:00
Manjunathappa Prakash
cdf1813b35 qcacmn: Add DP callbacks for flow_pool create and delete
Current lithim_dp flow pool created in wma_vdev_start, wma_vdev_start
is called for same vdev multiple times for vdev. This leads to creation
of multiple flow pools for each vdev. Instead create from policy_manager
when session become active.

Register flow pool create/delete callbacks with policy manager.
So that lithium_dp vdev flow pools are created/deleted when vdev
become active/not-active.

Change-Id: Iaf6aaece47c79c7e6f7745feaee35a6bc5cd1297
CRs-Fixed: 2231601
2018-06-06 05:49:26 -07:00
Zhu Jianmin
7f8d1df7e9 qcacmn: Check chip capability when enable AP+AP
Check capability of dbs, mcc and scc on single band when enable
AP+AP, then same driver code can support different chip and
firmware.
Add wmi_service_dual_beacon_on_single_mac_(mcc/scc)_support

Change-Id: I505747122504b2a89813e7bdfcd27dc07539f39e
CRs-Fixed: 2214237
2018-06-02 10:26:19 -07:00
Krunal Soni
3688381753 qcacmn: Pass the arg by reference while calling sme_pdev_set_pcl()
While calling sme_pdev_set_pcl() API, driver is passing the argument
by value. The size of the argument is 280 bytes which is not good
design.

Pass the argument by reference instead of passing it by value to make
design simple.

CRs-Fixed: 2238293
Change-Id: I92849fb125fe864c1c7c7977bce392a7bcfe4121
2018-05-30 13:57:23 -07:00
Jeff Johnson
ee56b4491c qcacmn: Replace new instances of tQDF_ADAPTER_MODE
Previously change "qcacmn: Use enum QDF_OPMODE", Change-Id
Ic6f663dac11a100f168b2626c7c0fbcaccbfca4f, replaced all instances of
tQDF_ADAPTER_MODE to QDF_OPMODE in the qca-wifi-host-cmn
project. However since tQDF_ADAPTER_MODE was originally defined in a
common project, and not all references to it could be immediately
removed, a legacy definition was left with the expectation that it
would be removed when all references to it had been
updated. Unfortunately new instances of using tQDF_ADAPTER_MODE have
been subsequently added to the project, so replace them with
QDF_OPMODE.

Change-Id: I71cead84151cc0411f7cc5cc13a87a281e7502c0
CRs-Fixed: 2245249
2018-05-27 15:02:38 -07:00
Jeff Johnson
c65c98fb3e qcacmn: umac: Remove legacy markings
Per current guidance remove legacy markings.

Change-Id: I34c7acfad802a3878ffa373489b7f6a4194abb62
CRs-Fixed: 2230684
2018-05-18 02:17:46 -07:00
Jeff Johnson
114fe088c9 qcacmn: Fix typo "lenght"
Replace typo "lenght" with correct spelling "length".

Change-Id: Ieea0c547c61248e510835d16a9fa55ace486df23
CRs-Fixed: 2238309
2018-05-17 00:47:02 -07:00
Srinivas Girigowda
b031fa6e0e qcacmn: Consistently use policy_mgr_dual_mac_config
Remove duplicate structs wmi_dual_mac_config and sir_dual_mac_config
and use policy_mgr_dual_mac_config.

Change-Id: I6da6539f519ec46ee274ba3f3ae042e5fd9c25d2
CRs-Fixed: 2191031
2018-05-12 04:31:30 -07:00
Himanshu Agarwal
70a52d9a29 qcacmn: Add API to stop DBS opportunistic timer
Add API to stop DBS opportunistic timer in policy mgr.

Change-Id: I11a2b2976c59d7cd09695f90c2d2bdd7338dde54
CRs-Fixed: 2236333
2018-05-11 23:57:08 -07:00
Manjunathappa Prakash
e51aba73e7 qcacmn: add API to get NAPI instance corresponding to NAPI ID
Add API to get NAPI instance from NAPI ID. Handle to NAPI is required
for Rx processing via GRO.

Change-Id: I15535827a03953231670d4138235c4876b16e045
CRs-Fixed: 2062180
2018-05-02 04:35:02 -07:00
jiad
c8754ac4bd qcacmn: fix ipa mcc scc event notification
Issue is under AP-AP MCC config, mcc event is not sent from wlan
to IPA driver. mcc mode is decided with the help of connection
table. But for AP mode, mcc mode is checked and updated before
connection table is updated by adding the SAP vdev entry.

Fix is to make ipa mcc mode check and notification when connection
table is updated.

Change-Id: I1ba3fcb874b014f05cebd8af90530b9aa54980a2
CRs-Fixed: 2214351
2018-04-06 13:25:29 -07:00
Tushnim Bhattacharyya
b4f3063313 qcacmn: Use enum type policy_mgr_con_mode instead of enum QDF_OPMODE
Use enum type policy_mgr_con_mode instead of enum QDF_OPMODE.

Change-Id: Ia7a6bb5e05c6dac650dc6386734462547365a4eb
CRs-Fixed: 2214003
2018-04-02 16:41:50 -07:00
Bala Venkatesh
119ed6b1e1 qcacmn: Add ENABLE_DBS_CXN_AND_DISABLE_DBS_SCAN
Add ENABLE_DBS_CXN_AND_DISABLE_DBS_SCAN option for the ini
gDualMacFeatureDisable. To enable DBS support for the
connection and disable DBS support for the scan.

Change-Id: I05c613467195fffac98e79b7e4a2991471ac1d80
CRs-Fixed: 2207820
2018-03-27 00:25:38 -07:00
Yeshwanth Sriram Guntuka
6a3be16847 qcacmn: Add support for HW mode info vendor command
Add support for HW mode info vendor command which sends
mac id, band, interface id and frequency information for
each MAC provided by driver to userspace.

Change-Id: If1112d29b8781cf5ba0480c84feeb772142f2c0e
CRs-Fixed: 2185559
2018-02-26 16:50:00 -08:00
Yeshwanth Sriram Guntuka
71e5ae6889 qcacmn: Set hw mode based on channel_select_logic_conc ini
Set hw mode to DBS or single MAC for STA+STA and STA+P2P
concurrencies based on channel_select_logic_conc ini.

Change-Id: I46ba4d5cd8f5cda71d0c00be2b612bc851eb5ba4
CRs-Fixed: 2189848
2018-02-26 06:34:59 -08:00
Yeshwanth Sriram Guntuka
257a5d7ede qcacmn: Add ini support for channel selection logic
Add ini to select DBS or inter-band MCC channel selection logic
for STA+STA and STA+P2P connections.

Change-Id: I7cfde9592ec210b0a8c812171d2bc6f005e17fb2
CRs-Fixed: 2189845
2018-02-26 06:34:53 -08:00
Tushnim Bhattacharyya
c7b9769831 qcacmn: Trim ACS channel list based on the concurrent connections
If force SCC is enabled and there is a STA connection, trim the
ACS channel list on the band on which STA connection is present.

Change-Id: Ibd580a7afdcdfc5fb4398ada547565e229d59c70
CRs-Fixed: 2193720
2018-02-22 23:30:57 -08:00
Arunk Khandavalli
24167fc8f3 qcacmn: update the pcl info from the converged structures
Update the pcl information from the converged strutures.

CRs-Fixed: 2179012
Change-Id: Id9269e85728409645266e1edc17d03237144a9cc
2018-02-08 07:55:50 -08:00
Himanshu Agarwal
533baa3076 qcacmn: Add policy mgr API to get no. of active sessions
Add policy mgr API to get no. of active sessions for a specific
mode.

Change-Id: If91685ae7b72c6be52426648e9d01cba92eee85e
CRs-Fixed: 2178921
2018-02-06 17:33:06 -08:00
Min Liu
c5b104351d qcacmn: Fix safe channel switch failure
For the AP+AP SCC LTE-Coex case, when channel avoidance event
is reported, the channel switch request for SAP will be blocked
by policy manager if the target channel is different with the
operating channel of the existing SAP due to the SCC policy.

Need to update the logic to give higher priority to the channel
avoidance request.

Change-Id: Ie42bab50c1fa92e4e8df9f1b0ce8b8f4f09551b5
CRs-Fixed: 2176250
2018-01-25 11:27:42 -08:00
Sourav Mohapatra
0c1a7f6c69 qcacmn: Converge on wmi service/ext service is enable
Converge on wmi service/ext service is enable

Change-Id: Ib246befa72cce927bee157394cd22c7d1562d341
CRs-Fixed: 2152751
2018-01-24 13:19:48 -08:00
Himanshu Agarwal
0c738b7b02 qcacmn: Green AP UMAC componentization
Add APIs, structures for Green AP component.

Change-Id: I4a39470104c89c20eec5440b7ae251a764151fd5
CRs-Fixed: 2166428
2018-01-12 12:20:17 -08:00
Tushnim Bhattacharyya
3b9ff3715a qcacmn: Keep HW mode in sync with FW when hdd stop happens
Stop the opportunistic timer & take action to keep HW mode in sync
when hdd stop happens.

Change-Id: Id34adb579987605831d2c7c4e22c2d76fe7d25dd
CRs-Fixed: 2165109
2018-01-03 20:09:48 -08:00
Yeshwanth Sriram Guntuka
067cd3e3eb qcacmn: Set passive dwell time
Set passive dwell time to 28msecs for active
scan when bt a2dp is enabled and hw is not dbs
capable and when sta is connected on 2G band.

Change-Id: I44f2e3d98f2d7ddc52e4902ba989131c256da4ef
CRs-Fixed: 2160963
2017-12-21 05:26:49 -08:00
Ganesh Kondabattini
8a611c641c qcacmn: Allow SAP to come up on DFS channel in SCC mode
Allow SAP to come up on DFS channel in STA+SAP concurrency mode
only when g_sta_sap_scc_on_dfs_chan enabled in ini file and also
disable chan_switch_hostapd_rate_enabled when force SCC is enabled.

CRs-Fixed: 2147032
Change-Id: Id1333a49d0538eb4ccfaf3c8498e9ca06671de02
2017-11-23 11:22:21 -08:00
Tushnim Bhattacharyya
9420656c9b qcacmn: Make the set HW mode & NSS update actions independent of each other
Typically set hw mode & Nss update happens at the same time. Since the
order of these 2 actions may not be same always, make them independent
of each other.

Change-Id: I652ad08e16680991535e0f064c7b5996f4f58792
CRs-Fixed: 2144977
2017-11-22 01:53:25 -08:00
Jeff Johnson
275208bd39 qcacmn: Use enum QDF_OPMODE
Change "qcacmn: Rename enum tQDF_ADAPTER_MODE" (qca-wifi-host-cmn
Change-Id I20f1b6d1a0ab4b8fe6a85cefdff96a49e2f4652c) renamed enum
tQDF_ADAPTER_MODE to QDF_OPMODE. Update all references to use the
new name.

Change-Id: Ic6f663dac11a100f168b2626c7c0fbcaccbfca4f
CRs-Fixed: 2141061
2017-11-09 23:42:58 -08:00
Tushnim Bhattacharyya
bdda5823be qcacmn: Stop the opportunistic timer when hdd stop happens
Stop the opportunistic timer & take action if needed when hdd stop
happens. Also, take action when set_hw_mode request to FW times out.

Change-Id: I32f1e38e93a5805e0d85b800cc4e070cd6f79669
CRs-Fixed: 2133388
2017-11-04 06:59:56 -07:00
Ganesh Kondabattini
a598b91ee0 qcacmn: Set weight of DFS/passive channels in pcl to 0
If force SCC is set and SAP is active then all DFS/disabled
channels in PCL should have 0 weight to avoid the STA roaming
to these channels.

Change-Id: I4519c29477c5108f5131b7caa806505b69efea8b
CRs-Fixed: 2135750
2017-11-04 06:09:13 -07:00
Yun Park
ab131773f7 qcacmn: Enable RPS dynamically for SAP mode
SAP Rx TPUT is bounded by host network stack, which is running in the
context of IPA work-queue, when IPA offload data path enabled.
However RPS shouldn't enabled for legacy Rx data path, where NAPI is
enabled. So, we dynamically enable RPS for SAP interface when the vdev
comes up and IPA was enabled only.
Send RPS enable indication to CNSS daemon to enable RPS only when SAP
interface comes up and disable RPS when SAP interface is closed.

Change-Id: Ia669b2c3ae814d0577f5226d8acbf026740ad760
CRs-Fixed: 2129520
2017-10-24 02:33:19 -07:00
Manjunathappa Prakash
fb82833f38 qcacmn: Disable LRO capability during concurrency
LRO rx jumbo packets cannot be forwarded to other vdev and kernel drops
them with warning message:
"skbuff: wlan0: received packets cannot be forwarded while LRO is enabled"
So disable LRO capability during concurrency.

Change-Id: Ib35e1ee5f9c18a846e21ce1eb293e12e17761fa8
CRs-Fixed: 1092193
2017-10-24 00:49:36 -07:00
Ganesh Kondabattini
2a8c7b0c6d qcacmn: Refactor the code to update the conc_system_pref
Refactor the code to dynamically change the conc_system_pref.
Whenever user changes conc_system_pref from application,
driver is overwriting the conc_system_pref which is getting
populated from ini file. Once it is overwritten there is no way
to get the configured value for this setting. So add a new
variable to hold the value of conc_system_pref without disturbing
default value read from ini file.

CRs-Fixed: 2082073
Change-Id: Icfb245c7a8872885332ec222780c911d08521d46
2017-09-25 13:21:42 -07:00
Ganesh Kondabattini
6c0554aac7 qcacmn: Initialize SAP mandatory chan list
Initialize SAP mandatory chan list.

Change-Id: I126d67da1bfe8426cd3a7b031e97aba907e6155a
CRs-Fixed: 2089122
2017-09-15 11:19:59 -07:00
Tushnim Bhattacharyya
c5348955ec qcacmn: Fix logic to force SCC in SAP+STA concurrency
If SAP is up & STA is coming up next(or vice versa) on a different
channel causing MCC, move SAP to cause SCC or DBS. This logic is
enabled only if gWlanMccToSccSwitchMode is set to
QDF_MCC_TO_SCC_SWITCH_FORCE_WITHOUT_DISCONNECTION or
QDF_MCC_TO_SCC_SWITCH_WITH_FAVORITE_CHANNEL.

Change-Id: I16615d828a285762133ee3533339320ef119b3d3
CRs-Fixed: 2063060
2017-09-02 04:19:15 -07:00
Tushnim Bhattacharyya
5e026735cb qcacmn: Add logic to force SCC in SAP+STA concurrency with ACS
If STA is up & SAP is comings up on a ACS derived channel causing MCC,
move SAP to the other band if DBS is supported. This logic is enabled
only if gWlanMccToSccSwitchMode is set to
QDF_MCC_TO_SCC_SWITCH_FORCE_WITHOUT_DISCONNECTION.

Change-Id: I48d809f83921292f51ca1735bff4c4d6dd339975
CRs-Fixed: 2063060
2017-09-02 04:19:09 -07:00