diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2015-07-15 08:56:05 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-07-17 09:48:50 -0400 |
commit | 727da60be91c9fd59f1b084ca537b5123ab97744 (patch) | |
tree | bed8b51c65e6684f33961c102ba83c8019d8a558 /net/mac80211/driver-ops.h | |
parent | 0e0060fcfb3d0f5a53ef43e7b6a50227b934ab7c (diff) |
mac80211: deinline drv_sta_state
With this .config: http://busybox.net/~vda/kernel_config,
after deinlining the function size is 3132 bytes and there are
7 callsites.
Total size reduction: about 20 kbytes.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
CC: John Linville <linville@tuxdriver.com>
CC: Michal Kazior <michal.kazior@tieto.com>
Cc: Johannes Berg <johannes.berg@intel.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
CC: linux-kernel@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/driver-ops.h')
-rw-r--r-- | net/mac80211/driver-ops.h | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index 32a2e707e222..02d91332d7dd 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h | |||
@@ -573,37 +573,12 @@ static inline void drv_sta_pre_rcu_remove(struct ieee80211_local *local, | |||
573 | trace_drv_return_void(local); | 573 | trace_drv_return_void(local); |
574 | } | 574 | } |
575 | 575 | ||
576 | static inline __must_check | 576 | __must_check |
577 | int drv_sta_state(struct ieee80211_local *local, | 577 | int drv_sta_state(struct ieee80211_local *local, |
578 | struct ieee80211_sub_if_data *sdata, | 578 | struct ieee80211_sub_if_data *sdata, |
579 | struct sta_info *sta, | 579 | struct sta_info *sta, |
580 | enum ieee80211_sta_state old_state, | 580 | enum ieee80211_sta_state old_state, |
581 | enum ieee80211_sta_state new_state) | 581 | enum ieee80211_sta_state new_state); |
582 | { | ||
583 | int ret = 0; | ||
584 | |||
585 | might_sleep(); | ||
586 | |||
587 | sdata = get_bss_sdata(sdata); | ||
588 | if (!check_sdata_in_driver(sdata)) | ||
589 | return -EIO; | ||
590 | |||
591 | trace_drv_sta_state(local, sdata, &sta->sta, old_state, new_state); | ||
592 | if (local->ops->sta_state) { | ||
593 | ret = local->ops->sta_state(&local->hw, &sdata->vif, &sta->sta, | ||
594 | old_state, new_state); | ||
595 | } else if (old_state == IEEE80211_STA_AUTH && | ||
596 | new_state == IEEE80211_STA_ASSOC) { | ||
597 | ret = drv_sta_add(local, sdata, &sta->sta); | ||
598 | if (ret == 0) | ||
599 | sta->uploaded = true; | ||
600 | } else if (old_state == IEEE80211_STA_ASSOC && | ||
601 | new_state == IEEE80211_STA_AUTH) { | ||
602 | drv_sta_remove(local, sdata, &sta->sta); | ||
603 | } | ||
604 | trace_drv_return_int(local, ret); | ||
605 | return ret; | ||
606 | } | ||
607 | 582 | ||
608 | static inline void drv_sta_rc_update(struct ieee80211_local *local, | 583 | static inline void drv_sta_rc_update(struct ieee80211_local *local, |
609 | struct ieee80211_sub_if_data *sdata, | 584 | struct ieee80211_sub_if_data *sdata, |