msm: kgsl: Fix mem leak when page allocation fails

Page allocation may fail during OOM condition. Update
sglen and size to correct value (allocated) so that
they get freed in kgsl_sharedmem_free().

Change-Id: I1aa0ca77bb767523dfcf0f6cc3a21eac2b6b80e4
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
msm: qdsp6v2: memset stack buffer allocation.

This is needed to avoid garbage data in uninitialized variables.

Change-Id: Id5921e369055d846b990380be6355ad464518a10
CRs-Fixed: 554301
Signed-off-by: Yeleswarapu, Nagaradhesh <nagaradh@codeaurora.org>
Signed-off-by: Mohammad Johny Shaik <mjshai@codeaurora.org>
Flash LED tps61310: use alloc_workqueue() instead of create_workqueue()

MSM8930 uses tps61310 in which work_queue was getting created
each time flash is turned ON. So using alloc_workqueue().

CRs-Fixed: 597864
Change-Id: I6e487cf4d17e66c22aed588f3ba55d32e41b21a2
Signed-off-by: Vijaya Kumar T M <vtmuni@codeaurora.org>
Merge "Merge "wlan:Revision 3.2.7.24""
Merge "Merge "msm: bam_dmux: Fix race condition during SSR""
radio: iris: Fixed an issue with search stations list.

RDS search, search station list were getting excluded
while checking bounds for allowed search types. Fixed
check to include them.

CRs-fixed: 597996
Change-Id: Ia2d7cc8a1bbf8e861a0e23dfc8ca56181b42b810
Signed-off-by: Satish Kodishala <skodisha@codeaurora.org>
Merge "Merge "Merge "wlan:Revision 3.2.7.24"""
Merge "Merge "Merge "msm: bam_dmux: Fix race condition during SSR"""
Configure flag to debug remain on channel issues.

Add flag to configuration file to debug remain on
channel. This flag is used to send marker frames
at start and end of remain on channel.

Change-Id: I9106e6240b706aa9c57910e0afe83c7082af00f7
CRs-Fixed: 594906
diag: Reduce error message frequency

Some diag error messages are printed with high frequency. This
cause flooding of kernel logs. Rate limiting these messages will
help reading kernel logs.

Change-Id: I477ff2394116603a27d65948a60d3460c32572d1
CRs-fixed: 594186
Signed-off-by: Katish Paran <kparan@codeaurora.org>
wlan: Disable NSOffload on all slots during resume.

NSOffload is enabled on per slot basis for each IPv6 addresses
during suspend. During resume slot index 0 was the only slot
being disabled, which leaves other slot index still active in the
firmware. This use to filter out MC packets being received to the
host even when host is active/out of suspend.

To overcome this, NSOffload is being disabled on all slots during
resume.

Change-Id: I821bf2f93cfacef5b0bddef01b4014178e3abe4e
CRs-Fixed: 579662
wlan: Enable uapsd parameter by default.

SAP does not have uapsd(gEnableApUapsd) enabled by
default. So, default value of gEnableApUapsd is
modified to 1.

Change-Id: I93a77e8c146013c3b970e1ce51ea21d50e54e937
CRs-Fixed: 586136
wlan: Increase the maximum number of tspec's supported

According to WMMAC WFA cert 5.2.3 test case 24 ADDTS requests needs
to send by the STA-DUT with UAPSD enable/disable having different
TID/UP traffic which requries support to maintain 14 unique
Add Tspec entries.In our present implementaion we support only 4
unique entries.So,increased number of unique entries from 4 to 15.

CRs-Fixed: 594528
Change-Id: Ie5ff11415d6d1271f703150db89720838041f394
wlan: Issue explicit SSR when the chip does not respond to FIQ

On detecting certain error conditions DXE will try to restart
the WCN susbsystem by sending an FIQ to the WCN chip so that
it restarts but if the chip is in bad state it wont handle the
FIQ, in such a case we should issue an explicit SSR which will
restart the WCN subsystem.

Change-Id: Iaaf33a78d304485d7699f3cdc560d39e3f0c21e1
CRs-Fixed: 596762
msm: ipc: Possible memory corruption due to Sign Conversion

msm_ipc_router_skb_to_buf() takes an unsigned argument and assigns the
same to a signed local variable. This might cause issues when the value
of the argument is too high.

Change the datatype of the local variable to unsigned.

CRs-Fixed: 550606
Change-Id: I257a095681dd82fba05367fd6faf25820e95c719
Signed-off-by: Zaheerulla Meer <zmeer@codeaurora.org>
Fix for wifi can not connect networks after wake up

when used shared key auth with the AP which is not configured
properly DUT is stuck in bad state.this commit helps recover
the issue

Change-Id: I263f0365df5a7c7e683d458e79cfc92993e4b5b9
CRs-fixed: 582802
P2P: Send P2P Marker Frame on air to debug ROC issues.

Debug Marker frames are sent over air at start and end of remain on
channel. These marker frames helps in debugging scan and connection
issues by indicating DUT remained on channel or not.

Data in vendor specific information element indicates the start and
end of DUT's remain on channel. The data contains channel number,
duration and sequence number. Two sets of Marker frames are sent on
each start and end of remain on channel to make sure any of these
frames are captured in the sniffer.

Example:-
If DUT starts remain on channel on channel 6 for duration 200ms and
sequence number of debug marker frame is 15 then the contents of
vendor specific information element and sequence of marker frames
are as below,
START-REMAIN-ON-CHANNEL1-CHN=6-FOR-DUR=200-SEQ=15
START-REMAIN-ON-CHANNEL2-CHN=6-FOR-DUR=200-SEQ=15

And at end of remain on channel message will be as
CANCEL-REMAIN-ON-CHANNEL1-SEQ=15
CANCEL-REMAIN-ON-CHANNEL2-SEQ=15

Change-Id: I4f6e62c90d36ba2897038d4960e0652dad88e21a
CRs-Fixed: 594906
msm: kgsl: Change an overflow check to be "smart" compiler proof

In its infinite wisdom, GCC will optimize out this overflow check:

   if ((gpuaddr + size) < gpuaddr)

Which might totally make sense for the compiler but it doesn't do us
a bit of good. Replace the existing overflow check with something
that GCC can't ignore.

CRs-fixed: 544025
Change-Id: Ic0dedbad921545a01d5fe80a20c3f2f4f86ef641
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Bluetooth: Replace sprintf with snprintf

Change will replace sprintf with snprintf, since sprintf is a
banned function.

CRs-FIxed: 548220
Change-Id: I32f5ab1f3707e5bbe43c31a7ad4611b67557b267
Signed-off-by: Juffin Alex Varghese <jalex@codeaurora.org>
msm: kgsl: Fix overflow check in mmap_range_valid

A eager compiler might optimize out the overflow check in
mmap_range_valid.  Add a check against ULONG_MAX to ensure
that the check is performed.

CRs-fixed: 546373
Change-Id: Ic0dedbad478cc3bd65a00a7b31d2039095c005d6
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>