aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2015-09-23 08:18:35 -0400
committerJohannes Berg <johannes.berg@intel.com>2015-09-29 09:56:49 -0400
commit6db96838971eb4c8ae6285795188f391e97d47c3 (patch)
tree5ee34c2864429918177d9d9c7e64f7beb543ad6e
parent42677ed33a8b6995e6af2ec15643840afcf1c48b (diff)
mac80211: Deinline drv_ampdu_action()
With this .config: http://busybox.net/~vda/kernel_config_ALLYES_Os, after deinlining the function size is 755 bytes and there are 6 callsites. Total size reduction is about 3.3 kbytes. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com> CC: Johannes Berg <johannes.berg@intel.com> CC: John Linville <linville@tuxdriver.com> CC: Michal Kazior <michal.kazior@tieto.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.c26
-rw-r--r--net/mac80211/driver-ops.h30
2 files changed, 31 insertions, 25 deletions
diff --git a/net/mac80211/driver-ops.c b/net/mac80211/driver-ops.c
index 1a720e890d40..e1bb9e04e5be 100644
--- a/net/mac80211/driver-ops.c
+++ b/net/mac80211/driver-ops.c
@@ -189,3 +189,29 @@ int drv_switch_vif_chanctx(struct ieee80211_local *local,
189 189
190 return ret; 190 return ret;
191} 191}
192
193int drv_ampdu_action(struct ieee80211_local *local,
194 struct ieee80211_sub_if_data *sdata,
195 enum ieee80211_ampdu_mlme_action action,
196 struct ieee80211_sta *sta, u16 tid,
197 u16 *ssn, u8 buf_size, bool amsdu)
198{
199 int ret = -EOPNOTSUPP;
200
201 might_sleep();
202
203 sdata = get_bss_sdata(sdata);
204 if (!check_sdata_in_driver(sdata))
205 return -EIO;
206
207 trace_drv_ampdu_action(local, sdata, action, sta, tid,
208 ssn, buf_size, amsdu);
209
210 if (local->ops->ampdu_action)
211 ret = local->ops->ampdu_action(&local->hw, &sdata->vif, action,
212 sta, tid, ssn, buf_size, amsdu);
213
214 trace_drv_return_int(local, ret);
215
216 return ret;
217}
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index 275146eee646..6411c3b9fe38 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -649,31 +649,11 @@ static inline int drv_tx_last_beacon(struct ieee80211_local *local)
649 return ret; 649 return ret;
650} 650}
651 651
652static inline int drv_ampdu_action(struct ieee80211_local *local, 652int drv_ampdu_action(struct ieee80211_local *local,
653 struct ieee80211_sub_if_data *sdata, 653 struct ieee80211_sub_if_data *sdata,
654 enum ieee80211_ampdu_mlme_action action, 654 enum ieee80211_ampdu_mlme_action action,
655 struct ieee80211_sta *sta, u16 tid, 655 struct ieee80211_sta *sta, u16 tid,
656 u16 *ssn, u8 buf_size, bool amsdu) 656 u16 *ssn, u8 buf_size, bool amsdu);
657{
658 int ret = -EOPNOTSUPP;
659
660 might_sleep();
661
662 sdata = get_bss_sdata(sdata);
663 if (!check_sdata_in_driver(sdata))
664 return -EIO;
665
666 trace_drv_ampdu_action(local, sdata, action, sta, tid,
667 ssn, buf_size, amsdu);
668
669 if (local->ops->ampdu_action)
670 ret = local->ops->ampdu_action(&local->hw, &sdata->vif, action,
671 sta, tid, ssn, buf_size, amsdu);
672
673 trace_drv_return_int(local, ret);
674
675 return ret;
676}
677 657
678static inline int drv_get_survey(struct ieee80211_local *local, int idx, 658static inline int drv_get_survey(struct ieee80211_local *local, int idx,
679 struct survey_info *survey) 659 struct survey_info *survey)