Browse files

call some commands on association

some of the commands (e.g. set aid) were mistakenly taken out
during the connection redesign. add them back.

(NOTE: i get some errors from time to time, but it mostly seem
like fw issues)
  • Loading branch information...
1 parent a584d9a commit d4a897f11e4912c292772ce60b16193c7756be7e @elp elp committed May 22, 2012
Showing with 19 additions and 8 deletions.
  1. +19 −8 drivers/net/wireless/ti/wlcore/main.c
View
27 drivers/net/wireless/ti/wlcore/main.c
@@ -2308,8 +2308,7 @@ static int wl12xx_op_change_interface(struct ieee80211_hw *hw,
return ret;
}
-static int wl1271_join(struct wl1271 *wl, struct wl12xx_vif *wlvif,
- bool set_assoc)
+static int wl1271_join(struct wl1271 *wl, struct wl12xx_vif *wlvif)
{
int ret;
bool is_ibss = (wlvif->bss_type == BSS_TYPE_IBSS);
@@ -2344,9 +2343,13 @@ static int wl1271_join(struct wl1271 *wl, struct wl12xx_vif *wlvif,
wl12xx_roc(wl, wlvif, wlvif->role_id);
wlvif->pending_roc = false;
}
+out:
+ return ret;
+}
- if (!test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags))
- goto out;
+static int wlcore_set_assoc(struct wl1271 *wl, struct wl12xx_vif *wlvif)
+{
+ int ret;
/*
* The join command disable the keep-alive mode, shut down its process,
@@ -2371,7 +2374,6 @@ static int wl1271_join(struct wl1271 *wl, struct wl12xx_vif *wlvif,
ACX_KEEP_ALIVE_TPL_VALID);
if (ret < 0)
goto out;
-
out:
return ret;
}
@@ -3848,8 +3850,8 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl,
if (ret < 0)
goto out;
- if (test_bit(WLVIF_FLAG_STA_AUTHORIZED, &wlvif->flags))
- wl12xx_set_authorized(wl, wlvif);
+ /* TODO: reorder do_join and set_assoc? */
+ set_assoc = true;
} else {
bool was_assoc =
!!test_and_clear_bit(WLVIF_FLAG_STA_ASSOCIATED,
@@ -3903,7 +3905,7 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl,
goto out;
if (do_join) {
- ret = wl1271_join(wl, wlvif, set_assoc);
+ ret = wl1271_join(wl, wlvif);
if (ret < 0) {
wl1271_warning("cmd join failed %d", ret);
goto out;
@@ -3919,6 +3921,15 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl,
*/
}
+ if (set_assoc) {
+ ret = wlcore_set_assoc(wl, wlvif);
+ if (ret < 0)
+ goto out;
+
+ if (test_bit(WLVIF_FLAG_STA_AUTHORIZED, &wlvif->flags))
+ wl12xx_set_authorized(wl, wlvif);
+ }
+
/* Handle new association with HT. Do this after join. */
if (sta_exists) {
if ((changed & BSS_CHANGED_HT) &&

0 comments on commit d4a897f

Please sign in to comment.