diff options
author | Michael Braun <michael-dev@fami-braun.de> | 2016-10-10 19:12:20 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2016-10-12 11:11:08 +0200 |
commit | 5f9994bd4a58f72a4312fb3e09c7fe2c4ca95b82 (patch) | |
tree | 1817e2f2909c923a43e4b8ea267f679a17b227ad /net/mac80211/cfg.c | |
parent | 246ad56e25b4005648cd54e0f0ab8f0357f8a42a (diff) | |
download | linux-5f9994bd4a58f72a4312fb3e09c7fe2c4ca95b82.tar.bz2 |
mac80211: remove unnecessary num_mcast_sta check
Checking for num_mcast_sta in __ieee80211_request_smps_ap() is
unnecessary as sta list will be empty in this case anyway, so
the list iteration will just exit immediately. Since this isn't
a "hot" code path, it doesn't really matter, and the next patch
will redefine num_mcast_sta to make this check invalid.
Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
[change commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 7d0172395589..7de34a3fbd35 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -2477,13 +2477,6 @@ int __ieee80211_request_smps_ap(struct ieee80211_sub_if_data *sdata, smps_mode == IEEE80211_SMPS_AUTOMATIC) return 0; - /* If no associated stations, there's no need to do anything */ - if (!atomic_read(&sdata->u.ap.num_mcast_sta)) { - sdata->smps_mode = smps_mode; - ieee80211_queue_work(&sdata->local->hw, &sdata->recalc_smps); - return 0; - } - ht_dbg(sdata, "SMPS %d requested in AP mode, sending Action frame to %d stations\n", smps_mode, atomic_read(&sdata->u.ap.num_mcast_sta)); |