diff options
Diffstat (limited to 'drivers/net/wireless/airo.c')
-rw-r--r-- | drivers/net/wireless/airo.c | 65 |
1 files changed, 33 insertions, 32 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index df20adcd0730..6db1fb6461de 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -1040,7 +1040,7 @@ typedef struct { | |||
1040 | u16 status; | 1040 | u16 status; |
1041 | } WifiCtlHdr; | 1041 | } WifiCtlHdr; |
1042 | 1042 | ||
1043 | WifiCtlHdr wifictlhdr8023 = { | 1043 | static WifiCtlHdr wifictlhdr8023 = { |
1044 | .ctlhdr = { | 1044 | .ctlhdr = { |
1045 | .ctl = HOST_DONT_RLSE, | 1045 | .ctl = HOST_DONT_RLSE, |
1046 | } | 1046 | } |
@@ -1111,13 +1111,13 @@ static int airo_thread(void *data); | |||
1111 | static void timer_func( struct net_device *dev ); | 1111 | static void timer_func( struct net_device *dev ); |
1112 | static int airo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); | 1112 | static int airo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); |
1113 | #ifdef WIRELESS_EXT | 1113 | #ifdef WIRELESS_EXT |
1114 | struct iw_statistics *airo_get_wireless_stats (struct net_device *dev); | 1114 | static struct iw_statistics *airo_get_wireless_stats (struct net_device *dev); |
1115 | static void airo_read_wireless_stats (struct airo_info *local); | 1115 | static void airo_read_wireless_stats (struct airo_info *local); |
1116 | #endif /* WIRELESS_EXT */ | 1116 | #endif /* WIRELESS_EXT */ |
1117 | #ifdef CISCO_EXT | 1117 | #ifdef CISCO_EXT |
1118 | static int readrids(struct net_device *dev, aironet_ioctl *comp); | 1118 | static int readrids(struct net_device *dev, aironet_ioctl *comp); |
1119 | static int writerids(struct net_device *dev, aironet_ioctl *comp); | 1119 | static int writerids(struct net_device *dev, aironet_ioctl *comp); |
1120 | int flashcard(struct net_device *dev, aironet_ioctl *comp); | 1120 | static int flashcard(struct net_device *dev, aironet_ioctl *comp); |
1121 | #endif /* CISCO_EXT */ | 1121 | #endif /* CISCO_EXT */ |
1122 | #ifdef MICSUPPORT | 1122 | #ifdef MICSUPPORT |
1123 | static void micinit(struct airo_info *ai); | 1123 | static void micinit(struct airo_info *ai); |
@@ -1226,6 +1226,12 @@ static int setup_proc_entry( struct net_device *dev, | |||
1226 | static int takedown_proc_entry( struct net_device *dev, | 1226 | static int takedown_proc_entry( struct net_device *dev, |
1227 | struct airo_info *apriv ); | 1227 | struct airo_info *apriv ); |
1228 | 1228 | ||
1229 | static int cmdreset(struct airo_info *ai); | ||
1230 | static int setflashmode (struct airo_info *ai); | ||
1231 | static int flashgchar(struct airo_info *ai,int matchbyte,int dwelltime); | ||
1232 | static int flashputbuf(struct airo_info *ai); | ||
1233 | static int flashrestart(struct airo_info *ai,struct net_device *dev); | ||
1234 | |||
1229 | #ifdef MICSUPPORT | 1235 | #ifdef MICSUPPORT |
1230 | /*********************************************************************** | 1236 | /*********************************************************************** |
1231 | * MIC ROUTINES * | 1237 | * MIC ROUTINES * |
@@ -1234,10 +1240,11 @@ static int takedown_proc_entry( struct net_device *dev, | |||
1234 | 1240 | ||
1235 | static int RxSeqValid (struct airo_info *ai,miccntx *context,int mcast,u32 micSeq); | 1241 | static int RxSeqValid (struct airo_info *ai,miccntx *context,int mcast,u32 micSeq); |
1236 | static void MoveWindow(miccntx *context, u32 micSeq); | 1242 | static void MoveWindow(miccntx *context, u32 micSeq); |
1237 | void emmh32_setseed(emmh32_context *context, u8 *pkey, int keylen, struct crypto_tfm *); | 1243 | static void emmh32_setseed(emmh32_context *context, u8 *pkey, int keylen, struct crypto_tfm *); |
1238 | void emmh32_init(emmh32_context *context); | 1244 | static void emmh32_init(emmh32_context *context); |
1239 | void emmh32_update(emmh32_context *context, u8 *pOctets, int len); | 1245 | static void emmh32_update(emmh32_context *context, u8 *pOctets, int len); |
1240 | void emmh32_final(emmh32_context *context, u8 digest[4]); | 1246 | static void emmh32_final(emmh32_context *context, u8 digest[4]); |
1247 | static int flashpchar(struct airo_info *ai,int byte,int dwelltime); | ||
1241 | 1248 | ||
1242 | /* micinit - Initialize mic seed */ | 1249 | /* micinit - Initialize mic seed */ |
1243 | 1250 | ||
@@ -1315,7 +1322,7 @@ static int micsetup(struct airo_info *ai) { | |||
1315 | return SUCCESS; | 1322 | return SUCCESS; |
1316 | } | 1323 | } |
1317 | 1324 | ||
1318 | char micsnap[]= {0xAA,0xAA,0x03,0x00,0x40,0x96,0x00,0x02}; | 1325 | static char micsnap[] = {0xAA,0xAA,0x03,0x00,0x40,0x96,0x00,0x02}; |
1319 | 1326 | ||
1320 | /*=========================================================================== | 1327 | /*=========================================================================== |
1321 | * Description: Mic a packet | 1328 | * Description: Mic a packet |
@@ -1570,7 +1577,7 @@ static void MoveWindow(miccntx *context, u32 micSeq) | |||
1570 | static unsigned char aes_counter[16]; | 1577 | static unsigned char aes_counter[16]; |
1571 | 1578 | ||
1572 | /* expand the key to fill the MMH coefficient array */ | 1579 | /* expand the key to fill the MMH coefficient array */ |
1573 | void emmh32_setseed(emmh32_context *context, u8 *pkey, int keylen, struct crypto_tfm *tfm) | 1580 | static void emmh32_setseed(emmh32_context *context, u8 *pkey, int keylen, struct crypto_tfm *tfm) |
1574 | { | 1581 | { |
1575 | /* take the keying material, expand if necessary, truncate at 16-bytes */ | 1582 | /* take the keying material, expand if necessary, truncate at 16-bytes */ |
1576 | /* run through AES counter mode to generate context->coeff[] */ | 1583 | /* run through AES counter mode to generate context->coeff[] */ |
@@ -1602,7 +1609,7 @@ void emmh32_setseed(emmh32_context *context, u8 *pkey, int keylen, struct crypto | |||
1602 | } | 1609 | } |
1603 | 1610 | ||
1604 | /* prepare for calculation of a new mic */ | 1611 | /* prepare for calculation of a new mic */ |
1605 | void emmh32_init(emmh32_context *context) | 1612 | static void emmh32_init(emmh32_context *context) |
1606 | { | 1613 | { |
1607 | /* prepare for new mic calculation */ | 1614 | /* prepare for new mic calculation */ |
1608 | context->accum = 0; | 1615 | context->accum = 0; |
@@ -1610,7 +1617,7 @@ void emmh32_init(emmh32_context *context) | |||
1610 | } | 1617 | } |
1611 | 1618 | ||
1612 | /* add some bytes to the mic calculation */ | 1619 | /* add some bytes to the mic calculation */ |
1613 | void emmh32_update(emmh32_context *context, u8 *pOctets, int len) | 1620 | static void emmh32_update(emmh32_context *context, u8 *pOctets, int len) |
1614 | { | 1621 | { |
1615 | int coeff_position, byte_position; | 1622 | int coeff_position, byte_position; |
1616 | 1623 | ||
@@ -1652,7 +1659,7 @@ void emmh32_update(emmh32_context *context, u8 *pOctets, int len) | |||
1652 | static u32 mask32[4] = { 0x00000000L, 0xFF000000L, 0xFFFF0000L, 0xFFFFFF00L }; | 1659 | static u32 mask32[4] = { 0x00000000L, 0xFF000000L, 0xFFFF0000L, 0xFFFFFF00L }; |
1653 | 1660 | ||
1654 | /* calculate the mic */ | 1661 | /* calculate the mic */ |
1655 | void emmh32_final(emmh32_context *context, u8 digest[4]) | 1662 | static void emmh32_final(emmh32_context *context, u8 digest[4]) |
1656 | { | 1663 | { |
1657 | int coeff_position, byte_position; | 1664 | int coeff_position, byte_position; |
1658 | u32 val; | 1665 | u32 val; |
@@ -2255,7 +2262,7 @@ static void airo_read_stats(struct airo_info *ai) { | |||
2255 | ai->stats.rx_fifo_errors = vals[0]; | 2262 | ai->stats.rx_fifo_errors = vals[0]; |
2256 | } | 2263 | } |
2257 | 2264 | ||
2258 | struct net_device_stats *airo_get_stats(struct net_device *dev) | 2265 | static struct net_device_stats *airo_get_stats(struct net_device *dev) |
2259 | { | 2266 | { |
2260 | struct airo_info *local = dev->priv; | 2267 | struct airo_info *local = dev->priv; |
2261 | 2268 | ||
@@ -2414,7 +2421,7 @@ EXPORT_SYMBOL(stop_airo_card); | |||
2414 | 2421 | ||
2415 | static int add_airo_dev( struct net_device *dev ); | 2422 | static int add_airo_dev( struct net_device *dev ); |
2416 | 2423 | ||
2417 | int wll_header_parse(struct sk_buff *skb, unsigned char *haddr) | 2424 | static int wll_header_parse(struct sk_buff *skb, unsigned char *haddr) |
2418 | { | 2425 | { |
2419 | memcpy(haddr, skb->mac.raw + 10, ETH_ALEN); | 2426 | memcpy(haddr, skb->mac.raw + 10, ETH_ALEN); |
2420 | return ETH_ALEN; | 2427 | return ETH_ALEN; |
@@ -2681,7 +2688,7 @@ static struct net_device *init_wifidev(struct airo_info *ai, | |||
2681 | return dev; | 2688 | return dev; |
2682 | } | 2689 | } |
2683 | 2690 | ||
2684 | int reset_card( struct net_device *dev , int lock) { | 2691 | static int reset_card( struct net_device *dev , int lock) { |
2685 | struct airo_info *ai = dev->priv; | 2692 | struct airo_info *ai = dev->priv; |
2686 | 2693 | ||
2687 | if (lock && down_interruptible(&ai->sem)) | 2694 | if (lock && down_interruptible(&ai->sem)) |
@@ -2696,9 +2703,9 @@ int reset_card( struct net_device *dev , int lock) { | |||
2696 | return 0; | 2703 | return 0; |
2697 | } | 2704 | } |
2698 | 2705 | ||
2699 | struct net_device *_init_airo_card( unsigned short irq, int port, | 2706 | static struct net_device *_init_airo_card( unsigned short irq, int port, |
2700 | int is_pcmcia, struct pci_dev *pci, | 2707 | int is_pcmcia, struct pci_dev *pci, |
2701 | struct device *dmdev ) | 2708 | struct device *dmdev ) |
2702 | { | 2709 | { |
2703 | struct net_device *dev; | 2710 | struct net_device *dev; |
2704 | struct airo_info *ai; | 2711 | struct airo_info *ai; |
@@ -7235,7 +7242,7 @@ static void airo_read_wireless_stats(struct airo_info *local) | |||
7235 | local->wstats.miss.beacon = vals[34]; | 7242 | local->wstats.miss.beacon = vals[34]; |
7236 | } | 7243 | } |
7237 | 7244 | ||
7238 | struct iw_statistics *airo_get_wireless_stats(struct net_device *dev) | 7245 | static struct iw_statistics *airo_get_wireless_stats(struct net_device *dev) |
7239 | { | 7246 | { |
7240 | struct airo_info *local = dev->priv; | 7247 | struct airo_info *local = dev->priv; |
7241 | 7248 | ||
@@ -7450,14 +7457,8 @@ static int writerids(struct net_device *dev, aironet_ioctl *comp) { | |||
7450 | * Flash command switch table | 7457 | * Flash command switch table |
7451 | */ | 7458 | */ |
7452 | 7459 | ||
7453 | int flashcard(struct net_device *dev, aironet_ioctl *comp) { | 7460 | static int flashcard(struct net_device *dev, aironet_ioctl *comp) { |
7454 | int z; | 7461 | int z; |
7455 | int cmdreset(struct airo_info *); | ||
7456 | int setflashmode(struct airo_info *); | ||
7457 | int flashgchar(struct airo_info *,int,int); | ||
7458 | int flashpchar(struct airo_info *,int,int); | ||
7459 | int flashputbuf(struct airo_info *); | ||
7460 | int flashrestart(struct airo_info *,struct net_device *); | ||
7461 | 7462 | ||
7462 | /* Only super-user can modify flash */ | 7463 | /* Only super-user can modify flash */ |
7463 | if (!capable(CAP_NET_ADMIN)) | 7464 | if (!capable(CAP_NET_ADMIN)) |
@@ -7515,7 +7516,7 @@ int flashcard(struct net_device *dev, aironet_ioctl *comp) { | |||
7515 | * card. | 7516 | * card. |
7516 | */ | 7517 | */ |
7517 | 7518 | ||
7518 | int cmdreset(struct airo_info *ai) { | 7519 | static int cmdreset(struct airo_info *ai) { |
7519 | disable_MAC(ai, 1); | 7520 | disable_MAC(ai, 1); |
7520 | 7521 | ||
7521 | if(!waitbusy (ai)){ | 7522 | if(!waitbusy (ai)){ |
@@ -7539,7 +7540,7 @@ int cmdreset(struct airo_info *ai) { | |||
7539 | * mode | 7540 | * mode |
7540 | */ | 7541 | */ |
7541 | 7542 | ||
7542 | int setflashmode (struct airo_info *ai) { | 7543 | static int setflashmode (struct airo_info *ai) { |
7543 | set_bit (FLAG_FLASHING, &ai->flags); | 7544 | set_bit (FLAG_FLASHING, &ai->flags); |
7544 | 7545 | ||
7545 | OUT4500(ai, SWS0, FLASH_COMMAND); | 7546 | OUT4500(ai, SWS0, FLASH_COMMAND); |
@@ -7566,7 +7567,7 @@ int setflashmode (struct airo_info *ai) { | |||
7566 | * x 50us for echo . | 7567 | * x 50us for echo . |
7567 | */ | 7568 | */ |
7568 | 7569 | ||
7569 | int flashpchar(struct airo_info *ai,int byte,int dwelltime) { | 7570 | static int flashpchar(struct airo_info *ai,int byte,int dwelltime) { |
7570 | int echo; | 7571 | int echo; |
7571 | int waittime; | 7572 | int waittime; |
7572 | 7573 | ||
@@ -7606,7 +7607,7 @@ int flashpchar(struct airo_info *ai,int byte,int dwelltime) { | |||
7606 | * Get a character from the card matching matchbyte | 7607 | * Get a character from the card matching matchbyte |
7607 | * Step 3) | 7608 | * Step 3) |
7608 | */ | 7609 | */ |
7609 | int flashgchar(struct airo_info *ai,int matchbyte,int dwelltime){ | 7610 | static int flashgchar(struct airo_info *ai,int matchbyte,int dwelltime){ |
7610 | int rchar; | 7611 | int rchar; |
7611 | unsigned char rbyte=0; | 7612 | unsigned char rbyte=0; |
7612 | 7613 | ||
@@ -7637,7 +7638,7 @@ int flashgchar(struct airo_info *ai,int matchbyte,int dwelltime){ | |||
7637 | * send to the card | 7638 | * send to the card |
7638 | */ | 7639 | */ |
7639 | 7640 | ||
7640 | int flashputbuf(struct airo_info *ai){ | 7641 | static int flashputbuf(struct airo_info *ai){ |
7641 | int nwords; | 7642 | int nwords; |
7642 | 7643 | ||
7643 | /* Write stuff */ | 7644 | /* Write stuff */ |
@@ -7659,7 +7660,7 @@ int flashputbuf(struct airo_info *ai){ | |||
7659 | /* | 7660 | /* |
7660 | * | 7661 | * |
7661 | */ | 7662 | */ |
7662 | int flashrestart(struct airo_info *ai,struct net_device *dev){ | 7663 | static int flashrestart(struct airo_info *ai,struct net_device *dev){ |
7663 | int i,status; | 7664 | int i,status; |
7664 | 7665 | ||
7665 | ssleep(1); /* Added 12/7/00 */ | 7666 | ssleep(1); /* Added 12/7/00 */ |