msm: ultrasound: add support for aDSP Sub-System Restart

Add handling of RESET_EVENTS message from APR, which indicates
aDSP sub-system restart has begun.

Add a new internal state, USF_ADSP_RESTART_STATE, for this
scenario.

Change-Id: Ic1178f8fb4e659abc29947fac4079ba088e51447
Signed-off-by: Lior Barenboim <liorb@codeaurora.org>
msm-camera: Dividing unified buffer in proportion to the image size

Write masters writing large images require large latency buffers in
unified buffer whereas write masters writing smaller images don't,
Allocating latency buffer in proportion to image size will reduce
buf overflows

Change-Id: I54d3b4389eb616b9684d5b62caaed029c83299ab
Signed-off-by: Mohit Setia <msetia@codeaurora.org>
msm-camera: Support to capture MIPI RAW and JPEG Simulataneously

Adding Support to capture MIPI RAW,Embedded data
and JPEG Simultaneously

Change-Id: I82fdc40045eb34a7ed51e8c41068d006c76eb2e4
Signed-off-by: Chandan Gera <cgera@codeaurora.org>
msm:rpm-log: add the mutex to protect read opertion

This commit will protect rpm log read operation. Then multithread
read the same rpm log buffer will not corruption.

CRs-Fixed: 646485
Change-Id: I0af7d8b3025d036cfa8927c2e37ef865075ff312
Signed-off-by: Pan Fang <fangpan@codeaurora.org>
msm: camera: Add framedrop configuration for raw intf

Add framedrop support to Raw data interface in isp32
driver.

Conflicts:

	drivers/media/platform/msm/camera_v2/isp/msm_isp32.c

Change-Id: I15f6d1e62584e8e42320bd196128aeac394bd0ab
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>
Signed-off-by: Sivasri Kumar Vanka <sivasri@codeaurora.org>
ASoC: msm: fix the target crash due to the NULL pointer dereference

During the close of the FE, the mclk is disabled which accesses the
codec drv data.
In case if the tapan codec was not initialized, then close sequence
will result in the null pointer dereference.
Fix by adding a null check before accessing the codec data structure.

CRs-Fixed: 635065
Change-Id: I0678826d073a69b99a05a5b628920be89d210519
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
cfg80211: fix possible circular lock on reg_regdb_search()

When call_crda() is called we kick off a witch hunt search
for the same regulatory domain on our internal regulatory
database and that work gets kicked off on a workqueue, this
is done while the cfg80211_mutex is held. If that workqueue
kicks off it will first lock reg_regdb_search_mutex and
later cfg80211_mutex but to ensure two CPUs will not contend
against cfg80211_mutex the right thing to do is to have the
reg_regdb_search() wait until the cfg80211_mutex is let go.

Change-Id: I244196da32809e1d67ee2ca0ada88f030b933fb5
CRs-Fixed: 655287
Signed-off-by: Santhosh Kumar Padma <skpadma@codeaurora.org>
msm: camera: Avoid memory corruption by changing order of enum

SET_POSITION is added above MOVE_FOCUS which makes kernel prone to
memory corruption as MOVE_FOCUS enum is changed. when CFG_POSITION
is not present and userspace calls MOVE_FOCUS kernel misinterprets
MOVE_FOCUS as SET_POSITION and thus copies user structure to wrong
structure and makes memory to corrupt.

Change-Id: I335ee28d9af6ec25b00262d71701e503a06e21c5
Signed-off-by: Lokesh Kumar Aakulu <lkumar@codeaurora.org>
qseecom: update cumulative_mode and timer properly.

qseecom.cumulative_mode is used to track the cummulative bus request
mode from all concurrent running clients. It is registered before
send_cmd operation, but is not un-registered after it is complete.
This may cause the bus bandwidth is restored to a wrong mode after
resuming from sleep. Thus, we make change to update it accordingly.
qseecom.current_mode is also updated in suspend/resume function to
ensure timer can scale down bus bw after resume when cumulative_mode
is non-zero. Besides, timer operation is optimized in case there are
multiple unserialized concurrent users of the same timer.

Change-Id: I06043d2b88a47e24da03460fe1ae26a94cb6a608
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
mmc: sdhci-msm: Correct usage of readl_poll_timeout() API

The intention of sdhci_msm_probe() was to wait up to 1ms for
CORE_SW_RST to be set, but only a 10us timeout was passed to
readl_poll_timeout().

Correct the timeout value to be 1ms, and decrease the sleep
time between read attempts to only 10us so that it's less
than the expected wait time of 40us.

Change-Id: I7007a68232bfba76409e2dbae3060622fa5c1913
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
ASoC: dapm: fix race condition in dapm

Dirty widget list can be accessed by multiple paths
in dapm framework. Dirty list is protected by dapm mutex.
Since dapm_set_pin and dapm_force_enable_pin function
accesses the dirty list, protect it using the dapm mutex.

CRs-Fixed: 637323
Change-Id: I8c265072083e142c0858b6cc7a983d07e7d75af0
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
msm: display: reduce display commit prepare waiting time

Unblock overlay_set, prepare and buffer sync ioctls when
commit thread finishes hardware programming.
Use wait_for_kickoff nstead of pan_idle for these ioctls.

Change-Id: Iefb6cbc390d2130926fdcb93688b4d92bfb26937
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Neti Ravi Kumar <ravineti@codeaurora.org>
CRs-Fixed: 647081
Merge "ASoC: msm: fix the target crash due to the NULL pointer dereference"
Merge "qseecom: update cumulative_mode and timer properly."
cfg80211: Add support for QoS mapping

This allows QoS mapping from external networks to be implemented as
defined in IEEE Std 802.11-2012, 10.24.9. APs can use this to advertise
DSCP ranges and exceptions for mapping frames to a specific UP over
Wi-Fi.

The payload of the QoS Map Set element (IEEE Std 802.11-2012, 8.4.2.97)
is sent to the driver through the new NL80211_ATTR_QOS_MAP attribute to
configure the local behavior either on the AP (based on local
configuration) or on a station (based on information received from the
AP).

CRs-fixed: 650927
Change-Id: I72ab05c7aa98528b05f6278df192cc25358c2666
Signed-off-by: Kyeyoon Park <kyeyoonp@qca.qualcomm.com>
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: fa9ffc745610f31c6bc136d5a6a1782e00870e72
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
[ppotte@codeaurora.org: manually solved merge conflicts]
Signed-off-by: Pradeep Reddy POTTETI <ppotte@codeaurora.org>
cfg80211: Allow BSS hint to be provided for connect

This clarifies the expected driver behavior on the older
NL80211_ATTR_MAC and NL80211_ATTR_WIPHY_FREQ attributes and adds a new
set of similar attributes with _HINT postfix to enable use of a
recommendation of the initial BSS to choose. This can be helpful for
some drivers that can avoid an additional full scan on connection
request if the information is provided to them (user space tools like
wpa_supplicant already has that information available based on earlier
scans).

In addition, this can be used to get more expected behavior for cases
where a specific BSS should be picked first based on operations like
Interworking network selection or WPS. These cases were already easily
addressed with drivers that leave BSS selection to user space, but there
was no convenient way to do this with drivers that take care of BSS
selection internally without using the NL80211_ATTR_MAC which is not
really desired since it is needed for other purposes to force the
association to remain with the same BSS.

CRs-Fixed: 650927
Change-Id: I882d4b94b90f270907df0e53c360d69f3c984fb8
Signed-off-by: Jouni Malinen <j@w1.fi>
[add const, fix policy]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: 1df4a51082df6e5b0b8eb70df81885b9b4c9e6ec
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
Signed-off-by: Pradeep Reddy POTTETI <ppotte@codeaurora.org>
cfg80211: Advertise maximum associated STAs in AP mode

This allows drivers to advertise the maximum number of associated
stations they support in AP mode (including P2P GO). User space
applications can use this for cleaner way of handling the limit (e.g.,
hostapd rejecting IEEE 802.11 authentication without manual
configuration of the limit) or to figure out what type of use cases can
be executed with multiple devices before trying and failing.

CRs-Fixed: 650927
Change-Id: I73a078800d8da28c9699cc02e7d4142691107811
Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: b43504cf75b8b8773ee70c90bcd691282e151b9a
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
[ppotte@codeaurora.org: manually solved merge conflicts]
Signed-off-by: Pradeep Reddy POTTETI <ppotte@codeaurora.org>
cfg80211: Pass TDLS peer capability information in tdls_mgmt

While framing the TDLS Setup Confirmation frame, the driver needs to
know if the TDLS peer is VHT/HT/WMM capable and thus shall construct
the VHT/HT operation / WMM parameter elements accordingly. Supplicant
determines if the TDLS peer is VHT/HT/WMM capable based on the
presence of the respective IEs in the received TDLS Setup Response frame.

The host driver should not need to parse the received TDLS Response
frame and thus, should be able to rely on the supplicant to indicate
the capability of the peer through additional flags while transmitting
the TDLS Setup Confirmation frame through tdls_mgmt operations.

CRs-Fixed: 650927
Change-Id: I6e37ff671aa39b27cd22fa8af0b6a1a3b33a64db
[ppotte@codeaurora.org: manually solved merge conflicts]
Signed-off-by: Pradeep Reddy POTTETI <ppotte@codeaurora.org>
Merge "msm-camera: Dividing unified buffer in proportion to the image size"
Merge "msm-camera: Support to capture MIPI RAW and JPEG Simulataneously"