wl->channel = WL1251_DEFAULT_CHANNEL;
wl->monitor_present = false;
wl->joined = false;
+ wl->long_doze_mode_set = false;
wl1251_debugfs_reset(wl);
* This leaves the tx path disabled in firmware, whereas
* the usual JOIN command seems to transmit some frames
* at firmware level.
+ *
+ * Note that bss_type must be BSS_TYPE_STA_BSS, also at least
+ * one join has to be performed before CMD_ENABLE_RX can
+ * properly switch channels (join will be done by CONF_IDLE).
*/
if (wl->vif == NULL) {
+ wl->bss_type = BSS_TYPE_STA_BSS;
wl->joined = false;
ret = wl1251_cmd_data_path_rx(wl, wl->channel, 1);
} else {
wl->power_level = conf->power_level;
}
- /*
- * Tell stack that connection is lost because hw encryption isn't
- * supported in monitor mode.
- * This requires temporary enabling of the hw connection monitor flag
- */
- if ((changed & IEEE80211_CONF_CHANGE_MONITOR) && wl->vif) {
- wl->hw->flags |= IEEE80211_HW_CONNECTION_MONITOR;
- ieee80211_connection_loss(wl->vif);
- }
-
out_sleep:
wl1251_ps_elp_sleep(wl);
{
struct wl1251 *wl = hw->priv;
struct sk_buff *beacon, *skb;
+ bool do_join = false;
bool enable;
int ret;
if (ret < 0)
goto out_sleep;
- ret = wl1251_join(wl, wl->bss_type, wl->channel,
- wl->beacon_int, wl->dtim_period);
- if (ret < 0)
- goto out_sleep;
+ do_join = true;
}
}
if (changed & BSS_CHANGED_ASSOC) {
- /* Disable temporary enabled hw connection monitor flag */
- wl->hw->flags &= ~IEEE80211_HW_CONNECTION_MONITOR;
-
if (bss_conf->assoc) {
wl->beacon_int = bss_conf->beacon_int;
if (ret < 0)
goto out_sleep;
- ret = wl1251_join(wl, wl->bss_type, wl->beacon_int,
- wl->channel, wl->dtim_period);
+ do_join = true;
+ }
+ if (do_join) {
+ ret = wl1251_join(wl, wl->bss_type, wl->channel,
+ wl->beacon_int, wl->dtim_period);
if (ret < 0)
goto out_sleep;
}