P2P: Fix for GO inviting a p2p device.

A p2p device on an invitation request from the peer invokes
p2p_peer command to know if the peer is a p2p device / GO.
Due to the cached entries there would be a possibility of
not getting the updated information, ending up in the wrong
negotiation with the invited peer. Thus do not rely on
p2p_peer command, rather assume that the peer is a GO on an
invitation request, provided there is no persistent network
configured.

CRs-Fixed: 486437.
Change-Id: Ifaeb6a8c5f9cddd7df96622056541e22aad74314
P2P: Change supplicant scan intervel during WFD session

During WFD session supplicant scan intervel is one minute. If
there are some saved profiles, then supplicant will issue a scan
for every one minute, this is causing some ping latency in WFD.
    Hence supplicant scan intervel should change to five minutes
to improve ping latency in WFD session only.

Change-Id: If827bab6f186ebeaac90f297935bc8b987eb4d09
CRs-Fixed: 669404
Wifi: Fix ap list issue while wifi turns on

Decrease the sleep time to resolve the synchronization issue
which happens between wpa_supplicant and Wifimonitor thread
when wifi turns on.

Change-Id: I4e2414301ace26a26351b6c1345e1ff6e7ab49a9
CRs-Fixed: 673012
wifi: update to blacklisting mechanism

Disable or Enable Auto Join for an Access Point blacklisted or
unblacklisted by WQE if wqe feature is enabled.

Change-Id: I6a655c9d0a6b21963c13f36e25ab7f74f98e97cc
CRs-Fixed: 728066
Regional: Customize wifi hotspot and wifi name

-Set WLAN hotspot's default security type to none.
-Customize hotspot ssid and pass.
-Customize wifi direct name for carrier.

Change-Id: If1613a8556908f372a70fbd859fa35e9315f9613
Merge "wifi: update to blacklisting mechanism"
Merge "Wifi: Fix ap list issue while wifi turns on"
Merge "P2P: Fix for GO inviting a p2p device."
Merge "P2P: Change supplicant scan intervel during WFD session"
Merge "Regional: Customize wifi hotspot and wifi name"
wlan: Honour regular scan in case Preferred Network Offload scan fails

In suspend mode STA fails to connect to an AP if preferred network
offload configuration is failed to configure the saved profile.

Framework sets a scan alarm if the PNO configuration fails. This
scan alarm apparently fails to issue a scan for mCurrentScanAlarmMs
set to 0 . Thus, set this parameter to mDisconnectedScanPeriodMs for
the cases when PNO trigger fails.

Change-Id: Iaa793642fe3c9dd307b199438368baa26a33bd61
CRs-Fixed: 753999
Wi-Fi : Abort setWifiEnabled if WifiController not ready

While executing setWifiEnabled, it send commands to WifiController.
If WifiController is not started by this time, StateMachine reports
crash which creates device reboot.
Thus, check if WiFiController is started before invoking any
command to the same. Indicate a failure in such an instance

CRs-Fixed: 742857

Change-Id: Ic40eb82522b67f7e606d4739c41da3b8ba2f3590
Merge "wlan: Honour regular scan in case Preferred Network Offload scan fails"
wifi: Do a periodic scan for a PNO failure only on non zero sta profiles

The current framework shall ensure to do a periodic scan for the case
where the configured profiles are 0 but does not address the case of
PNO trigger failure.Hence,do a periodic scan for a failure in PNO
trigger on non zero configured profiles.

Change-Id: I4f5ce511baf0ae8695c52adf63bce13e7790117e
CRs-Fixed: 756529
Merge "wifi: Do a periodic scan for a PNO failure only on non zero sta profiles"
Merge "Wi-Fi : Abort setWifiEnabled if WifiController not ready"
Wifi: Get the network mask info

Get the network mask info in the function getDhcpInfo().

Change-Id: I218827501a382a28c860875587243d9509d67a60
CRs-Fixed: 750982
Wifi:Fix issue in connection in WPS mode when STA_AUTOCONNECT is disabled

Autojoin is enabled in framework by default and this disables
connection retry feature in supplicant. For WPS failure cases
framework needs to retry connection.
This change is for framework handling connection retry logic in case
of WPS Connection failures with reason code other than 3.
Reason code 3 is generated by supplicant and in that case framework ignores
retry.

Change-Id: I5d59b578aac339f4018c93c5e0f11ef45203d056
CRs-Fixed: 759641
Wifi: Reduce auto join scans when p2p is connected

When p2p is connected, change alarm source originated scan interval
to 5 minutes. Add below configuration parameter in autojoinconfig.txt
file to modify this scan interval:
AUTO_JOIN_SCAN_INTERVAL_WHEN_P2P_CONNECTED:   <milliseconds>

Change-Id: I8e8eb635981129d43cca88db6392c9a2b1e25a10
CRs-Fixed: 758935
Merge "Wifi: Get the network mask info"