Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328345
b: refs/heads/master
c: 889300f
h: refs/heads/master
i:
  328343: d588ecd
v: v3
  • Loading branch information
Eliad Peller authored and Luciano Coelho committed Sep 27, 2012
1 parent 9a5d672 commit be59aa1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8dc574308b9172e2a38ac20319b7dd696b6d4741
refs/heads/master: 889300fa53702ce3ed063eeadddfa7775afc8cde
16 changes: 15 additions & 1 deletion trunk/drivers/net/wireless/ti/wlcore/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1788,10 +1788,17 @@ int wl12xx_start_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif)
wlvif->bss_type == BSS_TYPE_IBSS)))
return -EINVAL;

ret = wl12xx_cmd_role_start_dev(wl, wlvif);
ret = wl12xx_cmd_role_enable(wl,
wl12xx_wlvif_to_vif(wlvif)->addr,
WL1271_ROLE_DEVICE,
&wlvif->dev_role_id);
if (ret < 0)
goto out;

ret = wl12xx_cmd_role_start_dev(wl, wlvif);
if (ret < 0)
goto out_disable;

ret = wl12xx_roc(wl, wlvif, wlvif->dev_role_id);
if (ret < 0)
goto out_stop;
Expand All @@ -1800,6 +1807,8 @@ int wl12xx_start_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif)

out_stop:
wl12xx_cmd_role_stop_dev(wl, wlvif);
out_disable:
wl12xx_cmd_role_disable(wl, &wlvif->dev_role_id);
out:
return ret;
}
Expand Down Expand Up @@ -1827,6 +1836,11 @@ int wl12xx_stop_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif)
ret = wl12xx_cmd_role_stop_dev(wl, wlvif);
if (ret < 0)
goto out;

ret = wl12xx_cmd_role_disable(wl, &wlvif->dev_role_id);
if (ret < 0)
goto out;

out:
return ret;
}
19 changes: 0 additions & 19 deletions trunk/drivers/net/wireless/ti/wlcore/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2273,21 +2273,6 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw,
}
}

if (wlvif->bss_type == BSS_TYPE_STA_BSS ||
wlvif->bss_type == BSS_TYPE_IBSS) {
/*
* The device role is a special role used for
* rx and tx frames prior to association (as
* the STA role can get packets only from
* its associated bssid)
*/
ret = wl12xx_cmd_role_enable(wl, vif->addr,
WL1271_ROLE_DEVICE,
&wlvif->dev_role_id);
if (ret < 0)
goto out;
}

ret = wl12xx_cmd_role_enable(wl, vif->addr,
role_type, &wlvif->role_id);
if (ret < 0)
Expand Down Expand Up @@ -2356,10 +2341,6 @@ static void __wl1271_op_remove_interface(struct wl1271 *wl,
wlvif->bss_type == BSS_TYPE_IBSS) {
if (wl12xx_dev_role_started(wlvif))
wl12xx_stop_dev(wl, wlvif);

ret = wl12xx_cmd_role_disable(wl, &wlvif->dev_role_id);
if (ret < 0)
goto deinit;
}

ret = wl12xx_cmd_role_disable(wl, &wlvif->role_id);
Expand Down

0 comments on commit be59aa1

Please sign in to comment.