radio-iris: Fix bug in the AF_LIST event handling

- Bug in the AF_LIST event handling, there copying af_list bytes,
  but it should be (af_list * 4).

Change-Id: I13b2535347e1030945d78d506c656279f311fb90
CRs-Fixed: 476076
Signed-off-by: Venkateshwarlu Domakonda <Venkateshwarlu@codeaurora.org>
radio-iris: Return hardware capabilities

- Radio iris isn't properly advertising its hardware capabilities to
  userspace which makes it look like radio is unsupported.
  Fix this so that userspace sees that radio is in fact supported
- Upadate the hardware capabilities while returning response to query
  device capabilities.

CRs-fixed: 512171
Change-Id: I52d6479cfc1e974735be5f835a0d564fb6d5c1d4
Signed-off-by: Venkateshwarlu Domakonda <Venkateshwarlu@codeaurora.org>
radio: iris: Use proper condition to queue stereo/mono event

Upper layer does not receive any audio output mode when fm is
tuned to a station after FM is turned on.Use proper condition
to queue stereo/mono event.

Change-Id: I7e0ac57a93c4ea30b92b08ce476ba553401ecd22
CRs-Fixed: 525975
Signed-off-by: Ayaz Ahmad <aahmad@codeaurora.org>
radio: iris: Avoid NULL pointer dereferencing

Before dereferencing a pointer check for NULL
pointer.

CRs-Fixed: 537890
Signed-off-by: Ayaz Ahmad <aahmad@codeaurora.org>
Change-Id: If010b89fd4f5930d944c9e327c51de4b40f33c3c
cfg80211: add flags to define country IE processing rules

802.11 cards may have different country IE parsing behavioural
preferences and vendors may want to support these. These preferences
were managed by the WIPHY_FLAG_CUSTOM_REGULATORY and the
WIPHY_FLAG_STRICT_REGULATORY flags and their combination.
Instead of using this existing notation, split out the country IE
behavioural preferences to a new flag. This will allow us to add more
customizations easily and make the code more maintainable. Also add
a new flag to disable country IE hints issued by the CORE as the
first customization.

Change-Id: I66ba4a92ac0f029a115eea0a274b02db11279787
CRs-Fixed: 542802
Signed-off-by: Mihir Shete <smihir@codeaurora.org>

Conflicts:
	net/wireless/reg.c
qseecom: Fix error handling path in receive_req()

This patch fixes the error handling path in receive_req() function
called from userspace. Issue seen if user is calling the receive_req
function without calling the listener registration. qseecom_find_svc()
should return NULL if there are no services found.

Change-Id: Id51d8f48d7266b5acbc845f7b9ac0068d16b1ede
CRs-fixed: 496927
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
qseecom: Fix QSEECOM_IOCTL_UNLOAD_EXTERNAL_ELF_REQ kernel crash

Fixes the kernel crash occuring with IOCTL_UNLOAD_EXTERNAL_ELF_REQ
ioctl by adding unavailable client type to qseecom_client_handle_type
enum, which is required in the driver during qseecom_release().

Change-Id: I73b817255149ffc4a808852feb2954a0ba3c317f
CRs-fixed: 508253
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
qseecom: Fix issues with qssecom_remove/exit APIs

Clean-up the qseecom_remove() function by removing the null pointer
dereference. Change the logic by removing the unnecessary code and
also modified the qseecom_exit() function with proper calls.

Change-Id: Ibcca1b3c2c37024661505de2550e202b507703aa
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
crypto: msm: Fix issues related to non-zero byteoffset input

Fix buffer overflow for a non-zero byteoffset value.

Also fixes memory leak issue by adding data_len check in check_params.
One of the scenarios data_len can be less than byteoffset which results
in memory leak with huge data length, which might cause the kernel panic.

Change-Id: I3f773673219f45dad4f17499b1ee0feda2aff1f7
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
crypto: msm: Fix null pointer exception in qcrypto_count_sg()

Fixes null pointer exception in count scatter gather function. Scatter
gather list pointer become NULL if the sg pointer reaches last but one
node, which results in NULL pointer exception.

Change-Id: I634baf30074e6e53ffa22635565da54e9ae43150
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
crypto: msm: Use scnprintf() instead of snprintf()

snprintf can return more than the size of buffer, which is not
expected here, obviously. Use scnprintf instead.

Change-Id: I3b97a016df910728dfef5a0914ab8ad67c68e39c
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>