summaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
authorJohannes Berg2010-08-12 14:49:58 +0200
committerJohn W. Linville2010-08-24 22:27:54 +0200
commit633adf1ad1c92c02bd3f10bbd73737a969179378 (patch)
tree3f23d54719a1742d9326d61b6820147185cdb60c /include/net/cfg80211.h
parentdrivers/net/wireless/libertas/cfg.c: needs sched.h (diff)
downloadkernel-qcow2-linux-633adf1ad1c92c02bd3f10bbd73737a969179378.tar.gz
kernel-qcow2-linux-633adf1ad1c92c02bd3f10bbd73737a969179378.tar.xz
kernel-qcow2-linux-633adf1ad1c92c02bd3f10bbd73737a969179378.zip
cfg80211: mark ieee80211_hdrlen const
This function analyses only its single, value-passed argument, and has no side effects. Thus it can be const, which makes mac80211 smaller, for example: text data bss dec hex filename 362518 16720 884 380122 5ccda mac80211.ko (before) 362358 16720 884 379962 5cc3a mac80211.ko (after) a 160 byte saving in text size, and an optimisation because the function won't be called as often. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r--include/net/cfg80211.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 2fd06c60ffbb..2b403c7ee32e 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1715,7 +1715,7 @@ unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb);
* ieee80211_hdrlen - get header length in bytes from frame control
* @fc: frame control field in little-endian format
*/
-unsigned int ieee80211_hdrlen(__le16 fc);
+unsigned int __attribute_const__ ieee80211_hdrlen(__le16 fc);
/**
* ieee80211_data_to_8023 - convert an 802.11 data frame to 802.3