aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wavelan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/wavelan.c')
-rw-r--r--drivers/net/wireless/wavelan.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/net/wireless/wavelan.c b/drivers/net/wireless/wavelan.c
index dade4b903579..5b69befdab74 100644
--- 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 */
1695 /* Look in the table if the frequency is allowed */ 1695 /* Look in the table if the frequency is allowed */
1696 if (table[9 - (freq / 16)] & (1 << (freq % 16))) { 1696 if (table[9 - (freq / 16)] & (1 << (freq % 16))) {
1697 /* Compute approximate channel number */ 1697 /* Compute approximate channel number */
1698 while ((((channel_bands[c] >> 1) - 24) < freq) && 1698 while ((c < NELS(channel_bands)) &&
1699 (c < NELS(channel_bands))) 1699 (((channel_bands[c] >> 1) - 24) < freq))
1700 c++; 1700 c++;
1701 list[i].i = c; /* Set the list index */ 1701 list[i].i = c; /* Set the list index */
1702 1702
@@ -2903,6 +2903,7 @@ static int wavelan_packet_xmit(struct sk_buff *skb, struct net_device * dev)
2903{ 2903{
2904 net_local *lp = (net_local *) dev->priv; 2904 net_local *lp = (net_local *) dev->priv;
2905 unsigned long flags; 2905 unsigned long flags;
2906 char data[ETH_ZLEN];
2906 2907
2907#ifdef DEBUG_TX_TRACE 2908#ifdef DEBUG_TX_TRACE
2908 printk(KERN_DEBUG "%s: ->wavelan_packet_xmit(0x%X)\n", dev->name, 2909 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)
2937 * able to detect collisions, therefore in theory we don't really 2938 * able to detect collisions, therefore in theory we don't really
2938 * need to pad. Jean II */ 2939 * need to pad. Jean II */
2939 if (skb->len < ETH_ZLEN) { 2940 if (skb->len < ETH_ZLEN) {
2940 skb = skb_padto(skb, ETH_ZLEN); 2941 memset(data, 0, ETH_ZLEN);
2941 if (skb == NULL) 2942 memcpy(data, skb->data, skb->len);
2942 return 0; 2943 /* Write packet on the card */
2944 if(wv_packet_write(dev, data, ETH_ZLEN))
2945 return 1; /* We failed */
2943 } 2946 }
2944 2947 else if(wv_packet_write(dev, skb->data, skb->len))
2945 /* Write packet on the card */
2946 if(wv_packet_write(dev, skb->data, skb->len))
2947 return 1; /* We failed */ 2948 return 1; /* We failed */
2948 2949
2950
2949 dev_kfree_skb(skb); 2951 dev_kfree_skb(skb);
2950 2952
2951#ifdef DEBUG_TX_TRACE 2953#ifdef DEBUG_TX_TRACE