Commit Graph

143 Commits

Author SHA1 Message Date
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
gaurank kathpalia
afa4e1b224 qcacmn: Fix hw mode change issue in case of DBS
The driver stops the oppurtunitistic timer for DBS, when
the start AP requests come, which results in HW mode stuck
in DBS if the next vdev start request comes on the same MAC
This further results in NSS = 1 for the MAC, hence throughput
decreases.

Fix is to set hw mode to single MAC in case the STA/SAP comes up
in the band/channel

Change-Id: I8ec4282c78594ee7e133a1e7768fa230bb2e8180
CRs-Fixed: 2273443
2018-07-06 03:19:19 -07:00
Kiran Kumar Lokere
aa40f60b9c qcacmn: Add support for SRD channels in ETSI domain
Add support for Short Range Devices 25 mW max power
channels in ETSI regulatory domain.

Add Short Range Devices 25 mW max power channels only
if DSRC feature is disabled.
Provide service apis to check SRD and DSRC channels.

Change-Id: Ib2a1d7cf191d07319cb29038ad60130f5cbe7f16
CRs-Fixed: 2264790
2018-07-05 20:49:34 -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
Bala Venkatesh
68bdbfa062 qcacmn: Add support to allow user select preferred band for SAP
Add enum QDF_MCC_TO_SCC_WITH_PREFERRED_BAND(6) for this.
If ini gWlanMccToSccSwitchMode is selected to
QDF_MCC_TO_SCC_WITH_PREFERRED_BAND(6) then following will be the
behaviour of STA+SAP concurrency.
1. If second interface(SAP/STA) comes in same band as
   first interface(STA/SAP) respectively then force SCC
   irrespective of channel.
2. If second interface(SAP/STA) comes in other band as
   first interface(STA/SAP) then dont force SCC allow
   interband MCC or DBS based on DBS capability.
Allow interband MCC but not intraband MCC.

Change-Id: I91d41b4b0306ed4e362b5bcab9538f5fd5feea7d
CRs-Fixed: 2260677
2018-07-02 08:45:47 -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
Yeshwanth Sriram Guntuka
2854295433 qcacmn: Send mode change event after addkey
On STA connection, mode change event is sent to
userspace after association is completed. This causes
delay in processing of M1 frame at supplicant due to
latency associated with nl80211_get_wiphy_index
function as part of processing mode change vendor event.

Fix is to send mode change event for STA after key
is added.

Change-Id: Id403bfdd26ed3a47449ba3f2967f4b4322ad5da6
CRs-Fixed: 2260483
2018-06-29 03:29:52 -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
7c96e54a19 qcacmn: Allow SAP to move from one DFS chan to another DFS chan
Allow the SAP to move from DFS channel to another DFS channel in
STA+SAP SCC concurrency scenario.

CRs-Fixed: 2263031
Change-Id: I3d1f5e57415ed39a30125d4565bb768926dff4c9
2018-06-21 17:40:40 -07:00
Dundi Raviteja
a02444a206 qcacmn: Incorrect usage of QDF_ARRAY_SIZE macro
In some use cases of QDF_ARRAY_SIZE macro, the argument passing
to it is a pointer instead of array which leads to getting
incorrect array size.

Current implementation of updating main arrays pcl_list_org and
weight_list_org is inefficient. So, update the main arrays directly,
instead of copying the data to local arrays and again updating the
main arrays.

Change-Id: I9a4a7fa813412fd000ce55d2a958e49ab1b02ed5
CRs-Fixed: 2262231
2018-06-20 00:42:57 -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
Bala Venkatesh
06a4e7c57e qcacmn: Skip CAC and ignore radar indication for SAP
If STA is already connected on DFS channel and SAP is going to start
on the same channel then skip the CAC for SAP.
If STA and SAP sessions are already operating on same DFS channel,
then ignore radar indication received on SAP interface.

CRs-Fixed: 2262494
Change-Id: Ife0ab6979a07c8773001a43f5a30c9a555dab37a
2018-06-19 22:42:33 -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
Tushnim Bhattacharyya
b7f839694a qcacmn: Restrict the force SCC logic for STA+SAP only
Restrict the force SCC logic for STA+SAP only unless ini is set for
QDF_MCC_TO_SCC_SWITCH_FORCE_PREFERRED_WITHOUT_DISCONNECTION.

Change-Id: If2c4c285b92ea5eba69679561c32875cff5f7b08
CRs-Fixed: 2261717
2018-06-18 16:34:01 -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
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