
From: Adrian Bunk <bunk@stusta.de>

This patch makes some functions in prism54 that are only required 
locally static.

As a side effect it turned out that the mgt_unlatch_all function was 
completely unused, and it's therefore #if 0'ed.

I also considered moving display_buffer as static inline into 
islpci_mgt.h, but I wasn't 100% sure and therefore left it.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/net/wireless/prism54/isl_ioctl.c  |   32 +++++++++++++---------
 25-akpm/drivers/net/wireless/prism54/isl_ioctl.h  |    5 ---
 25-akpm/drivers/net/wireless/prism54/islpci_dev.c |    5 ++-
 25-akpm/drivers/net/wireless/prism54/islpci_dev.h |    2 -
 25-akpm/drivers/net/wireless/prism54/islpci_mgt.c |    2 +
 25-akpm/drivers/net/wireless/prism54/oid_mgt.c    |    6 ++--
 25-akpm/drivers/net/wireless/prism54/oid_mgt.h    |    4 --
 7 files changed, 30 insertions(+), 26 deletions(-)

diff -puN drivers/net/wireless/prism54/isl_ioctl.c~prism54-misc-cleanups drivers/net/wireless/prism54/isl_ioctl.c
--- 25/drivers/net/wireless/prism54/isl_ioctl.c~prism54-misc-cleanups	2005-02-02 18:21:21.991843320 -0800
+++ 25-akpm/drivers/net/wireless/prism54/isl_ioctl.c	2005-02-02 18:21:22.006841040 -0800
@@ -36,6 +36,14 @@
 
 #include <net/iw_handler.h>	/* New driver API */
 
+
+static void prism54_wpa_ie_add(islpci_private *priv, u8 *bssid,
+				u8 *wpa_ie, size_t wpa_ie_len);
+static size_t prism54_wpa_ie_get(islpci_private *priv, u8 *bssid, u8 *wpa_ie);
+static int prism54_set_wpa(struct net_device *, struct iw_request_info *,
+				__u32 *, char *);
+
+
 /**
  * prism54_mib_mode_helper - MIB change mode helper function
  * @mib: the &struct islpci_mib object to modify
@@ -47,7 +55,7 @@
  *  Wireless API modes to Device firmware modes. It also checks for 
  *  correct valid Linux wireless modes. 
  */
-int
+static int
 prism54_mib_mode_helper(islpci_private *priv, u32 iw_mode)
 {
 	u32 config = INL_CONFIG_MANUALRUN;
@@ -647,7 +655,7 @@ prism54_translate_bss(struct net_device 
 	return current_ev;
 }
 
-int
+static int
 prism54_get_scan(struct net_device *ndev, struct iw_request_info *info,
 		 struct iw_point *dwrq, char *extra)
 {
@@ -1586,7 +1594,7 @@ static u8 wpa_oid[4] = { 0x00, 0x50, 0xf
 #define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
 #define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
 
-void
+static void
 prism54_wpa_ie_add(islpci_private *priv, u8 *bssid,
 		   u8 *wpa_ie, size_t wpa_ie_len)
 {
@@ -1653,7 +1661,7 @@ prism54_wpa_ie_add(islpci_private *priv,
 	up(&priv->wpa_sem);
 }
 
-size_t
+static size_t
 prism54_wpa_ie_get(islpci_private *priv, u8 *bssid, u8 *wpa_ie)
 {
 	struct list_head *ptr;
@@ -1740,7 +1748,7 @@ handle_request(islpci_private *priv, str
 	}
 }
 
-int
+static int
 prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid,
 			    char *data)
 {
@@ -2318,7 +2326,7 @@ prism54_hostapd(struct net_device *ndev,
        return ret;
 }
 
-int
+static int
 prism54_set_wpa(struct net_device *ndev, struct iw_request_info *info,
 		__u32 * uwrq, char *extra)
 {
@@ -2362,7 +2370,7 @@ prism54_set_wpa(struct net_device *ndev,
 	return 0;
 }
 
-int
+static int
 prism54_get_wpa(struct net_device *ndev, struct iw_request_info *info,
 		__u32 * uwrq, char *extra)
 {
@@ -2371,7 +2379,7 @@ prism54_get_wpa(struct net_device *ndev,
 	return 0;
 }
 
-int
+static int
 prism54_set_prismhdr(struct net_device *ndev, struct iw_request_info *info,
 		     __u32 * uwrq, char *extra)
 {
@@ -2384,7 +2392,7 @@ prism54_set_prismhdr(struct net_device *
 	return 0;
 }
 
-int
+static int
 prism54_get_prismhdr(struct net_device *ndev, struct iw_request_info *info,
 		     __u32 * uwrq, char *extra)
 {
@@ -2393,7 +2401,7 @@ prism54_get_prismhdr(struct net_device *
 	return 0;
 }
 
-int
+static int
 prism54_debug_oid(struct net_device *ndev, struct iw_request_info *info,
 		  __u32 * uwrq, char *extra)
 {
@@ -2405,7 +2413,7 @@ prism54_debug_oid(struct net_device *nde
 	return 0;
 }
 
-int
+static int
 prism54_debug_get_oid(struct net_device *ndev, struct iw_request_info *info,
 		      struct iw_point *data, char *extra)
 {
@@ -2441,7 +2449,7 @@ prism54_debug_get_oid(struct net_device 
 	return ret;
 }
 
-int
+static int
 prism54_debug_set_oid(struct net_device *ndev, struct iw_request_info *info,
 		      struct iw_point *data, char *extra)
 {
diff -puN drivers/net/wireless/prism54/isl_ioctl.h~prism54-misc-cleanups drivers/net/wireless/prism54/isl_ioctl.h
--- 25/drivers/net/wireless/prism54/isl_ioctl.h~prism54-misc-cleanups	2005-02-02 18:21:21.992843168 -0800
+++ 25-akpm/drivers/net/wireless/prism54/isl_ioctl.h	2005-02-02 18:21:22.006841040 -0800
@@ -41,15 +41,10 @@ void prism54_process_trap(void *);
 
 void prism54_wpa_ie_init(islpci_private *priv);
 void prism54_wpa_ie_clean(islpci_private *priv);
-void prism54_wpa_ie_add(islpci_private *priv, u8 *bssid,
-			u8 *wpa_ie, size_t wpa_ie_len);
-size_t prism54_wpa_ie_get(islpci_private *priv, u8 *bssid, u8 *wpa_ie);
 
 int prism54_set_mac_address(struct net_device *, void *);
 
 int prism54_ioctl(struct net_device *, struct ifreq *, int);
-int prism54_set_wpa(struct net_device *, struct iw_request_info *, 
-			__u32 *, char *);
 
 extern const struct iw_handler_def prism54_handler_def;
 
diff -puN drivers/net/wireless/prism54/islpci_dev.c~prism54-misc-cleanups drivers/net/wireless/prism54/islpci_dev.c
--- 25/drivers/net/wireless/prism54/islpci_dev.c~prism54-misc-cleanups	2005-02-02 18:21:21.994842864 -0800
+++ 25-akpm/drivers/net/wireless/prism54/islpci_dev.c	2005-02-02 18:21:22.007840888 -0800
@@ -44,6 +44,7 @@
 
 static int prism54_bring_down(islpci_private *);
 static int islpci_alloc_memory(islpci_private *);
+static struct net_device_stats *islpci_statistics(struct net_device *);
 
 /* Temporary dummy MAC address to use until firmware is loaded.
  * The idea there is that some tools (such as nameif) may query
@@ -52,7 +53,7 @@ static int islpci_alloc_memory(islpci_pr
  * Of course, this is not the final/real MAC address. It doesn't
  * matter, as you are suppose to be able to change it anytime via
  * ndev->set_mac_address. Jean II */
-const unsigned char	dummy_mac[6] = { 0x00, 0x30, 0xB4, 0x00, 0x00, 0x00 };
+static const unsigned char	dummy_mac[6] = { 0x00, 0x30, 0xB4, 0x00, 0x00, 0x00 };
 
 static int
 isl_upload_firmware(islpci_private *priv)
@@ -607,7 +608,7 @@ islpci_reset(islpci_private *priv, int r
 	return rc;
 }
 
-struct net_device_stats *
+static struct net_device_stats *
 islpci_statistics(struct net_device *ndev)
 {
 	islpci_private *priv = netdev_priv(ndev);
diff -puN drivers/net/wireless/prism54/islpci_dev.h~prism54-misc-cleanups drivers/net/wireless/prism54/islpci_dev.h
--- 25/drivers/net/wireless/prism54/islpci_dev.h~prism54-misc-cleanups	2005-02-02 18:21:21.996842560 -0800
+++ 25-akpm/drivers/net/wireless/prism54/islpci_dev.h	2005-02-02 18:21:22.008840736 -0800
@@ -211,8 +211,6 @@ islpci_trigger(islpci_private *priv)
 			       priv->device_base);
 }
 
-struct net_device_stats *islpci_statistics(struct net_device *);
-
 int islpci_free_memory(islpci_private *);
 struct net_device *islpci_setup(struct pci_dev *);
 #endif				/* _ISLPCI_DEV_H */
diff -puN drivers/net/wireless/prism54/islpci_mgt.c~prism54-misc-cleanups drivers/net/wireless/prism54/islpci_mgt.c
--- 25/drivers/net/wireless/prism54/islpci_mgt.c~prism54-misc-cleanups	2005-02-02 18:21:21.997842408 -0800
+++ 25-akpm/drivers/net/wireless/prism54/islpci_mgt.c	2005-02-02 18:21:22.008840736 -0800
@@ -44,6 +44,7 @@ module_param(pc_debug, int, 0);
 /******************************************************************************
     Driver general functions
 ******************************************************************************/
+#if VERBOSE > SHOW_ERROR_MESSAGES
 void
 display_buffer(char *buffer, int length)
 {
@@ -58,6 +59,7 @@ display_buffer(char *buffer, int length)
 
 	printk("\n");
 }
+#endif
 
 /*****************************************************************************
     Queue handling for management frames
diff -puN drivers/net/wireless/prism54/oid_mgt.c~prism54-misc-cleanups drivers/net/wireless/prism54/oid_mgt.c
--- 25/drivers/net/wireless/prism54/oid_mgt.c~prism54-misc-cleanups	2005-02-02 18:21:21.999842104 -0800
+++ 25-akpm/drivers/net/wireless/prism54/oid_mgt.c	2005-02-02 18:21:22.009840584 -0800
@@ -24,8 +24,8 @@
 #include "isl_ioctl.h"
 
 /* to convert between channel and freq */
-const int frequency_list_bg[] = { 2412, 2417, 2422, 2427, 2432, 2437, 2442,
-	2447, 2452, 2457, 2462, 2467, 2472, 2484
+static const int frequency_list_bg[] = { 2412, 2417, 2422, 2427, 2432,
+	2437, 2442, 2447, 2452, 2457, 2462, 2467, 2472, 2484
 };
 
 int
@@ -730,6 +730,7 @@ mgt_commit(islpci_private *priv)
  *
  * The way to do this is to set ESSID. Note though that they may get 
  * unlatch before though by setting another OID. */
+#if 0
 void
 mgt_unlatch_all(islpci_private *priv)
 {
@@ -756,6 +757,7 @@ mgt_unlatch_all(islpci_private *priv)
 	if (rvalue)
 		printk(KERN_DEBUG "%s: Unlatching OIDs failed\n", priv->ndev->name);
 }
+#endif
 
 /* This will tell you if you are allowed to answer a mlme(ex) request .*/
 
diff -puN drivers/net/wireless/prism54/oid_mgt.h~prism54-misc-cleanups drivers/net/wireless/prism54/oid_mgt.h
--- 25/drivers/net/wireless/prism54/oid_mgt.h~prism54-misc-cleanups	2005-02-02 18:21:22.000841952 -0800
+++ 25-akpm/drivers/net/wireless/prism54/oid_mgt.h	2005-02-02 18:21:22.010840432 -0800
@@ -28,8 +28,7 @@ int mgt_init(islpci_private *);
 
 void mgt_clean(islpci_private *);
 
-/* I don't know where to put these 3 */
-extern const int frequency_list_bg[];
+/* I don't know where to put these 2 */
 extern const int frequency_list_a[];
 int channel_of_freq(int);
 
@@ -49,7 +48,6 @@ void mgt_set(islpci_private *, enum oid_
 void mgt_get(islpci_private *, enum oid_num_t, void *);
 
 int mgt_commit(islpci_private *);
-void mgt_unlatch_all(islpci_private *);
 
 int mgt_mlme_answer(islpci_private *);
 
_
