aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/wext.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-04-26 23:46:55 -0400
committerDavid S. Miller <davem@davemloft.net>2007-04-26 23:46:55 -0400
commitbdf51894c1d7ce3fba8c8fdf485e85173ac60c6c (patch)
treea9a71a1cc057b8059eaeba460eee69af56cea5d6 /net/wireless/wext.c
parent7a9df167db0f200d5f8e393376dba8ceeae0fd53 (diff)
[WEXT]: Reduce inline abuse.
This patch removes a bunch of inline abuse from wext. Most functions that were marked inline are only used once so the compiler will inline them anyway, others are used multiple times but there's no requirement for them to be inline since they aren't in any fast paths. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/wireless/wext.c')
-rw-r--r--net/wireless/wext.c29
1 files changed, 10 insertions, 19 deletions
diff --git a/net/wireless/wext.c b/net/wireless/wext.c
index 53478465b4ba..f733303f4bde 100644
--- a/net/wireless/wext.c
+++ b/net/wireless/wext.c
@@ -440,10 +440,8 @@ static const int event_type_pk_size[] = {
440/* ---------------------------------------------------------------- */ 440/* ---------------------------------------------------------------- */
441/* 441/*
442 * Return the driver handler associated with a specific Wireless Extension. 442 * Return the driver handler associated with a specific Wireless Extension.
443 * Called from various place, so make sure it remains efficient.
444 */ 443 */
445static inline iw_handler get_handler(struct net_device *dev, 444static iw_handler get_handler(struct net_device *dev, unsigned int cmd)
446 unsigned int cmd)
447{ 445{
448 /* Don't "optimise" the following variable, it will crash */ 446 /* Don't "optimise" the following variable, it will crash */
449 unsigned int index; /* *MUST* be unsigned */ 447 unsigned int index; /* *MUST* be unsigned */
@@ -470,7 +468,7 @@ static inline iw_handler get_handler(struct net_device *dev,
470/* 468/*
471 * Get statistics out of the driver 469 * Get statistics out of the driver
472 */ 470 */
473static inline struct iw_statistics *get_wireless_stats(struct net_device *dev) 471static struct iw_statistics *get_wireless_stats(struct net_device *dev)
474{ 472{
475 /* New location */ 473 /* New location */
476 if ((dev->wireless_handlers != NULL) && 474 if ((dev->wireless_handlers != NULL) &&
@@ -500,7 +498,7 @@ static inline struct iw_statistics *get_wireless_stats(struct net_device *dev)
500 * netif_running(dev) test. I'm open on that one... 498 * netif_running(dev) test. I'm open on that one...
501 * Hopefully, the driver will remember to do a commit in "open()" ;-) 499 * Hopefully, the driver will remember to do a commit in "open()" ;-)
502 */ 500 */
503static inline int call_commit_handler(struct net_device * dev) 501static int call_commit_handler(struct net_device *dev)
504{ 502{
505 if ((netif_running(dev)) && 503 if ((netif_running(dev)) &&
506 (dev->wireless_handlers->standard[0] != NULL)) { 504 (dev->wireless_handlers->standard[0] != NULL)) {
@@ -622,8 +620,8 @@ static int iw_handler_get_private(struct net_device * dev,
622/* 620/*
623 * Print one entry (line) of /proc/net/wireless 621 * Print one entry (line) of /proc/net/wireless
624 */ 622 */
625static __inline__ void wireless_seq_printf_stats(struct seq_file *seq, 623static void wireless_seq_printf_stats(struct seq_file *seq,
626 struct net_device *dev) 624 struct net_device *dev)
627{ 625{
628 /* Get stats from the driver */ 626 /* Get stats from the driver */
629 struct iw_statistics *stats = get_wireless_stats(dev); 627 struct iw_statistics *stats = get_wireless_stats(dev);
@@ -892,10 +890,8 @@ static int ioctl_standard_call(struct net_device * dev,
892 * a iw_handler but process it in your ioctl handler (i.e. use the 890 * a iw_handler but process it in your ioctl handler (i.e. use the
893 * old driver API). 891 * old driver API).
894 */ 892 */
895static inline int ioctl_private_call(struct net_device * dev, 893static int ioctl_private_call(struct net_device *dev, struct ifreq *ifr,
896 struct ifreq * ifr, 894 unsigned int cmd, iw_handler handler)
897 unsigned int cmd,
898 iw_handler handler)
899{ 895{
900 struct iwreq * iwr = (struct iwreq *) ifr; 896 struct iwreq * iwr = (struct iwreq *) ifr;
901 const struct iw_priv_args * descr = NULL; 897 const struct iw_priv_args * descr = NULL;
@@ -1134,11 +1130,8 @@ static DECLARE_TASKLET(wireless_nlevent_tasklet, wireless_nlevent_process, 0);
1134 * current wireless config. Dumping the wireless config is far too 1130 * current wireless config. Dumping the wireless config is far too
1135 * expensive (for each parameter, the driver need to query the hardware). 1131 * expensive (for each parameter, the driver need to query the hardware).
1136 */ 1132 */
1137static inline int rtnetlink_fill_iwinfo(struct sk_buff * skb, 1133static int rtnetlink_fill_iwinfo(struct sk_buff *skb, struct net_device *dev,
1138 struct net_device * dev, 1134 int type, char *event, int event_len)
1139 int type,
1140 char * event,
1141 int event_len)
1142{ 1135{
1143 struct ifinfomsg *r; 1136 struct ifinfomsg *r;
1144 struct nlmsghdr *nlh; 1137 struct nlmsghdr *nlh;
@@ -1172,9 +1165,7 @@ rtattr_failure:
1172 * Andrzej Krzysztofowicz mandated that I used a IFLA_XXX field 1165 * Andrzej Krzysztofowicz mandated that I used a IFLA_XXX field
1173 * within a RTM_NEWLINK event. 1166 * within a RTM_NEWLINK event.
1174 */ 1167 */
1175static inline void rtmsg_iwinfo(struct net_device * dev, 1168static void rtmsg_iwinfo(struct net_device *dev, char *event, int event_len)
1176 char * event,
1177 int event_len)
1178{ 1169{
1179 struct sk_buff *skb; 1170 struct sk_buff *skb;
1180 int size = NLMSG_GOODSIZE; 1171 int size = NLMSG_GOODSIZE;