wlan: Updating dwelltime in run time.

Added Driver command to get and set dwell time.
This will call appropriate driver ioctl to get and set dwell time.

Change-Id: I6ab55d25bfba2d8c37eff88715b867f9271be0cb
CRs-Fixed: 507132.
wlan: Make allocation dynamic instead of static array

Fix buffer overun issue due to static array allocation.
Dynamic allocation is done according to  IE length's to
resolve this issue.

Change-Id: I85d6cbb25c98786662874f22eee574e611e57c46
CRs-fixed: 457100
qcwcn: Properly indicate "channel list changed" event

Code exists such that when a "COUNTRY" command is executed, a "channel
list changed" event is supposed to be sent to the supplicant.  However
due to a logic error the event is not actually sent.  Modify the code
to properly detect when a "COUNTRY" command is successfully processed
so that the event is sent.  Also do the same for "SETCOUNTRYREV" and
"SETBAND" since these also result in a change in the channel list.

Change-Id: I85283a22f106171dd30f494e40a7a4e88631bb06
CRs-fixed: 482678
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
CRs-Fixed: 458741
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-service: Preseve old behavior as default

Set TARGET_USES_WCNSS_CTRL := true in Boardconfig to use
the new /dev/wcnss_ctrl and ini in system/etc/wifi

Change-Id: I9912ab03e71c8e0ed4dfd4296e5f12b465ae29d5