Commit d15b48a1 authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds

[PATCH] prism54: misc cleanups

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: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0e17b42f
......@@ -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 *ndev, char *current_ev,
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, 0xf2, 1 };
#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, u8 *bssid,
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, struct obj_mlme *mlme, enum oid_num_t oid)
}
}
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, struct iw_point *p)
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, struct iw_request_info *info,
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, struct iw_request_info *info,
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 *ndev, struct iw_request_info *info,
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 *ndev, struct iw_request_info *info,
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 *ndev, struct iw_request_info *info,
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 *ndev, struct iw_request_info *info,
return ret;
}
int
static int
prism54_debug_set_oid(struct net_device *ndev, struct iw_request_info *info,
struct iw_point *data, char *extra)
{
......
......@@ -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;
......
......@@ -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_private *);
* 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 reload_firmware)
return rc;
}
struct net_device_stats *
static struct net_device_stats *
islpci_statistics(struct net_device *ndev)
{
islpci_private *priv = netdev_priv(ndev);
......
......@@ -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 */
......@@ -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
......
......@@ -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 .*/
......
......@@ -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_num_t, void *);
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 *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment