Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 368420
b: refs/heads/master
c: 690205f
h: refs/heads/master
v: v3
  • Loading branch information
Stanislaw Gruszka authored and Johannes Berg committed Mar 6, 2013
1 parent 104f654 commit d2e46c1
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 98 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: a61829437e68c8b2036cf5005ed0e875451c9120
refs/heads/master: 690205f18fd069898c70d743f498ba42798e5c4e
2 changes: 0 additions & 2 deletions trunk/net/mac80211/ieee80211_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,6 @@ struct ieee80211_if_mesh {
struct timer_list mesh_path_timer;
struct timer_list mesh_path_root_timer;

unsigned long timers_running;

unsigned long wrkq_flags;

u8 mesh_id[IEEE80211_MAX_MESH_ID_LEN];
Expand Down
57 changes: 2 additions & 55 deletions trunk/net/mac80211/mesh.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
#include "ieee80211_i.h"
#include "mesh.h"

#define TMR_RUNNING_HK 0
#define TMR_RUNNING_MP 1
#define TMR_RUNNING_MPR 2

static int mesh_allocated;
static struct kmem_cache *rm_cache;

Expand Down Expand Up @@ -50,11 +46,6 @@ static void ieee80211_mesh_housekeeping_timer(unsigned long data)

set_bit(MESH_WORK_HOUSEKEEPING, &ifmsh->wrkq_flags);

if (local->quiescing) {
set_bit(TMR_RUNNING_HK, &ifmsh->timers_running);
return;
}

ieee80211_queue_work(&local->hw, &sdata->work);
}

Expand Down Expand Up @@ -479,32 +470,19 @@ static void ieee80211_mesh_path_timer(unsigned long data)
{
struct ieee80211_sub_if_data *sdata =
(struct ieee80211_sub_if_data *) data;
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
struct ieee80211_local *local = sdata->local;

if (local->quiescing) {
set_bit(TMR_RUNNING_MP, &ifmsh->timers_running);
return;
}

ieee80211_queue_work(&local->hw, &sdata->work);
ieee80211_queue_work(&sdata->local->hw, &sdata->work);
}

static void ieee80211_mesh_path_root_timer(unsigned long data)
{
struct ieee80211_sub_if_data *sdata =
(struct ieee80211_sub_if_data *) data;
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
struct ieee80211_local *local = sdata->local;

set_bit(MESH_WORK_ROOT, &ifmsh->wrkq_flags);

if (local->quiescing) {
set_bit(TMR_RUNNING_MPR, &ifmsh->timers_running);
return;
}

ieee80211_queue_work(&local->hw, &sdata->work);
ieee80211_queue_work(&sdata->local->hw, &sdata->work);
}

void ieee80211_mesh_root_setup(struct ieee80211_if_mesh *ifmsh)
Expand Down Expand Up @@ -622,35 +600,6 @@ static void ieee80211_mesh_rootpath(struct ieee80211_sub_if_data *sdata)
round_jiffies(TU_TO_EXP_TIME(interval)));
}

#ifdef CONFIG_PM
void ieee80211_mesh_quiesce(struct ieee80211_sub_if_data *sdata)
{
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;

/* use atomic bitops in case all timers fire at the same time */

if (del_timer_sync(&ifmsh->housekeeping_timer))
set_bit(TMR_RUNNING_HK, &ifmsh->timers_running);
if (del_timer_sync(&ifmsh->mesh_path_timer))
set_bit(TMR_RUNNING_MP, &ifmsh->timers_running);
if (del_timer_sync(&ifmsh->mesh_path_root_timer))
set_bit(TMR_RUNNING_MPR, &ifmsh->timers_running);
}

void ieee80211_mesh_restart(struct ieee80211_sub_if_data *sdata)
{
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;

if (test_and_clear_bit(TMR_RUNNING_HK, &ifmsh->timers_running))
add_timer(&ifmsh->housekeeping_timer);
if (test_and_clear_bit(TMR_RUNNING_MP, &ifmsh->timers_running))
add_timer(&ifmsh->mesh_path_timer);
if (test_and_clear_bit(TMR_RUNNING_MPR, &ifmsh->timers_running))
add_timer(&ifmsh->mesh_path_root_timer);
ieee80211_mesh_root_setup(ifmsh);
}
#endif

static int
ieee80211_mesh_build_beacon(struct ieee80211_if_mesh *ifmsh)
{
Expand Down Expand Up @@ -871,8 +820,6 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)
local->fif_other_bss--;
atomic_dec(&local->iff_allmultis);
ieee80211_configure_filter(local);

sdata->u.mesh.timers_running = 0;
}

static void
Expand Down
12 changes: 0 additions & 12 deletions trunk/net/mac80211/mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,6 @@ void mesh_path_timer(unsigned long data);
void mesh_path_flush_by_nexthop(struct sta_info *sta);
void mesh_path_discard_frame(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb);
void mesh_path_quiesce(struct ieee80211_sub_if_data *sdata);
void mesh_path_restart(struct ieee80211_sub_if_data *sdata);
void mesh_path_tx_root_frame(struct ieee80211_sub_if_data *sdata);

bool mesh_action_is_path_sel(struct ieee80211_mgmt *mgmt);
Expand Down Expand Up @@ -359,22 +357,12 @@ static inline bool mesh_path_sel_is_hwmp(struct ieee80211_sub_if_data *sdata)

void ieee80211_mesh_notify_scan_completed(struct ieee80211_local *local);

void ieee80211_mesh_quiesce(struct ieee80211_sub_if_data *sdata);
void ieee80211_mesh_restart(struct ieee80211_sub_if_data *sdata);
void mesh_plink_quiesce(struct sta_info *sta);
void mesh_plink_restart(struct sta_info *sta);
void mesh_path_flush_by_iface(struct ieee80211_sub_if_data *sdata);
void mesh_sync_adjust_tbtt(struct ieee80211_sub_if_data *sdata);
void ieee80211s_stop(void);
#else
static inline void
ieee80211_mesh_notify_scan_completed(struct ieee80211_local *local) {}
static inline void ieee80211_mesh_quiesce(struct ieee80211_sub_if_data *sdata)
{}
static inline void ieee80211_mesh_restart(struct ieee80211_sub_if_data *sdata)
{}
static inline void mesh_plink_quiesce(struct sta_info *sta) {}
static inline void mesh_plink_restart(struct sta_info *sta) {}
static inline bool mesh_path_sel_is_hwmp(struct ieee80211_sub_if_data *sdata)
{ return false; }
static inline void mesh_path_flush_by_iface(struct ieee80211_sub_if_data *sdata)
Expand Down
27 changes: 1 addition & 26 deletions trunk/net/mac80211/mesh_plink.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,10 +534,8 @@ static void mesh_plink_timer(unsigned long data)
*/
sta = (struct sta_info *) data;

if (sta->sdata->local->quiescing) {
sta->plink_timer_was_running = true;
if (sta->sdata->local->quiescing)
return;
}

spin_lock_bh(&sta->lock);
if (sta->ignore_plink_timer) {
Expand Down Expand Up @@ -598,29 +596,6 @@ static void mesh_plink_timer(unsigned long data)
}
}

#ifdef CONFIG_PM
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;
}

void mesh_plink_restart(struct sta_info *sta)
{
if (sta->plink_timer_was_running) {
add_timer(&sta->plink_timer);
sta->plink_timer_was_running = false;
}
}
#endif

static inline void mesh_plink_timer_set(struct sta_info *sta, int timeout)
{
sta->plink_timer.expires = jiffies + (HZ * timeout / 1000);
Expand Down
2 changes: 0 additions & 2 deletions trunk/net/mac80211/sta_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ struct sta_ampdu_mlme {
* @plink_state: peer link state
* @plink_timeout: timeout of peer link
* @plink_timer: peer link watch timer
* @plink_timer_was_running: used by suspend/resume to restore timers
* @t_offset: timing offset relative to this host
* @t_offset_setpoint: reference timing offset of this sta to be used when
* calculating clockdrift
Expand Down Expand Up @@ -379,7 +378,6 @@ struct sta_info {
__le16 reason;
u8 plink_retries;
bool ignore_plink_timer;
bool plink_timer_was_running;
enum nl80211_plink_state plink_state;
u32 plink_timeout;
struct timer_list plink_timer;
Expand Down

0 comments on commit d2e46c1

Please sign in to comment.