HACK: quick extremely dirty hack to get rid of warning SPAM

This simply avoids getting a shitload of warnings like this when
running on OMAP:

[ 1568.144378] BUG: sleeping function called from invalid context at include/linux/freezer.h:46
[ 1568.144714] in_atomic(): 0, irqs_disabled(): 128, pid: 1615, name: ntpd
[ 1568.144714] INFO: lockdep is turned off.
[ 1568.144714] irq event stamp: 0
[ 1568.144714] hardirqs last  enabled at (0): [<  (null)>]   (null)
[ 1568.174133] hardirqs last disabled at (0): [<c00419c4>] copy_process+0x3ec/0x105c
[ 1568.174133] softirqs last  enabled at (0): [<c00419c4>] copy_process+0x3ec/0x105c
[ 1568.174133] softirqs last disabled at (0): [<  (null)>]   (null)
[ 1568.189880] [<c001e1e4>] (unwind_backtrace+0x0/0x148) from [<c0501afc>] (dump_stack+0x20/0x24)
[ 1568.205261] [<c0501afc>] (dump_stack+0x20/0x24) from [<c0077048>] (__might_sleep+0x130/0x134)
[ 1568.205261] [<c0077048>] (__might_sleep+0x130/0x134) from [<c0018998>] (do_signal+0x54/0x600)
[ 1568.223175] [<c0018998>] (do_signal+0x54/0x600) from [<c0018fa4>] (do_notify_resume+0x60/0x6c)
[ 1568.223175] [<c0018fa4>] (do_notify_resume+0x60/0x6c) from [<c00154e4>] (work_pending+0x24/0x28)

With this hack, it doesn't mean that your device will not crash to the
point of no return! Use it at your own risk.

Signed-off-by: Luciano Coelho <coelho@ti.com>
OMAP: wlan: Set the WLAN Regulator to be always on

For regulator omap4_clk32k used by wlan, set .constraints.always_on to 1.
This regulator should never be disabled.

Signed-off-by: Panduranga Mallireddy <panduranga_mallireddy@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Revert "regulator: twl: Remove references to 32kHz clock from DT bindings"

This reverts commit 0e8e5c34cf1a8beaaf0a6a05c053592693bf8cb4.
Revert "regulator: twl: Remove references to the twl4030 regulator"

This reverts commit e76ab829cc2d8b6350a3f01fffb208df4d7d8c1b.
Revert "regulator: twl: Remove another unused variable warning"

This reverts commit 029dd3cefa46ecdd879f9b4e2df3bdf4371cc22c.
mac80211: init sched_scan_ies

In case that there is an unsupported band, the ie will be
unallocated and the free will crash.

Cc: stable@vger.kernel.org
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
wlcore: print role_id on bss_info_changed

In multi-vif setup it's useful to know the role_id
being configured.

Signed-off-by: Eliad Peller <eliad@wizery.com>
wl12xx: update min fw version

There was some mess in the fw version numbering,
but the current fw version is 7.3.0.131, so fix it.

Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: don't leak wl->mbox

free it on wlcore_free_hw()

Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: start sta role on CHANGED_BSSID

Make the connection flow simpler by starting
sta role on bssid change.

Currently, we start dev role when going idle-off,
and start the sta role only after association
indication. This complicates the connection
flow with some possible intermediate states.

Make it simpler by starting sta role on bssid change,
which now happens *before* auth req get sent.

Update the handling of mac80211's notifications
and change wl1271_join/unjoin accordingly -
* Split wl1271_join() into wlcore_join (tuning on
  a channel/bssid) and wlcore_set_assoc (configure
  sta after association).
* Rename wl1271_unjoin() to wlcore_disconnect(), as
  it is no longer the inversion of wl1271_join()
  (now it's only used to disconnect associated sta /
  joined ibss, without stopping the role).

Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: always use sta.hlid

since we no longer use dev role in the connection flow,
we should always use the hlid of the sta role.

Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: workaround start_sta problem in wl12xx fw

for some reason, the wl12xx fw is not able to rx/tx
on the first start_sta cmd.
Workaround it by issuing a dummy start_sta + stop_sta
before starting the sta for the final time.

Signed-off-by: Eliad Peller <eliad@wizery.com>
mac80211: make remain_on_channel() op pass vif param

Drivers (e.g. wl12xx) might need to know the vif
to roc on (mainly in order to configure its
rx filters correctly).

Add the vif to the op params, and update the current
users (iwlwifi) to use the new api.

Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: use dev_hlid if the tx is offchannel
wlcore: implement .remain_on_channel() callback

implement the reamin_on_channel() callback by starting
a dev role (already associated with the current vif)
on the requested channel/band.

This channel is usually different from the channel
of the sta role, so pass it to wl12xx_roc() as well,
and notify mac80211 (async) when the fw is ready
on the new channel.

Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: get channel from bss_conf instead of hw->conf

Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: add chanctx implementation
wlcore: remove channel handling from op_config
wlcore: initiate ROC/CROC from sta state updates

this function is now very ugly. need to
refactor it somehow.
wlcore: use sta_state-based ROCs for AP mode (EXPERIMENTAL)

we still need matching patches in hostapd to add the station
on authentication.