diff options
author | Joe Perches <joe@perches.com> | 2010-11-20 21:39:00 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-22 15:58:52 -0500 |
commit | 22288a5847df30fb8ba298914f144c3b1d6e1fbe (patch) | |
tree | 67998c4b184f5bcf5f2dad385f65ba58ee001b41 /drivers/net/wireless/rndis_wlan.c | |
parent | ff273b91ff04e6f232234b70c45101074a0daa27 (diff) |
rndis_wlan: Use static const
Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.
text data bss dec hex filename
41757 2205 9896 53858 d262 drivers/net/wireless/rndis_wlan.o.old
41653 2205 9880 53738 d1ea drivers/net/wireless/rndis_wlan.o.new
Changed functions rndis_set_oid and set_bssid to take const *'s.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rndis_wlan.c')
-rw-r--r-- | drivers/net/wireless/rndis_wlan.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index ee08bcaaf47a..19f3d568f700 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -817,7 +817,8 @@ exit_unlock: | |||
817 | return ret; | 817 | return ret; |
818 | } | 818 | } |
819 | 819 | ||
820 | static int rndis_set_oid(struct usbnet *dev, __le32 oid, void *data, int len) | 820 | static int rndis_set_oid(struct usbnet *dev, __le32 oid, const void *data, |
821 | int len) | ||
821 | { | 822 | { |
822 | struct rndis_wlan_private *priv = get_rndis_wlan_priv(dev); | 823 | struct rndis_wlan_private *priv = get_rndis_wlan_priv(dev); |
823 | union { | 824 | union { |
@@ -1033,7 +1034,7 @@ static int set_essid(struct usbnet *usbdev, struct ndis_80211_ssid *ssid) | |||
1033 | return ret; | 1034 | return ret; |
1034 | } | 1035 | } |
1035 | 1036 | ||
1036 | static int set_bssid(struct usbnet *usbdev, u8 bssid[ETH_ALEN]) | 1037 | static int set_bssid(struct usbnet *usbdev, const u8 *bssid) |
1037 | { | 1038 | { |
1038 | int ret; | 1039 | int ret; |
1039 | 1040 | ||
@@ -1049,7 +1050,9 @@ static int set_bssid(struct usbnet *usbdev, u8 bssid[ETH_ALEN]) | |||
1049 | 1050 | ||
1050 | static int clear_bssid(struct usbnet *usbdev) | 1051 | static int clear_bssid(struct usbnet *usbdev) |
1051 | { | 1052 | { |
1052 | u8 broadcast_mac[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; | 1053 | static const u8 broadcast_mac[ETH_ALEN] = { |
1054 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff | ||
1055 | }; | ||
1053 | 1056 | ||
1054 | return set_bssid(usbdev, broadcast_mac); | 1057 | return set_bssid(usbdev, broadcast_mac); |
1055 | } | 1058 | } |