Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203738
b: refs/heads/master
c: bc05d19
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jul 21, 2010
1 parent 40a5bb2 commit ababd6d
Show file tree
Hide file tree
Showing 2 changed files with 15 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: 9dca9c490146e787472bc05b264e043311a4c67b
refs/heads/master: bc05d19f4b884b1dbbce48912710ae3f972c89d2
19 changes: 14 additions & 5 deletions trunk/net/mac80211/ibss.c
Original file line number Diff line number Diff line change
Expand Up @@ -943,11 +943,6 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)
}
}

del_timer_sync(&sdata->u.ibss.timer);
clear_bit(IEEE80211_IBSS_REQ_RUN, &sdata->u.ibss.request);
cancel_work_sync(&sdata->work);
clear_bit(IEEE80211_IBSS_REQ_RUN, &sdata->u.ibss.request);

sta_info_flush(sdata->local, sdata);

/* remove beacon */
Expand All @@ -964,6 +959,20 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)
memset(sdata->u.ibss.bssid, 0, ETH_ALEN);
sdata->u.ibss.ssid_len = 0;

/*
* ssid_len indicates active or not, so needs to be visible to
* everybody, especially ieee80211_ibss_notify_scan_completed,
* so it won't restart the timer after we remove it here.
*/
mb();

del_timer_sync(&sdata->u.ibss.timer);
clear_bit(IEEE80211_IBSS_REQ_RUN, &sdata->u.ibss.request);
/*
* Since the REQ_RUN bit is clear, the work won't do
* anything if it runs after this.
*/

ieee80211_recalc_idle(sdata->local);

return 0;
Expand Down

0 comments on commit ababd6d

Please sign in to comment.