aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/airo.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 8a0abb668ed4..6f591abacfdc 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -902,6 +902,7 @@ static char swversion[] = "2.1";
902#define NUM_MODULES 2 902#define NUM_MODULES 2
903#define MIC_MSGLEN_MAX 2400 903#define MIC_MSGLEN_MAX 2400
904#define EMMH32_MSGLEN_MAX MIC_MSGLEN_MAX 904#define EMMH32_MSGLEN_MAX MIC_MSGLEN_MAX
905#define AIRO_DEF_MTU 2312
905 906
906typedef struct { 907typedef struct {
907 u32 size; // size 908 u32 size; // size
@@ -2642,7 +2643,7 @@ static void wifi_setup(struct net_device *dev)
2642 2643
2643 dev->type = ARPHRD_IEEE80211; 2644 dev->type = ARPHRD_IEEE80211;
2644 dev->hard_header_len = ETH_HLEN; 2645 dev->hard_header_len = ETH_HLEN;
2645 dev->mtu = 2312; 2646 dev->mtu = AIRO_DEF_MTU;
2646 dev->addr_len = ETH_ALEN; 2647 dev->addr_len = ETH_ALEN;
2647 dev->tx_queue_len = 100; 2648 dev->tx_queue_len = 100;
2648 2649
@@ -2799,7 +2800,7 @@ static struct net_device *_init_airo_card( unsigned short irq, int port,
2799 /* Allocate the transmit buffers */ 2800 /* Allocate the transmit buffers */
2800 if (probe && !test_bit(FLAG_MPI,&ai->flags)) 2801 if (probe && !test_bit(FLAG_MPI,&ai->flags))
2801 for( i = 0; i < MAX_FIDS; i++ ) 2802 for( i = 0; i < MAX_FIDS; i++ )
2802 ai->fids[i] = transmit_allocate(ai,2312,i>=MAX_FIDS/2); 2803 ai->fids[i] = transmit_allocate(ai,AIRO_DEF_MTU,i>=MAX_FIDS/2);
2803 2804
2804 setup_proc_entry( dev, dev->priv ); /* XXX check for failure */ 2805 setup_proc_entry( dev, dev->priv ); /* XXX check for failure */
2805 netif_start_queue(dev); 2806 netif_start_queue(dev);
@@ -2865,7 +2866,7 @@ int reset_airo_card( struct net_device *dev )
2865 /* Allocate the transmit buffers if needed */ 2866 /* Allocate the transmit buffers if needed */
2866 if (!test_bit(FLAG_MPI,&ai->flags)) 2867 if (!test_bit(FLAG_MPI,&ai->flags))
2867 for( i = 0; i < MAX_FIDS; i++ ) 2868 for( i = 0; i < MAX_FIDS; i++ )
2868 ai->fids[i] = transmit_allocate (ai,2312,i>=MAX_FIDS/2); 2869 ai->fids[i] = transmit_allocate (ai,AIRO_DEF_MTU,i>=MAX_FIDS/2);
2869 2870
2870 enable_interrupts( ai ); 2871 enable_interrupts( ai );
2871 netif_wake_queue(dev); 2872 netif_wake_queue(dev);
@@ -3133,7 +3134,7 @@ static irqreturn_t airo_interrupt ( int irq, void* dev_id, struct pt_regs *regs)
3133 } 3134 }
3134 len = le16_to_cpu(hdr.len); 3135 len = le16_to_cpu(hdr.len);
3135 3136
3136 if (len > 2312) { 3137 if (len > AIRO_DEF_MTU) {
3137 airo_print_err(apriv->dev->name, "Bad size %d", len); 3138 airo_print_err(apriv->dev->name, "Bad size %d", len);
3138 goto badrx; 3139 goto badrx;
3139 } 3140 }
@@ -3508,7 +3509,7 @@ void mpi_receive_802_11 (struct airo_info *ai)
3508 if (ai->wifidev == NULL) 3509 if (ai->wifidev == NULL)
3509 hdr.len = 0; 3510 hdr.len = 0;
3510 len = le16_to_cpu(hdr.len); 3511 len = le16_to_cpu(hdr.len);
3511 if (len > 2312) { 3512 if (len > AIRO_DEF_MTU) {
3512 airo_print_err(ai->dev->name, "Bad size %d", len); 3513 airo_print_err(ai->dev->name, "Bad size %d", len);
3513 goto badrx; 3514 goto badrx;
3514 } 3515 }
@@ -4774,7 +4775,7 @@ static void proc_config_on_close( struct inode *inode, struct file *file ) {
4774 4775
4775 line += 14; 4776 line += 14;
4776 v = get_dec_u16(line, &i, 4); 4777 v = get_dec_u16(line, &i, 4);
4777 v = (v<0) ? 0 : ((v>2312) ? 2312 : v); 4778 v = (v<0) ? 0 : ((v>AIRO_DEF_MTU) ? AIRO_DEF_MTU : v);
4778 ai->config.rtsThres = (u16)v; 4779 ai->config.rtsThres = (u16)v;
4779 set_bit (FLAG_COMMIT, &ai->flags); 4780 set_bit (FLAG_COMMIT, &ai->flags);
4780 } else if ( !strncmp( line, "TXMSDULifetime: ", 16 ) ) { 4781 } else if ( !strncmp( line, "TXMSDULifetime: ", 16 ) ) {
@@ -4808,7 +4809,7 @@ static void proc_config_on_close( struct inode *inode, struct file *file ) {
4808 4809
4809 line += 15; 4810 line += 15;
4810 v = get_dec_u16(line, &i, 4); 4811 v = get_dec_u16(line, &i, 4);
4811 v = (v<256) ? 256 : ((v>2312) ? 2312 : v); 4812 v = (v<256) ? 256 : ((v>AIRO_DEF_MTU) ? AIRO_DEF_MTU : v);
4812 v = v & 0xfffe; /* Make sure its even */ 4813 v = v & 0xfffe; /* Make sure its even */
4813 ai->config.fragThresh = (u16)v; 4814 ai->config.fragThresh = (u16)v;
4814 set_bit (FLAG_COMMIT, &ai->flags); 4815 set_bit (FLAG_COMMIT, &ai->flags);
@@ -5965,8 +5966,8 @@ static int airo_set_rts(struct net_device *dev,
5965 int rthr = vwrq->value; 5966 int rthr = vwrq->value;
5966 5967
5967 if(vwrq->disabled) 5968 if(vwrq->disabled)
5968 rthr = 2312; 5969 rthr = AIRO_DEF_MTU;
5969 if((rthr < 0) || (rthr > 2312)) { 5970 if((rthr < 0) || (rthr > AIRO_DEF_MTU)) {
5970 return -EINVAL; 5971 return -EINVAL;
5971 } 5972 }
5972 readConfigRid(local, 1); 5973 readConfigRid(local, 1);
@@ -5989,7 +5990,7 @@ static int airo_get_rts(struct net_device *dev,
5989 5990
5990 readConfigRid(local, 1); 5991 readConfigRid(local, 1);
5991 vwrq->value = local->config.rtsThres; 5992 vwrq->value = local->config.rtsThres;
5992 vwrq->disabled = (vwrq->value >= 2312); 5993 vwrq->disabled = (vwrq->value >= AIRO_DEF_MTU);
5993 vwrq->fixed = 1; 5994 vwrq->fixed = 1;
5994 5995
5995 return 0; 5996 return 0;
@@ -6008,8 +6009,8 @@ static int airo_set_frag(struct net_device *dev,
6008 int fthr = vwrq->value; 6009 int fthr = vwrq->value;
6009 6010
6010 if(vwrq->disabled) 6011 if(vwrq->disabled)
6011 fthr = 2312; 6012 fthr = AIRO_DEF_MTU;
6012 if((fthr < 256) || (fthr > 2312)) { 6013 if((fthr < 256) || (fthr > AIRO_DEF_MTU)) {
6013 return -EINVAL; 6014 return -EINVAL;
6014 } 6015 }
6015 fthr &= ~0x1; /* Get an even value - is it really needed ??? */ 6016 fthr &= ~0x1; /* Get an even value - is it really needed ??? */
@@ -6033,7 +6034,7 @@ static int airo_get_frag(struct net_device *dev,
6033 6034
6034 readConfigRid(local, 1); 6035 readConfigRid(local, 1);
6035 vwrq->value = local->config.fragThresh; 6036 vwrq->value = local->config.fragThresh;
6036 vwrq->disabled = (vwrq->value >= 2312); 6037 vwrq->disabled = (vwrq->value >= AIRO_DEF_MTU);
6037 vwrq->fixed = 1; 6038 vwrq->fixed = 1;
6038 6039
6039 return 0; 6040 return 0;
@@ -6728,9 +6729,9 @@ static int airo_get_range(struct net_device *dev,
6728 range->throughput = 1500 * 1000; 6729 range->throughput = 1500 * 1000;
6729 6730
6730 range->min_rts = 0; 6731 range->min_rts = 0;
6731 range->max_rts = 2312; 6732 range->max_rts = AIRO_DEF_MTU;
6732 range->min_frag = 256; 6733 range->min_frag = 256;
6733 range->max_frag = 2312; 6734 range->max_frag = AIRO_DEF_MTU;
6734 6735
6735 if(cap_rid.softCap & 2) { 6736 if(cap_rid.softCap & 2) {
6736 // WEP: RC4 40 bits 6737 // WEP: RC4 40 bits
@@ -7885,7 +7886,7 @@ static int flashrestart(struct airo_info *ai,struct net_device *dev){
7885 if (!test_bit(FLAG_MPI,&ai->flags)) 7886 if (!test_bit(FLAG_MPI,&ai->flags))
7886 for( i = 0; i < MAX_FIDS; i++ ) { 7887 for( i = 0; i < MAX_FIDS; i++ ) {
7887 ai->fids[i] = transmit_allocate 7888 ai->fids[i] = transmit_allocate
7888 ( ai, 2312, i >= MAX_FIDS / 2 ); 7889 ( ai, AIRO_DEF_MTU, i >= MAX_FIDS / 2 );
7889 } 7890 }
7890 7891
7891 ssleep(1); /* Added 12/7/00 */ 7892 ssleep(1); /* Added 12/7/00 */