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: 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>
wlcore: don't leak wl->mbox

free it on wlcore_free_hw()

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 the
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: 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_unset_assoc(), 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).

While on it, split wl1271_bss_info_changed_sta() into
some sub-functions.

Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: set ssid before starting station role

start_role(station) takes the ssid as parameter, so set
the correct ssid on BSS_CHANGED_BSSID (just before
calling start_role(sta))

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>
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: use dev_hlid if the tx is offchannel
wlcore: get channel from bss_conf instead of hw->conf

We care only about the operational channel, not
about the temporal hw channel (which won't have
any real meaning in multi-channel env anyway)

Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: add chanctx implementation

Add some basic chanctx implementation.

Only add debug prints, and save the vif's channel/band/type.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: remove channel handling from op_config

After setting the channel on chanctx callbacks, we
no longer need to handle channel change notifications
on op_config.

Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: initiate ROC/CROC on sta state updates

Use the sta_state notifications to ROC when a station
is about to connect, and CROC respectively on
authorization (success) / deletion (failure).

Change the wl12xx_update_sta_state() flow to bail out
only on error, so multiple code blocks could refer
to the same state.

Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: set active psm on association

The default ps mode of the fw is auto, while the default
ps mode of mac80211 is active (ps off).
In order to sync them, configure active ps on association.

Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: specify correct supported_rates

The supported_rates field should contain all our supported
rates, even if the remote peer doesn't support them.

(use CONF_TX_AP_ENABLED_RATES for bg rates, as the possible
rates are the same for ap and sta)

Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: reconfigure rate policy on association

When first configuring the rate policy, before auth,
we still don't have the correct rates that were
agreed during association.

Reconfigure the rate policy on association in order
to update them.

Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: refactor CHANGED_HT handling

Pass a variable indicating whether HT is enabled,
instead of duplicating the function call with
different arguments.

Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: configure the remote rates with our own rates

With the new connection flow, start_sta is called before
the remote rates where updated. Use our own supported rates
instead to make sure we don't disable any potential rate
(the rate policies will be updated later, but there is
currently no way to update the remote rates)
wlcore: don't stop fwlog if dbgpins are used

Due to some bug, the fw asserts on fw log stop
when dbgping are used.
Don't stop the fw log in this case.

Signed-off-by: Eliad Peller <eliad@wizery.com>