Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352647
b: refs/heads/master
c: 45b5028
h: refs/heads/master
i:
  352645: fc1fc26
  352643: 89a01ca
  352639: 958d861
v: v3
  • Loading branch information
Thomas Pedersen authored and Johannes Berg committed Feb 11, 2013
1 parent 33ddb7b commit 6b058e3
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 11 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: 077f897a8be9c617e69035af4d17a472d4af272b
refs/heads/master: 45b5028e86292284f4d5794047d5dfd742c22421
25 changes: 25 additions & 0 deletions trunk/net/mac80211/mesh.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,31 @@ u32 mesh_accept_plinks_update(struct ieee80211_sub_if_data *sdata)
return changed;
}

/*
* mesh_sta_cleanup - clean up any mesh sta state
*
* @sta: mesh sta to clean up.
*/
void mesh_sta_cleanup(struct sta_info *sta)
{
struct ieee80211_sub_if_data *sdata = sta->sdata;
u32 changed;

/*
* maybe userspace handles peer allocation and peering, but in either
* case the beacon is still generated by the kernel and we might need
* an update.
*/
changed = mesh_accept_plinks_update(sdata);
if (sdata->u.mesh.security == IEEE80211_MESH_SEC_NONE) {
changed |= mesh_plink_deactivate(sta);
del_timer_sync(&sta->plink_timer);
}

if (changed)
ieee80211_bss_info_change_notify(sdata, changed);
}

int mesh_rmc_init(struct ieee80211_sub_if_data *sdata)
{
int i;
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/mac80211/mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,13 @@ void mesh_neighbour_update(struct ieee80211_sub_if_data *sdata,
bool mesh_peer_accepts_plinks(struct ieee802_11_elems *ie);
u32 mesh_accept_plinks_update(struct ieee80211_sub_if_data *sdata);
void mesh_plink_broken(struct sta_info *sta);
void mesh_plink_deactivate(struct sta_info *sta);
u32 mesh_plink_deactivate(struct sta_info *sta);
int mesh_plink_open(struct sta_info *sta);
void mesh_plink_block(struct sta_info *sta);
void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt, size_t len,
struct ieee80211_rx_status *rx_status);
void mesh_sta_cleanup(struct sta_info *sta);

/* Private interfaces */
/* Mesh tables */
Expand Down
8 changes: 6 additions & 2 deletions trunk/net/mac80211/mesh_plink.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ static u32 __mesh_plink_deactivate(struct sta_info *sta)
*
* All mesh paths with this peer as next hop will be flushed
*/
void mesh_plink_deactivate(struct sta_info *sta)
u32 mesh_plink_deactivate(struct sta_info *sta)
{
struct ieee80211_sub_if_data *sdata = sta->sdata;
u32 changed;
Expand All @@ -227,7 +227,7 @@ void mesh_plink_deactivate(struct sta_info *sta)
sta->reason);
spin_unlock_bh(&sta->lock);

ieee80211_bss_info_change_notify(sdata, changed);
return changed;
}

static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
Expand Down Expand Up @@ -595,6 +595,10 @@ void mesh_plink_quiesce(struct sta_info *sta)
if (!ieee80211_vif_is_mesh(&sta->sdata->vif))
return;

/* no kernel mesh sta timers have been initialized */
if (sta->sdata->u.mesh.security != IEEE80211_MESH_SEC_NONE)
return;

if (del_timer_sync(&sta->plink_timer))
sta->plink_timer_was_running = true;
}
Expand Down
9 changes: 2 additions & 7 deletions trunk/net/mac80211/sta_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,8 @@ static void cleanup_single_sta(struct sta_info *sta)
ieee80211_purge_tx_queue(&local->hw, &sta->tx_filtered[ac]);
}

#ifdef CONFIG_MAC80211_MESH
if (ieee80211_vif_is_mesh(&sdata->vif)) {
mesh_accept_plinks_update(sdata);
mesh_plink_deactivate(sta);
del_timer_sync(&sta->plink_timer);
}
#endif
if (ieee80211_vif_is_mesh(&sdata->vif))
mesh_sta_cleanup(sta);

cancel_work_sync(&sta->drv_unblock_wk);

Expand Down

0 comments on commit 6b058e3

Please sign in to comment.