diff options
author | Eliad Peller <eliad@wizery.com> | 2014-12-29 08:24:10 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-01-09 15:48:01 +0200 |
commit | 830513abc6ea2b1828b83b37300711984bae89f6 (patch) | |
tree | 18247a58f0399dc5d932b18ab99b24a74b99acad /drivers/net/wireless/ti/wlcore | |
parent | 534719f445c6f8bf5218adaf4bec36f118ccc1e9 (diff) | |
download | op-kernel-dev-830513abc6ea2b1828b83b37300711984bae89f6.zip op-kernel-dev-830513abc6ea2b1828b83b37300711984bae89f6.tar.gz |
wlcore: add dfs master restart calls
call wlcore_cmd_dfs_master_restart when starting
the ap on a new channel (after csa is done).
Add a new WLVIF_FLAG_BEACON_DISABLED flag to
indicate that dfs_master_restart command
is required.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ti/wlcore')
-rw-r--r-- | drivers/net/wireless/ti/wlcore/event.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/hw_ops.h | 9 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/main.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/wlcore.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/wlcore_i.h | 1 |
5 files changed, 21 insertions, 1 deletions
diff --git a/drivers/net/wireless/ti/wlcore/event.c b/drivers/net/wireless/ti/wlcore/event.c index 69a2661..c42e789 100644 --- a/drivers/net/wireless/ti/wlcore/event.c +++ b/drivers/net/wireless/ti/wlcore/event.c @@ -154,6 +154,7 @@ void wlcore_event_channel_switch(struct wl1271 *wl, ieee80211_chswitch_done(vif, success); cancel_delayed_work(&wlvif->channel_switch_work); } else { + set_bit(WLVIF_FLAG_BEACON_DISABLED, &wlvif->flags); ieee80211_csa_finish(vif); } } diff --git a/drivers/net/wireless/ti/wlcore/hw_ops.h b/drivers/net/wireless/ti/wlcore/hw_ops.h index 42fef84..eec5693 100644 --- a/drivers/net/wireless/ti/wlcore/hw_ops.h +++ b/drivers/net/wireless/ti/wlcore/hw_ops.h @@ -320,4 +320,13 @@ wlcore_hw_set_cac(struct wl1271 *wl, struct wl12xx_vif *wlvif, bool start) return wl->ops->set_cac(wl, wlvif, start); } + +static inline int +wlcore_hw_dfs_master_restart(struct wl1271 *wl, struct wl12xx_vif *wlvif) +{ + if (!wl->ops->dfs_master_restart) + return -EINVAL; + + return wl->ops->dfs_master_restart(wl, wlvif); +} #endif diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 68da50e..2cbec03 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c @@ -4127,8 +4127,14 @@ static int wl1271_bss_beacon_info_changed(struct wl1271 *wl, ret = wlcore_set_beacon_template(wl, vif, is_ap); if (ret < 0) goto out; - } + if (test_and_clear_bit(WLVIF_FLAG_BEACON_DISABLED, + &wlvif->flags)) { + ret = wlcore_hw_dfs_master_restart(wl, wlvif); + if (ret < 0) + goto out; + } + } out: if (ret != 0) wl1271_error("beacon info change failed: %d", ret); @@ -4774,6 +4780,8 @@ static int __wlcore_switch_vif_chan(struct wl1271 *wl, if (WARN_ON_ONCE(wlvif->bss_type != BSS_TYPE_AP_BSS)) return 0; + WARN_ON(!test_bit(WLVIF_FLAG_BEACON_DISABLED, &wlvif->flags)); + if (wlvif->radar_enabled) { wl1271_debug(DEBUG_MAC80211, "Stop radar detection"); wlcore_hw_set_cac(wl, wlvif, false); diff --git a/drivers/net/wireless/ti/wlcore/wlcore.h b/drivers/net/wireless/ti/wlcore/wlcore.h index caee58f..581c479 100644 --- a/drivers/net/wireless/ti/wlcore/wlcore.h +++ b/drivers/net/wireless/ti/wlcore/wlcore.h @@ -125,6 +125,7 @@ struct wlcore_ops { u8 key_len, u8 *key); int (*set_cac)(struct wl1271 *wl, struct wl12xx_vif *wlvif, bool start); + int (*dfs_master_restart)(struct wl1271 *wl, struct wl12xx_vif *wlvif); }; enum wlcore_partitions { diff --git a/drivers/net/wireless/ti/wlcore/wlcore_i.h b/drivers/net/wireless/ti/wlcore/wlcore_i.h index b2bdb13..3396ce5 100644 --- a/drivers/net/wireless/ti/wlcore/wlcore_i.h +++ b/drivers/net/wireless/ti/wlcore/wlcore_i.h @@ -251,6 +251,7 @@ enum wl12xx_vif_flags { WLVIF_FLAG_AP_PROBE_RESP_SET, WLVIF_FLAG_IN_USE, WLVIF_FLAG_ACTIVE, + WLVIF_FLAG_BEACON_DISABLED, }; struct wl12xx_vif; |