diff options
author | Eliad Peller <eliad@wizery.com> | 2011-10-10 04:13:08 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-10-11 08:12:12 -0400 |
commit | 52630c5d89840bf09826fe89cc15f868e92223ef (patch) | |
tree | 803978a8c9124ae88534b1d1638f9512a3a6884a | |
parent | 836d6600ea0e785fcf8159a3c4b7350276bcd49a (diff) |
wl12xx: make WL1271_FLAG_CS_PROGRESS flag per-vif
This flag should be set per-vif, rather than globally.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
-rw-r--r-- | drivers/net/wireless/wl12xx/event.c | 22 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl12xx.h | 2 |
3 files changed, 21 insertions, 15 deletions
diff --git a/drivers/net/wireless/wl12xx/event.c b/drivers/net/wireless/wl12xx/event.c index 1f60a1f6335e..a47312db5a2a 100644 --- a/drivers/net/wireless/wl12xx/event.c +++ b/drivers/net/wireless/wl12xx/event.c | |||
@@ -345,16 +345,18 @@ static int wl1271_event_process(struct wl1271 *wl, struct event_mailbox *mbox) | |||
345 | * 1) channel switch complete with status=0 | 345 | * 1) channel switch complete with status=0 |
346 | * 2) channel switch failed status=1 | 346 | * 2) channel switch failed status=1 |
347 | */ | 347 | */ |
348 | if (test_and_clear_bit(WL1271_FLAG_CS_PROGRESS, &wl->flags)) { | 348 | |
349 | /* TODO: configure only the relevant vif */ | 349 | /* TODO: configure only the relevant vif */ |
350 | wl12xx_for_each_wlvif_sta(wl, wlvif) { | 350 | wl12xx_for_each_wlvif_sta(wl, wlvif) { |
351 | struct ieee80211_vif *vif = | 351 | struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif); |
352 | wl12xx_wlvif_to_vif(wlvif); | 352 | bool success; |
353 | bool success = mbox->channel_switch_status ? | 353 | |
354 | false : true; | 354 | if (!test_and_clear_bit(WLVIF_FLAG_CS_PROGRESS, |
355 | 355 | &wl->flags)) | |
356 | ieee80211_chswitch_done(vif, success); | 356 | continue; |
357 | } | 357 | |
358 | success = mbox->channel_switch_status ? false : true; | ||
359 | ieee80211_chswitch_done(vif, success); | ||
358 | } | 360 | } |
359 | } | 361 | } |
360 | 362 | ||
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 73973b4fc57f..0647d460b698 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -2317,7 +2317,7 @@ static int wl1271_unjoin(struct wl1271 *wl, struct wl12xx_vif *wlvif) | |||
2317 | { | 2317 | { |
2318 | int ret; | 2318 | int ret; |
2319 | 2319 | ||
2320 | if (test_and_clear_bit(WL1271_FLAG_CS_PROGRESS, &wl->flags)) { | 2320 | if (test_and_clear_bit(WLVIF_FLAG_CS_PROGRESS, &wlvif->flags)) { |
2321 | wl12xx_cmd_stop_channel_switch(wl); | 2321 | wl12xx_cmd_stop_channel_switch(wl); |
2322 | ieee80211_chswitch_done(wl->vif, false); | 2322 | ieee80211_chswitch_done(wl->vif, false); |
2323 | } | 2323 | } |
@@ -4275,6 +4275,7 @@ static void wl12xx_op_channel_switch(struct ieee80211_hw *hw, | |||
4275 | struct ieee80211_channel_switch *ch_switch) | 4275 | struct ieee80211_channel_switch *ch_switch) |
4276 | { | 4276 | { |
4277 | struct wl1271 *wl = hw->priv; | 4277 | struct wl1271 *wl = hw->priv; |
4278 | struct wl12xx_vif *wlvif; | ||
4278 | int ret; | 4279 | int ret; |
4279 | 4280 | ||
4280 | wl1271_debug(DEBUG_MAC80211, "mac80211 channel switch"); | 4281 | wl1271_debug(DEBUG_MAC80211, "mac80211 channel switch"); |
@@ -4291,10 +4292,13 @@ static void wl12xx_op_channel_switch(struct ieee80211_hw *hw, | |||
4291 | if (ret < 0) | 4292 | if (ret < 0) |
4292 | goto out; | 4293 | goto out; |
4293 | 4294 | ||
4294 | ret = wl12xx_cmd_channel_switch(wl, ch_switch); | 4295 | /* TODO: change mac80211 to pass vif as param */ |
4296 | wl12xx_for_each_wlvif_sta(wl, wlvif) { | ||
4297 | ret = wl12xx_cmd_channel_switch(wl, ch_switch); | ||
4295 | 4298 | ||
4296 | if (!ret) | 4299 | if (!ret) |
4297 | set_bit(WL1271_FLAG_CS_PROGRESS, &wl->flags); | 4300 | set_bit(WLVIF_FLAG_CS_PROGRESS, &wlvif->flags); |
4301 | } | ||
4298 | 4302 | ||
4299 | wl1271_ps_elp_sleep(wl); | 4303 | wl1271_ps_elp_sleep(wl); |
4300 | 4304 | ||
diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h index bf410f8d01cb..fc8c9758fc0c 100644 --- a/drivers/net/wireless/wl12xx/wl12xx.h +++ b/drivers/net/wireless/wl12xx/wl12xx.h | |||
@@ -326,7 +326,6 @@ enum wl12xx_flags { | |||
326 | WL1271_FLAG_PENDING_WORK, | 326 | WL1271_FLAG_PENDING_WORK, |
327 | WL1271_FLAG_SOFT_GEMINI, | 327 | WL1271_FLAG_SOFT_GEMINI, |
328 | WL1271_FLAG_RECOVERY_IN_PROGRESS, | 328 | WL1271_FLAG_RECOVERY_IN_PROGRESS, |
329 | WL1271_FLAG_CS_PROGRESS, | ||
330 | }; | 329 | }; |
331 | 330 | ||
332 | enum wl12xx_vif_flags { | 331 | enum wl12xx_vif_flags { |
@@ -339,6 +338,7 @@ enum wl12xx_vif_flags { | |||
339 | WLVIF_FLAG_STA_STATE_SENT, | 338 | WLVIF_FLAG_STA_STATE_SENT, |
340 | WLVIF_FLAG_RX_STREAMING_STARTED, | 339 | WLVIF_FLAG_RX_STREAMING_STARTED, |
341 | WLVIF_FLAG_PSPOLL_FAILURE, | 340 | WLVIF_FLAG_PSPOLL_FAILURE, |
341 | WLVIF_FLAG_CS_PROGRESS, | ||
342 | }; | 342 | }; |
343 | 343 | ||
344 | struct wl1271_link { | 344 | struct wl1271_link { |