Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256223
b: refs/heads/master
c: ef4b29e
h: refs/heads/master
i:
  256221: bc1e721
  256219: 435e37c
  256215: e7493ad
  256207: bd6b65c
  256191: c23d2f5
v: v3
  • Loading branch information
Eliad Peller authored and Luciano Coelho committed Jun 27, 2011
1 parent a667108 commit 67041c9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 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: 6bb043321569ac356c790a8d3bd759742e1f9352
refs/heads/master: ef4b29e976f9e0a622dfd2722b443bb65686f47c
23 changes: 18 additions & 5 deletions trunk/drivers/net/wireless/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,22 @@ static struct platform_device wl1271_device = {
static DEFINE_MUTEX(wl_list_mutex);
static LIST_HEAD(wl_list);

static int wl1271_check_operstate(struct wl1271 *wl, unsigned char operstate)
{
int ret;
if (operstate != IF_OPER_UP)
return 0;

if (test_and_set_bit(WL1271_FLAG_STA_STATE_SENT, &wl->flags))
return 0;

ret = wl1271_cmd_set_sta_state(wl);
if (ret < 0)
return ret;

wl1271_info("Association completed.");
return 0;
}
static int wl1271_dev_notify(struct notifier_block *me, unsigned long what,
void *arg)
{
Expand Down Expand Up @@ -443,11 +459,7 @@ static int wl1271_dev_notify(struct notifier_block *me, unsigned long what,
if (ret < 0)
goto out;

if ((dev->operstate == IF_OPER_UP) &&
!test_and_set_bit(WL1271_FLAG_STA_STATE_SENT, &wl->flags)) {
wl1271_cmd_set_sta_state(wl);
wl1271_info("Association completed.");
}
wl1271_check_operstate(wl, dev->operstate);

wl1271_ps_elp_sleep(wl);

Expand Down Expand Up @@ -3217,6 +3229,7 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl,
wl1271_warning("cmd join failed %d", ret);
goto out;
}
wl1271_check_operstate(wl, ieee80211_get_operstate(vif));
}

out:
Expand Down

0 comments on commit 67041c9

Please sign in to comment.