aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2015-09-18 09:19:35 -0400
committerJohannes Berg <johannes.berg@intel.com>2015-09-29 09:56:45 -0400
commit4fbd572c29bd184146e8adf52631db193c4e34b9 (patch)
tree588878ac9785e6bf7a1db27eda885c7f7b6f0acd
parentb23dcd4aca1854cda520def01731ad035cae94d8 (diff)
mac80211: Deinline drv_sta_rc_update()
With this .config: http://busybox.net/~vda/kernel_config_ALLYES_Os, after deinlining the function size is 706 bytes and there are 2 callsites, reducing code size by about 700 bytes. 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: linux-kernel@vger.kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--net/mac80211/driver-ops.c20
-rw-r--r--net/mac80211/driver-ops.h22
2 files changed, 23 insertions, 19 deletions
diff --git a/net/mac80211/driver-ops.c b/net/mac80211/driver-ops.c
index b28e66ca835c..b85f6ff5f6c3 100644
--- a/net/mac80211/driver-ops.c
+++ b/net/mac80211/driver-ops.c
@@ -40,6 +40,26 @@ int drv_sta_state(struct ieee80211_local *local,
40 return ret; 40 return ret;
41} 41}
42 42
43void drv_sta_rc_update(struct ieee80211_local *local,
44 struct ieee80211_sub_if_data *sdata,
45 struct ieee80211_sta *sta, u32 changed)
46{
47 sdata = get_bss_sdata(sdata);
48 if (!check_sdata_in_driver(sdata))
49 return;
50
51 WARN_ON(changed & IEEE80211_RC_SUPP_RATES_CHANGED &&
52 (sdata->vif.type != NL80211_IFTYPE_ADHOC &&
53 sdata->vif.type != NL80211_IFTYPE_MESH_POINT));
54
55 trace_drv_sta_rc_update(local, sdata, sta, changed);
56 if (local->ops->sta_rc_update)
57 local->ops->sta_rc_update(&local->hw, &sdata->vif,
58 sta, changed);
59
60 trace_drv_return_void(local);
61}
62
43int drv_conf_tx(struct ieee80211_local *local, 63int drv_conf_tx(struct ieee80211_local *local,
44 struct ieee80211_sub_if_data *sdata, u16 ac, 64 struct ieee80211_sub_if_data *sdata, u16 ac,
45 const struct ieee80211_tx_queue_params *params) 65 const struct ieee80211_tx_queue_params *params)
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index 6cc6bd4b6e7d..2937bcbc32e0 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -596,25 +596,9 @@ int drv_sta_state(struct ieee80211_local *local,
596 enum ieee80211_sta_state old_state, 596 enum ieee80211_sta_state old_state,
597 enum ieee80211_sta_state new_state); 597 enum ieee80211_sta_state new_state);
598 598
599static inline void drv_sta_rc_update(struct ieee80211_local *local, 599void drv_sta_rc_update(struct ieee80211_local *local,
600 struct ieee80211_sub_if_data *sdata, 600 struct ieee80211_sub_if_data *sdata,
601 struct ieee80211_sta *sta, u32 changed) 601 struct ieee80211_sta *sta, u32 changed);
602{
603 sdata = get_bss_sdata(sdata);
604 if (!check_sdata_in_driver(sdata))
605 return;
606
607 WARN_ON(changed & IEEE80211_RC_SUPP_RATES_CHANGED &&
608 (sdata->vif.type != NL80211_IFTYPE_ADHOC &&
609 sdata->vif.type != NL80211_IFTYPE_MESH_POINT));
610
611 trace_drv_sta_rc_update(local, sdata, sta, changed);
612 if (local->ops->sta_rc_update)
613 local->ops->sta_rc_update(&local->hw, &sdata->vif,
614 sta, changed);
615
616 trace_drv_return_void(local);
617}
618 602
619static inline void drv_sta_rate_tbl_update(struct ieee80211_local *local, 603static inline void drv_sta_rate_tbl_update(struct ieee80211_local *local,
620 struct ieee80211_sub_if_data *sdata, 604 struct ieee80211_sub_if_data *sdata,