power: don't wait for timeout if sys_sync completes early

In some cases the suspend thread is waiting for timer to expire
even if the sync workqueue is empty. So the suspend is taking extra
time.
To avoid this waiting, sending the completion event from
last sync item in workqueue.

CRs-Fixed: 583016

Change-Id: Ia3219e90762ec7f6ad3e7096126832acfd03ed69
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
msm: clock-rpm: Make rpm clocks sleeping clocks

Now that we have clk_prepare/unprepare we can make the RPM clocks
sleepable. This allows us to move the sometimes costly busy wait
that RPM clocks incur when enabling and disabling or changing
rates.

CRs-Fixed: 552223

Change-Id: I8ac53c0b7fc79e56051b19fedb6910ac3f1cda42
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Git-commit: b500badb5dc821dd92f93833003170cb9ae106b0
Git-repo: https://android.googlesource.com/kernel/msm/
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
cfg80211: pass station supported channel and oper class info

The information of the peer's supported channels and supported operating
classes are required for the driver to perform TDLS off channel
operations. This commit enhances the function nl80211_(new)set_station
to pass this information of the peer to the driver.

CRs-fixed: 595620
Change-Id: I1d630deb4cf435e7f72e3a59276d3771c2b03114
Signed-off-by: Naresh Jayaram <njayar@codeaurora.org>
nl80211: vendor command support

Add support for vendor-specific commands to nl80211. This is
intended to be used for really vendor-specific functionality
that can't be implemented in a generic fashion for any reason.
It's *NOT* intended to be used for any normal/generic feature
or any optimisations that could be implemented across drivers.
Currently, only vendor commands (with replies) are supported,
no dump operations or vendor-specific notifications.
Also add a function wdev_to_ieee80211_vif() to mac80211 which
is needed for mac80211-based drivers wanting to implement any
vendor commands.

Change-Id: If73cf90d152ca0888a563cf4ae685aad9cec6443
CRs-fixed: 576020
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: ad7e718c9b4f717823fd920a0103f7b0fb06183f
Git-repo: https://git.kernel.org/cgit/linux/kernel/git/linville/wireless-next.git
Signed-off-by: Leo Chang <leochang@codeaurora.org>
nl80211: support vendor-specific events

In addition to vendor-specific commands, also support vendor-specific
events. These must be registered with cfg80211 before they can be used.
They're also advertised in nl80211 in the wiphy information so that
userspace knows can be expected. The events themselves are sent on a
new multicast group called "vendor".

Change-Id: I184aaa9f9e8461aee572f7d0a35916cd668c2218
CRs-fixed: 576020
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: 567ffc3509b2d3f965a49a18631d3da7f9a96d4f
Git-repo: https://git.kernel.org/cgit/linux/kernel/git/linville/wireless-next.git
Signed-off-by: Leo Chang <leochang@codeaurora.org>
wlan: enahnce logic to obtain the country from country IEs

Sometimes the BSS from which country IE is used as the source
of deriving the regulatory data is not obtained in the current
scan. If the BSS is missed in the current scan the logic for
deriving country information will use the country IE from
any other BSS which was obtained in the scan results, this
results in frequent toggling of the country from which
regulatory data is obtained. This patchset handles such scenario
by caching the RSSI of the BSS from which the regulatory data
is derived and using it in the algorithm for determining the
regulatory domain.

Change-Id: Icffc2162575e8ca6ee0ceada01d35213a087a99f
CRs-Fixed: 604506
wlan: Change in default ini value of gMaxMediumTime.

This fix will change the default ini value of gMaxMediumTime
from 6000 to 5480 which is the right safe max value as
clarified by HW team for low throughput issues.

Change-Id: Ia9c4676a5e169b10c2ff385d24f67d8e03086c9e
CRs-Fixed:  575078
msm: kgsl: don't use sscanf()

Friends do not let friends use sscanf().

CRs-Fixed: 563605
Change-Id: Ic0dedbad56af5bbee4fc833701d8bc93b118efa9
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Ananta Kishore K <akollipa@codeaurora.org>
msm: vidc: No need to allocate metadata by default

If metadata is not enabled by client, there is no need
to enable it by default.

Change-Id: I6d5bd1c04dcdf78549afac57bcaceb82602da270
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
wlan: do not wait for WDA_HALDumpCmdReq() to complete

WDA_HALDumpCmdReq() does not return till it receives
a response from the firmware, so do not wait for it
to complete as it is a synchronous call.

Change-Id: I89743c58d2f82b7cae561c024349ca5be394649e
CRs-Fixed: 609232
wlan: reprogram skb data buffer if all the headroom is available

It has been seen that in certain scenarios the skb data buffer
is programmed in the the DMA engine in such a way that the skb
data buffer points to the skb tail pointer, in such cases the
dma engine will overwrite a memory region being referenced by
the skb tail pointer corrupting the memory. This can result in
various crashes, so before programming the DMA engine with data
buffere try to use the skb headroom when the error condition is
met, but if WLAN_BUG_ON_SKB_ERROR is defined panic the device
so that extra information can be obtained.

Change-Id: Ia76de4b572cf0198a8f3fa149ea72797d2096fcc
CRs-Fixed: 605122
Fix for IMPS Req sent to Firmware in connected state

Due to race condition between reception of Deauth frame from AP
and disconnect from Upper layer, driver sends IMPS Request
to firmware when firmware is in connected state.As a result
Firmware crashes.So when deauth req comes from upper layer
read the status of FW state and accordingly return the error
code so that SME does not issue IMPS request.

Change-Id: Ie2cbdb8021e0920b6778708946a9f3e1a92586b8
CRs-fixed: 604928
wlan: Switch to supported data rates after roaming

Whenever  the DUT is roaming from one AP to another,
it should automatically support the data rates and
bandwidth of the target AP.

Change-Id: I6beb99d42f6ea4dfd8eaa8ca77b8f8ffce099e28
CRs-Fixed: 579235
Merge "power: don't wait for timeout if sys_sync completes early"
Merge "msm: clock-rpm: Make rpm clocks sleeping clocks"
Merge "msm: kgsl: don't use sscanf()"
Merge "Fix for IMPS Req sent to Firmware in connected state"
Merge "wlan: reprogram skb data buffer if all the headroom is available"
Merge "wlan: Change in default ini value of gMaxMediumTime."
Merge "wlan: do not wait for WDA_HALDumpCmdReq() to complete"