X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fnet%2Fwireless%2Fwavelan_cs.c;h=baf74015751c4cb04c3ad5b4940db68bb04080b6;hb=c92758ceda477b1333fde35327cfa867dcc47bd1;hp=c2037b2a05bf664c5e37192bb6cc9f37956230e6;hpb=c1f3ee120bb61045b1c0a3ead620d1d65af47130;p=linux-2.6 diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c index c2037b2a05..baf7401575 100644 --- a/drivers/net/wireless/wavelan_cs.c +++ b/drivers/net/wireless/wavelan_cs.c @@ -102,7 +102,7 @@ hacr_write(u_long base, * Write to card's Host Adapter Command Register. Include a delay for * those times when it is needed. */ -static inline void +static void hacr_write_slow(u_long base, u_char hacr) { @@ -149,7 +149,7 @@ psa_write(struct net_device * dev, net_local *lp = netdev_priv(dev); u_char __iomem *ptr = lp->mem + PSA_ADDR + (o << 1); int count = 0; - kio_addr_t base = dev->base_addr; + unsigned int base = dev->base_addr; /* As there seem to have no flag PSA_BUSY as in the ISA model, we are * oblige to verify this address to know when the PSA is ready... */ volatile u_char __iomem *verify = lp->mem + PSA_ADDR + @@ -255,7 +255,7 @@ update_psa_checksum(struct net_device * dev) /* * Write 1 byte to the MMC. */ -static inline void +static void mmc_out(u_long base, u_short o, u_char d) @@ -275,7 +275,7 @@ mmc_out(u_long base, * Routine to write bytes to the Modem Management Controller. * We start by the end because it is the way it should be ! */ -static inline void +static void mmc_write(u_long base, u_char o, u_char * b, @@ -293,7 +293,7 @@ mmc_write(u_long base, * Read 1 byte from the MMC. * Optimised version for 1 byte, avoid using memory... */ -static inline u_char +static u_char mmc_in(u_long base, u_short o) { @@ -318,7 +318,7 @@ mmc_in(u_long base, * (code has just been moved in the above function) * We start by the end because it is the way it should be ! */ -static inline void +static void mmc_read(u_long base, u_char o, u_char * b, @@ -350,9 +350,8 @@ mmc_encr(u_long base) /* i/o port of the card */ /*------------------------------------------------------------------*/ /* * Wait for the frequency EEprom to complete a command... - * I hope this one will be optimally inlined... */ -static inline void +static void fee_wait(u_long base, /* i/o port of the card */ int delay, /* Base delay to wait for */ int number) /* Number of time to wait */ @@ -708,7 +707,7 @@ static void wl_update_history(wavepoint_history *wavepoint, unsigned char sigqua /* Perform a handover to a new WavePoint */ static void wv_roam_handover(wavepoint_history *wavepoint, net_local *lp) { - kio_addr_t base = lp->dev->base_addr; + unsigned int base = lp->dev->base_addr; mm_t m; unsigned long flags; @@ -738,9 +737,9 @@ static void wv_roam_handover(wavepoint_history *wavepoint, net_local *lp) } /* Called when a WavePoint beacon is received */ -static inline void wl_roam_gather(struct net_device * dev, - u_char * hdr, /* Beacon header */ - u_char * stats) /* SNR, Signal quality +static void wl_roam_gather(struct net_device * dev, + u_char * hdr, /* Beacon header */ + u_char * stats) /* SNR, Signal quality of packet */ { wavepoint_beacon *beacon= (wavepoint_beacon *)hdr; /* Rcvd. Beacon */ @@ -794,7 +793,7 @@ out: static inline int WAVELAN_BEACON(unsigned char *data) { wavepoint_beacon *beacon= (wavepoint_beacon *)data; - static wavepoint_beacon beacon_template={0xaa,0xaa,0x03,0x08,0x00,0x0e,0x20,0x03,0x00}; + static const wavepoint_beacon beacon_template={0xaa,0xaa,0x03,0x08,0x00,0x0e,0x20,0x03,0x00}; if(memcmp(beacon,&beacon_template,9)==0) return 1; @@ -821,7 +820,7 @@ wv_82593_cmd(struct net_device * dev, int cmd, int result) { - kio_addr_t base = dev->base_addr; + unsigned int base = dev->base_addr; int status; int wait_completed; long spin; @@ -945,7 +944,7 @@ read_ringbuf(struct net_device * dev, char * buf, int len) { - kio_addr_t base = dev->base_addr; + unsigned int base = dev->base_addr; int ring_ptr = addr; int chunk_len; char * buf_ptr = buf; @@ -980,7 +979,7 @@ read_ringbuf(struct net_device * dev, * wavelan_interrupt is not an option...), so you may experience * some delay sometime... */ -static inline void +static void wv_82593_reconfig(struct net_device * dev) { net_local * lp = netdev_priv(dev); @@ -1096,7 +1095,7 @@ wv_psa_show(psa_t * p) static void wv_mmc_show(struct net_device * dev) { - kio_addr_t base = dev->base_addr; + unsigned int base = dev->base_addr; net_local * lp = netdev_priv(dev); mmr_t m; @@ -1233,7 +1232,7 @@ wv_local_show(struct net_device * dev) /* * Dump packet header (and content if necessary) on the screen */ -static inline void +static void wv_packet_info(u_char * p, /* Packet to dump */ int length, /* Length of the packet */ char * msg1, /* Name of the device */ @@ -1272,10 +1271,10 @@ wv_packet_info(u_char * p, /* Packet to dump */ * This is the information which is displayed by the driver at startup * There is a lot of flag to configure it at your will... */ -static inline void +static void wv_init_info(struct net_device * dev) { - kio_addr_t base = dev->base_addr; + unsigned int base = dev->base_addr; psa_t psa; DECLARE_MAC_BUF(mac); @@ -1294,7 +1293,7 @@ wv_init_info(struct net_device * dev) #ifdef DEBUG_BASIC_SHOW /* Now, let's go for the basic stuff */ - printk(KERN_NOTICE "%s: WaveLAN: port %#lx, irq %d, " + printk(KERN_NOTICE "%s: WaveLAN: port %#x, irq %d, " "hw_addr %s", dev->name, base, dev->irq, print_mac(mac, dev->dev_addr)); @@ -1509,7 +1508,7 @@ wavelan_set_mac_address(struct net_device * dev, * Frequency setting (for hardware able of it) * It's a bit complicated and you don't really want to look into it... */ -static inline int +static int wv_set_frequency(u_long base, /* i/o port of the card */ iw_freq * frequency) { @@ -1706,7 +1705,7 @@ wv_set_frequency(u_long base, /* i/o port of the card */ /* * Give the list of available frequencies */ -static inline int +static int wv_frequency_list(u_long base, /* i/o port of the card */ iw_freq * list, /* List of frequency to fill */ int max) /* Maximum number of frequencies */ @@ -1828,7 +1827,7 @@ static int wavelan_set_nwid(struct net_device *dev, union iwreq_data *wrqu, char *extra) { - kio_addr_t base = dev->base_addr; + unsigned int base = dev->base_addr; net_local *lp = netdev_priv(dev); psa_t psa; mm_t m; @@ -1918,7 +1917,7 @@ static int wavelan_set_freq(struct net_device *dev, union iwreq_data *wrqu, char *extra) { - kio_addr_t base = dev->base_addr; + unsigned int base = dev->base_addr; net_local *lp = netdev_priv(dev); unsigned long flags; int ret; @@ -1948,7 +1947,7 @@ static int wavelan_get_freq(struct net_device *dev, union iwreq_data *wrqu, char *extra) { - kio_addr_t base = dev->base_addr; + unsigned int base = dev->base_addr; net_local *lp = netdev_priv(dev); psa_t psa; unsigned long flags; @@ -1994,7 +1993,7 @@ static int wavelan_set_sens(struct net_device *dev, union iwreq_data *wrqu, char *extra) { - kio_addr_t base = dev->base_addr; + unsigned int base = dev->base_addr; net_local *lp = netdev_priv(dev); psa_t psa; unsigned long flags; @@ -2060,7 +2059,7 @@ static int wavelan_set_encode(struct net_device *dev, union iwreq_data *wrqu, char *extra) { - kio_addr_t base = dev->base_addr; + unsigned int base = dev->base_addr; net_local *lp = netdev_priv(dev); unsigned long flags; psa_t psa; @@ -2130,7 +2129,7 @@ static int wavelan_get_encode(struct net_device *dev, union iwreq_data *wrqu, char *extra) { - kio_addr_t base = dev->base_addr; + unsigned int base = dev->base_addr; net_local *lp = netdev_priv(dev); psa_t psa; unsigned long flags; @@ -2349,7 +2348,7 @@ static int wavelan_get_range(struct net_device *dev, union iwreq_data *wrqu, char *extra) { - kio_addr_t base = dev->base_addr; + unsigned int base = dev->base_addr; net_local *lp = netdev_priv(dev); struct iw_range *range = (struct iw_range *) extra; unsigned long flags; @@ -2425,7 +2424,7 @@ static int wavelan_set_qthr(struct net_device *dev, union iwreq_data *wrqu, char *extra) { - kio_addr_t base = dev->base_addr; + unsigned int base = dev->base_addr; net_local *lp = netdev_priv(dev); psa_t psa; unsigned long flags; @@ -2701,7 +2700,7 @@ static const struct iw_handler_def wavelan_handler_def = static iw_stats * wavelan_get_wireless_stats(struct net_device * dev) { - kio_addr_t base = dev->base_addr; + unsigned int base = dev->base_addr; net_local * lp = netdev_priv(dev); mmr_t m; iw_stats * wstats; @@ -2759,12 +2758,12 @@ wavelan_get_wireless_stats(struct net_device * dev) * frame pointer and verify that the frame seem correct * (called by wv_packet_rcv()) */ -static inline int +static int wv_start_of_frame(struct net_device * dev, int rfp, /* end of frame */ int wrap) /* start of buffer */ { - kio_addr_t base = dev->base_addr; + unsigned int base = dev->base_addr; int rp; int len; @@ -2821,7 +2820,7 @@ wv_start_of_frame(struct net_device * dev, * Note: if any errors occur, the packet is "dropped on the floor" * (called by wv_packet_rcv()) */ -static inline void +static void wv_packet_read(struct net_device * dev, int fd_p, int sksize) @@ -2922,10 +2921,10 @@ wv_packet_read(struct net_device * dev, * (called by wavelan_interrupt()) * Note : the spinlock is already grabbed for us and irq are disabled. */ -static inline void +static void wv_packet_rcv(struct net_device * dev) { - kio_addr_t base = dev->base_addr; + unsigned int base = dev->base_addr; net_local * lp = netdev_priv(dev); int newrfp; int rp; @@ -3056,13 +3055,13 @@ wv_packet_rcv(struct net_device * dev) * the transmit. * (called in wavelan_packet_xmit()) */ -static inline void +static void wv_packet_write(struct net_device * dev, void * buf, short length) { net_local * lp = netdev_priv(dev); - kio_addr_t base = dev->base_addr; + unsigned int base = dev->base_addr; unsigned long flags; int clen = length; register u_short xmtdata_base = TX_BASE; @@ -3180,10 +3179,10 @@ wavelan_packet_xmit(struct sk_buff * skb, * Routine to initialize the Modem Management Controller. * (called by wv_hw_config()) */ -static inline int +static int wv_mmc_init(struct net_device * dev) { - kio_addr_t base = dev->base_addr; + unsigned int base = dev->base_addr; psa_t psa; mmw_t m; int configured; @@ -3377,7 +3376,7 @@ wv_mmc_init(struct net_device * dev) static int wv_ru_stop(struct net_device * dev) { - kio_addr_t base = dev->base_addr; + unsigned int base = dev->base_addr; net_local * lp = netdev_priv(dev); unsigned long flags; int status; @@ -3440,7 +3439,7 @@ wv_ru_stop(struct net_device * dev) static int wv_ru_start(struct net_device * dev) { - kio_addr_t base = dev->base_addr; + unsigned int base = dev->base_addr; net_local * lp = netdev_priv(dev); unsigned long flags; @@ -3528,7 +3527,7 @@ wv_ru_start(struct net_device * dev) static int wv_82593_config(struct net_device * dev) { - kio_addr_t base = dev->base_addr; + unsigned int base = dev->base_addr; net_local * lp = netdev_priv(dev); struct i82593_conf_block cfblk; int ret = TRUE; @@ -3699,7 +3698,7 @@ wv_82593_config(struct net_device * dev) * wavelan. * (called by wv_config()) */ -static inline int +static int wv_pcmcia_reset(struct net_device * dev) { int i; @@ -3765,7 +3764,7 @@ static int wv_hw_config(struct net_device * dev) { net_local * lp = netdev_priv(dev); - kio_addr_t base = dev->base_addr; + unsigned int base = dev->base_addr; unsigned long flags; int ret = FALSE; @@ -3864,7 +3863,7 @@ wv_hw_config(struct net_device * dev) * 2. Start the LAN controller's receive unit * (called by wavelan_event(), wavelan_watchdog() and wavelan_open()) */ -static inline void +static void wv_hw_reset(struct net_device * dev) { net_local * lp = netdev_priv(dev); @@ -3895,7 +3894,7 @@ wv_hw_reset(struct net_device * dev) * device available to the system. * (called by wavelan_event()) */ -static inline int +static int wv_pcmcia_config(struct pcmcia_device * link) { struct net_device * dev = (struct net_device *) link->priv; @@ -4047,7 +4046,7 @@ wavelan_interrupt(int irq, { struct net_device * dev = dev_id; net_local * lp; - kio_addr_t base; + unsigned int base; int status0; u_int tx_status; @@ -4306,7 +4305,7 @@ static void wavelan_watchdog(struct net_device * dev) { net_local * lp = netdev_priv(dev); - kio_addr_t base = dev->base_addr; + unsigned int base = dev->base_addr; unsigned long flags; int aborted = FALSE; @@ -4382,7 +4381,7 @@ wavelan_open(struct net_device * dev) { net_local * lp = netdev_priv(dev); struct pcmcia_device * link = lp->link; - kio_addr_t base = dev->base_addr; + unsigned int base = dev->base_addr; #ifdef DEBUG_CALLBACK_TRACE printk(KERN_DEBUG "%s: ->wavelan_open(dev=0x%x)\n", dev->name, @@ -4436,7 +4435,7 @@ static int wavelan_close(struct net_device * dev) { struct pcmcia_device * link = ((net_local *)netdev_priv(dev))->link; - kio_addr_t base = dev->base_addr; + unsigned int base = dev->base_addr; #ifdef DEBUG_CALLBACK_TRACE printk(KERN_DEBUG "%s: ->wavelan_close(dev=0x%x)\n", dev->name,