diff -Naur linux-wlan-0.3.4/driver/Makefile linux-wlan-0.3.4-mybuild/driver/Makefile --- linux-wlan-0.3.4/driver/Makefile Sat Nov 6 02:21:06 1999 +++ linux-wlan-0.3.4-mybuild/driver/Makefile Wed Aug 28 23:06:20 2002 @@ -124,6 +124,7 @@ mkdir -p $(MODDIR)/net cp -p $(ISA_MODULE) $(MODDIR)/net endif + depmod -ae clean: rm -f core core.* *.o .*.o *.s *.a .depend tmp_make *~ tags diff -Naur linux-wlan-0.3.4/driver/am930cs.c linux-wlan-0.3.4-mybuild/driver/am930cs.c --- linux-wlan-0.3.4/driver/am930cs.c Sat Nov 6 02:21:06 1999 +++ linux-wlan-0.3.4-mybuild/driver/am930cs.c Tue Dec 3 12:34:43 2002 @@ -35,6 +35,8 @@ */ #if defined(__LINUX_WLAN__) +#include +#include /* PCMCIA headers generated during PCMCIA package installation */ #include #include @@ -52,7 +54,7 @@ #include #include #include -#include +#include #include #include #include @@ -64,6 +66,9 @@ #include +/* ProcFS */ +#include + /* Ethernet and network includes */ #include #include @@ -84,7 +89,6 @@ /*================================================================*/ /* Local Includes */ #include -#include #include "am930di.h" /*================================================================*/ @@ -114,6 +118,9 @@ int wlan_debug=0; /* Debug output level, declared in */ MODULE_PARM( wlan_debug, "i"); /* wlan_compat.h */ +/* RSSI info */ +int proc_rssi = 0; + /*================================================================*/ /* Local functions */ int init_module(void); @@ -122,6 +129,16 @@ dev_link_t *am930_drvr_attach(void); void am930_drvr_detach(dev_link_t *); +/* ProcFS */ +#define MY_PROC_ENTRY_NAME "net/wlan" +struct proc_dir_entry *my_proc_entry = NULL; + +static int get_rssi_info( char *page, char **start, off_t requested_offset, int requested_len, int *eof, void *data ) { + /* struct privdata = *priv */ /* Per-card RSSI */ + int mylen = 0; + mylen = sprintf( page, "RSSI = %03d\n", proc_rssi ); + return mylen; +} /*---------------------------------------------------------------- @@ -152,13 +169,22 @@ return -1; } - printk(KERN_INFO "Linux WLAN " WLAN_RELEASE "\n"); + printk(KERN_INFO "Linux WLAN (whacked) " WLAN_RELEASE "\n"); /* Notify driver services that we are loaded and are a pcmcia driver */ register_pcmcia_driver( &am930_driver_name, &am930_drvr_attach, &am930_drvr_detach); + /* Set up the ProcFS entry */ + my_proc_entry = create_proc_read_entry( MY_PROC_ENTRY_NAME, S_IFREG | S_IRUGO | S_IWUSR, NULL, get_rssi_info, &proc_root ); + if ( ! my_proc_entry ) { + printk(KERN_INFO "Failed to register proc entry\n"); + /*return -ENOMEM;*/ /* whoops. don't do this. */ + } else { + } + + DBFEXIT; return 0; } @@ -179,6 +205,9 @@ { DBFENTER; + if ( my_proc_entry != NULL ) { + remove_proc_entry( MY_PROC_ENTRY_NAME, &proc_root ); + } unregister_pcmcia_driver(&am930_driver_name); @@ -246,7 +275,7 @@ * occurs when socket services detects that a card has been * removed. * -* Kindof a wierd function, it has to determine if it's OK to do +* Kindof a weird function, it has to determine if it's OK to do * its job. If not then it sets some flags and expects to be * called later. * @@ -292,7 +321,7 @@ *curr = instance->next; /* free the memory */ - kfree_s(instance, sizeof(struct dev_link_t)); + kfree(instance); } } diff -Naur linux-wlan-0.3.4/driver/am930di.c linux-wlan-0.3.4-mybuild/driver/am930di.c --- linux-wlan-0.3.4/driver/am930di.c Sat Nov 6 02:21:06 1999 +++ linux-wlan-0.3.4-mybuild/driver/am930di.c Tue Dec 3 12:26:09 2002 @@ -39,6 +39,9 @@ /* The following prevents "kernel_version" from being set in this file. */ #define __NO_VERSION__ +#include +#include + /* PCMCIA headers generated during PCMCIA package installation */ #include #include @@ -67,7 +70,7 @@ #include #include #include -#include +#include #include #include #include @@ -85,7 +88,6 @@ /* Local Includes */ #include -#include #include #include #include "am930di.h" @@ -93,7 +95,7 @@ #include "am930mac.h" #include "am930hw.h" -#if (LINUX_VERSION_CODE < VERSION(2,2,0)) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0)) # define ioremap_nocache ioremap #endif @@ -126,7 +128,7 @@ * Card Services events at this point. Therefore, the event * handler must be coded to deal with ALL of them. * -* returns: nothing +* returns: device instance structure (dev_link_t *) ----------------------------------------------------------------*/ dev_link_t* am930DI_construct(void) { @@ -190,8 +192,8 @@ if (ret != 0) { am930_drvr_cs_error(instance->handle, RegisterClient, ret); - kfree_s( instance->dev, sizeof(struct dev_node_t)); - kfree_s( instance, sizeof(struct dev_link_t)); + kfree( instance->dev); + kfree( instance); instance = NULL; } } @@ -246,6 +248,7 @@ if ( mac != NULL ) { am930mac_destruct(mac); + instance->priv = NULL; } am930DI_deconfig(instance); @@ -260,7 +263,7 @@ if (instance->dev != NULL ) { - kfree_s( instance->dev, sizeof(dev_node_t)); + kfree( instance->dev); instance->dev = NULL; } @@ -540,6 +543,7 @@ /*-- Save the mem base ----*/ *pMemBase = (UINT32)ioremap_nocache( req.Base, 0x8000 ); } + WLAN_LOG_NOTICE1( "Membase: %08lx\n", *pMemBase ); break; next_entry: diff -Naur linux-wlan-0.3.4/driver/am930hw.c linux-wlan-0.3.4-mybuild/driver/am930hw.c --- linux-wlan-0.3.4/driver/am930hw.c Sat Nov 6 02:21:06 1999 +++ linux-wlan-0.3.4-mybuild/driver/am930hw.c Wed Nov 6 00:53:35 2002 @@ -74,7 +74,7 @@ #include #include #include -#include +#include #include #include #include @@ -610,7 +610,7 @@ DBFENTER; #if (WLAN_OS == WLAN_LINUX_KERNEL) - kfree_s( hw, sizeof(am930hw_t)); + kfree( hw); #elif (WLAN_OS == WLAN_LWOS) #else #error "No WLAN_OS match!" @@ -1374,6 +1374,7 @@ else { stats->rssi = read8(hw, hw->rx_head + RXD_OFF_RSSI); + proc_rssi = stats->rssi; stats->ch = read8(hw, hw->rx_head + RXD_OFF_INDEX_OR_CH); stats->local_time = read32(hw, hw->rx_head + RXD_OFF_LOCAL_TIME); stats->rate = read8(hw, hw->rx_head + RXD_OFF_RATE); @@ -1597,6 +1598,7 @@ am930hw_cmd_result_t cmd_result; DBFENTER; + WLAN_LOG_NOTICE1("resetting, iodelay is %d\n", am930_iodelay ); do { @@ -2128,7 +2130,7 @@ * >0 - pkt was handed to f/w and no more tx buffers avail * <0 - pkt was not sent due to no tx buffers avail ----------------------------------------------------------------*/ -UINT32 am930hw_txdata( am930hw_t* hw, wlan_pb_t *pb, UINT32 rate) +UINT32 am930hw_txdata( am930hw_t* hw, wlan_pb_t *pb, UINT32 rate, UINT32 *count ) { UINT32 result = 0; UINT32 slot; @@ -2298,6 +2300,9 @@ result = (hw->used_txbuf >= hw->ntxbuf) ? 1 : 0; + /* FIXME send totallen back up to the caller for stats */ + *count = totallen; + #ifdef WLAN_INCLUDE_SNIF if ( hw->mac->snifflags & SNIFFLAG_SNIFTX ) { diff -Naur linux-wlan-0.3.4/driver/am930hw.h linux-wlan-0.3.4-mybuild/driver/am930hw.h --- linux-wlan-0.3.4/driver/am930hw.h Sat Nov 6 02:21:06 1999 +++ linux-wlan-0.3.4-mybuild/driver/am930hw.h Wed Nov 6 00:55:20 2002 @@ -370,6 +370,7 @@ /*===== Variables ==================================*/ extern int am930_iodelay; /* udelay between i/o or mem reads */ +extern int proc_rssi; /*=============================================================*/ /*--- Command Argument Types ---------------------------------*/ @@ -638,7 +639,7 @@ UINT8 am930hw_stateset( am930hw_t *hw, UINT8 state); UINT8 am930hw_stateget( am930hw_t *hw); -UINT32 am930hw_txdata( am930hw_t* hw, wlan_pb_t *pb, UINT32 rate); +UINT32 am930hw_txdata( am930hw_t* hw, wlan_pb_t *pb, UINT32 rate, UINT32 *count); UINT32 am930hw_txmgmt( am930hw_t* hw, UINT8 *buf, UINT32 len); void am930hw_txkick( am930hw_t* hw); diff -Naur linux-wlan-0.3.4/driver/am930llc.c linux-wlan-0.3.4-mybuild/driver/am930llc.c --- linux-wlan-0.3.4/driver/am930llc.c Sat Nov 6 02:21:07 1999 +++ linux-wlan-0.3.4-mybuild/driver/am930llc.c Wed Nov 6 00:29:59 2002 @@ -73,7 +73,7 @@ #include #include #include -#include +#include #include #include #include @@ -176,7 +176,7 @@ llc->dev = kmalloc( sizeof(device_t), GFP_KERNEL); if ( llc->dev == NULL ) { - kfree_s(llc, sizeof(am930llc_t)); + kfree(llc); return NULL; } memset( llc->dev, 0, sizeof(device_t)); @@ -184,28 +184,28 @@ llc->dev->priv = kmalloc( sizeof(devpriv_t), GFP_KERNEL); if ( llc->dev->priv == NULL ) { - kfree_s(llc->dev, sizeof(device_t)); - kfree_s(llc, sizeof(am930llc_t)); + kfree(llc->dev); + kfree(llc); return NULL; } memset( llc->dev->priv, 0, sizeof(devpriv_t)); /* the dev name field will point to the same memory used by the node_t field of the pcmcia di object */ - #ifdef WLAN_PCMCIA - llc->dev->name = ((dev_link_t*)(llc->mac->di))->dev->dev_name; - #else +/*new #ifdef WLAN_PCMCIA + llc->dev->name = ((dev_link_t*)(llc->mac->di))->dev->dev_name; + #else llc->dev->name = kmalloc(WLAN_DEVNAME_LEN, GFP_KERNEL); if ( llc->dev->name == NULL ) { WLAN_LOG_ERROR0("Failed to alloc device name space.\n"); - kfree_s( llc->dev->priv, sizeof(devpriv_t)); - kfree_s( llc->dev, sizeof(device_t)); - kfree_s( llc, sizeof(am930llc_t)); + kfree( llc->dev->priv); + kfree( llc->dev); + kfree( llc); return NULL; } llc->dev->name[0] = '\0'; - #endif + #endif*/ /* set the private data to point back at the llc */ V2P(llc->dev->priv)->llc = llc; @@ -221,6 +221,8 @@ llc->dev->get_stats = am930llc_devgetstats; llc->dev->set_multicast_list = am930llc_devset_multicast_list; llc->dev->do_ioctl = (do_ioctl_t)am930llc_devdo_ioctl; +/*new Create queue head */ + init_waitqueue_head(&(llc->cmdwq)); ether_setup( llc->dev ); @@ -233,7 +235,10 @@ llc = NULL; } WLAN_LOG_INFO1("Device %s registered\n", llc->dev->name); - +/*new Copy to pcmcia di object */ + #ifdef WLAN_PCMCIA + strcpy(((dev_link_t*)(llc->mac->di))->dev->dev_name, llc->dev->name); + #endif #if 0 /* now set up the kernel timer */ init_timer(&llc->timer); @@ -271,7 +276,8 @@ /* Assume the timer was set up to watch us while an ioctl's in */ /* the wait queue. Check for NULL and if not, wake it */ - if ( llc->cmdwq != NULL ){ +/* if ( llc->cmdwq != NULL ){ */ + if ( llc->cmdbusy != 0 ){ wake_up_interruptible(&(llc->cmdwq)); } @@ -324,13 +330,13 @@ if ( llc->dev != NULL ) { del_timer(&llc->timer); - llc->dev->start = 0; +/*old llc->dev->start = 0; */ unregister_netdev( llc->dev ); kfree(llc->dev); llc->dev = NULL; } - kfree_s( llc, sizeof(am930llc_t)); + kfree( llc); DBFEXIT; return; @@ -368,7 +374,8 @@ { DBFENTER; - if ( llc->cmdwq != NULL ){ +/*old if ( llc->cmdwq != NULL ){ */ + if ( llc->cmdbusy != 0 ){ llc->cmdstatus = status; wake_up_interruptible(&(llc->cmdwq)); } @@ -448,8 +455,8 @@ /* Now, do an interruptible_sleep, we'll be awakened by: */ /* a signal the process, cmdtimerfunc (timeout), or llc_scancomplete */ - interruptible_sleep_on(&(llc->cmdwq)); - llc->cmdwq = NULL; + interruptible_sleep_on(&(llc->cmdwq)); +/*old llc->cmdwq = NULL; */ /* If sleep return is via signal */ if ( signal_pending(current) ) { @@ -534,7 +541,7 @@ (cmd->nitems * sizeof(netitem_t))) ) { result = -EFAULT; } - kfree_s(cmd, sizeof(wlan_netlist_t)+(tmp.nitems*sizeof(netitem_t))); + kfree(cmd); break; } case WLAN_BSSCREATE: @@ -578,7 +585,7 @@ /* Now, do an interruptible_sleep, we'll be awakened by: */ /* a signal the process, cmdtimerfunc (timeout), or llc_scancomplete */ interruptible_sleep_on(&(llc->cmdwq)); - llc->cmdwq = NULL; +/*old llc->cmdwq = NULL;*/ /* If sleep return is via signal */ if ( signal_pending(current) ) { @@ -622,7 +629,7 @@ /* Now, do an interruptible_sleep, we'll be awakened by: */ /* a signal the process, cmdtimerfunc (timeout), or llc_scancomplete */ interruptible_sleep_on(&(llc->cmdwq)); - llc->cmdwq = NULL; +/* llc->cmdwq = NULL; */ /* If sleep return is via signal */ if ( signal_pending(current) ) { @@ -662,7 +669,7 @@ } if ( copy_from_user( &mibcode, req->data, 4 ) ) { - kfree_s(p, req->len); + kfree(p); result = -EFAULT; break; } @@ -696,7 +703,7 @@ if ( copy_to_user( ((UINT8*)(req->data)) + 4, p, size)) { result = -EFAULT; } - kfree_s(p, req->len); + kfree(p); break; } case WLAN_SETMIBITEM: @@ -811,7 +818,7 @@ break; } default: - printk(KERN_DEBUG "am930_cs: Unknown or unsupported wlan ioctl!\n"); + printk(KERN_DEBUG "am930_cs: Unknown or unsupported wlan ioctl %d!\n", cmd); break; } llc->currcmd = 0; @@ -855,7 +862,8 @@ DBFENTER; - if ( dev->start == 1 ) +/*old if ( dev->start == 1 ) */ + if ( netif_running(dev) ) { /* If some higher layer thinks we've missed a tx-done, we are passed NULL. Caution: dev_tint handles the cli/sti .. @@ -869,7 +877,8 @@ } #endif - if ( test_and_set_bit(0, (void*)&(dev->tbusy)) != 0 ) +/*old if ( test_and_set_bit(0, (void*)&(dev->tbusy)) != 0 ) */ + if ( netif_queue_stopped(dev) ) { /* TODO: add a f/w reset capability here. see skeleton.c */ WLAN_LOG_DEBUG2(1, "called when tbusy set," @@ -908,7 +917,8 @@ if ( txresult == 0) /* success and more buf avail, re: hw_txdata */ { - dev->tbusy = 0; +/*old dev->tbusy = 0; */ + netif_wake_queue(dev); result = 0; } else if ( txresult == 1 ) /* success, no more avail */ @@ -948,10 +958,10 @@ DBFENTER; /* set the flags in the device object */ - dev->tbusy = 0; - dev->interrupt = 0; - dev->start = 1; - +/*old dev->tbusy = 0; */ +/*old dev->interrupt = 0; */ +/*old dev->start = 1; */ + netif_start_queue(dev); #ifdef WLAN_PCMCIA MOD_INC_USE_COUNT; #endif @@ -975,8 +985,9 @@ DBFENTER; /* set the flags in the device object */ - dev->start = 0; - dev->tbusy = 1; +/*old dev->start = 0; */ +/*old dev->tbusy = 1; */ + netif_stop_queue(dev); #ifdef WLAN_PCMCIA MOD_DEC_USE_COUNT; @@ -1343,12 +1354,18 @@ * * returns: nothing ----------------------------------------------------------------*/ +/* Cribbed from the net */ +/* kfree_skb called from a hard interrupt is Not Good in 2.4 */ +#if (LINUX_VERSION_CODE < 0x020300) +#define dev_kfree_skb_any dev_kfree_skb +#endif + void am930llc_pbfreeskb( void *buf, int size ) { #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0)) dev_kfree_skb( (struct sk_buff*)buf, FREE_WRITE); #else - dev_kfree_skb( (struct sk_buff*)buf ); + dev_kfree_skb_any( (struct sk_buff*)buf ); #endif } @@ -1362,7 +1379,7 @@ ----------------------------------------------------------------*/ void am930llc_pbkfree_s( void *buf, int size) { - kfree_s( buf, size); + kfree( buf); } @@ -1430,7 +1447,7 @@ { (*(pb->p80211free))(pb->p80211hostbuf, pb->p80211buflen); } - kfree_s(pb, sizeof(wlan_pb_t)); + kfree(pb); } @@ -1446,9 +1463,10 @@ DBFENTER; - llc->dev->interrupt = 1; +/*old llc->dev->interrupt = 1; */ - if ( llc->dev->start ) +/*old if ( llc->dev->start ) */ + if ( netif_running(llc->dev) ) { if ( am930llc_pb_p80211_to_ether(llc, pb) == 0 ) { @@ -1465,12 +1483,13 @@ skb->protocol = eth_type_trans( skb, llc->dev); V2P(llc->dev->priv)->stats.rx_packets++; + V2P(llc->dev->priv)->stats.rx_bytes += skb->len; netif_rx(skb); } } - llc->dev->interrupt = 0; +/*old llc->dev->interrupt = 0; */ am930llc_pbfree(pb); @@ -1618,7 +1637,7 @@ * * returns: zero ----------------------------------------------------------------*/ -void am930llc_ontxcomplete( am930llc_t *llc, UINT32 txresult) +void am930llc_ontxcomplete( am930llc_t *llc, UINT32 txresult, UINT32 count) { DBFENTER; @@ -1629,10 +1648,12 @@ else { V2P(llc->dev->priv)->stats.tx_packets++; + V2P(llc->dev->priv)->stats.tx_bytes += count; } - llc->dev->tbusy = 0; - mark_bh(NET_BH); +/*old llc->dev->tbusy = 0; */ +/*old mark_bh(NET_BH); */ + netif_wake_queue(llc->dev); DBFEXIT; return; diff -Naur linux-wlan-0.3.4/driver/am930llc.h linux-wlan-0.3.4-mybuild/driver/am930llc.h --- linux-wlan-0.3.4/driver/am930llc.h Sat Nov 6 02:21:07 1999 +++ linux-wlan-0.3.4-mybuild/driver/am930llc.h Wed Nov 6 00:30:52 2002 @@ -261,8 +261,7 @@ UINT cmdbusy; UINT currcmd; struct timer_list cmdtimer; /* ioctl cmd timeout timer */ - struct wait_queue *cmdwq; /* ioctl blocking wait queue */ - + wait_queue_head_t cmdwq; /* ioctl blocking wait queue */ /* Implementation specific config items */ int ethconv; struct sock *nlsk; @@ -283,7 +282,7 @@ void am930llc_rxframe( am930llc_t *llc, wlan_pb_t *pb); void am930llc_rxframe_err(am930llc_t *llc); -void am930llc_ontxcomplete( am930llc_t *llc, UINT32 txresult); +void am930llc_ontxcomplete( am930llc_t *llc, UINT32 txresult, UINT32 count); void am930llc_cmdcomplete(am930llc_t *llc, UINT status); /* frame translation routines */ diff -Naur linux-wlan-0.3.4/driver/am930mac.c linux-wlan-0.3.4-mybuild/driver/am930mac.c --- linux-wlan-0.3.4/driver/am930mac.c Sat Nov 6 02:21:07 1999 +++ linux-wlan-0.3.4-mybuild/driver/am930mac.c Wed Nov 6 00:54:56 2002 @@ -67,7 +67,7 @@ #include #include #include -#include +#include #include #include #include @@ -361,16 +361,16 @@ { am930shim_pbfree(pb); } - kfree_s( mac->llcq, sizeof(am930q_t)); + kfree( mac->llcq); while ( (mac->macq != NULL) && (pb = (wlan_pb_t*)am930q_dequeue(mac->macq)) ) { am930shim_pbfree(pb); } - kfree_s( mac->macq, sizeof(am930q_t)); + kfree( mac->macq); /* all subobjects handled, now free the mac object */ - kfree_s( mac, sizeof(am930mac_t)); + kfree( mac); DBFEXIT; return; @@ -529,6 +529,8 @@ wlan_pb_t *pb = NULL; am930q_t *q; int i = 0; + UINT32 count = 0; + UINT32 pb_count = 0; DBFENTER; @@ -557,7 +559,7 @@ if ( pb != NULL ) { - txdone = am930hw_txdata( mac->hw, pb, mac->mgr->curr_rate); + txdone = am930hw_txdata( mac->hw, pb, mac->mgr->curr_rate, &pb_count ); am930shim_pbfree(pb); pb = NULL; } @@ -567,15 +569,21 @@ } } mac->nextq ^= 1; + if ( txdone >= 0 ) + count += pb_count; } while( q != NULL && txdone == 0 && i++ < 4); #if (WLAN_OS == WLAN_LINUX_KERNEL) if ( txresult != 0xffffffff ) { - am930shim_ontxcomplete( mac->llc, txresult); + am930shim_ontxcomplete( mac->llc, txresult, count ); + } + else + { + /* FIXME explain what txresult = 0xfffffff means */ } #elif (WLAN_OS == WLAN_LWOS) - am930shim_ontxcomplete( mac->llc, txresult); + am930shim_ontxcomplete( mac->llc, txresult, bytes_written ); #else #error "No WLAN_OS match!" #endif @@ -626,7 +634,7 @@ { am930mgr_class2err(mac->mgr, pb->p80211_hdr->a3.a2); am930shim_pbfree(pb); - kfree_s( stats, sizeof(am930rxstats_t)); + kfree( stats); return; } } @@ -637,7 +645,7 @@ { am930mgr_class3err(mac->mgr, pb->p80211_hdr->a3.a2); am930shim_pbfree(pb); - kfree_s( stats, sizeof(am930rxstats_t)); + kfree( stats); return; } } @@ -669,14 +677,14 @@ { am930shim_pbfree(pb2); am930shim_pbfree(pb); - kfree_s( stats, sizeof(am930rxstats_t)); + kfree( stats); return; } } else /* alloc failure, drop the frame */ { am930shim_pbfree(pb); - kfree_s( stats, sizeof(am930rxstats_t)); + kfree( stats); return; } } @@ -732,7 +740,7 @@ am930shim_rxframe( mac->llc, pb); } } - kfree_s( stats, sizeof(am930rxstats_t)); + kfree( stats); DBFEXIT; return; } @@ -761,7 +769,7 @@ /* drop the frame */ am930shim_pbfree( pb ); am930shim_free(stats, sizeof(am930rxstats_t)); - kfree_s(item, sizeof(am930mac_rxitem_t)); + kfree(item); } else { @@ -803,14 +811,14 @@ { pb = item->f; stats = item->s; - kfree_s( item, sizeof(*item)); + kfree( item); ftype = WLAN_GET_FC_FTYPE(ieee2host16(pb->p80211_hdr->a3.fc)); if ( ftype != WLAN_FTYPE_MGMT && ftype != WLAN_FTYPE_DATA ) { /* we've got a frame we shouldn't...drop it */ WLAN_LOG_WARNING0("Ctl or unknown frame type received, dropped\n"); - kfree_s( stats, sizeof(am930rxstats_t)); + kfree( stats); am930shim_pbfree(pb); } @@ -820,7 +828,7 @@ if ( pb == NULL ) { /* the frame was absorbed by a fragment pool, do no more */ - kfree_s( stats, sizeof(am930rxstats_t)); + kfree( stats); } else { @@ -829,7 +837,7 @@ if ( pb == NULL ) { /* the frame failed decryption somehow, do no more */ - kfree_s( stats, sizeof(am930rxstats_t)); + kfree( stats); } else { @@ -1272,7 +1280,7 @@ { /* mgmt frame with DA that's not me...silently drop it */ am930shim_pbfree( pb ); - kfree_s(stats, sizeof(am930rxstats_t)); + kfree(stats); } else { @@ -1489,7 +1497,7 @@ * am930q_init * * Initilizes a new queue. To get rid of it, the caller should -* empty it and then use kfree_s(q, sizeof(am930q_t)). +* empty it and then use kfree(q). * * returns: * NULL - alloc failure @@ -1613,7 +1621,7 @@ { q->head = q->tail = NULL; } - kfree_s(qitem, sizeof(am930qitem_t)); + kfree(qitem); q->len--; } q->busy = 0; diff -Naur linux-wlan-0.3.4/driver/am930mgr.c linux-wlan-0.3.4-mybuild/driver/am930mgr.c --- linux-wlan-0.3.4/driver/am930mgr.c Sat Nov 6 02:21:08 1999 +++ linux-wlan-0.3.4-mybuild/driver/am930mgr.c Mon Jul 8 19:42:59 2002 @@ -68,7 +68,7 @@ #include #include #include -#include +#include #include #include #include @@ -343,9 +343,9 @@ bss = mgr->bsslist; mgr->bsslist = bss->next; /* TODO: when we add ttl, need to kill any timer funcs */ - kfree_s( bss, sizeof( knownbss_t )); + kfree( bss); } - kfree_s(mgr, sizeof(am930mgr_t)); + kfree(mgr); } DBFEXIT; } @@ -652,7 +652,7 @@ } /* the response(s) will be handled in auth_rx */ - kfree_s( f, sizeof(wlan_fr_authen_t) + WLAN_AUTHEN_FR_MAXLEN); + kfree( f); } } DBFEXIT; @@ -951,7 +951,7 @@ } /* discard the buffer */ - kfree_s( reply, sizeof(wlan_fr_authen_t) + WLAN_AUTHEN_FR_MAXLEN); + kfree( reply); } } @@ -2444,7 +2444,7 @@ } am930shim_pbfree( rxpb ); - kfree_s(stats, sizeof(am930rxstats_t)); + kfree(stats); DBFEXIT; return; @@ -2488,7 +2488,7 @@ { bss = mgr->bsslist; mgr->bsslist = mgr->bsslist->next; - kfree_s( bss, sizeof( knownbss_t )); + kfree( bss); } mgr->scanstate = MGR_ISSCANNING; diff -Naur linux-wlan-0.3.4/driver/am930mod.c linux-wlan-0.3.4-mybuild/driver/am930mod.c --- linux-wlan-0.3.4/driver/am930mod.c Sat Nov 6 02:21:08 1999 +++ linux-wlan-0.3.4-mybuild/driver/am930mod.c Mon Jul 8 19:42:59 2002 @@ -60,7 +60,7 @@ #include #include #include -#include +#include #include #include #include diff -Naur linux-wlan-0.3.4/include/wlan/wlan_compat.h linux-wlan-0.3.4-mybuild/include/wlan/wlan_compat.h --- linux-wlan-0.3.4/include/wlan/wlan_compat.h Sat Nov 6 02:21:09 1999 +++ linux-wlan-0.3.4-mybuild/include/wlan/wlan_compat.h Wed Nov 6 00:28:51 2002 @@ -417,9 +417,12 @@ #define am930shim_pballoc am930llc_pballoc #define am930shim_pbfree am930llc_pbfree #define am930shim_malloc(l,d) kmalloc((l), (d)) +/* old #define am930shim_free(p,l) kfree_s((p), (l)) + */ + #define am930shim_free(p,l) kfree((p)) #define am930shim_rxframe(o,p) am930llc_rxframe((o), (p)) - #define am930shim_ontxcomplete(o,r) am930llc_ontxcomplete((o), (r)) + #define am930shim_ontxcomplete(o,r,b) am930llc_ontxcomplete((o), (r), (b)) typedef UINT32 wlan_flags_t; #ifdef CONFIG_MODVERSIONS #define MODVERSIONS 1 @@ -464,7 +467,7 @@ #define am930shim_malloc(l,d) am930lw_bufalloc((l)) #define am930shim_free(p,l) am930lw_buffree((p), (l)) #define am930shim_rxframe(o,p) am930lw_rxframe((o), (p)) - #define am930shim_ontxcomplete(o,r) am930lw_ontxcomplete((o), (r)) + #define am930shim_ontxcomplete(o,r,b) am930lw_ontxcomplete((o), (r), (b)) #define SPIN_LOCK_UNLOCKED 0 #define time_after(a,b) ((UINT32)(b) - (UINT32)(a) < 0) #define time_before(a,b) time_after(b,a) diff -Naur linux-wlan-0.3.4/scripts/wlan linux-wlan-0.3.4-mybuild/scripts/wlan --- linux-wlan-0.3.4/scripts/wlan Sat Nov 6 02:21:10 1999 +++ linux-wlan-0.3.4-mybuild/scripts/wlan Thu Jul 4 11:19:26 2002 @@ -98,7 +98,7 @@ "channel=$CREATE_CHANNEL and" \ "ssid=$CREATE_SSID" - $DESIRED_SSID=$CREATE_SSID + DESIRED_SSID=$CREATE_SSID else echo "wlan failed to find ssid=$DESIRED_SSID" exit 1 diff -Naur linux-wlan-0.3.4/wepgen/Makefile linux-wlan-0.3.4-mybuild/wepgen/Makefile --- linux-wlan-0.3.4/wepgen/Makefile Sat Nov 6 02:21:10 1999 +++ linux-wlan-0.3.4-mybuild/wepgen/Makefile Fri Jul 19 15:11:29 2002 @@ -10,7 +10,7 @@ zwepgen: zwepgen.o - cc -o zwepgen zwepgen.o + $(CC) -o zwepgen zwepgen.o install: cp -p wlandump $(INST_EXEDIR) diff -Naur linux-wlan-0.3.4/wlanctl/Makefile linux-wlan-0.3.4-mybuild/wlanctl/Makefile --- linux-wlan-0.3.4/wlanctl/Makefile Sat Nov 6 02:23:32 1999 +++ linux-wlan-0.3.4-mybuild/wlanctl/Makefile Fri Jul 19 15:11:36 2002 @@ -13,7 +13,7 @@ wlanctl: main.o prmib.o - cc -o wlanctl main.o prmib.o + $(CC) -o wlanctl main.o prmib.o install: cp -p wlanctl $(INST_EXEDIR) diff -Naur linux-wlan-0.3.4/wlandump/Makefile linux-wlan-0.3.4-mybuild/wlandump/Makefile --- linux-wlan-0.3.4/wlandump/Makefile Sat Nov 6 02:23:53 1999 +++ linux-wlan-0.3.4-mybuild/wlandump/Makefile Fri Jul 19 15:11:43 2002 @@ -10,10 +10,10 @@ wlandump: wlandump.o prframe.o p80211.o wep.o - cc -o wlandump wlandump.o prframe.o p80211.o wep.o + $(CC) -o wlandump wlandump.o prframe.o p80211.o wep.o p80211.o: ../p80211/p80211.c - cc -c $(CFLAGS) $(CPPFLAGS) -o ./p80211.o ../p80211/p80211.c + $(CC) -c $(CFLAGS) $(CPPFLAGS) -o ./p80211.o ../p80211/p80211.c install: cp -p wlandump $(INST_EXEDIR)