Skip to content

Commit

Permalink
move set_authorized to CHANGED_ASSOC
Browse files Browse the repository at this point in the history
  • Loading branch information
elp committed May 16, 2012
1 parent 449792a commit fafc4be
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions drivers/net/wireless/ti/wlcore/main.c
Expand Up @@ -3790,6 +3790,10 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl,
/* TODO: use some flag instead? */
if (!is_ibss &&
wlvif->sta.hlid == WL12XX_INVALID_LINK_ID) {
/* TODO: should be in userspace */
if (test_bit(wlvif->role_id, wl->roc_map))
wl12xx_croc(wl, wlvif->role_id);

ret = wl12xx_cmd_role_stop_sta(wl, wlvif);
if (ret < 0)
goto out;
Expand All @@ -3798,6 +3802,9 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl,
}

if ((changed & BSS_CHANGED_ASSOC)) {
/* TODO: we have to make sure we start sta role before this
* notification (e.g. we'll have a problem with reconfig)
*/
if (bss_conf->assoc) {
int ieoffset;
wlvif->aid = bss_conf->aid;
Expand Down Expand Up @@ -3831,6 +3838,9 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl,
ret = wl1271_acx_conn_monit_params(wl, wlvif, true);
if (ret < 0)
goto out;

if (test_bit(WLVIF_FLAG_STA_AUTHORIZED, &wlvif->flags))
wl12xx_set_authorized(wl, wlvif);
} else {
bool was_assoc =
!!test_and_clear_bit(WLVIF_FLAG_STA_ASSOCIATED,
Expand Down Expand Up @@ -3895,18 +3905,6 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl,
ret = wl12xx_roc(wl, wlvif, wlvif->role_id);
if (ret < 0)
goto out;

if (test_bit(WLVIF_FLAG_STA_AUTHORIZED, &wlvif->flags))
wl12xx_set_authorized(wl, wlvif);
}
/*
* stop device role if started (we might already be in
* STA/IBSS role).
*/
if (wl12xx_dev_role_started(wlvif)) {
ret = wl12xx_stop_dev(wl, wlvif);
if (ret < 0)
goto out;
}
}

Expand Down

0 comments on commit fafc4be

Please sign in to comment.