Commit Graph

272 Commits

Author SHA1 Message Date
Rajeev Kumar
8eaedf65a1 qcacld-3.0: Remove obsolete CDS mq APIs reference from SME module
After control path scheduler componentization CDS message queue
APIs are no longer used hence replace CDS mq APIs in SME by
scheduler mq APIs.

Change-Id: I645209741a602798fc077a50ac66de198e292038
CRs-Fixed: 1114363
2017-01-21 22:01:01 -08:00
Nitesh Shah
a5ba4e1445 qcacld-3.0: Call cdp_update_mac_id after hw_mode change in fw
When MAC0 is in 2.4G and new connection is coming in 5G, then MAC0
connection is shifted to MAC1, and new connection comes in MAC0.
But in this process, cdp_update_mac_id() is not called while
shifting from MAC0 to MAC1.

Fix is to call cdp_update_mac_id() after hw_mode change occurs
in the firmware, thus updating mac_id and corresponding vdev_id for
the interface whose mac_id or vdev_id get shifted.

Change-Id: I294c26f7d5054e42cdc116e8ae878954904056b5
CRs-Fixed: 1109511
2017-01-21 04:18:54 -08:00
Abhishek Singh
562aad6cf8 qcacld-3.0: Enhance 5/10 MHz feature logging
Add logs to enhance 5/10 MHz feature logging

Change-Id: Ied2489185721e3c547ee392a9c46b5a3d733ad74
CRs-Fixed: 1108818
2017-01-19 02:42:07 -08:00
Rajeev Kumar
9fdfbe06ee qcacld-3.0: Remove obsolete CDS message queue init/deinit APIs
After control path scheduler componentization CDS message queue
init/deinit APIs are no longer used hence remove them.

Change-Id: I65c14872bf20412eb1014deac0172f2bfacc0f0f
CRs-Fixed: 1111033
2017-01-18 13:33:18 -08:00
Krunal Soni
a6e505bc7b qcacld-3.0: Fix compilation error and disable unit test framework
for policy manager component, unit test framework has been created.
this unit test framework can be enabled or disabled through Kbuild
flag. As policy manager is matured, unit test framework needs to
be disabled.

While disabling unit test framework, couple of compilation errors have
been observed. Fix those compilation errors.

Change-Id: I2a3ee57cc082e5ebc598f0aea2d05f31fb878732
CRs-Fixed: 1110876
2017-01-17 11:12:37 -08:00
yeshwanth sriram guntuka
310b3ac34c qcacld-3.0: Add support for vendor abort scan
Add vendor abort scan which takes adapter and scan
id as input. Supplicant may abort a scan if a
preferred AP or P2P peer device is found.

Change-Id: Ia9cbf4bb38d2111b1fcf42a1e1f51d1049f5a9ab
CRs-Fixed: 1090800
2017-01-16 11:31:07 -08:00
Krunal Soni
4274f36bcd qcacld-3.0: Allow full spectrum scan when agile & aDFS scan supported
Traditionally full spectrum scan on STA/CLI is not allowed when SAP/GO is
already present on DFS channel.

With new generation of hardware, agile scan and agile DFS scan features
are supported which will allow hardware to do full spectrum scan even if
SAP/GO is present on DFS channel.

Change-Id: I7e5a21601642e0d6afef73beeecf80a3e0475909
CRs-Fixed: 1103730
2017-01-12 13:12:51 -08:00
Tushnim Bhattacharyya
d07dc906c7 qcacld-3.0: Fix for 2x2 DBS capability
Fix the way DBS capability is read from FW dev cap. Also, add HW mode
request for 2x2 DBS.

Change-Id: I935a2d0f4a7eed1517a3263fb8b29838f135f91e
CRs-Fixed: 1068000
2017-01-11 20:54:30 -08:00
Naveen Rawat
b56880cd83 qcacld-3.0: Match the timeout values at HDD with SME cmd timeout
Change the timeout values at HDD to match sme cmd timeout in all the
instances where HDD is sending cmd via SME command queue.

Change-Id: I00337169804b9ce71562cb114e4c2b92a7534dba
Crs-Fixed: 1100854
2017-01-11 09:06:29 -08:00
Arunk Khandavalli
cfe32d1cd7 qcacld-3.0: Validate if tlds is enabled before setting connection tracker
In the present scenario driver checks for  eTDLS_SUPPORT_DISABLED
before enabling the connection tracker for tdls mode. But if the
tdls is disabled from the ini or disabled in the firmware eTDLS_SUPPORT_NOT_ENABLED
is set in the tdls_mode. Checking for only eTDLS_SUPPORT_DISABLED is resulting
in enabling the connection tracker which tries to access the tdls_ctx
which is NULL.

To mitigate the issue also check for eTDLS_SUPPORT_NOT_ENABLED in the tdls_mode
before enabling the connection tracker.

CRs-Fixed: 1096830
Change-Id: I1e13af6b63aa058c19117efa99563540aa02da0b
2017-01-11 09:06:15 -08:00
Poddar, Siddarth
a78cac3fe6 qcacld-3.0: Relocate and rename cds_flush_cache_rx_queue()
API cds_flush_cache_rx_queue() is added as part of propagation
from qcacld-2.0. This function does not belong in CDS but
instead belongs in TXRX because corresponding function in
qcacld-2.0 is tl_shim_flush_cache_rx_queue() which is a datapath
function.

CRs-Fixed: 1106306
Change-Id: I6ca10fa9ebb7ad7cdc0b54ff7ed2cc0595b7d82d
2017-01-10 23:08:47 -08:00
Amar Singhal
6edf9733ec qcacld-3.0: Keep source of driver hint also
Maintain source of driver as well as 11d hint. Use the source of
hint to correctly disable 11d if required.

CRs-Fixed: 1093565
Change-Id: Id0ccc44389836b72466b501f5ce024f1be4b5926
2017-01-09 11:21:45 -08:00
Wei Song
2f76f64da7 qcacld-3.0: Fix a racing condition in BSS starting path
qcacld-2.0 to qcacld-3.0 propagation

1) BSS starting path and STA disassoc path should use
different events to perform synchronization
2) BSS starting event object should be reset before
BSS starting/restarting procedure is initiated

Change-Id: I96efd052fa19227c55c4f3af96afa8d590037c2d
CRs-Fixed: 1091108
2017-01-09 11:21:13 -08:00
Selvaraj, Sridhar
0672a1213d qcacld-3.0: Add support for init/deinit with obj manager framework
Create the psoc, pdev, vdev, peer hierarchy by calling obj manager
API's in driver init/deinit code.

Change-Id: I804fd56fff0f72d69274dda2667efb6b681e4dda
CRs-Fixed: 1097219
2017-01-06 11:40:26 -08:00
Jeff Johnson
d9f0860957 qcacld-3.0: Remove obsolete "frame_xln_reqd" flag
The current driver inherited support for the "frame_xln_reqd" flag
from a prior version of the driver. In the prior version of the driver
this flag was used to communicate to hardware whether or not
hardware-assisted data frame translation was required. However the
current driver does not use this flag, so remove it from the code.

Change-Id: I41047864de374c12a89fa031c6d38729a285262a
CRs-Fixed: 1075631
2017-01-05 12:06:46 -08:00
Tushnim Bhattacharyya
53bcb93027 qcacld-3.0: Add support for new 3 port concurrency combinations
Update or add policy rules for new 3 port concurrency cases:
STA+STA+SAP
SAP+SAP+STA
SAP+SAP+SAP

Change-Id: I6ca605808f1de7f8d31ee9a2f05b88491319e6f2
CRs-Fixed: 1068000
2017-01-05 12:06:35 -08:00
Rajeev Kumar
3e5ef0da16 qcacld-3.0: Remove obsolete MC thread message buffers from cds
After control path scheduler componentization CDS message buffers,
and message wrappers are no longer used hence remove them.

Change-Id: If6e915ffe27775511cb359adb704fa9e03653420
CRs-Fixed: 1107094
2017-01-04 17:39:44 -08:00
Rajeev Kumar
52333410ab qcacld-3.0: Remove obsolete cds_is_mq_empty API
After control path scheduler componentization cds_is_mq_empty
API is no longer used hence remove it.

Change-Id: I6b90d185d4faad7a02fca1b784dfea9b08213005
CRs-Fixed: 1106123
2017-01-04 17:39:43 -08:00
Rajeev Kumar
08ef0d620a qcacld-3.0: Remove obsolete cds_core_return_msg API
After control path scheduler componentization cds_core_return_msg
API is no longer used hence remove it.

Change-Id: I66122b918f0b27236b2b5ca454e52b0de20b16ee
CRs-Fixed: 1106115
2017-01-04 17:39:42 -08:00
Houston Hoffman
be58cc5b8b qcacld-3.0: do cdp_soc_detach in cds_close
Without doing cdp_soc_detach, datapth interrupts
would fire after the driver is unloaded and the
handlers have been removed from memory.

Change-Id: Ifad17059fa6f4b5957533defccc3126c15e55360
CRs-Fixed: 1103147
2016-12-24 15:25:37 -08:00
Krunal Soni
b37bb35ad3 qcacld-3.0: Fix to handle error conditions when pre-cac adapter fails
Currently, driver has following errors while handling pre-cac adapter
1) If SAP start operation fails in upper mac layers like PE or WMA then
   without checking status of operation, SAP/HDD layer notifies policy
   manager to add the connection to its table.
2) Driver is doing hardware mode change first and then it does pre-cac
   adapter open operation followed by starting the bss. If pre-cac
   adapter open operation fails then nobody is reverting original
   hardware mode change.
3) While doing CAC wait, If radar gets detected then driver is not
   releasing interfaces mac address due to which sub sequent adapter
   doesn't get valid mac address as driver has limited pool of mac
   addresses.
4) LIM layer is populating some garbage SME session id as it is
   releasing the memory before it access in case of any failure.

Add safety checks to avoid all above conditions.

CRs-Fixed: 1103673
Change-Id: Ie94af7783527e6c55490801b52898ec0c3208503
2016-12-22 10:58:06 -08:00
Jeff Johnson
2fb441a354 qcacld-3.0: Make cds_config_recovery_work() static
Recently change "qcacld-3.0: Add support for silent recovery in
cds_trigger_recovery()" added function cds_config_recovery_work().
This function is currently not defined as static, but it also does not
have a public prototype, and this results in a warning when the
compiler's -Wmissing-prototypes switch is used. Since this function is
not accessed from outside cds_api.c, make it static.

Change-Id: I5e78ff767931d21e99b1aff280deb3f9951ee866
CRs-Fixed: 1095791
2016-12-19 10:19:45 -08:00
Rajeev Kumar
e4cbd534a6 qcacld-3.0: Clean up obsolete conditional compilation NAPIER_CODE
Clean up obsolete conditional compilation NAPIER_CODE.

Change-Id: I6655c135757117535be1ccdc688dbe7ff5bd5a6a
CRs-Fixed: 1095867
2016-12-14 14:25:02 -08:00
Krunal Soni
d32c6bc3fd qcacld-3.0: Enable converged control path scheduler
Enable converged control path scheduler for cld driver
and disable legacy cds MC thread scheduler.

Change-Id: I11ecc6a5ee930a1039ed3460b3a3d4e5f7b75ac6
CRs-Fixed: 1095867
2016-12-14 14:25:00 -08:00
Ganesh Kondabattini
1a9d1e4e74 qcacld-3.0: aquire mutex qdf_conc_list_lock only if required
The mutex qdf_conc_list_lock should be used to protect the
access of conc_connection_list. If driver holds this lock and calls
sme api, then there is a chance of entering into a deadlock scenario
as sme api is going to aquire the sme global lock.

This change is going to make sure that driver doesn't hold
qdf_conc_list_lock and call any sme api.

CRs-Fixed: 1086929
Change-Id: I93819d13905609a6a2886b77e951db4253f281bd
2016-12-14 14:08:39 -08:00
Amar Singhal
0b51ecf196 qcacld-3.0: Regulatory domain changes
Add new regulatory domains APL15 and APL16. Also add
regulatory domains APl14_WORLD, APL15_WORLD and APL16_WORLD.
Also change reg-domain mappings for a host of countries. This
incorporates changes made 2016-10-31 to the regdomain.xls
regulatory database.

Change-Id: I12faa43bed83b7a046bba9b1921584ed5cef6f40
CRs-Fixed: 1090230
2016-12-14 14:07:11 -08:00
Kabilan Kannan
15cc6acd1c qcacld-3.0: Fix the mutex assert in concurrency module
The mutex qdf_conc_list_lock is accessed, before it is
initialized and it triggers the system assert.
Initialize the mutex in cds open function to avoid
invalid mutex access.

Change-Id: Iec13a101ba2cc4a332d486b08f0c0562f648edfa
CRs-Fixed: 1089357
2016-12-12 17:06:00 -08:00
Aravind Narasimhan
5b7c2cd51f qcacld-3.0: Changes for concurrency FR 32755
Add second and third connection pcl tables and next actions
for 2X2 dbs solution

Change-Id: I4722e137360a4a0d349d856b01255a0fe11d59fb
CRs-Fixed: 1068000
2016-12-09 00:26:41 -08:00
Kiran Kumar Lokere
52d8dc3fad qcacld-3.0: Fix the ping failure issue
ping fails due to full_reorder_enable is not initialized in the
cdp_config. Fix the full_reorder_offload initializtion and enable
the full_reorder_enable by default.

Change-Id: I3191fb96a4d2fc365d5470c3144fdca5d3f59913
CRs-Fixed: 1098023
2016-12-07 19:03:47 -08:00
Nitesh Shah
3197b711c9 qcacld-3.0: Restrict pcl_len to QDF_MAX_NUM_CHAN
The channel_list array for pcl channels is defined with size
QDF_MAX_NUM_CHAN. The index for the channel_list array can go
beyond QDF_MAX_NUM_CHAN.

The fix is to take care that the index for the channel list
for pcl channels does not exceed QDF_MAX_NUM_CHAN.

Change-Id: I1afd7e4b0ee13e02611cbc5f56a27d1da9ef06a6
CRs-Fixed: 1093129
2016-12-05 23:16:44 -08:00
Rajeev Kumar
97767a0297 qcacld-3.0: Define init-deinit basic framework for phase 3 convergence
Define basic dispatcher framework for init/deinit. Each individual
component is supposed to define its init/deinit primitives and replace
dummy place holder primitives.

Change-Id: I35140ea7af03ce568e1732435458caf78ab28996
CRs-Fixed: 1095741
2016-12-01 19:19:17 -08:00
Kiran Kumar Lokere
9aecfee377 qcacld-3.0: Fix compilation issues
Fix compilation issues.

Change-Id: I629acbb0c9ec1e36a3e6a13e3709dd4327003557
CRs-Fixed: 1094633
2016-11-30 19:27:31 -08:00
Ravi Joshi
fc2ed78279 qcacld-3.0: Disable PKTLOG & enable polling for DP on Lithium
For Napier end-to-end bringup:
 -- Disable PKTLOG, this is not ready on the new HW design
 -- Enable timer based polling on DP UMAC rings
 -- Modify cdp_soc_attach() to attach to Lithium DP

Change-Id: I096644887848dd8eae75bf4c497acc0b19f89833
CRs-Fixed: 1074199
2016-11-26 13:35:43 -08:00
Leo Chang
9b09703f79 qcacld-3.0: cds: change legacy data path api to cdp api
Remove legacy apis call from out side of data path.
Replace legacy apis to cdp apis.
cds module.

Change-Id: I3f26b69711f494bad7fbaf07c5b8961125f13e65
CRs-fixed: 1075736
2016-11-17 19:13:10 -08:00
Houston Hoffman
47a4a05cfa qcacld-3.0: Fix memory leaks when cds_open fails
When cds_open fails, several cleanup actions are missed.
cds_shutdown_notifier_purge
hdd_green_ap_deinit
wlan_hdd_deinit_tx_rx_histogram

Change-Id: I9812b26636b1fd82320de323538777ac048ea824
CRs-Fixed: 1089946
2016-11-15 13:47:51 -08:00
Govind Singh
b048e87f2c qcacld-3.0: Refactor De-init sequence to firmware when the modules are not enabled
With the new statemachine  cds start/stop will not be invoked without an
interface up from upperlayer. As part of cds stop host sends de-initialization
sequence to firmware, If there is no interface up from the upper layer and
driver gets removed, host driver doesn't send the de-init
inidication to firmware and starts closing its modules because of this
fw & host are out of sync.

To mitigate the issue send the de-init sequence during if the modules are
opened but not enabled.

Change-Id: I52fddc1b8765105c44192085ba93bf00d14eb0bd
CRs-Fixed: 1073599
2016-11-14 11:51:19 -08:00
wadesong
f2e86b2814 qcacld-3.0: Fix memory leak during SAP restart
qcacld-2.0 to qcacld-3.0 propagation

IE buffers for probe resp, assoc resp and beacon should be freed
when 1)SAP starting fails; 2)SAP starting success event is signaled

Change-Id: Ic9cc1c8d58667f34fbc877aeca4405b0156b1264
CRs-Fixed: 1071990
2016-11-14 11:50:45 -08:00
Mukul Sharma
b7b575b41b qcacld-3.0: Add support for silent recovery in cds_trigger_recovery()
qcacld-2.0 to qcacld-3.0 propagation

Currently, cds_trigger_recovery does not support silent recovery
instead host send WMI_FORCE_FW_HANG_CMDID and wait for timeout.
In cases where wmi cmd cannot be sent to firmware, host needs
silent recovery.
As a part of this fix, Parameterize the cds_trigger_recovery
function for silent recovery.

Change-Id: I9bb631f7346a267a10348037c49606af43c6be4f
CRs-Fixed: 1053303
2016-11-14 11:50:40 -08:00
Amar Singhal
5f9978661c qcacld-3.0: Consolidate and rename regulatory macros
Consolidate regulatory macros in cds file and rename for
homogeneity.

Change-Id: I572eda616b985a39655dca3944e26fb1e0b5efb4
CRs-Fixed: 1058399
2016-11-12 00:24:03 -08:00
Ganesh Kondabattini
e353184920 qcacld-3.0: Disable GAP when concurrent sessions running
GAP should be enabled by host only when SAP is operating in stand
alone mode. Host should disable when there is a concurrent STA or
P2P session.

CRs-Fixed: 1065543
Change-Id: I1649bd5caca07abf2799892ad92d906474277acc
2016-11-12 00:22:15 -08:00
Sandeep Puligilla
afa5289e90 qcacld-3.0: Trigger host crash for command timeout
Add feature to trigger host crash when firmware
fails to send the response and host timesout.

Change-Id: I47f23e03f2729981a346e2a9e8c8541ba9119af4
CRs-Fixed: 1078192
2016-11-12 00:20:47 -08:00
Tushnim Bhattacharyya
0105770430 qcacld-3.0: Fix buffer overflow issue in cds_update_with_safe_channel_list
Fix the size of pcl_channels & pcl_weight array to be QDF_MAX_NUM_CHAN in
cds_get_nondfs_preferred_channel. Also make sure all the callers of
cds_get_channel_list uses QDF_MAX_NUM_CHAN as channel array size.

Change-Id: I256421f54180d1d8f9f6abd549d417e74d62add5
CRs-Fixed: 1082596
2016-11-03 17:54:03 -07:00
Krunal Soni
35fc8ea8b8 qcacld-3.0: Fix to handle SAP+STA DFS MCC scenario
1) If STA is on 2G channel and SAP is coming up on 5G DFS channel then
   it should be allowed given that DBS is supported.
2) If STA is on 5G channel and SAP is coming up on 5G DFS channel then
   it shoudln't be allowed as it will create DFS MCC scenario
3) If SAP is on 5G DFS and STA is coming up on 2G channel then it should
   be allowed given that DBS is supported.
4) If SAP is on 5G or 2G channel and STA is coming up on either of the
   bands then allow  connections to go through.
Make necessary adjustment to apply all above 4 rules.

Change-Id: I0a4dfe57cad1d2a62ada1bd8c258f7f3f6ac5dc2
CRs-Fixed: 1083376
(cherry picked from commit c6b307e0bc8ea638f44bd8ef86d09737a930b3ba)
2016-10-29 17:29:22 -07:00
Amar Singhal
79da812012 qcacld-3.0: Combine channel states only for 80P80
We dont need to combine channel states if the Channel width is not
80P80MHZ. Fix this so the logic is easier to understand.

CRs-Fixed: 1082221
Change-Id: Ie31d564f63278fe6549a2d54165920c28958c274
(cherry picked from commit a53a28f26e2add8309bb0c2ebacaa8f97f2506d3)
2016-10-29 17:28:23 -07:00
Prashanth Bhatta
f7969a6c2d qcacld-3.0: Mechanism to complete waiting thread
During remove() or shutdown(), driver waits for external thread
to complete but there is no mechanism available today to inform
lower layers that driver is about to go through remove() or
shutdown().  Add mechanism to provide the notification about
remove() or shutdown() so that lower layers can make use of it
and get out of waiting logic and complete the remove() or
shutdown() early without waiting for the timeout to happen.

Change-Id: I1eece21fb63e6d5e0454659795a4dad011483c75
CRs-fixed: 1079299
(cherry picked from commit 305516248006141ef331c8c1b7a4b56999fa496d)
2016-10-28 18:09:16 -07:00
Dustin Brown
cc1753d288 qcacld-3.0: 4.8 Kernel Migration - Remove ablkcipher
As of version 4.8 of the Linux kernel, the ablkcipher Api is removed.
Remove all obsolete crypto functions that reference this Api.

Change-Id: Ia82743d048834a67dfce23b91f660beb59b1e94d
CRs-Fixed: 1079951
(cherry picked from commit bf349575d765f53f207c7cb2ad6c66a198cf07de)
2016-10-28 18:09:06 -07:00
Dustin Brown
a30892e784 qcacld-3.0: 4.8 Kernel Migration - Remove ieee80211_band
Update references from enum ieee80211_band to nl80211_band, as
ieee80211_band was removed in version 4.7 of the Linux Kernel.

Change-Id: Id42cf6e20c3ebe921546d11fd22c3909aeb84ddd
CRs-Fixed: 1077221
(cherry picked from commit 8e62ee9836406b81fe3e418028cdb2ae8f5ec039)
2016-10-28 18:08:23 -07:00
Dustin Brown
b2cef911eb qcacld-3.0: Improve CDS SSR Protecting Logging
Any time SSR protect/unprotect fails, log a count of the pending
functions. Also, periodically dump the protection log when it is
full to help with debugging.

Change-Id: I926b2f8198a14cf0fac4138400e84a6a8ffedc73
CRs-Fixed: 1082070
(cherry picked from commit dfef826bf4883bc59ea1e6bd7dfb227567b95d1d)
2016-10-28 18:04:40 -07:00
Jeff Johnson
28b7151d8d qcacld-3.0: Handle NULL pdev in cds_flush_cache_rx_queue()
Currently cds_flush_cache_rx_queue() does not verify that
cds_get_context() returns a valid pdev which could subsequently lead
to dereferencing an invalid pointer.  Add a validity check for this
pointer.

Change-Id: I326e0b92205fda78854c947248e675d287a7ec04
CRs-Fixed: 1082035
(cherry picked from commit 514e12df3c66ef0e457d76ef8c984874481f5117)
2016-10-28 18:04:21 -07:00
Himanshu Agarwal
46956a5aff qcacld-3.0: Add infrastructure for pktstats based on linkedlist
Proapagation from qcacld-2.0 to qcacld-3.0.

Currently pktstats are stored in static allocated memory. This
pkt stats can be accessed using
1) procEntry function
2) hal_proxy_daemon
If user access it using procEntry then read pointer is moved ahead
in static memory array because of which incomplete data goes when
queried using hal_proxy_daemon.
Fix this by maintaining the pktstats in link list. When the
request comes from hal_proxy_daemon, complete data is sent
to it from this link list

Change-Id: I09bbd03fe378b296e110ce52cc8cbeb8cf8d723d
CRs-Fixed: 958544
(cherry picked from commit c0d86fc4197383d0eb386e091cee5142a35b555a)
2016-10-28 18:04:11 -07:00