Commit Graph

123 Commits

Author SHA1 Message Date
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
a4d1ee9066 qcacmn: Fix typo "recieve"
Replace typo "recieve" with correct spelling "receive".

Change-Id: I7d88e57b97fa6d217630d4a5d5c365b56e714428
CRs-Fixed: 2238309
2018-05-17 00:47:23 -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
Jeff Johnson
656fa9a38f qcacmn: Fix typo "capabilites"
Replace typo "capabilites" with correct spelling "capabilities"

Change-Id: I8efa1d974ecabb1466bdf27ec305fd9960da0616
CRs-Fixed: 2238309
2018-05-17 00:46:46 -07:00
Tushnim Bhattacharyya
f8417d1117 qcacmn: Use channel and vdev_id array for get_mode_specific_conn_info
Use channel and vdev_id array while calling
policy_mgr_get_mode_specific_conn_info.

Change-Id: I64579e2b1af0eca47af5292d456367d059a461f5
CRs-Fixed: 2238386
2018-05-15 00:36:24 -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
Krunal Soni
af29fe9735 qcacmn: Fix uninitialize variables in few policy manager APIs
Few variables are left uninitialized and they are being used
with some random value.

Fix by initializing to default value.

CRs-Fixed: 2232791
Change-Id: I3351cae52c58e963601d53376f42ca8ebf0d3b9a
2018-05-07 06:37:09 -07:00
Tushnim Bhattacharyya
2923e70b09 qcacmn: Add range check for mode param in cds_get_pcl
Add range check for mode parameter in cds_get_pcl.

Change-Id: I049bebc5ec62f925e164517d59f94d122dbc5dc2
CRs-Fixed: 2234351
2018-05-04 20:43:14 -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
Yuanyuan Liu
0d506a4d64 qcacmn: Fix LLVM compiling issues
Remove typedef redefinition, use correct enum type, remove extra
parentheses and correct header guard.

CRs-Fixed: 2214003
Change-Id: I0a75c70cd530590a16f6bfa884955ebc26906de0
2018-04-02 16:41:52 -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
wadesong
a7bff60cf0 qcacmn: Suppress the verbose log from policy mgr
When DBS is disabled in WLAN INI file(e.g. on some platforms
where RM chipset is attached), the policy manager will keep
posting a verbose message saying 'DBS is disabled from ini'.
This isn't exhibiting much useful information, and may cause
watchdog bark when SnS stress is running.

Suppress the verbose log by lowering it's debug level.

Change-Id: Ie8d5a1784940f483cc671da43f734851c0b5adb6
CRs-Fixed: 2214201
2018-03-28 14:44:34 -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
Tushnim Bhattacharyya
23a5404b76 qcacmn: Remove redundant DBS HW mode request
Remove redundant DBS HW mode request from
pm_next_action_two_connection_dbs_2x2_table. For 2x2 DBS HW even for first
connection if it is on 2.4G, DBS will get requested. Hence no need to
request again for second connection on the other band.

Change-Id: I17db8de5ed7a60f556cc8eeed59bbbfe0d63e795
CRs-Fixed: 2199420
2018-03-06 20:10:15 -08: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
hqu
eb32063dcc qcacmn: Use no_of_open_sessions to check multiple beaconing sessions
When start sap+sap with acs concurrently, the first sap usually
choose dfs channel, the second sap will be failed to start.
when check multiple beaconing sessions it only checks in_use sap for
pm_conc_connection_lis which means bss started sap while it has no
started sap at that time, so the second sap can't follow the first sap's
dfs channel and start failed according to current code flow.

Fix is to use no_of_open_sessions to check multiple beaconing sessions.

CRs-Fixed: 2170567
Change-Id: Iada737dffcd826aaff3873b81355018d53485948
2018-01-29 02:17:47 -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
Liangwei Dong
76659b0055 qcacmn: Disallow Dualband MCC
For non DBS capable chip, to disallow dualband MCC
in case dnbs vdev exist.

Change-Id: Iee96e12dbb09e2d4633ca2fb73b5fb8bf155bd66
CRs-Fixed: 2164835
2018-01-24 13:19:45 -08:00
Will Huang
e93f5d1b34 qcacmn: Fix copy length error of unsafe_channel_list
unsafe_channel_list is defined as uint16, but copy with length of byte.

Change-Id: I35cd1d006f561c6bb1e64fd56e9822fefd991848
CRs-Fixed: 2170439
2018-01-21 23:20:53 -08:00
Krunal Soni
7728e21cf9 qcacmn: Check pcl array size against QDF_MAX_NUM_CHAN
While populating preferred channel list array, length
has not been checked against QDF_MAX_NUM_CHAN which
is size of PCL.

Fix it by checking indices and length against QDF_MAX_NUM_CHAN

CRs-Fixed: 2169424
Change-Id: I8c4d050bfc7040fba052eb42b32a91302a0a0ecb
2018-01-13 02:17:52 -08:00
Krunal Soni
4943b90122 qcacmn: Choose opportunistic timer's session id dynamically
Current opportunistic timer chooses session id as 0 up on expiry
which creates the issue when session id 0 doesn't exist.

Fix the situation by dynamically choosing existing session id to
complete the action.

CRs-Fixed: 2166667
Change-Id: I2e1da2ba0078381a5e91decd32d32b8ad77cec19
2018-01-13 01:28:18 -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
Varun Reddy Yeturu
e23b6bc5fc qcacmn: Fix static analysis issues in policy manager
1) Check for policy manager context to be non NULL before
   dereferncing and return if it is NULL.
2) Use QDF_MAX_NUM_CHAN consistently to represent the maximum
   number of channels supported.

Change-Id: I3393bc801dd780d881423c8be346e74ac6d3ac6c
CRs-Fixed: 2160770
2018-01-12 02:38:01 -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
Bala Venkatesh
17623642ea qcacmn: Initialize pcl length to 0 in cds_get_alternate_channel_for_sap
When number of connections is more than 2 then the pcl length will be
garbage value. Initialize the pcl length with 0 to avoid wrong channel
list initialization.

Change-Id: If08dc2670ff5ff296220d6ad68766becb252fab7
CRs-Fixed: 2164773
2018-01-02 03:25:05 -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
Srinivas Girigowda
efbeeab4fc qcacmn: clang: Remove unnecessary NULL check for address of array
Clang generated the following warning in various places:

warning: address of array 'weight->pcl_list' will always evaluate
to 'true' [-Wpointer-bool-conversion]
        if (weight->pcl_list) {
              ~~ ~~~^~~

Remove the unnecessary NULL check for address of array.

Change-Id: Ibc82b4d7135a0425748c0fb7f065435ccd28ad6f
CRs-Fixed: 2150493
2017-12-07 01:25:25 -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
Rachit Kankane
a07e4b97d4 qcacmn: Enforce MCC to SCC for 3-port combinations
This update is for moving of AP/GO to enforce SCC for 3-port
combinations AP+AP+STA and AP+GO+STA.

Change-Id: I878b56cd8215f0d0f846af62fa2033b268e96317
CRs-Fixed: 2127091
2017-10-23 06:12:41 -07:00
Rachit Kankane
1303fcd9b1 qcacmn: policy_mgr update for new connection
Policy Manager updated when new connection request is under process.
The update is resctricting below behavior:
1. Maximum 2 vdevs are only supported per mac.
2. Intraband MCC among beaconing entities shall not be supported.
3. Intraband MCC shall be allowed when STA is operating on
   DFS/Passive/LTE avoidance channel.
4. No DFC SCC shall be allowed both in 2-port and 3-port for Auto.

Change-Id: If4e78791832207838c38ab7525f8081093cc73ed
CRs-Fixed: 2127091
2017-10-23 06:12:39 -07:00
Rachit Kankane
758528a6e5 qcacmn: New value for ini gWlanMccToSccSwitchMode
Currently ini variable gWlanMccToSccSwitchMode has 4 values.
Value 3 enforces SCC in anycase, if SCC is not possible then switchoff
the AP.
Added new value 5 for auto specific scenarios where, if SCC is not
possible the allow MCC.

Change-Id: I584958c6c61f7d1f5e077871e3891bba79f726a3
CRs-Fixed: 2127091
2017-10-23 06:12:37 -07:00
Rachit Kankane
c4e7ce7142 qcacmn: Correction in PCL index fetching routine
In case of SBS or DBS, both the MACs are used for operations.
We have issue in PCL index fatching routines for 3-port
concurrent combinations when first two ports are configured
in DBS mode.

Change-Id: I36ca9979ef4222428e383d89b52ff1388c79ac22
CRs-Fixed: 2127091
2017-10-23 06:12:36 -07:00
Rachit Kankane
76b8464512 qcacmn: PCL update for 3-port combinations
Updated PCL table to support 3-port concurrent scenarios AP+AP+STA,
AP+GO+STA and AP+AP+AP.
The PCL entries are updated to have below behavior:
1. AP+GO or AP+AP will be supported either in DBS or in SCC mode
2. The Precedence order will be DBS, SCC.

Also disabling 3-port combinations with P2P-CLI.

Change-Id: I678e2b5a49577e173c0e34f83a7ccc528313aadd
CRs-Fixed: 2127091
2017-10-23 06:12:34 -07:00
Dustin Brown
3c49b2e6f9 qcacmn: Remove qdf_handle_t from unused qdf_defer APIs
There are many QDF APIs require a qdf_handle_t parameter. None of these
APIs actually use the qdf_handle_t parameter, meaning it can be
completely removed. As a step toward globally removing this unused
type, remove qdf_handle_t parameters from unsed qdf_defer APIs.

Change-Id: I0568aa7cbd430abc0d046143482a067d96bf6313
CRs-Fixed: 2112646
2017-10-12 14:22:02 -07:00
Tushnim Bhattacharyya
e677364a0f qcacmn: Update PCL table for non DBS to give preference to SCC
Update PCL table for non DBS to give preference to SCC in STA+P2P cases.

Change-Id: I0dfa1f2f37960b90a32e325e1397e301f6ce313d
CRs-Fixed: 2118720
2017-09-29 16:29:15 -07:00