net: wireless: bcmdhd: Changed sync mechanism for batch get

1. Changed sync mechanism for batch scan results get
   because of a race condition with wait_for_completion
2. Misc fixes for running legacy PNO ssid scan with gscan

Bug: 17071068 Deadlock on rtnl_lock

Change-Id: Ia17590ef4f3df643868ae462fb55146c2ab93a5f
Signed-off-by: Ashwin <ashwin.bhat@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net: wireless: bcmdhd: Fix CUSTOM_COUNTRY_CODE option

Change-Id: I94f84f2ebc8da9aae5f3bdaac3240f7250fce95a
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net: wireless: bcmdhd: Add ability to pass flags to get_country_code

Change-Id: Ifff040c88c2e268cf67293b51c5bcda1c5b15910
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net: wireless: bcmdhd: changed SAR control

Modified SAR callback function to allow dynamically control max TX power
for SAR reasons and for optimal RF performance of WLAN.

Change-Id: I7dcce16c5a9b361681aff132fed1ebf41b29edcb
Signed-off-by: Andrey Gostev <fga022c@motorola.com>
net: wireless: bcmdhd DHCP frame with lowest rates

17214104 DHCP frames are not using lowest rates
Signed-off-by: Ecco park <eccopark@broadcom.com>

Change-Id: If8d1436586c7e2d9fa2a4621e775c95deb0069e7
net: wireless: bcmdhd set random mac for SOFTAP

17373032 SoftAp has constant MAC that is not changed between reboots

Change-Id: I3cd0283175e47391e5def68cf1c6cc375b777163
Signed-off-by: Ecco park <eccopark@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net: wireless: bcmdhd: Ignore obsolete SAR update

Change-Id: I43fcafc94912035f3c4cfbb7b0689a5d9d9f9de7
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net: wireless: bcmdhd: Fix NODFS flag processing

We need to force country update in case of NODFS flag change
regardless if country name itself stays the same.

b/17167178

Change-Id: I9aff7523caf65122548257c84560f4ea199e2ad5
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net: wireless: bcmdhd: NULL checking for SOFTAP

b/17319743 Wifi AP stopped working then panicked

Change-Id: Id7c009c9a2d9b2dae0e67c4f7b73d3f424fb5c5e
Signed-off-by: Ritter Yeh <ryeh@broadcom.com>
net: wireless: bcmdhd: Start with NODFS flag ON

b/17166655

Change-Id: I5c7133d1ee7e7c74bfe228eaad8b0af44f74e3c2
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net: wireless: bcmdhd clears up flowrings when roaming completed

1) flowring doesn't clean up when dut roaming.
2) If user do roaming continuously, flowring created continuously,
   previous flowring remained until legacy connection disconnected.
3) 17441235 Driver prints not-associated errors when it is not asociated
Signed-off-by: Ecco park <eccopark@broadcom.com>

Change-Id: I471e042951498e814c08f20a8f85bccd2a64555e
Signed-off-by: Iliyan Malchev <malchev@google.com>
net: wireless: bcmdhd: Reduce scan dwell time only in power-save mode

b/17411001

Change-Id: Ia1d34303089e491116b027d2e310de4c4dec9482
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net: wireless : bcmdhd use dedicated wake queue for D3 ACK

So here is a corner case that could possibly happen:
1) Host send D3 request and wait for D3 ACK
2) An ioctl is sent to dongle and host is waiting for ioctl response
3) D3 ACK comes back and interrupt handler sends out wake up event
4) dhdmsgbuf_cmplt will wake up, copy out whatever in the response buffer
  (which may have not been updated by dongle at this point),
  free the skb according to the pkt id stored in ioct_resp.cmn_hdr.request_id
5) Because the pktid is outdated,
  it could be currently used by wl events/ioctl response or even in data path
Signed-off-by: Ecco park <eccopark@broadcom.com>

Change-Id: I604744c83fa5fce4104ad63d15ecda8ec7a0ed3e
net: wireless: bcmdhd Remove misleading bcmdhd driver message

bug : 17436248
Signed-off-by: Ecco park <eccopark@broadcom.com>
net: wireless: bcmdhd: Reduce scan dwell time to reduce power

Scan dwell time is reduced for 40/80 to 20/40 (normal)
and 20/30 (power-save). Scan quality reduction is ~ 20%.

b/17485849

Change-Id: I00d6e5ef83df8b075b48736daaa6e814dd09054a
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net: wireless: bcmdhd: Allow vendor OUI customization for SoftAP

Change-Id: I103fead7e418830c69e5a586ccae3f1fdad90839
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net: wireless: bcmdhd: Fix country update on dhd_stop()

b/17657029

Change-Id: I55bc07501d71a823f153a61462f5c3ca363b2a3e
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>