Skip to content

Commit

Permalink
mac80211: remove unnecessary num_mcast_sta check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Braun authored and Johannes Berg committed Oct 12, 2016
1 parent 246ad56 commit 5f9994b
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 5f9994b

Please sign in to comment.