wlan: Add WCNSS service daemon

The primary job of this daemon is to collect the calibrated data
recieved from WCNSS FW thru platform driver; and save it to a file.
And pass this stored calibrated data to firmware, when the device
boots next time.

WCNSS Firmware needs raw NV data (settings & some register values),
to do the power-on calibration. Once firmware does the power-on
calibration; it can then re-use the calibrated data. And it need
not do the calibration again in the next time it boots.

So WCNSS will send this calibrated data to Apps; and this service
should save this into a persistent area. And in the further bootup,
this service will send the calibrated data to WCNSS

Change-Id: I9497595036d580f1fffc2a99d419123d542d950a
wcnss: Ignore calibrated data during factory testing

Optional feature to force WCNSS power-on calibration. This is required
for factory testing

Change-Id: I8d5823efb35d03a0568fe17b0bbbf5bbf6c88861
CRs-Fixed: 518702
wcnss: Add support to copy WLAN config file

Copy WLAN config files to data partition at first bootup, this copy is
also done after a factory reset or after an OTA update.  This change also
adds support to plumb certain WCNSS module parameters

Change-Id: I738e4adec9066b82b499885dbea1801902f78f0b
CRs-Fixed: 516009
wcnss: set property of wlan.driver.ath to 0

The ability to run shell scripts as a service is removed and thus
only essential functionality from the init.qcom.wifi.sh is set in
wcnss-service. The wlan.driver.ath property needs to be set for
LOWI module to work

Change-Id: I6ccec41d1fd80fc0cefb7e6feb9528a7a702efbb
CRs-Fixed: 584329
wlan: Use wcnss driver's control interface

Setup the parameters required by wcnss driver thru the control
interface; serial number (for MAC address auto-generation), calibrated data
availability etc. are some of the parameters configured thru this
interface.  These parameters were earlier written thru module parameters,
however that required the wcnss service daemon to have the root permission

CRs-Fixed: 590457
Change-Id: Ia655ad142c95d542da1ef6b555c13351d6cba5f2
wcnss: Set the property of wlan.driver.ath in correct location

The property of wlan.driver.ath should be set before reading calibrated
data, since if reading calibrated date is stuck, there is no chance to
set the property

Change-Id: I2bed1b1013f57229bef10822945fefc36f51a33c
CRs-Fixed: 584329
wcnss_service: Added support to read wlan mac from Modem NV

Added support to read wlan mac from Modem NV using QMI interface.

Change-Id: Iff732338cad57767e856209d70cf3af6fb0a8a56
CRs-Fixed: 583465
wcnss: Write WLAN Mac addr through Ctrl interfafe

wcnss userspace service will use user control interface to
configure certain parameters required by wcnss driver. write
WLAN Mac addr through Ctrl interfafe

Change-Id: I08abf1f1531e492611b8544a3eec76deb8105703
CRs-fixed: 636970
wcnss: Enable wcnss compilation for 64 bit

Adding support for compilation of wcnss for both
32 and 64 bit arm architecture

Change-Id: I2783134f9363b259b359b24cd3c0f83524bc4089
wcnss-service: Additional guard on QMI support

Change-Id: Ib03062ec7713f93b208dcd0650921e713abe169f
wcnss-service: Additional format support

Change-Id: I4e5fea21135f7dd609b8cc0b1577265d29f58f71
wcnss: Build and dlopen wcnss_qmi_client as a shared library

* Allows us to decouple QMI from wcnss_service for those devices that
  rely on QMI features for wcnss.

Change-Id: I30a1f9a8760dcd19761d473cedb2104b7b33069c
wcnss_qmi: Generate a fixed random mac address if the NV doesn't provide one

If the NV is corrupted or blanked out, QMI won't return a MAC address
and prima will fallback to a fixed one. If the board defines a
TARGET_WCNSS_MAC_PREFIX value (2 to 4 hex values), use that prefix
to generate a random (and persistent) hwaddr instead.

For "TARGET_WCNSS_MAC_PREFIX := 0a0b0c0d", the last 2 bytes will be
pseudo-randomized, and the final address will be in the
"0a:0b:0c:0d:XX:YY" format.

Change-Id: Ie38cb5d3724223b2ec1ae45e6a9a4f2285229731