diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-08-05 17:02:38 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-08-16 21:26:40 +0200 |
commit | 7da7cc1d42d8ce02cca16df8c021e6d657f1f8fd (patch) | |
tree | 3d18e0b36edfcc015d27f66890cf4a8d60c45bda /net/mac80211/ibss.c | |
parent | net: mac80211: Fix a typo. (diff) | |
download | linux-7da7cc1d42d8ce02cca16df8c021e6d657f1f8fd.tar.xz linux-7da7cc1d42d8ce02cca16df8c021e6d657f1f8fd.zip |
mac80211: per interface idle notification
Sometimes we don't just need to know whether or
not the device is idle, but also per interface.
This adds that reporting capability to mac80211.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ibss.c')
-rw-r--r-- | net/mac80211/ibss.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index c691780725a7..32af97108425 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c @@ -920,12 +920,14 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata, memcpy(sdata->u.ibss.ssid, params->ssid, IEEE80211_MAX_SSID_LEN); sdata->u.ibss.ssid_len = params->ssid_len; + mutex_unlock(&sdata->u.ibss.mtx); + + mutex_lock(&sdata->local->mtx); ieee80211_recalc_idle(sdata->local); + mutex_unlock(&sdata->local->mtx); ieee80211_queue_work(&sdata->local->hw, &sdata->work); - mutex_unlock(&sdata->u.ibss.mtx); - return 0; } @@ -980,7 +982,9 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata) mutex_unlock(&sdata->u.ibss.mtx); + mutex_lock(&local->mtx); ieee80211_recalc_idle(sdata->local); + mutex_unlock(&local->mtx); return 0; } |