mac80211: VHT (11ac) association

Insert VHT IEs into association frames to allow
mac80211 to connect as a VHT client.

Change-Id: Ifc54bdbe49be3d8b499a764107b30cf3136adf9f
CRs-fixed: 452921

Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
ieee80211: Rename VHT cap struct

Rename struct ieee80211_vht_capabilities to ieee80211_vht_cap
and renamed its member vht_capabilities_info to vht_cap_info.

Change-Id: I2cfee9b9fa558a9c742d6f8a3827c21d443e9156
CRs-fixed: 452921

Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
{nl,cfg}80211: Peer STA VHT caps

To save STAs VHT caps in AP mode

Change-Id: I1930ec05a3e079733c00837c93bda615289fceda
CRs-fixed: 452921

Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
cfg80211: Pass station (extended) capability info to kernel

The information of the peer's capabilities and extended capabilities are
required for the driver to perform TDLS Peer UAPSD operations and off
channel operations. This information of the peer is passed from user space
using NL80211_CMD_SET_STATION command. This commit enhances
the function nl80211_set_station to pass the capability information of
the peer to the driver.

Similarly, there may be need for capability information for other modes,
so allow this to be provided with both add_station and change_station.

Change-Id: I1e626512a0f849ae05bbbd24c4e262d303b8f8ea
CRs-fixed: 452921

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
cfg80211: Pass TDLS peer's QoS/HT/VHT information during set_station

The information of the peer's capabilities is required for the driver
to perform TDLS Peer UAPSD operations. This information of the peer is
passed by the supplicant using NL80211_CMD_SET_STATION command. This
commit enhances the function nl80211_set_station to pass this
information of the peer to the driver in case this command is used
with the TDLS peer STA.

In addition, make the HT/VHT capability configuration handled more
consistently for other STA cases (reject both instead of just HT).

Change-Id: I08635df14f49711b04dfdad0daf8f874a340b5b7
CRs-fixed: 452921

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
cfg80211: fix station change if TDLS isn't supported

Larry noticed (and bisected) that commit df881293c6ba9a12868491a717b25
"cfg80211: Pass TDLS peer's QoS/HT/VHT information during set_station"
broke secure connections. This is is the case only for drivers that
don't support TDLS, where any kind of change, even just the change of
authorized flag that is required for normal operation, was rejected
now. To fix this, remove the checks. I have some patches that will add
proper verification for all the different cases later.

Change-Id: Ieaf0f8a8ab922d42bccdb4957c55b8c3d9463a3f
CRs-fixed: 452921

Cc: Jouni Malinen <j@w1.fi>
Bisected-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
qup_i2c: Avoid potential panic issue

I2c register access is happening in isr before check
PM runtime status. This can lead to potential hang because of
unwanted interrupts and i2c clocks are off.

Update the i2c driver code to have register access
after PM runtime status check.

CRs-Fixed: 454710
Change-Id: I11a3d8df24c514205203f24be8e08d7c1ea1a7b8
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
mmc: msm_sdcc: optimize sampling clock tuning procedure

SDCC-Card tuning sequence comprises of 16 phases. When the
card is detected for the first time the entire tuning
sequence should be implemented to determine the optimum phase
and lock the DLL. However, if the card is transitioning out
of low power mode or when the clock frequency is changed
dynamically, there is no need to carry out tuning sequence
for all 16 phases. It is sufficient to try with the last
successful tuning phase first. This reduces the overhead
involved in executing the entire tuning operation.

In case if the last successful tuning phase has failed,
tuning for all phases needs to be carried out to figure
out optimum phase.

CRs-Fixed: 433495
Change-Id: I78ea074a9bdeb5686c96debfcde3490d50beaf09
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
msm_fb: display: Do clock control within mdp4_hw_init

Since mdp4_hw_init() access mdp registers, mdp clock control
within mdp4_hw_init() is necessary.

CRs-fixed: 455506
Change-Id: I768f468314fc920029b4c88e49ef6a74f6b74f58
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Bluetooth: GAP: Disconnect ACL immediately after Auth failure.

The patch fixes issue of ACL lingering for 2 seconds after
Authentication failure. Another Auth request during this
time results in improper connection reference and hence
resulting in ACL to persist forever if remote doesn't
disconnect.

Change-Id: Ief920af97d8f27e93460130dc86113b40dc5f6a5
Signed-off-by: Mallikarjuna GB <gbmalli@codeaurora.org>
cfg80211: enable TDLS on P2P client interfaces

There's no reason TDLS should be prevented on P2P client
interfaces, and most of the code already handles it, so
allow adding stations for it.

CRs-fixed: 458139
Change-Id: Id5bdde87aa6988731c91176cb5d54ffde975577c

Reported-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
ASoC: wcd9310: Update compander configuration sequence

Update compander configuration sequence for headphone path
to prevent the concurreny of ANC and compander in addition
to bypass the delay buffer for ANC and class G to avoid the
audio delay change between class G enabled and disable modes.

CRs-fixed: 456565
Change-Id: I561cb878906b9e31d8c1b04c145c533090f80f1f
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
ASoC: wcd9310: Update compander gain implementation

When compander is enabled, PA has no impact on the playback
path. In order to keep the output audio level consistently during
compander enabling and disabling so we have to apply the same
gain/attention in PA to digital gain to compensate the PA gain.

CRs-fixed: 456565
Change-Id: Idf760bac35b25aab419a23ce5803c68831850856
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
block: blk-core: add printk_ratelimit

On failure of requests the console is flooded with prints,
which result in a watchdog bark.
This patch limits the number of prints to console thus, avoiding
the bark.

CRs-Fixed: 458071
Change-Id: I614002cc1305ab7b5c6a64d278139291c1baa3c4
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
ASoC: wcd9304: Resend edge triggered GPIO IRQ

If MBHC GPIO IRQ for mechanical headset detection asserted while power
management's suspend call chain is being called, wcd9xxx_lock_sleep will
fail to wait for system's resume since power management interface has
to finish suspend in order to resume system.
In this case, interrupt cannot be handled as codec driver cannot
guarantee if underlying bus is awake.
Wake up system and resend the IRQ for this situation.

Change-Id: I8fb58ee6c3eb310e63dfc2e31f4055488d552d45
CRs-Fixed: 458899
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
msm: wfd: Map double the size of reconstruction buffer

The MFC core has a hardware bug which causes it to access memory beyond
what is given.  This commit adds a workaround by mapping double the
buffer size into IOMMU.

Change-Id: Ib20a44f140f6c34d3e85205afb1cd00ee74f263c
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
usb: gadget: serial: Limit write permissions to root

android compatibility test suite complains if others have write
permission. Hence, limit the file permissions to root.

Change-Id: I3f607b307b7ecb6c01180bc752681b02e6e54c7a
Signed-off-by: Vamsi Krishna <vskrishn@codeaurora.org>
mmc: card: abort the suspend if the card is busy

mmc_blk_suspend() is triggered when system is going into suspend which
then waits for the mmcqd thread (which processes active MMC transfer
requests) to complete all queued transfer requests but if mmcqd has
multiple requests to be processed at this point, mmc_blk_suspend() may
very well sleep for duration longer than DPM (Device Power Management)
timeout (currently 12 sec) causing the DPM timeout bug.

To fix this issue, mmc_blk_suspend() checks if there are any more pending
MMC requests in progress or not and if there are any, it returns error
which should abort the ongoing system suspend.

CRs-Fixed: 439192
Change-Id: Ic7ba2f013d10a1952c30ea2ed93f74b831fcc27d
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
mmc: msm_sdcc: fix the clock selection logic in DDR mode

MSM SDCC controller requires the internal clock frequency to set be
doubled when running in DDR (Dual Data Rate) mode and existing
clock selection logic used to work fine until the MMC clock scaling
functionality got added. With clock scaling now, clock (ios->clock)
might get scaled down from 50MHz to 25MHz during DDR mode operation
and existing clock frequency selection logic may not change the clock
frequency when we move back from 25MHz to 50MHz.

This patch fixes the above issue and also simplifies the clock frequency
selection logic in DDR mode.

CRs-Fixed: 458926
Change-Id: I60f9ae2d5a7f92031fb46d9b16676c74363e7b9f
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
mmc: msm_sdcc: fix data timeout calculation for DDR bus speed mode

When card operates in DDR (Double Data Rate) bus speed mode,
most of the HW logic of SDCC controller needs to have clock
frequency that is twice the clock frequency going out to card.
For example, if a card operates at 50MHz clock in DDR mode then
internally SDCC controller logic will operate at a clock of 100MHz.

But SDCC controller's data timeout logic works on the clock rate
that actually goes to card. So this change calculates the data
timeout value based on the clock frequency that goes to card rather
than SDCC controller's clock frequency.

CRs-Fixed: 450675
Change-Id: Icd8b648eae0ad4efad2598749bed7b0bd65c65c9
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Krishna Konda <kkonda@codeaurora.org>