diff options
author | Eliad Peller <eliad@wizery.com> | 2011-10-05 05:55:52 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-10-07 01:32:43 -0400 |
commit | 7edebf56ca424484b9e0e51a6188c93c7fdd3a41 (patch) | |
tree | 7bcf6bf9d7da2d1ef9f7c60033b56392a39c238a | |
parent | 0603d891c5b5153f667a79357d4652824c22b54e (diff) |
wl12xx: move dev_role_id into wlvif
move dev_role_id into the per-interface data, rather than
being global.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
-rw-r--r-- | drivers/net/wireless/wl12xx/cmd.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/cmd.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 50 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/scan.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/tx.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl12xx.h | 4 |
6 files changed, 49 insertions, 38 deletions
diff --git a/drivers/net/wireless/wl12xx/cmd.c b/drivers/net/wireless/wl12xx/cmd.c index 918faca517cf..36544ff6a79b 100644 --- a/drivers/net/wireless/wl12xx/cmd.c +++ b/drivers/net/wireless/wl12xx/cmd.c | |||
@@ -464,7 +464,7 @@ static int wl12xx_get_new_session_id(struct wl1271 *wl) | |||
464 | return wl->session_counter; | 464 | return wl->session_counter; |
465 | } | 465 | } |
466 | 466 | ||
467 | int wl12xx_cmd_role_start_dev(struct wl1271 *wl) | 467 | int wl12xx_cmd_role_start_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif) |
468 | { | 468 | { |
469 | struct wl12xx_cmd_role_start *cmd; | 469 | struct wl12xx_cmd_role_start *cmd; |
470 | int ret; | 470 | int ret; |
@@ -475,9 +475,9 @@ int wl12xx_cmd_role_start_dev(struct wl1271 *wl) | |||
475 | goto out; | 475 | goto out; |
476 | } | 476 | } |
477 | 477 | ||
478 | wl1271_debug(DEBUG_CMD, "cmd role start dev %d", wl->dev_role_id); | 478 | wl1271_debug(DEBUG_CMD, "cmd role start dev %d", wlvif->dev_role_id); |
479 | 479 | ||
480 | cmd->role_id = wl->dev_role_id; | 480 | cmd->role_id = wlvif->dev_role_id; |
481 | if (wl->band == IEEE80211_BAND_5GHZ) | 481 | if (wl->band == IEEE80211_BAND_5GHZ) |
482 | cmd->band = WL12XX_BAND_5GHZ; | 482 | cmd->band = WL12XX_BAND_5GHZ; |
483 | cmd->channel = wl->channel; | 483 | cmd->channel = wl->channel; |
@@ -514,7 +514,7 @@ out: | |||
514 | return ret; | 514 | return ret; |
515 | } | 515 | } |
516 | 516 | ||
517 | int wl12xx_cmd_role_stop_dev(struct wl1271 *wl) | 517 | int wl12xx_cmd_role_stop_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif) |
518 | { | 518 | { |
519 | struct wl12xx_cmd_role_stop *cmd; | 519 | struct wl12xx_cmd_role_stop *cmd; |
520 | int ret; | 520 | int ret; |
@@ -530,7 +530,7 @@ int wl12xx_cmd_role_stop_dev(struct wl1271 *wl) | |||
530 | 530 | ||
531 | wl1271_debug(DEBUG_CMD, "cmd role stop dev"); | 531 | wl1271_debug(DEBUG_CMD, "cmd role stop dev"); |
532 | 532 | ||
533 | cmd->role_id = wl->dev_role_id; | 533 | cmd->role_id = wlvif->dev_role_id; |
534 | cmd->disc_type = DISCONNECT_IMMEDIATE; | 534 | cmd->disc_type = DISCONNECT_IMMEDIATE; |
535 | cmd->reason = cpu_to_le16(WLAN_REASON_UNSPECIFIED); | 535 | cmd->reason = cpu_to_le16(WLAN_REASON_UNSPECIFIED); |
536 | 536 | ||
diff --git a/drivers/net/wireless/wl12xx/cmd.h b/drivers/net/wireless/wl12xx/cmd.h index bf2c45b8b911..fb40556a8ad1 100644 --- a/drivers/net/wireless/wl12xx/cmd.h +++ b/drivers/net/wireless/wl12xx/cmd.h | |||
@@ -39,8 +39,8 @@ int wl1271_cmd_ext_radio_parms(struct wl1271 *wl); | |||
39 | int wl12xx_cmd_role_enable(struct wl1271 *wl, u8 *addr, u8 role_type, | 39 | int wl12xx_cmd_role_enable(struct wl1271 *wl, u8 *addr, u8 role_type, |
40 | u8 *role_id); | 40 | u8 *role_id); |
41 | int wl12xx_cmd_role_disable(struct wl1271 *wl, u8 *role_id); | 41 | int wl12xx_cmd_role_disable(struct wl1271 *wl, u8 *role_id); |
42 | int wl12xx_cmd_role_start_dev(struct wl1271 *wl); | 42 | int wl12xx_cmd_role_start_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif); |
43 | int wl12xx_cmd_role_stop_dev(struct wl1271 *wl); | 43 | int wl12xx_cmd_role_stop_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif); |
44 | int wl12xx_cmd_role_start_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif); | 44 | int wl12xx_cmd_role_start_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif); |
45 | int wl12xx_cmd_role_stop_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif); | 45 | int wl12xx_cmd_role_stop_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif); |
46 | int wl12xx_cmd_role_start_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif); | 46 | int wl12xx_cmd_role_start_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif); |
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index b3d4ef5b900d..f4d3df15719b 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -1857,6 +1857,7 @@ static void wl12xx_init_vif_data(struct wl12xx_vif *wlvif) | |||
1857 | { | 1857 | { |
1858 | wlvif->bss_type = MAX_BSS_TYPE; | 1858 | wlvif->bss_type = MAX_BSS_TYPE; |
1859 | wlvif->role_id = WL12XX_INVALID_ROLE_ID; | 1859 | wlvif->role_id = WL12XX_INVALID_ROLE_ID; |
1860 | wlvif->dev_role_id = WL12XX_INVALID_ROLE_ID; | ||
1860 | wlvif->basic_rate_set = CONF_TX_RATE_MASK_BASIC; | 1861 | wlvif->basic_rate_set = CONF_TX_RATE_MASK_BASIC; |
1861 | wlvif->basic_rate = CONF_TX_RATE_MASK_BASIC; | 1862 | wlvif->basic_rate = CONF_TX_RATE_MASK_BASIC; |
1862 | wlvif->rate_set = CONF_TX_RATE_MASK_BASIC; | 1863 | wlvif->rate_set = CONF_TX_RATE_MASK_BASIC; |
@@ -1958,7 +1959,7 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw, | |||
1958 | */ | 1959 | */ |
1959 | ret = wl12xx_cmd_role_enable(wl, vif->addr, | 1960 | ret = wl12xx_cmd_role_enable(wl, vif->addr, |
1960 | WL1271_ROLE_DEVICE, | 1961 | WL1271_ROLE_DEVICE, |
1961 | &wl->dev_role_id); | 1962 | &wlvif->dev_role_id); |
1962 | if (ret < 0) | 1963 | if (ret < 0) |
1963 | goto irq_disable; | 1964 | goto irq_disable; |
1964 | } | 1965 | } |
@@ -2067,7 +2068,7 @@ static void __wl1271_op_remove_interface(struct wl1271 *wl, | |||
2067 | goto deinit; | 2068 | goto deinit; |
2068 | 2069 | ||
2069 | if (wlvif->bss_type == BSS_TYPE_STA_BSS) { | 2070 | if (wlvif->bss_type == BSS_TYPE_STA_BSS) { |
2070 | ret = wl12xx_cmd_role_disable(wl, &wl->dev_role_id); | 2071 | ret = wl12xx_cmd_role_disable(wl, &wlvif->dev_role_id); |
2071 | if (ret < 0) | 2072 | if (ret < 0) |
2072 | goto deinit; | 2073 | goto deinit; |
2073 | } | 2074 | } |
@@ -2131,7 +2132,7 @@ deinit: | |||
2131 | wl->ap_ps_map = 0; | 2132 | wl->ap_ps_map = 0; |
2132 | wl->sched_scanning = false; | 2133 | wl->sched_scanning = false; |
2133 | wlvif->role_id = WL12XX_INVALID_ROLE_ID; | 2134 | wlvif->role_id = WL12XX_INVALID_ROLE_ID; |
2134 | wl->dev_role_id = WL12XX_INVALID_ROLE_ID; | 2135 | wlvif->dev_role_id = WL12XX_INVALID_ROLE_ID; |
2135 | memset(wl->roles_map, 0, sizeof(wl->roles_map)); | 2136 | memset(wl->roles_map, 0, sizeof(wl->roles_map)); |
2136 | memset(wl->links_map, 0, sizeof(wl->links_map)); | 2137 | memset(wl->links_map, 0, sizeof(wl->links_map)); |
2137 | memset(wl->roc_map, 0, sizeof(wl->roc_map)); | 2138 | memset(wl->roc_map, 0, sizeof(wl->roc_map)); |
@@ -2289,11 +2290,11 @@ static int wl1271_sta_handle_idle(struct wl1271 *wl, struct wl12xx_vif *wlvif, | |||
2289 | if (idle) { | 2290 | if (idle) { |
2290 | /* no need to croc if we weren't busy (e.g. during boot) */ | 2291 | /* no need to croc if we weren't busy (e.g. during boot) */ |
2291 | if (wl12xx_is_roc(wl)) { | 2292 | if (wl12xx_is_roc(wl)) { |
2292 | ret = wl12xx_croc(wl, wl->dev_role_id); | 2293 | ret = wl12xx_croc(wl, wlvif->dev_role_id); |
2293 | if (ret < 0) | 2294 | if (ret < 0) |
2294 | goto out; | 2295 | goto out; |
2295 | 2296 | ||
2296 | ret = wl12xx_cmd_role_stop_dev(wl); | 2297 | ret = wl12xx_cmd_role_stop_dev(wl, wlvif); |
2297 | if (ret < 0) | 2298 | if (ret < 0) |
2298 | goto out; | 2299 | goto out; |
2299 | } | 2300 | } |
@@ -2315,11 +2316,11 @@ static int wl1271_sta_handle_idle(struct wl1271 *wl, struct wl12xx_vif *wlvif, | |||
2315 | ieee80211_sched_scan_stopped(wl->hw); | 2316 | ieee80211_sched_scan_stopped(wl->hw); |
2316 | } | 2317 | } |
2317 | 2318 | ||
2318 | ret = wl12xx_cmd_role_start_dev(wl); | 2319 | ret = wl12xx_cmd_role_start_dev(wl, wlvif); |
2319 | if (ret < 0) | 2320 | if (ret < 0) |
2320 | goto out; | 2321 | goto out; |
2321 | 2322 | ||
2322 | ret = wl12xx_roc(wl, wl->dev_role_id); | 2323 | ret = wl12xx_roc(wl, wlvif->dev_role_id); |
2323 | if (ret < 0) | 2324 | if (ret < 0) |
2324 | goto out; | 2325 | goto out; |
2325 | clear_bit(WL1271_FLAG_IDLE, &wl->flags); | 2326 | clear_bit(WL1271_FLAG_IDLE, &wl->flags); |
@@ -2408,7 +2409,8 @@ static int wl1271_op_config(struct ieee80211_hw *hw, u32 changed) | |||
2408 | if (test_bit(WL1271_FLAG_STA_ASSOCIATED, &wl->flags)) { | 2409 | if (test_bit(WL1271_FLAG_STA_ASSOCIATED, &wl->flags)) { |
2409 | if (wl12xx_is_roc(wl)) { | 2410 | if (wl12xx_is_roc(wl)) { |
2410 | /* roaming */ | 2411 | /* roaming */ |
2411 | ret = wl12xx_croc(wl, wl->dev_role_id); | 2412 | ret = wl12xx_croc(wl, |
2413 | wlvif->dev_role_id); | ||
2412 | if (ret < 0) | 2414 | if (ret < 0) |
2413 | goto out_sleep; | 2415 | goto out_sleep; |
2414 | } | 2416 | } |
@@ -2424,11 +2426,13 @@ static int wl1271_op_config(struct ieee80211_hw *hw, u32 changed) | |||
2424 | */ | 2426 | */ |
2425 | if (wl12xx_is_roc(wl) && | 2427 | if (wl12xx_is_roc(wl) && |
2426 | !(conf->flags & IEEE80211_CONF_IDLE)) { | 2428 | !(conf->flags & IEEE80211_CONF_IDLE)) { |
2427 | ret = wl12xx_croc(wl, wl->dev_role_id); | 2429 | ret = wl12xx_croc(wl, |
2430 | wlvif->dev_role_id); | ||
2428 | if (ret < 0) | 2431 | if (ret < 0) |
2429 | goto out_sleep; | 2432 | goto out_sleep; |
2430 | 2433 | ||
2431 | ret = wl12xx_roc(wl, wl->dev_role_id); | 2434 | ret = wl12xx_roc(wl, |
2435 | wlvif->dev_role_id); | ||
2432 | if (ret < 0) | 2436 | if (ret < 0) |
2433 | wl1271_warning("roc failed %d", | 2437 | wl1271_warning("roc failed %d", |
2434 | ret); | 2438 | ret); |
@@ -2891,6 +2895,8 @@ static int wl1271_op_hw_scan(struct ieee80211_hw *hw, | |||
2891 | struct cfg80211_scan_request *req) | 2895 | struct cfg80211_scan_request *req) |
2892 | { | 2896 | { |
2893 | struct wl1271 *wl = hw->priv; | 2897 | struct wl1271 *wl = hw->priv; |
2898 | struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif); | ||
2899 | |||
2894 | int ret; | 2900 | int ret; |
2895 | u8 *ssid = NULL; | 2901 | u8 *ssid = NULL; |
2896 | size_t len = 0; | 2902 | size_t len = 0; |
@@ -2925,8 +2931,8 @@ static int wl1271_op_hw_scan(struct ieee80211_hw *hw, | |||
2925 | ret = -EBUSY; | 2931 | ret = -EBUSY; |
2926 | goto out_sleep; | 2932 | goto out_sleep; |
2927 | } | 2933 | } |
2928 | wl12xx_croc(wl, wl->dev_role_id); | 2934 | wl12xx_croc(wl, wlvif->dev_role_id); |
2929 | wl12xx_cmd_role_stop_dev(wl); | 2935 | wl12xx_cmd_role_stop_dev(wl, wlvif); |
2930 | } | 2936 | } |
2931 | 2937 | ||
2932 | ret = wl1271_scan(hw->priv, vif, ssid, len, req); | 2938 | ret = wl1271_scan(hw->priv, vif, ssid, len, req); |
@@ -3437,8 +3443,8 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl, | |||
3437 | if (test_and_clear_bit(WL1271_FLAG_IBSS_JOINED, | 3443 | if (test_and_clear_bit(WL1271_FLAG_IBSS_JOINED, |
3438 | &wl->flags)) { | 3444 | &wl->flags)) { |
3439 | wl1271_unjoin(wl, wlvif); | 3445 | wl1271_unjoin(wl, wlvif); |
3440 | wl12xx_cmd_role_start_dev(wl); | 3446 | wl12xx_cmd_role_start_dev(wl, wlvif); |
3441 | wl12xx_roc(wl, wl->dev_role_id); | 3447 | wl12xx_roc(wl, wlvif->dev_role_id); |
3442 | } | 3448 | } |
3443 | } | 3449 | } |
3444 | } | 3450 | } |
@@ -3605,16 +3611,17 @@ sta_not_found: | |||
3605 | * roaming on the same channel. until we will | 3611 | * roaming on the same channel. until we will |
3606 | * have a better flow...) | 3612 | * have a better flow...) |
3607 | */ | 3613 | */ |
3608 | if (test_bit(wl->dev_role_id, wl->roc_map)) { | 3614 | if (test_bit(wlvif->dev_role_id, wl->roc_map)) { |
3609 | ret = wl12xx_croc(wl, wl->dev_role_id); | 3615 | ret = wl12xx_croc(wl, |
3616 | wlvif->dev_role_id); | ||
3610 | if (ret < 0) | 3617 | if (ret < 0) |
3611 | goto out; | 3618 | goto out; |
3612 | } | 3619 | } |
3613 | 3620 | ||
3614 | wl1271_unjoin(wl, wlvif); | 3621 | wl1271_unjoin(wl, wlvif); |
3615 | if (!(conf_flags & IEEE80211_CONF_IDLE)) { | 3622 | if (!(conf_flags & IEEE80211_CONF_IDLE)) { |
3616 | wl12xx_cmd_role_start_dev(wl); | 3623 | wl12xx_cmd_role_start_dev(wl, wlvif); |
3617 | wl12xx_roc(wl, wl->dev_role_id); | 3624 | wl12xx_roc(wl, wlvif->dev_role_id); |
3618 | } | 3625 | } |
3619 | } | 3626 | } |
3620 | } | 3627 | } |
@@ -3693,12 +3700,12 @@ sta_not_found: | |||
3693 | * stop device role if started (we might already be in | 3700 | * stop device role if started (we might already be in |
3694 | * STA role). TODO: make it better. | 3701 | * STA role). TODO: make it better. |
3695 | */ | 3702 | */ |
3696 | if (wl->dev_role_id != WL12XX_INVALID_ROLE_ID) { | 3703 | if (wlvif->dev_role_id != WL12XX_INVALID_ROLE_ID) { |
3697 | ret = wl12xx_croc(wl, wl->dev_role_id); | 3704 | ret = wl12xx_croc(wl, wlvif->dev_role_id); |
3698 | if (ret < 0) | 3705 | if (ret < 0) |
3699 | goto out; | 3706 | goto out; |
3700 | 3707 | ||
3701 | ret = wl12xx_cmd_role_stop_dev(wl); | 3708 | ret = wl12xx_cmd_role_stop_dev(wl, wlvif); |
3702 | if (ret < 0) | 3709 | if (ret < 0) |
3703 | goto out; | 3710 | goto out; |
3704 | } | 3711 | } |
@@ -4882,7 +4889,6 @@ struct ieee80211_hw *wl1271_alloc_hw(void) | |||
4882 | wl->tx_spare_blocks = TX_HW_BLOCK_SPARE_DEFAULT; | 4889 | wl->tx_spare_blocks = TX_HW_BLOCK_SPARE_DEFAULT; |
4883 | wl->system_hlid = WL12XX_SYSTEM_HLID; | 4890 | wl->system_hlid = WL12XX_SYSTEM_HLID; |
4884 | wl->sta_hlid = WL12XX_INVALID_LINK_ID; | 4891 | wl->sta_hlid = WL12XX_INVALID_LINK_ID; |
4885 | wl->dev_role_id = WL12XX_INVALID_ROLE_ID; | ||
4886 | wl->dev_hlid = WL12XX_INVALID_LINK_ID; | 4892 | wl->dev_hlid = WL12XX_INVALID_LINK_ID; |
4887 | wl->session_counter = 0; | 4893 | wl->session_counter = 0; |
4888 | wl->ap_bcast_hlid = WL12XX_INVALID_LINK_ID; | 4894 | wl->ap_bcast_hlid = WL12XX_INVALID_LINK_ID; |
diff --git a/drivers/net/wireless/wl12xx/scan.c b/drivers/net/wireless/wl12xx/scan.c index 9d0dfb516e26..9372136b27e4 100644 --- a/drivers/net/wireless/wl12xx/scan.c +++ b/drivers/net/wireless/wl12xx/scan.c | |||
@@ -34,6 +34,7 @@ void wl1271_scan_complete_work(struct work_struct *work) | |||
34 | { | 34 | { |
35 | struct delayed_work *dwork; | 35 | struct delayed_work *dwork; |
36 | struct wl1271 *wl; | 36 | struct wl1271 *wl; |
37 | struct ieee80211_vif *vif; | ||
37 | struct wl12xx_vif *wlvif; | 38 | struct wl12xx_vif *wlvif; |
38 | int ret; | 39 | int ret; |
39 | bool is_sta, is_ibss; | 40 | bool is_sta, is_ibss; |
@@ -51,7 +52,8 @@ void wl1271_scan_complete_work(struct work_struct *work) | |||
51 | if (wl->scan.state == WL1271_SCAN_STATE_IDLE) | 52 | if (wl->scan.state == WL1271_SCAN_STATE_IDLE) |
52 | goto out; | 53 | goto out; |
53 | 54 | ||
54 | wlvif = wl12xx_vif_to_data(wl->scan_vif); | 55 | vif = wl->scan_vif; |
56 | wlvif = wl12xx_vif_to_data(vif); | ||
55 | 57 | ||
56 | wl->scan.state = WL1271_SCAN_STATE_IDLE; | 58 | wl->scan.state = WL1271_SCAN_STATE_IDLE; |
57 | memset(wl->scan.scanned_ch, 0, sizeof(wl->scan.scanned_ch)); | 59 | memset(wl->scan.scanned_ch, 0, sizeof(wl->scan.scanned_ch)); |
@@ -72,10 +74,10 @@ void wl1271_scan_complete_work(struct work_struct *work) | |||
72 | is_ibss = (wlvif->bss_type == BSS_TYPE_IBSS); | 74 | is_ibss = (wlvif->bss_type == BSS_TYPE_IBSS); |
73 | if (((is_sta && !test_bit(WL1271_FLAG_STA_ASSOCIATED, &wl->flags)) || | 75 | if (((is_sta && !test_bit(WL1271_FLAG_STA_ASSOCIATED, &wl->flags)) || |
74 | (is_ibss && !test_bit(WL1271_FLAG_IBSS_JOINED, &wl->flags))) && | 76 | (is_ibss && !test_bit(WL1271_FLAG_IBSS_JOINED, &wl->flags))) && |
75 | !test_bit(wl->dev_role_id, wl->roc_map)) { | 77 | !test_bit(wlvif->dev_role_id, wl->roc_map)) { |
76 | /* restore remain on channel */ | 78 | /* restore remain on channel */ |
77 | wl12xx_cmd_role_start_dev(wl); | 79 | wl12xx_cmd_role_start_dev(wl, wlvif); |
78 | wl12xx_roc(wl, wl->dev_role_id); | 80 | wl12xx_roc(wl, wlvif->dev_role_id); |
79 | } | 81 | } |
80 | wl1271_ps_elp_sleep(wl); | 82 | wl1271_ps_elp_sleep(wl); |
81 | 83 | ||
diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/tx.c index 5561ec2d4b4f..538d8613b324 100644 --- a/drivers/net/wireless/wl12xx/tx.c +++ b/drivers/net/wireless/wl12xx/tx.c | |||
@@ -77,7 +77,8 @@ static void wl1271_free_tx_id(struct wl1271 *wl, int id) | |||
77 | } | 77 | } |
78 | 78 | ||
79 | static int wl1271_tx_update_filters(struct wl1271 *wl, | 79 | static int wl1271_tx_update_filters(struct wl1271 *wl, |
80 | struct sk_buff *skb) | 80 | struct wl12xx_vif *wlvif, |
81 | struct sk_buff *skb) | ||
81 | { | 82 | { |
82 | struct ieee80211_hdr *hdr; | 83 | struct ieee80211_hdr *hdr; |
83 | int ret; | 84 | int ret; |
@@ -97,11 +98,11 @@ static int wl1271_tx_update_filters(struct wl1271 *wl, | |||
97 | goto out; | 98 | goto out; |
98 | 99 | ||
99 | wl1271_debug(DEBUG_CMD, "starting device role for roaming"); | 100 | wl1271_debug(DEBUG_CMD, "starting device role for roaming"); |
100 | ret = wl12xx_cmd_role_start_dev(wl); | 101 | ret = wl12xx_cmd_role_start_dev(wl, wlvif); |
101 | if (ret < 0) | 102 | if (ret < 0) |
102 | goto out; | 103 | goto out; |
103 | 104 | ||
104 | ret = wl12xx_roc(wl, wl->dev_role_id); | 105 | ret = wl12xx_roc(wl, wlvif->dev_role_id); |
105 | if (ret < 0) | 106 | if (ret < 0) |
106 | goto out; | 107 | goto out; |
107 | out: | 108 | out: |
@@ -192,7 +193,7 @@ static u8 wl1271_tx_get_hlid(struct wl1271 *wl, struct ieee80211_vif *vif, | |||
192 | if (wlvif->bss_type == BSS_TYPE_AP_BSS) | 193 | if (wlvif->bss_type == BSS_TYPE_AP_BSS) |
193 | return wl12xx_tx_get_hlid_ap(wl, skb); | 194 | return wl12xx_tx_get_hlid_ap(wl, skb); |
194 | 195 | ||
195 | wl1271_tx_update_filters(wl, skb); | 196 | wl1271_tx_update_filters(wl, wlvif, skb); |
196 | 197 | ||
197 | if ((test_bit(WL1271_FLAG_STA_ASSOCIATED, &wl->flags) || | 198 | if ((test_bit(WL1271_FLAG_STA_ASSOCIATED, &wl->flags) || |
198 | test_bit(WL1271_FLAG_IBSS_JOINED, &wl->flags)) && | 199 | test_bit(WL1271_FLAG_IBSS_JOINED, &wl->flags)) && |
diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h index e249b459f62b..4c69ae1635fe 100644 --- a/drivers/net/wireless/wl12xx/wl12xx.h +++ b/drivers/net/wireless/wl12xx/wl12xx.h | |||
@@ -401,7 +401,6 @@ struct wl1271 { | |||
401 | 401 | ||
402 | u8 mac_addr[ETH_ALEN]; | 402 | u8 mac_addr[ETH_ALEN]; |
403 | int channel; | 403 | int channel; |
404 | u8 dev_role_id; | ||
405 | u8 system_hlid; | 404 | u8 system_hlid; |
406 | u8 sta_hlid; | 405 | u8 sta_hlid; |
407 | u8 dev_hlid; | 406 | u8 dev_hlid; |
@@ -622,6 +621,9 @@ struct wl12xx_vif { | |||
622 | u8 p2p; /* we are using p2p role */ | 621 | u8 p2p; /* we are using p2p role */ |
623 | u8 role_id; | 622 | u8 role_id; |
624 | 623 | ||
624 | /* sta/ibss specific */ | ||
625 | u8 dev_role_id; | ||
626 | |||
625 | u8 ssid[IEEE80211_MAX_SSID_LEN + 1]; | 627 | u8 ssid[IEEE80211_MAX_SSID_LEN + 1]; |
626 | u8 ssid_len; | 628 | u8 ssid_len; |
627 | 629 | ||