Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328165
b: refs/heads/master
c: 5d8e423
h: refs/heads/master
i:
  328163: 5bc1d9f
v: v3
  • Loading branch information
Johannes Berg committed Sep 14, 2012
1 parent 48b7d19 commit fbddb49
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 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: 04b7b2ff50fc77380c1e711f1d7223734547e41b
refs/heads/master: 5d8e4237d2dc73b51ac66dc612c5c42dd7424479
2 changes: 0 additions & 2 deletions trunk/net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2070,9 +2070,7 @@ int __ieee80211_request_smps(struct ieee80211_sub_if_data *sdata,
*/
if (!sdata->u.mgd.associated ||
sdata->vif.bss_conf.channel_type == NL80211_CHAN_NO_HT) {
mutex_lock(&sdata->local->iflist_mtx);
ieee80211_recalc_smps(sdata->local);
mutex_unlock(&sdata->local->iflist_mtx);
return 0;
}

Expand Down
2 changes: 0 additions & 2 deletions trunk/net/mac80211/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,7 @@ static void ieee80211_recalc_smps_work(struct work_struct *work)
struct ieee80211_local *local =
container_of(work, struct ieee80211_local, recalc_smps);

mutex_lock(&local->iflist_mtx);
ieee80211_recalc_smps(local);
mutex_unlock(&local->iflist_mtx);
}

#ifdef CONFIG_INET
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -1348,9 +1348,9 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata,

mutex_lock(&local->iflist_mtx);
ieee80211_recalc_ps(local, -1);
ieee80211_recalc_smps(local);
mutex_unlock(&local->iflist_mtx);

ieee80211_recalc_smps(local);
ieee80211_recalc_ps_vif(sdata);

netif_tx_start_all_queues(sdata->dev);
Expand Down
7 changes: 4 additions & 3 deletions trunk/net/mac80211/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1606,14 +1606,13 @@ static int check_mgd_smps(struct ieee80211_if_managed *ifmgd,
return 0;
}

/* must hold iflist_mtx */
void ieee80211_recalc_smps(struct ieee80211_local *local)
{
struct ieee80211_sub_if_data *sdata;
enum ieee80211_smps_mode smps_mode = IEEE80211_SMPS_OFF;
int count = 0;

lockdep_assert_held(&local->iflist_mtx);
mutex_lock(&local->iflist_mtx);

/*
* This function could be improved to handle multiple
Expand Down Expand Up @@ -1642,12 +1641,14 @@ void ieee80211_recalc_smps(struct ieee80211_local *local)
}

if (smps_mode == local->smps_mode)
return;
goto unlock;

set:
local->smps_mode = smps_mode;
/* changed flag is auto-detected for this */
ieee80211_hw_config(local, 0);
unlock:
mutex_unlock(&local->iflist_mtx);
}

static bool ieee80211_id_in_list(const u8 *ids, int n_ids, u8 id)
Expand Down

0 comments on commit fbddb49

Please sign in to comment.