Pavel Roskin | 1 Nov 22:15 2007

revision 2816 committed

Project     : madwifi
Revision    : 2816
Author      : proski (Pavel Roskin)
Date        : 2007-11-01 22:15:28 +0100 (Thu, 01 Nov 2007)

Log Message :
Big cleanup of tools/ath_info.c

Reformat with madwifi-indent, it was needed badly.  Break some long
lines.  Avoid complex structure initializers that GNU indent cannot
format.  Avoid using macro for the names table.  Remove spaces in the
names, add then with formatted output.  Remove spaces before punctuation
signs.

Fix all sparse warnings.  Default to base 16 for all numbers specified
on the command line.

Affected Files:
* madwifi/trunk/tools/ath_info.c                      updated             

Modified: madwifi/trunk/tools/ath_info.c
===================================================================
--- madwifi/trunk/tools/ath_info.c	2007-10-31 05:46:45 UTC (rev 2815)
+++ madwifi/trunk/tools/ath_info.c	2007-11-01 21:15:28 UTC (rev 2816)
 <at>  <at>  -2,9 +2,9  <at>  <at> 
 /*-
  * Copyright (c) 2007 Nick Kossifidis <mickflemm <at> gmail.com>
  * Copyright (c) 2007 Joerg Albert    <jal2 *at* gmx.de>
- * 
+ *
(Continue reading)

Pavel Roskin | 1 Nov 23:25 2007

revision 2817 committed

Project     : madwifi
Revision    : 2817
Author      : proski (Pavel Roskin)
Date        : 2007-11-01 23:25:15 +0100 (Thu, 01 Nov 2007)

Log Message :
Fix support for 64-bit systems

Fix all uses of long integers for 32-bit values.

Affected Files:
* madwifi/trunk/tools/ath_info.c                      updated             

Modified: madwifi/trunk/tools/ath_info.c
===================================================================
--- madwifi/trunk/tools/ath_info.c	2007-11-01 21:15:28 UTC (rev 2816)
+++ madwifi/trunk/tools/ath_info.c	2007-11-01 22:25:15 UTC (rev 2817)
 <at>  <at>  -334,13 +334,13  <at>  <at> 
  * Read from a device register
  */
 #define AR5K_REG_READ(_reg)		\
-	(*((volatile unsigned long int *)(mem + (_reg))))
+	(*((volatile u_int32_t *)(mem + (_reg))))

 /*
  * Write to a device register
  */
 #define AR5K_REG_WRITE(_reg, _val)	\
-	(*((volatile unsigned long int *)(mem + (_reg))) = (_val))
+	(*((volatile u_int32_t *)(mem + (_reg))) = (_val))
(Continue reading)

Pavel Roskin | 2 Nov 03:05 2007

revision 2818 committed

Project     : madwifi
Revision    : 2818
Author      : proski (Pavel Roskin)
Date        : 2007-11-02 03:05:22 +0100 (Fri, 02 Nov 2007)

Log Message :
Fix support for big-endian systems

Affected Files:
* madwifi/trunk/tools/ath_info.c                      updated             

Modified: madwifi/trunk/tools/ath_info.c
===================================================================
--- madwifi/trunk/tools/ath_info.c	2007-11-01 22:25:15 UTC (rev 2817)
+++ madwifi/trunk/tools/ath_info.c	2007-11-02 02:05:22 UTC (rev 2818)
 <at>  <at>  -96,6 +96,8  <at>  <at> 
 #include <string.h>
 #include <fcntl.h>
 #include <sys/mman.h>
+#include <endian.h>
+#include <byteswap.h>

 #define dbg(fmt, __args__...) \
 do { \
 <at>  <at>  -331,17 +333,21  <at>  <at> 
 	(((_val) & (_flags)) >> _flags##_S)

 /*
- * Read from a device register
+ * Access device registers
(Continue reading)

Pavel Roskin | 2 Nov 03:18 2007

revision 2819 committed

Project     : madwifi
Revision    : 2819
Author      : proski (Pavel Roskin)
Date        : 2007-11-02 03:18:36 +0100 (Fri, 02 Nov 2007)

Log Message :
Merge revisions 2801-2818 from trunk

Affected Files:
* madwifi/branches/madwifi-trace/ath/if_ath.c         updated             
* madwifi/branches/madwifi-trace/ath_hal/ah_os.c      updated             
* madwifi/branches/madwifi-trace/ath_rate/amrr/amrr.c  updated             
* madwifi/branches/madwifi-trace/ath_rate/onoe/onoe.c  updated             
* madwifi/branches/madwifi-trace/include/compat.h     updated             
* madwifi/branches/madwifi-trace/net80211/ieee80211_linux.c  updated             
* madwifi/branches/madwifi-trace/tools/ath_info.c     updated             

Modified: madwifi/branches/madwifi-trace/ath/if_ath.c
===================================================================
--- madwifi/branches/madwifi-trace/ath/if_ath.c	2007-11-02 02:05:22 UTC (rev 2818)
+++ madwifi/branches/madwifi-trace/ath/if_ath.c	2007-11-02 02:18:36 UTC (rev 2819)
 <at>  <at>  -9403,7 +9403,7  <at>  <at> 
 	if (write) {
 		ret = ATH_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer, lenp, ppos);
 		if (ret == 0) {
-			switch (ctl->ctl_name) {
+			switch ((long)ctl->extra2) {
 			case ATH_SLOTTIME:
 				if (val > 0) {
 					if (!ath_hal_setslottime(ah, val))
(Continue reading)

Bruno Randolf | 2 Nov 07:20 2007

revision 2820 committed

Project     : madwifi
Revision    : 2820
Author      : br1 (Bruno Randolf)
Date        : 2007-11-02 07:20:55 +0100 (Fri, 02 Nov 2007)

Log Message :
allow re-decoding of already decoded files

Affected Files:
* tools/trace/ath-reg-decode.pl                       updated             

Modified: tools/trace/ath-reg-decode.pl
===================================================================
--- tools/trace/ath-reg-decode.pl	2007-11-02 02:18:36 UTC (rev 2819)
+++ tools/trace/ath-reg-decode.pl	2007-11-02 06:20:55 UTC (rev 2820)
 <at>  <at>  -104,7 +104,7  <at>  <at> 
 ### functions ###

 sub match_decode($) {
-	if (/^.*(.):0x0+(\w{4}) = 0x(\w{8}) - (.*)/) {
+	if (/^.*(.): ?0x0?(\w{4}) = 0x(\w{8}) - (.*)/) {
 		decode($1,$2,$3,$4);
 	}
 	else {
 <at>  <at>  -222,6 +222,10  <at>  <at> 
 	}
 	else {
 		$dec = lookup_name($reg);
+		# allow us to re-convert already converted dumps
+		if ($func =~ /.*\((.*)\)$/) {
(Continue reading)

Bruno Randolf | 2 Nov 10:17 2007

revision 2821 committed

Project     : madwifi
Revision    : 2821
Author      : br1 (Bruno Randolf)
Date        : 2007-11-02 10:17:32 +0100 (Fri, 02 Nov 2007)

Log Message :
added "--cross" option to cross reference registers and which values are
written or read from it across multiple files.

i don't know how you guys can handle that, but i can't make sense from the 8MB
of trace files i have lying around here without sharp tools ;)

i think it makes most sense to be used in combination with the --batch option,
so it can print the filename too.

please tell me if it makes more sense to use another way of aggregating the
information.

Affected Files:
* tools/trace/ath-reg-decode.pl                       updated             

Modified: tools/trace/ath-reg-decode.pl
===================================================================
--- tools/trace/ath-reg-decode.pl	2007-11-02 06:20:55 UTC (rev 2820)
+++ tools/trace/ath-reg-decode.pl	2007-11-02 09:17:32 UTC (rev 2821)
 <at>  <at>  -4,6 +4,7  <at>  <at> 
 use Getopt::Long;

 my %regs;
+my %cross;
(Continue reading)

Pavel Roskin | 2 Nov 15:55 2007

revision 2822 committed

Project     : madwifi
Revision    : 2822
Author      : proski (Pavel Roskin)
Date        : 2007-11-02 15:55:37 +0100 (Fri, 02 Nov 2007)

Log Message :
Use vmalloc() for alq->aq_entbuf, it's way too big for kmalloc()

Affected Files:
* madwifi/branches/madwifi-trace/ath_hal/kern_alq.c   updated             

Modified: madwifi/branches/madwifi-trace/ath_hal/kern_alq.c
===================================================================
--- madwifi/branches/madwifi-trace/ath_hal/kern_alq.c	2007-11-02 09:17:32 UTC (rev 2821)
+++ madwifi/branches/madwifi-trace/ath_hal/kern_alq.c	2007-11-02 14:55:37 UTC (rev 2822)
 <at>  <at>  -34,6 +34,7  <at>  <at> 
 #include <linux/uio.h>
 #include <linux/wait.h>
 #include <linux/sched.h>
+#include <linux/vmalloc.h>

 #include <asm/semaphore.h>
 #include <asm/uaccess.h>
 <at>  <at>  -333,7 +334,7  <at>  <at> 
 		goto bad1;
 	}
 	memset(alq, 0, sizeof(*alq));
-	alq->aq_entbuf = kmalloc(count * size, GFP_KERNEL);
+	alq->aq_entbuf = vmalloc(count * size);
 	if (alq->aq_entbuf == NULL) {
(Continue reading)

Michael Taylor | 3 Nov 06:30 2007

revision 2823 committed

Project     : madwifi
Revision    : 2823
Author      : mtaylor (Michael Taylor)
Date        : 2007-11-03 06:30:40 +0100 (Sat, 03 Nov 2007)

Log Message :
Fix a node reference leak in ieee80211_ioctl_getspy loop

Affected Files:
* madwifi/trunk/net80211/ieee80211_wireless.c         updated             

Modified: madwifi/trunk/net80211/ieee80211_wireless.c
===================================================================
--- madwifi/trunk/net80211/ieee80211_wireless.c	2007-11-02 14:55:37 UTC (rev 2822)
+++ madwifi/trunk/net80211/ieee80211_wireless.c	2007-11-03 05:30:40 UTC (rev 2823)
 <at>  <at>  -1103,14 +1103,15  <at>  <at> 
 	for (i = 0; i < number; i++) {
 		ni = ieee80211_find_node(nt, &vap->iv_spy.mac[i * IEEE80211_ADDR_LEN]);
 		/* check we are associated w/ this vap */
-		if (ni && (ni->ni_vap == vap)) {
-			set_quality(&spy_stat[i], ni->ni_rssi, ic->ic_channoise);
-			if (ni->ni_rtsf != vap->iv_spy.ts_rssi[i]) {
-				vap->iv_spy.ts_rssi[i] = ni->ni_rtsf;
-			} else {
-				spy_stat[i].updated = 0;
+		if (ni) {
+			if(ni->ni_vap == vap) {
+				set_quality(&spy_stat[i], ni->ni_rssi, ic->ic_channoise);
+				if (ni->ni_rtsf != vap->iv_spy.ts_rssi[i]) {
+					vap->iv_spy.ts_rssi[i] = ni->ni_rtsf;
(Continue reading)

Michael Taylor | 3 Nov 06:49 2007

revision 2824 committed

Project     : madwifi
Revision    : 2824
Author      : mtaylor (Michael Taylor)
Date        : 2007-11-03 06:49:37 +0100 (Sat, 03 Nov 2007)

Log Message :
Fix a node reference leak in XR mode due to re-assigning a variable without 
unref first.

Affected Files:
* madwifi/trunk/net80211/ieee80211_output.c           updated             

Modified: madwifi/trunk/net80211/ieee80211_output.c
===================================================================
--- madwifi/trunk/net80211/ieee80211_output.c	2007-11-03 05:30:40 UTC (rev 2823)
+++ madwifi/trunk/net80211/ieee80211_output.c	2007-11-03 05:49:37 UTC (rev 2824)
 <at>  <at>  -270,7 +270,7  <at>  <at> 
 		 * We'll get the frame back when the time is right.
 		 */
 		ieee80211_pwrsave(ni, skb);
-		ieee80211_unref_node(&ni);
+		ieee80211_unref_node(&ni); /* matches ieee80211_find_txnode */
 		return 0;
 	}

 <at>  <at>  -284,11 +284,11  <at>  <at> 
 	if (vap->iv_xrvap && ni == vap->iv_bss &&
 	    vap->iv_xrvap->iv_sta_assoc) {
 		struct sk_buff *skb1;
-		ni = ieee80211_find_txnode(vap->iv_xrvap, eh->ether_dhost);
(Continue reading)

benoit | 4 Nov 17:14 2007

revision 2825 committed

Project     : madwifi
Revision    : 2825
Author      : benoit
Date        : 2007-11-04 17:14:42 +0100 (Sun, 04 Nov 2007)

Log Message :
Use sc_imask if possible when calling ath_hal_intrset

Affected Files:
* madwifi/branches/madwifi-dfs/ath/if_ath.c           updated             

Modified: madwifi/branches/madwifi-dfs/ath/if_ath.c
===================================================================
--- madwifi/branches/madwifi-dfs/ath/if_ath.c	2007-11-03 05:49:37 UTC (rev 2824)
+++ madwifi/branches/madwifi-dfs/ath/if_ath.c	2007-11-04 16:14:42 UTC (rev 2825)
 <at>  <at>  -1989,8 +1989,7  <at>  <at> 
 			else {
 				sc->sc_beacons = 0;
 				sc->sc_imask &= ~(HAL_INT_SWBA | HAL_INT_BMISS);
-				ath_hal_intrset(ah, ath_hal_intrget(ah) & 
-					~(HAL_INT_SWBA | HAL_INT_BMISS));
+				ath_hal_intrset(ah, sc->sc_imask);
 			}
 		}
 		if (status & HAL_INT_RXEOL) {
 <at>  <at>  -2043,8 +2042,7  <at>  <at> 
 			else {
 				sc->sc_beacons = 0;
 				sc->sc_imask &= ~(HAL_INT_SWBA | HAL_INT_BMISS);
-				ath_hal_intrset(ah, ath_hal_intrget(ah) & 
(Continue reading)


Gmane