summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8192e
diff options
context:
space:
mode:
authorJesper Juhl <jj@chaosbits.net>2011-11-06 23:21:26 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-27 01:19:23 (GMT)
commit6f03053b6810c7ca315afb30b31b63d9f5863faf (patch)
treea70289993b2e63587e8662856c33e066a64973b6 /drivers/staging/rtl8192e
parent7c19c1e80d348a5c79b65f9fc3d54bbbeea9cd0f (diff)
downloadlinux-fsl-qoriq-6f03053b6810c7ca315afb30b31b63d9f5863faf.tar.xz
rtl8192e: Don't copy huge struct by value (and make it const).
rtllib_is_shortslot() takes one argument - a struct that's more than a kilobyte large. It should take a pointer instead of copying such a huge struct - and the argument might as well be declared 'const' now that we are at it, since it is not modified. This patch makes these changes. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rtl8192e')
-rw-r--r--drivers/staging/rtl8192e/rtllib.h2
-rw-r--r--drivers/staging/rtl8192e/rtllib_softmac.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index de25975..3a52120 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -2804,7 +2804,7 @@ extern int rtllib_wx_set_gen_ie(struct rtllib_device *ieee, u8 *ie, size_t len);
/* rtllib_softmac.c */
extern short rtllib_is_54g(struct rtllib_network *net);
-extern short rtllib_is_shortslot(struct rtllib_network net);
+extern short rtllib_is_shortslot(const struct rtllib_network *net);
extern int rtllib_rx_frame_softmac(struct rtllib_device *ieee,
struct sk_buff *skb,
struct rtllib_rx_stats *rx_stats, u16 type,
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index b508685..fa774cf 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -28,9 +28,9 @@ short rtllib_is_54g(struct rtllib_network *net)
return (net->rates_ex_len > 0) || (net->rates_len > 4);
}
-short rtllib_is_shortslot(struct rtllib_network net)
+short rtllib_is_shortslot(const struct rtllib_network *net)
{
- return net.capability & WLAN_CAPABILITY_SHORT_SLOT_TIME;
+ return net->capability & WLAN_CAPABILITY_SHORT_SLOT_TIME;
}
/* returns the total length needed for pleacing the RATE MFIE