Commit graph

564708 commits

Author SHA1 Message Date
Sreelakshmi Gownipalli
fc116784df diag: Add snap shot of diag driver
Add snap shot of diag driver

Signed-off-by: Sreelakshmi Gownipalli <sgownipa@codeaurora.org>
2016-03-23 19:58:26 -07:00
Mayank Rana
0163608079 usb: gadget: cdev: Add USB serial driver functionality
This change adds below functionality:
1. Add USB serial driver functionality
2. Add configfS support
3. Enable USB character serial driver

Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-03-23 19:58:25 -07:00
Girish Mahadevan
203411ee67 drivers: of: Add snapshot of of_slimbus driver
Add snapshot of of_slimbus driver from msm-3.18 tree.
3.18 baseline
e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1

Change-Id: I1bd2a767b238b4cf0184bc778940cd3a9eef2e9b
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
2016-03-23 19:58:24 -07:00
Mayank Rana
d559208e1a usb: Rename u_data_bridge.c as f_cdev.c
To reduce depedency on f_serial.c, this change rename u_data_bridge.c
as f_cdev.c and USB serial functionality shall be added on this driver.

Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-03-23 19:58:23 -07:00
Mayank Rana
3c2bb805ce usb: u_data_bridge: Check for USB cable connect with gbridge_port_write()
There is NULL pointer crash seen due to accessing port->port_usb from
gbridge_port_write() when port bridge application's write thread is
pre-empted and USB cable disconnect is being performed. Fix this issue
by adding check for USB cable is connected or not and handling USB
request accordingly.

Change-Id: Ide14de298b7186cbe7b7af1e99c8c47bc389130b
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-03-23 19:58:22 -07:00
Mayank Rana
ea1cd34463 usb: u_data_bridge: Lower DTR on USB cable disconnect to modem
When DUN call is operational and USB cable is being disconnected,
DTR is not being lowered with modem. This results into no DUN call
functionality on next USB cable connect case. Fix this issue by
lowering DTR to modem on USB cable disconnect.

This change also returns zero instead of -EAGAIN when there is no
write USB request available. Also it moves port open interrupted
message loglevel from pr_err() to pr_debug to reduce logging on
serial console.

Change-Id: I3259417aceee2713d7765c9de34ace4ea2d3ed96
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-03-23 19:58:21 -07:00
Mayank Rana
4687a02e76 usb: u_data_bridge: Check allowable size with gbridge_port_write()
Currently gbridge_port_write() is not checking size of user space
provided data and directly copies buffer into USB request buffer
which is having size as 2KB. If user space application writes data
bigger than 2KB, copy_from_user() tries to copy data beyond allocated
USB request buffer size which results into memory corruption. Fix
this issue by checking allowable size with gbridge_port_write() and
making sure that it doesn't copy data beyond allocated buffer size.

Change-Id: I7a34e37f5d1609792374f07b70542b80edbe6944
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-03-23 19:58:21 -07:00
Mayank Rana
df2968af9f usb: u_data_bridge: Improve USB RX (read) functionality
This change handles below cases and improves performance:
1. If USB OUT request buffer is bigger than provided read buffer
from application, then data equal to read buffer is copied. This
results into data loss. Handle this case by making sure that
whole USB OUT request buffer is provided to application across
multiple read() call.

2. If read buffer size is greater than available data as part of
one USB OUT request buffer, then copy data from other USB OUT
request buffers until read buffer is filled completely.

Change-Id: If2756ed82bd6e95650ebcc38c4042bfb593f8a2b
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-03-23 19:58:20 -07:00
Mayank Rana
3cbb89d1a4 usb: u_data_bridge: Return error when no USB TX request available
In some cases, it has been observed that all USB TX requests are
queued with USB controller and port bridge is trying to write data.
gbridge_port_write() API is returning zero (success of data) instead
of error code which results into data loss. Hence return -EAGAIN
when there is no USB TX request available. Also mark this error as
non-fatal by using pr_debug() here.

Change-Id: Id56788b372b62a005448a729e5f00de6fb895e47
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-03-23 19:58:19 -07:00
Mayank Rana
1ec29eb231 usb: u_data_bridge: Fix handling of USB RX requests
Currently on USB composition switch or USB cable disconnect,
USB RX requests are being added as part of read_queued list
instead of read_pool. In some cases it is seen that if port
bridge is trying to read data, those requests are requeued
and fails with -ESHUTDOWN, and again it continues with results
into watchdog timeout due to error log coming from read request
completion handler. Fix this by adding proper check in read
request completion handler.

Also reduce USB Tx/RX buffer size from PAGE_SIZE to 2048 bytes.
It also fixes issue where USB RX requests are not being queued
after USB composition switch.

CRs-Fixed: 854301
Change-Id: I3616dc35c093cfa19865891f46e7b1ccc7302573
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-03-23 19:58:18 -07:00
Mayank Rana
aae7a3ff40 USB: gadget: Add support for DUN Character Driver
This driver provides character device node (/dev/at_usb0)
to user space application for file operations like open,
close, read, write, poll and ioctl (for control signals).
This change also adds required support to use this new
character bridge driver with existing USB Serial driver
and android gadget driver.

Change-Id: I26f297636de585d3fd99d10fac76ecb71f852df3
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-03-23 19:58:17 -07:00
Rohit Vaswani
e95affa994 power_supply: smbcharger: use psy pointers to check init
The current driver uses a boolean flag psy_registered to track
whether the power supplies are initialized. Instead check if the
psy pointers are non null to ensure they are initialized.

Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2016-03-23 19:58:16 -07:00
Rohit Vaswani
638f324728 irqchip: Compile IRQ_MSM
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2016-03-23 19:58:15 -07:00
William Clark
745f49266d defconfig: Seemp: add seemp functionality
Needed to add seemp functionality

Change-Id: I43b4eee9191adc7777b9cb937bc4cd0e455dc198
Signed-off-by: William Clark <wclark@codeaurora.org>
2016-03-23 19:58:15 -07:00
Mona Hossain
e0f32de9cf qmp: Add support for QSSP Enhancements
update seemp_api header file
update seemp_parm_id header file
update seemp_core to log data with blk header set to 64B
remove logging from fs proc base and net socket modules

Change-Id: I583e3129d62651b155b0372e173564d5a17e3153
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
2016-03-23 19:58:14 -07:00
William Clark
7a494e6444 seemp: add more seemp parameters
Add more seep parameters for frameworks refactoring.

Change-Id: I9807ef0dc6d5a54c82dea64cec68be3fd0ff7396
Signed-off-by: William Clark <wclark@codeaurora.org>
2016-03-23 19:58:13 -07:00
William Clark
5f0d2109e1 seemp: prevent assert
The change fixes event parameter encoding for seemp. It will
prevent an assert in seemp functioning

Change-Id: Ib3681d526a1dfb45cd5de5a40ee8cf07e02296dd
Signed-off-by: William Clark <wclark@codeaurora.org>
2016-03-23 19:58:12 -07:00
William Clark
0990b37505 seemp: enhance support for malware detection
Improves the ability of a malware protection program
to detect anomalies in various activities. It records
task activities in a log and rates the actions
according to how a typical user would use the tools.

Change-Id: I976bc97f57215f173b046326b5f905522d785288
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Signed-off-by: William Clark <wclark@codeaurora.org>
2016-03-23 19:58:11 -07:00
Maya Erez
c7a777070b defconfig: msm8996: Enable wil driver
Enable wil driver as module for MSM8996.
Wil driver is needed for 11ad wireless card.

Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:58:10 -07:00
Hamad Kadmany
915823609a msm_11ad: Enable driver by default
Enable 11ad msm platform driver by default. The driver
must be built-in within kernel so that by default it turns
off any power related to the 11ad chipset when connected
to msm.

Change-Id: Ice3a85fcd5e3c10fbe3193d52d6d4cf26f0abe74
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
2016-03-23 19:58:10 -07:00
Maya Erez
cd958296ac wil6210: enable WA for PCIe HW errata
WA for HW errata for PCIe in MSM8998 v1, QCTDD02664351.
Due to this issue, PCIe write ordering rule may be violated
causing cluster to read older data from its L2 cache, in specific
scenario.

To avoid that for wil6210 rx transactions, we set "no snoop" for
PCIe wr transactions (from device to host).
For configuring the above bit 4 of 0x8812C4 register is set.

Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:58:09 -07:00
Maya Erez
faab237c9c wil6210: handle multiple connect/disconnect events
In the current solution wil6210 configures the vring in a worker
and holds only one pending CID. This implementation may lead to
race conditions between connect and disconnect events of multiple
stations or fast connect/disconnect events of the same station.

In order to allow the removal of the connect worker and handling of
WMI_VRING_CFG_DONE_EVENTID in the connect event, the WMI replies
that provide the reply in a given buffer needs to be handled
immediately in the WMI event interrupt thread.
To prevent deadlocks, WMI replies that requires additional
handling are still handled via the events list.

Change-Id: I81f08011ef98be845d98fbe15d98bbf050032f88
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 0916d9f2b6bea53a830ae5061b63a515c04da62e
Git-repo: https://github.com/kvalo/ath.git
CRs-Fixed: 971604
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:58:08 -07:00
Maya Erez
fdf67e3dd1 wil6210: find TX vring only if vring_tx_data is enabled
In TX vring allocation, vring_tx->va is allocated before WMI command to
configure the vring is sent to the device. As the WMI command can take
time to complete, it can lead to scenarios where vring_tx->va is not NULL
but vring is still not enabled.

This patch adds a check that vring_tx_data is enabled before returning
a valid TX vring.

Change-Id: I21bad8fdbb7bb0ff8fe0447efb94dbfd69f4e6b0
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: b729aaf066b013458e95cd6c69a5e371eb9ce355
Git-repo: https://github.com/kvalo/ath.git
CRs-Fixed: 971604
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:58:07 -07:00
Maya Erez
f4309fe27e wil6210: handle tx completions only if vring tx data is enabled
wil_vring_fini_tx is called in disconnect in order to free the
allocated vrings.
wil_vring_fini_tx is disabling the vring_tx_data before napi_synchronize
is called in order to avoid the tx handling of this vring, while
wil_vring_free is called only after napi finished the current handling
of the tx completed packets.
Due to that, in case of disconnect, wil6210_netdev_poll_tx can be called
when vring->va is not NULL but vring_tx_data[i]->enabled is already
disabled.

This patch checks vring_tx_data[i]->enabled in wil6210_netdev_poll_tx
to prevent handling of disabled vrings.

Change-Id: I6c38be5b47eb3c34ccb4b503545fccada26806e4
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 640751ac30b2ddfbe06ad712aa7d57a8d89a7eef
Git-repo: https://github.com/kvalo/ath.git
CRs-Fixed: 971604
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:58:06 -07:00
Lior David
92009e8020 wil6210: use extra IEs from probe response
In the start_ap/change_beacon API, when we set up probe response
offloading, we only use the IE list from the probe response
template and not the IE list from the proberesp_ies argument.
As a result, we miss important IEs and it causes problems with
some scenarios such as P2P.
With this change, we merge the list of IEs from the probe response
template and proberesp_ies and send the merged list to the FW
for offloading. It is still FW responsibility to filter out
irrelevant IEs when sending probe response, based on the actual
contents of the probe request.
Also in case association response termplate is not provided,
we will use the merged list of IEs from probe response in the
association response as well.

Change-Id: Ic21e9a70f64af67c630dc710ccd6825879f872b6
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: c100c883e785802ab333604237928a65ae62c6bc
Git-repo: https://github.com/kvalo/ath.git
CRs-Fixed: 970919
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:58:05 -07:00
Lior David
00ffb353aa wil6210: fix privacy flag calculation in change_beacon
Currently the privacy flag calculation in change_beacon
checks for RSN IE inside proberesp_ies, but normally it
is not found there. It works today because of code inside
the function wil_fix_bcon, but wil_fix_bcon is not directly
related to change_beacon, and it may be changed or removed
in the future and break the calculation.
To fix this issue, change the privacy flag calculation
to check RSN IE inside the beacon itself. The new check is more
reliable and will not be sensitive to changes in wil_fix_bcon.

Change-Id: Ida5b55f6456d04e22303fedddc8c77c5ad081177
CRs-Fixed: 970919
Signed-off-by: Lior David <liord@codeaurora.org>
2016-03-23 19:58:04 -07:00
Maya Erez
5e89efd09c msm_11ad: add VDD and VDDIO regulators voting
On platforms where the power supply for 11AD is external
the wil6210 driver has to vote for the VDD and VDDIO regulators.

This patch adds such voting and guarantees the required
voltage for each regulator.

Change-Id: I472fe6b0600557bc4e623a3dd1b6352fd4a86e27
[merez@codeaurora.org: using regulator_set_load]
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:58:04 -07:00
Lior David
add338b4a5 msm_11ad: add support for subsystem_restart framework
Add 11ad as a subsystem (WIGIG) within the subsystem_restart
framework, in order to allow proper support for recovery from
11ad firmware crashes, and support automated collection of
crash dumps for offline analysis and bug reporting.

Change-Id: I7acbe8860e046cdba2ce027f91ed2fa995a70c70
Signed-off-by: Lior David <liord@codeaurora.org>
[merez@codeaurora.org: fixed merge conflicts]
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:58:03 -07:00
Lior David
f9b44400f7 wil6210: support for platform specific crash recovery
Added a simple interface for platform to perform crash
recovery.
When firmware crashes, wil driver can notify the platform
which can trigger a crash recovery process. During
the process the platform can request a ram dump
from the wil driver as well as control when firmware
recovery will start. This interface allows the platform
to implement a more advanced crash recovery, for
example to reset dependent subsystems in proper order, or
to provide its own notifications during the recovery process.

Change-Id: I2545d220b779c24931b6263249449f37bcad75a4
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: ea3ade75db690dc47c78a77d71dfd7c2df3bb15d
Git-repo: https://github.com/kvalo/ath.git
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:58:02 -07:00
Hamad Kadmany
eba9e63599 wil6210: fix kernel OOPS when stopping interface during Rx traffic
When network interface is stopping, some resources may
be already released by the network stack, and Rx frames
cause kernel OOPS (observed one is in netfilter code)

Proper solution is to drop packets pending in reorder buffer.

Change-Id: Id043d466135f20fe980814380e6f01e2554c22e3
Signed-off-by: Hamad Kadmany <qca_hkadmany@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: dea16eddb4753129dbcd8dc8d1a58ff0cc4ea38c
Git-repo: https://github.com/kvalo/ath.git
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:58:01 -07:00
Dan Carpenter
5a45ce7b35 wil6210: fix a warning message condition
"iter" is -1 at the end of the loop and not zero.  It means we don't
print a warning message.

Change-Id: I532bd54fbdafb92e71205c317ae5d467c4cd5f3b
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: f94c48d6c315a580b60b062c0360561b61faa311
Git-repo: https://github.com/kvalo/ath.git
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:58:00 -07:00
Maya Erez
fa8629d210 wil6210: prevent external wmi commands during suspend flow
In __wmi_send we check if fw is ready at the beginning of the function.
While we wait for the completion of the previous command, system suspend
can be invoked and reset the HW, causing __wmi_send to read from HW
registers while it is not ready.
Taking the wmi_mutex in the reset flow when setting the FW ready bit
to zero will prevent the above race condition.

Change-Id: I5d2e823a27beaeaaf5b8b1e25457c158efd3ea46
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:59 -07:00
Vladimir Kondratiev
97f833bbc8 wil6210: hold wil->mutex while managing vrings
To prevent race when connect flow may run in parallel with
the disconnect event.

Scenario leading to the bug is: while running connect flow on the AP,
STA sends disconnect. log follows.

<7>[  668.736269] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Configure for connection CID 1
<7>[  668.736269] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil_vring_init_tx() max_mpdu_size 2048
<7>[  668.736301] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil_vring_alloc()
<7>[  668.736363] wil6210 0000:01:00.0: wlan0: DBG[MISC]vring[1024] 0xffbe8000:d962ce08 0xdb244000
<7>[  668.736394] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Head 0x00880300 -> 0x00880308
<7>[  668.736394] wil6210 0000:01:00.0: wlan0: DBG[ WMI]WMI command 0x0821 [28]
<7>[  668.736426] DBG[ WMI]Cmd 00000000: 20 00 24 00 00 00 00 00 00 00 21 08 00 00 00 00   .$.......!.....
<7>[  668.736426] DBG[ WMI]cmd 00000000: 00 00 00 00 00 00 5f 5c 00 00 00 00 00 04 00 08  ......_\........
<7>[  668.736457] DBG[ WMI]cmd 00000010: 01 01 00 00 00 00 00 00 00 00 ff 0f              ............
<7>[  668.736488] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]Pseudo IRQ 0x00000004
<7>[  668.736519] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Handle WMI 0x1824 (reply_id 0x1821)
<7>[  668.736519] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]wil6210_mask_irq_pseudo()
<7>[  668.736519] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]ISR MISC 0x20000000
<7>[  668.736551] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Handle WMI 0x1003 (reply_id 0x1821)
<7>[  668.736551] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Disconnect 04:ce:14:00:07:70 reason [proto 3 wmi 4]
<7>[  668.736582] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil6210_disconnect()
<7>[  668.736613] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]Thread IRQ
<7>[  668.736613] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]Thread ISR MISC 0x20000000
<7>[  668.736644] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]MBOX event
<7>[  668.736644] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Mbox head 00880330 tail 00880328
<7>[  668.736676] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Mbox evt 001a 0010 0000 00
<7>[  668.736676] wil6210 0000:01:00.0: wlan0: DBG[ WMI]WMI event 0x1821 MID 0 @3255145 msec
<7>[  668.736707] DBG[ WMI]evt 00000000: 1a 00 10 00 00 00 00 10 00 00 21 18 69 ab 31 00  ..........!.i.1.
<7>[  668.736707] DBG[ WMI]evt 00000010: 01 01 00 00 00 00 00 00                          ........
<7>[  668.736738] wil6210 0000:01:00.0: wlan0: DBG[ WMI]queue_work -> 0
<7>[  668.736738] wil6210 0000:01:00.0: wlan0: DBG[ WMI]wmi_recv_cmd -> 1 events queued
<7>[  668.736769] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]wil6210_unmask_irq_pseudo()
<7>[  668.736832] wil6210 0000:01:00.0: wlan0: DBG[MISC]Disconnect 04:ce:14:00:07:70, CID=1, reason=3
<7>[  668.736832] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil_disconnect_cid(CID 1, status 1)
<7>[  668.736894] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil_vring_fini_tx() id=1
<7>[  668.736894] wil6210 0000:01:00.0: wlan0: DBG[MISC]free Tx vring 1 [1024] 0xffbe8000:d962ce08 0xdb244000
<7>[  668.736957] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Handle WMI 0x1821 (reply_id 0x1821)
<7>[  668.736988] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Complete WMI 0x1821
<7>[  668.737019] wil6210 0000:01:00.0: wlan0: DBG[ WMI]wmi_call(0x0821->0x1821) completed in 0 msec
<3>[  668.737019] wil6210 0000:01:00.0: wlan0: Tx config failed, status 0x01
<7>[  668.739518] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil_cfg80211_del_station(04:ce:14:00:07:70, reason=2)
<7>[  668.739550] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil6210_disconnect()
<7>[  668.739550] wil6210 0000:01:00.0: wlan0: DBG[MISC]_wil6210_disconnect(bssid=04:ce:14:00:07:70, reason=2, ev-)
<7>[  668.739581] wil6210 0000:01:00.0: wlan0: DBG[MISC]Disconnect 04:ce:14:00:07:70, CID=-2, reason=2
<7>[  668.742705] wil6210 0000:01:00.0: wlan0: DBG[MISC]free Tx vring 1 [1024] 0x  (null):d962ce08 0x  (null)
<3>[  668.742736] __dma_free_remap: trying to free invalid coherent area:   (null)

Change-Id: I19b37cbea24cecfb56099e8931687c380839f1c0
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 9b1ba7b28e70a1f4066cfa3bebea24953f36feef
Git-repo: https://github.com/kvalo/ath.git
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:59 -07:00
Maya Erez
55ea73efd0 msm_11ad: change wigig_en to be an optional property
Some platforms don't support the wigig_en GPIO.
Changing wigig_en to be an optional property allows
removing the redundant setting of this GPIO in platforms
that do not support it.

Change-Id: Iad33d3876c1657cc4cc6b779b11d1c634f58a243
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:58 -07:00
Hamad Kadmany
fd6b238f22 msm_11ad: Disable asynchronous suspend
msm root-complex does not maintain parent/child relationship
with PCIe devices. Due to this, suspend operation may be carried
out asynchronously between PCIe device and root-complex.

In cases where 11ad refuses to suspend for any reason, the
root-complex connected to it may get suspended in parallel,
causing inconsistency between root-complex and 11ad device.

Disabling async suspend ensures proper ordering of suspend
between PCIe device and root-complex.

Change-Id: I42749d6af229721dc420b55b91e78bf58923d67f
CRs-Fixed: 933571
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:57 -07:00
Hamad Kadmany
8236eb8628 wil6210: Handle set WPS-P2P IE ioctl
hostap in Android issues private ioctls in some scenarios,
specifically P2P and WPS.

Currently 11ad driver supports WPS but not P2P, when WPS
is enabled IE related to WPS in P2P is sent through
private ioctl and fails which blocks WPS.

Add handling of this command so that WPS could be
enabled outside of P2P flow.

Change-Id: Id67174ad128b47a6b6244b1fe48b0e535b397247
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:56 -07:00
Hamad Kadmany
41d3baa95e msm_11ad: Add option to enable sleep clock
Sleep clock may be used by 11ad chip to support
low power modes.

Change-Id: I00c9c5f3d24fa47463f5d0fe4aecc97ab09334b9
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
[merez@codeaurora.org: fixed merge conflicts]
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:55 -07:00
Hamad Kadmany
857bd53c2d msm_11ad: Fix config space restore from suspend
Config space was not properly restored when
resuming from suspend.

Change-Id: I6b9188f3989957eb44c93302d7958d422bb29e81
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:54 -07:00
Maya Erez
ab30d8cc16 msm_11ad: remove order parameter from arm_iommu_create_mapping()
Align msm_11ad driver with commit:
5d186c1a1f152c480b51772764d53f66c2a657ca - arm64: dma-mapping:
remove order parameter from arm_iommu_create_mapping()

Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:54 -07:00
Hamad Kadmany
ffac72e679 msm_11ad: Set atomic attribute to SMMU driver
Set DOMAIN_ATTR_ATOMIC attribute to SMMU driver so that
it can handle DMA map/unmap operations from atomic context
which is required by 11ad driver

Change-Id: I7e538e6c41e5f40ff01dcfc9cbecf860ded22057
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:53 -07:00
Hamad Kadmany
d01e7b6017 msm_11ad: Tune delay between chip power-on to PCIe init
Larger delay is required when using perf build

Change-Id: I1f24aa181e0f6982ec637a24a0ae543e87b500cc
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:52 -07:00
Hamad Kadmany
3de46377e1 msm_11ad: Add delay between chip power-on to PCIe init
Delay is required to wait for the PCIe endpoint to become
stable after power on before de-assertion of PERST to
the endpoint by PCIe root complex.

Change-Id: Ib064e936fa0540646e6751d7c3b739c0beb48e60
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:51 -07:00
Hamad Kadmany
572c609c0a msm_11ad: Add proper NULL check
Failure of memory allocation for context was
not properly checked. Added proper check against
valid context value in relevant locations.

Change-Id: Ia74ddfb3c54e2781957e695a831c30f1356fed08
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:50 -07:00
Hamad Kadmany
9ba9a18604 msm_11ad: Add 11ad platform driver
Platform driver used to handle msm specific platform
requirement for 11ad chipset connected to msm platform

Takes care of platform support like:
- power switch through dedicated GPIO
- bus frequency voting
- SMMU attachment

Change-Id: I09c54ea747a5b4e0688b1b7d96e83ef134bb4215
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
[merez@codeaurora.org: fix merge conflicts]
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:49 -07:00
Hamad Kadmany
28a5c53fcb wil6210: use msm_11ad for platform operations
wil6210 11ad driver hook to platform specific
driver so that platform specific operations of msm
are properly executed.

Need to reorder init sequence to run wil_platform_init
before pci_enable_device. Assumption is platform init
may be required before device may be enabled, for example,
to turn on platform power for 11ad chip and run
PCIe enumeration.

platform uninit should be called after
pci_disable_device because platform uninit may render
pci device non-accessible.

Change-Id: Id36d20c2dcbf8704b1c4aec9e962117960c2eefe
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
[merez@codeaurora.org: fixed merge conflicts]
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:49 -07:00
Hamad Kadmany
7602152806 wil6210: Add IOMMU support for MSM targets
Initialize IOMMU if target supports it.

Change-Id: Ice8d7d1e2fb3db5b3f96131945c628529172cbe4
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:48 -07:00
Vladimir Kondratiev
4fc6b9520f wil6210: platform specific module
New module (wil_platform) for handling platform specific tasks

Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
[merez@codeaurora.org: fixed merge conflicts and change to ARCH_QCOM]
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:57:47 -07:00
Zhen Kong
722093b86a defconfig: arm64: msm: Enable qcom msm crypto driver
This is necessary to support qcom msm crypto functionality.

Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2016-03-23 19:57:46 -07:00
Zhen Kong
97a7e8fcc4 crypto: msm: disable aead alg related apis temporarily
Just temporarily disable aead alg related apis for 4.4 upgrade.
4.4 upstream cryto driver has a lot of changes on aead related APIS
and data structures, and hw crypto driver can not be compiled on 4.4.

Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2016-03-23 19:57:45 -07:00
Yue Ma
1db07b7a79 defconfig: msm: Enable WLAN related flags
Add the flags which are required to enable WLAN.

Signed-off-by: Yue Ma <yuem@codeaurora.org>
2016-03-23 19:57:44 -07:00