提交 52630c5d 编写于 作者: E Eliad Peller 提交者: Luciano Coelho

wl12xx: make WL1271_FLAG_CS_PROGRESS flag per-vif

This flag should be set per-vif, rather than globally.
Signed-off-by: NEliad Peller <eliad@wizery.com>
Signed-off-by: NLuciano Coelho <coelho@ti.com>
上级 836d6600
...@@ -345,16 +345,18 @@ static int wl1271_event_process(struct wl1271 *wl, struct event_mailbox *mbox) ...@@ -345,16 +345,18 @@ static int wl1271_event_process(struct wl1271 *wl, struct event_mailbox *mbox)
* 1) channel switch complete with status=0 * 1) channel switch complete with status=0
* 2) channel switch failed status=1 * 2) channel switch failed status=1
*/ */
if (test_and_clear_bit(WL1271_FLAG_CS_PROGRESS, &wl->flags)) {
/* TODO: configure only the relevant vif */ /* TODO: configure only the relevant vif */
wl12xx_for_each_wlvif_sta(wl, wlvif) { wl12xx_for_each_wlvif_sta(wl, wlvif) {
struct ieee80211_vif *vif = struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif);
wl12xx_wlvif_to_vif(wlvif); bool success;
bool success = mbox->channel_switch_status ?
false : true; if (!test_and_clear_bit(WLVIF_FLAG_CS_PROGRESS,
&wl->flags))
ieee80211_chswitch_done(vif, success); continue;
}
success = mbox->channel_switch_status ? false : true;
ieee80211_chswitch_done(vif, success);
} }
} }
......
...@@ -2317,7 +2317,7 @@ static int wl1271_unjoin(struct wl1271 *wl, struct wl12xx_vif *wlvif) ...@@ -2317,7 +2317,7 @@ static int wl1271_unjoin(struct wl1271 *wl, struct wl12xx_vif *wlvif)
{ {
int ret; int ret;
if (test_and_clear_bit(WL1271_FLAG_CS_PROGRESS, &wl->flags)) { if (test_and_clear_bit(WLVIF_FLAG_CS_PROGRESS, &wlvif->flags)) {
wl12xx_cmd_stop_channel_switch(wl); wl12xx_cmd_stop_channel_switch(wl);
ieee80211_chswitch_done(wl->vif, false); ieee80211_chswitch_done(wl->vif, false);
} }
...@@ -4275,6 +4275,7 @@ static void wl12xx_op_channel_switch(struct ieee80211_hw *hw, ...@@ -4275,6 +4275,7 @@ static void wl12xx_op_channel_switch(struct ieee80211_hw *hw,
struct ieee80211_channel_switch *ch_switch) struct ieee80211_channel_switch *ch_switch)
{ {
struct wl1271 *wl = hw->priv; struct wl1271 *wl = hw->priv;
struct wl12xx_vif *wlvif;
int ret; int ret;
wl1271_debug(DEBUG_MAC80211, "mac80211 channel switch"); wl1271_debug(DEBUG_MAC80211, "mac80211 channel switch");
...@@ -4291,10 +4292,13 @@ static void wl12xx_op_channel_switch(struct ieee80211_hw *hw, ...@@ -4291,10 +4292,13 @@ static void wl12xx_op_channel_switch(struct ieee80211_hw *hw,
if (ret < 0) if (ret < 0)
goto out; goto out;
ret = wl12xx_cmd_channel_switch(wl, ch_switch); /* TODO: change mac80211 to pass vif as param */
wl12xx_for_each_wlvif_sta(wl, wlvif) {
ret = wl12xx_cmd_channel_switch(wl, ch_switch);
if (!ret) if (!ret)
set_bit(WL1271_FLAG_CS_PROGRESS, &wl->flags); set_bit(WLVIF_FLAG_CS_PROGRESS, &wlvif->flags);
}
wl1271_ps_elp_sleep(wl); wl1271_ps_elp_sleep(wl);
......
...@@ -326,7 +326,6 @@ enum wl12xx_flags { ...@@ -326,7 +326,6 @@ enum wl12xx_flags {
WL1271_FLAG_PENDING_WORK, WL1271_FLAG_PENDING_WORK,
WL1271_FLAG_SOFT_GEMINI, WL1271_FLAG_SOFT_GEMINI,
WL1271_FLAG_RECOVERY_IN_PROGRESS, WL1271_FLAG_RECOVERY_IN_PROGRESS,
WL1271_FLAG_CS_PROGRESS,
}; };
enum wl12xx_vif_flags { enum wl12xx_vif_flags {
...@@ -339,6 +338,7 @@ enum wl12xx_vif_flags { ...@@ -339,6 +338,7 @@ enum wl12xx_vif_flags {
WLVIF_FLAG_STA_STATE_SENT, WLVIF_FLAG_STA_STATE_SENT,
WLVIF_FLAG_RX_STREAMING_STARTED, WLVIF_FLAG_RX_STREAMING_STARTED,
WLVIF_FLAG_PSPOLL_FAILURE, WLVIF_FLAG_PSPOLL_FAILURE,
WLVIF_FLAG_CS_PROGRESS,
}; };
struct wl1271_link { struct wl1271_link {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册