git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
net
/
wireless
/
wavelan.c
diff --git
a/drivers/net/wireless/wavelan.c
b/drivers/net/wireless/wavelan.c
index
dade4b9
..
24221e4
100644
(file)
--- a/
drivers/net/wireless/wavelan.c
+++ b/
drivers/net/wireless/wavelan.c
@@
-1695,8
+1695,8
@@
static int wv_frequency_list(unsigned long ioaddr, /* I/O port of the card */
/* Look in the table if the frequency is allowed */
if (table[9 - (freq / 16)] & (1 << (freq % 16))) {
/* Compute approximate channel number */
/* Look in the table if the frequency is allowed */
if (table[9 - (freq / 16)] & (1 << (freq % 16))) {
/* Compute approximate channel number */
- while ((
((channel_bands[c] >> 1) - 24) < freq
) &&
- (c < NELS(channel_bands)))
+ while ((
c < NELS(channel_bands)
) &&
+ (((channel_bands[c] >> 1) - 24) < freq))
c++;
list[i].i = c; /* Set the list index */
c++;
list[i].i = c; /* Set the list index */
@@
-2903,6
+2903,7
@@
static int wavelan_packet_xmit(struct sk_buff *skb, struct net_device * dev)
{
net_local *lp = (net_local *) dev->priv;
unsigned long flags;
{
net_local *lp = (net_local *) dev->priv;
unsigned long flags;
+ char data[ETH_ZLEN];
#ifdef DEBUG_TX_TRACE
printk(KERN_DEBUG "%s: ->wavelan_packet_xmit(0x%X)\n", dev->name,
#ifdef DEBUG_TX_TRACE
printk(KERN_DEBUG "%s: ->wavelan_packet_xmit(0x%X)\n", dev->name,
@@
-2937,15
+2938,16
@@
static int wavelan_packet_xmit(struct sk_buff *skb, struct net_device * dev)
* able to detect collisions, therefore in theory we don't really
* need to pad. Jean II */
if (skb->len < ETH_ZLEN) {
* able to detect collisions, therefore in theory we don't really
* need to pad. Jean II */
if (skb->len < ETH_ZLEN) {
- skb = skb_padto(skb, ETH_ZLEN);
- if (skb == NULL)
- return 0;
+ memset(data, 0, ETH_ZLEN);
+ memcpy(data, skb->data, skb->len);
+ /* Write packet on the card */
+ if(wv_packet_write(dev, data, ETH_ZLEN))
+ return 1; /* We failed */
}
}
-
- /* Write packet on the card */
- if(wv_packet_write(dev, skb->data, skb->len))
+ else if(wv_packet_write(dev, skb->data, skb->len))
return 1; /* We failed */
return 1; /* We failed */
+
dev_kfree_skb(skb);
#ifdef DEBUG_TX_TRACE
dev_kfree_skb(skb);
#ifdef DEBUG_TX_TRACE
@@
-3766,7
+3768,7
@@
static int wv_check_ioaddr(unsigned long ioaddr, u8 * mac)
* This function is the interrupt handler for the WaveLAN card. This
* routine will be called whenever:
*/
* This function is the interrupt handler for the WaveLAN card. This
* routine will be called whenever:
*/
-static irqreturn_t wavelan_interrupt(int irq, void *dev_id
, struct pt_regs *regs
)
+static irqreturn_t wavelan_interrupt(int irq, void *dev_id)
{
struct net_device *dev;
unsigned long ioaddr;
{
struct net_device *dev;
unsigned long ioaddr;