Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352151
b: refs/heads/master
c: 2993626
h: refs/heads/master
i:
  352149: 0ba2b0a
  352147: d14e706
  352143: b572a1b
v: v3
  • Loading branch information
Eliad Peller authored and Luciano Coelho committed Nov 27, 2012
1 parent 73bcdb7 commit bd1aee3
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 17 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: b6970ee582acf059fbbc35d861376bd2ae38b7de
refs/heads/master: 29936266780295c812b9b8ac27a3db669e0ed1be
44 changes: 28 additions & 16 deletions trunk/drivers/net/wireless/ti/wlcore/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ static int wl12xx_set_authorized(struct wl1271 *wl,
if (ret < 0)
return ret;

wl12xx_croc(wl, wlvif->role_id);

wl1271_info("Association completed.");
return 0;
}
Expand Down Expand Up @@ -3974,14 +3972,6 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl,
wl1271_warning("cmd join failed %d", ret);
goto out;
}

/* ROC until connected (after EAPOL exchange) */
if (!is_ibss) {
ret = wl12xx_roc(wl, wlvif, wlvif->role_id,
wlvif->band, wlvif->channel);
if (ret < 0)
goto out;
}
}

if (changed & BSS_CHANGED_ASSOC) {
Expand Down Expand Up @@ -4398,16 +4388,18 @@ static int wl12xx_update_sta_state(struct wl1271 *wl,
/* Add station (AP mode) */
if (is_ap &&
old_state == IEEE80211_STA_NOTEXIST &&
new_state == IEEE80211_STA_NONE)
return wl12xx_sta_add(wl, wlvif, sta);
new_state == IEEE80211_STA_NONE) {
ret = wl12xx_sta_add(wl, wlvif, sta);
if (ret)
return ret;
}

/* Remove station (AP mode) */
if (is_ap &&
old_state == IEEE80211_STA_NONE &&
new_state == IEEE80211_STA_NOTEXIST) {
/* must not fail */
wl12xx_sta_remove(wl, wlvif, sta);
return 0;
}

/* Authorize station (AP mode) */
Expand All @@ -4419,24 +4411,44 @@ static int wl12xx_update_sta_state(struct wl1271 *wl,

ret = wl1271_acx_set_ht_capabilities(wl, &sta->ht_cap, true,
hlid);
return ret;
if (ret)
return ret;
}

/* Authorize station */
if (is_sta &&
new_state == IEEE80211_STA_AUTHORIZED) {
set_bit(WLVIF_FLAG_STA_AUTHORIZED, &wlvif->flags);
return wl12xx_set_authorized(wl, wlvif);
ret = wl12xx_set_authorized(wl, wlvif);
if (ret)
return ret;
}

if (is_sta &&
old_state == IEEE80211_STA_AUTHORIZED &&
new_state == IEEE80211_STA_ASSOC) {
clear_bit(WLVIF_FLAG_STA_AUTHORIZED, &wlvif->flags);
clear_bit(WLVIF_FLAG_STA_STATE_SENT, &wlvif->flags);
return 0;
}

/* clear ROCs on failure or authorization */
if (is_sta &&
(new_state == IEEE80211_STA_AUTHORIZED ||
new_state == IEEE80211_STA_NOTEXIST)) {
if (test_bit(wlvif->role_id, wl->roc_map))
wl12xx_croc(wl, wlvif->role_id);
}

if (is_sta &&
old_state == IEEE80211_STA_NOTEXIST &&
new_state == IEEE80211_STA_NONE) {
if (find_first_bit(wl->roc_map,
WL12XX_MAX_ROLES) >= WL12XX_MAX_ROLES) {
WARN_ON(wlvif->role_id == WL12XX_INVALID_ROLE_ID);
wl12xx_roc(wl, wlvif, wlvif->role_id,
wlvif->band, wlvif->channel);
}
}
return 0;
}

Expand Down

0 comments on commit bd1aee3

Please sign in to comment.