From 69eaf98163c9f9ed2f4000539e2e556148acd6e2 Mon Sep 17 00:00:00 2001 From: mark Date: Sun, 11 Mar 2001 01:37:52 +0000 Subject: [PATCH] tgriffin's patch for mrproper/memleak/nullcheck/freeonsuccess. conf.modules change is already there. --- CHANGES | 6 ++++++ Makefile | 4 ++++ TODO | 10 +++------- etc/pcmcia/wlan-ng.opts | 2 +- src/p80211/p80211netdev.c | 10 ++++++++-- src/prism2/driver/prism2sta.c | 8 ++++++++ 6 files changed, 30 insertions(+), 10 deletions(-) diff --git a/CHANGES b/CHANGES index 89d32de..3ae620a 100644 --- a/CHANGES +++ b/CHANGES @@ -42,8 +42,14 @@ * * -------------------------------------------------------------------- 0.1.8 + - tgriffin's patch for mrproper/memleak/nullcheck/freeonsuccess. + conf.modules change is already there. + - Added most of jhicks ARM related patches. I had to leave out the + HOST vs. TARGET compile variables in the Makefiles though. Some folks + are using that stuff. - Added script changes and new mib items to support 128-bit WEP per hong's suggestion. + - Added conf.modules alias instead of symlink - Added a compat macro for kfree_s to wlan_compat.h per the suggestion from rbraun. - Added pkundrat's 'chinfo' patch diff --git a/Makefile b/Makefile index 49daa0b..9599255 100644 --- a/Makefile +++ b/Makefile @@ -53,12 +53,16 @@ help: @echo -e "\tmake all\t\t- build modules and programs" @echo -e "\tmake install\t\t- install modules and programs" @echo -e "\tmake clean\t\t- remove old binaries and dependency files" + @echo -e "\tmake mrproper\t- 'make clean' + removes config file" @echo -e "\tmake tags\t\t- generate tag files for source code" @echo " " all: set -e; for d in $(DIRS); do $(MAKE) -C $$d ; done +mrproper: clean + rm -f config.out + clean: touch config.mk config.new set -e; for d in $(DIRS); do $(MAKE) -C $$d clean ; done diff --git a/TODO b/TODO index 85db86a..7a9472c 100644 --- a/TODO +++ b/TODO @@ -43,25 +43,22 @@ * -------------------------------------------------------------------- Linux WLAN NG TODO -Fri Aug 18 11:20:50 EDT 2000 +Sat Mar 10 21:12:17 EST 2001 +- Fix makefiles/config.mk so we can work w/ RedHat 7. - Fix obj directory usage in src/wlanctl/Makefile - Add support for (dangerous) DisableALC command. See t02c6 RFM. - Review zero and 1 byte WEP issues, did we have a workaround? It's no longer needed in t02c6 and ??? s07c? . - Add support for 32 bit Tallies (t02c6) -- Figure out how to reasonbly control powersave -- Change prism2dl to generate warnings instead of fatal errors on missing - PDRs +- Figure out how to reasonably control powersave - Consider a host WEP option - review changes necessary to get AC's approval for kernel integration - Look at making the bus interface (PCMCIA, PCI, USB) more independent - Review changes necessary for static linking to kernel - Update MAC RID to 802.11 MIB mapping document - Update MAC feature to 802.11 mapping document -- Add support for 128 bit WEP - Add support for data-only promiscuous mode (so tcpdump will work) -- Add support for multicast filters - Display the MAC and BBP partnum & revision at initialization time - Perform a more effective I/O access test and an irq test at initialization time @@ -74,7 +71,6 @@ Fri Aug 18 11:20:50 EDT 2000 - rx time - rx/tx DCF/PCF - rx/tx priority -- Fix the timeout foolishness in the hfa384x code - Add an lnx command to query the rx signal stats: (cumlative should be a weighted average) last beacon rssi diff --git a/etc/pcmcia/wlan-ng.opts b/etc/pcmcia/wlan-ng.opts index 8983f5e..d642815 100755 --- a/etc/pcmcia/wlan-ng.opts +++ b/etc/pcmcia/wlan-ng.opts @@ -81,7 +81,7 @@ wlannoenable,*,*,*) #=======WEP=========================================== # [Dis/En]able WEP. Settings only matter if PrivacyInvoked is true dot11PrivacyInvoked=false # true|false - dot11WEPDefaultKeyID=1 # 0|1|2|3 + dot11WEPDefaultKeyID=0 # 0|1|2|3 dot11ExcludeUnencrypted=true # true|false, in AP this means WEP # is required for all STAs PRIV_KEY128=false # keylength to use diff --git a/src/p80211/p80211netdev.c b/src/p80211/p80211netdev.c index 5394e52..5cdd06d 100644 --- a/src/p80211/p80211netdev.c +++ b/src/p80211/p80211netdev.c @@ -353,6 +353,10 @@ int p80211knetdev_hard_start_xmit( struct sk_buff *skb, netdevice_t *netdev) DBFENTER; + if (skb == NULL ) { + return 0; + } + #if (LINUX_VERSION_CODE < WLAN_KVERSION(2,3,38) ) if (netdev->start == 0) { #else @@ -424,8 +428,10 @@ int p80211knetdev_hard_start_xmit( struct sk_buff *skb, netdevice_t *netdev) goto failed; } if ( wlandev->txframe == NULL ) { - result = 1; - goto failed; + /* Free the pb, but not the skb */ + pb->ethhostbuf = NULL; + result = 1; + goto failed; } wlandev->linux_stats.tx_packets++; diff --git a/src/prism2/driver/prism2sta.c b/src/prism2/driver/prism2sta.c index 581497b..5d4d761 100644 --- a/src/prism2/driver/prism2sta.c +++ b/src/prism2/driver/prism2sta.c @@ -665,6 +665,14 @@ dmpmem(pb->p80211_payload, pb->p80211_payloadlen); #endif failed: + /* tgriffin: Deallocate packet buffer only on success */ + /* MSM: tg and others have me ping-ponging over memory */ + /* leaks/doublefrees. This needs a full review in both */ + /* 2.2 and 2.4 kernels. I'm not certain that the rules */ + /* haven't changed...oh goodie, more macros|#if's ;-) */ + if ( result == 0 || result == 1 ) { + p80211pb_free(pb); + } DBFEXIT; return result; }