Re: svn commit: r207768 - head/sys/dev/usb/wlan
On May 11, 2010, at 5:12 AM, Rui Paulo wrote: On 8 May 2010, at 12:56, Ed Maste wrote: Author: emaste Date: Sat May 8 11:56:00 2010 New Revision: 207768 URL: http://svn.freebsd.org/changeset/base/207768 Log: Add dummy function for ic_update_mcast (a la if_urtw) to avoid console spam. I don't agree with this. I think these dummy functions should be removed in all drivers and if the console spam is annoying it should be limited to one message per interface. Yes, I didn't catch the other stubs going in but already talked to Ed about this one. People need to understand that stub'ing out this function is masking a real problem. Drivers that can support mcast filtering should do so. Otherwise we need mcast filtering implemented in the 802.3 layer to support the ALLMULTI ifnet flag; in which case drivers that are incomplete can fallback on this support. In lieu of working support a better solution is to provide a stub in net80211 that ratelimits the printf but doesn't completely remove it. Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r206419 - head/sys/net80211
Rui Paulo wrote: Author: rpaulo Date: Fri Apr 9 12:06:19 2010 New Revision: 206419 URL: http://svn.freebsd.org/changeset/base/206419 Log: Use M_NOWAIT instead of M_WAITOK to avoid race conditions. Can you describe these race conditions (or at least one of them)? Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r206429 - head/sys/dev/e1000
Jack F Vogel wrote: Author: jfv Date: Fri Apr 9 18:42:15 2010 New Revision: 206429 URL: http://svn.freebsd.org/changeset/base/206429 Log: Incorporate suggested improvements from yongari. Also, from feedback, make the multiqueue code an option (EM_MULTIQUEUE) that is off by default. Problems have been seen with UDP when its on. It is usually a good idea to say what the suggested improvements are as it's unlikely anyone looking at the commit will have the needed context (I certainly did not). It also seems that you roll-up unrelated changes in one commit; this is not advisable. Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r205421 - head/share/man/man4
Author: sam Date: Sun Mar 21 17:53:54 2010 New Revision: 205421 URL: http://svn.freebsd.org/changeset/base/205421 Log: remove pre-vap examples Modified: head/share/man/man4/ath.4 Modified: head/share/man/man4/ath.4 == --- head/share/man/man4/ath.4 Sun Mar 21 17:05:41 2010(r205420) +++ head/share/man/man4/ath.4 Sun Mar 21 17:53:54 2010(r205421) @@ -28,7 +28,7 @@ .\ .\ $FreeBSD$ .\/ -.Dd July 8, 2009 +.Dd March 21, 2010 .Dt ATH 4 .Os .Sh NAME @@ -145,15 +145,6 @@ except those that are based on the AR500 A list of cards that are supported can be found at .Pa http://customerproducts.atheros.com/customerproducts/default.asp . .Sh EXAMPLES -Join an existing BSS network (ie: connect to an access point): -.Pp -.Dl ifconfig ath0 inet 192.168.0.20 netmask 0xff00 -.Pp -Join a specific BSS network with network name -.Dq Li my_net : -.Pp -.Dl ifconfig ath0 inet 192.168.0.20 netmask 0xff00 ssid my_net -.Pp Join a specific BSS network with WEP encryption: .Bd -literal -offset indent ifconfig wlan0 create wlandev ath0 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r203933 - head/sys/dev/ath/ath_hal/ar5416
Rui Paulo wrote: Author: rpaulo Date: Mon Feb 15 18:47:42 2010 New Revision: 203933 URL: http://svn.freebsd.org/changeset/base/203933 Log: Fix KITE version check. Obtained from: //depot/user/rpaulo/80211n/... Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h == --- head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Mon Feb 15 18:46:02 2010 (r203932) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Mon Feb 15 18:47:42 2010 (r203933) @@ -613,12 +613,12 @@ (AR_SREV_KITE(ah) \ AH_PRIVATE((_ah))-ah_macRev == AR_XSREV_REVISION_KITE_11) #defineAR_SREV_KITE_11_OR_LATER(_ah) \ - (AH_PRIVATE((_ah))-ah_macVersion = AR_XSREV_VERSION_KITE || \ + (AR_SREV_KITE_11(_ah) || \ AH_PRIVATE((_ah))-ah_macRev = AR_XSREV_REVISION_KITE_11) #defineAR_SREV_KITE_12(_ah) \ (AR_SREV_KITE(ah) \ -AH_PRIVATE((_ah))-ah_macRev == AR_XSREV_REVISION_KITE_12) +AH_PRIVATE((_ah))-ah_macRev = AR_XSREV_REVISION_KITE_12) Should this be named AR_SREV_KITE_12_OR_LATER? or is the change wrong? #defineAR_SREV_KITE_12_OR_LATER(_ah) \ - (AH_PRIVATE((_ah))-ah_macVersion = AR_XSREV_VERSION_KITE || \ + (AR_SREV_KITE_12(_ah) || \ AH_PRIVATE((_ah))-ah_macRev = AR_XSREV_REVISION_KITE_12) #endif /* _DEV_ATH_AR5416REG_H */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r200481 - head/sys/dev/ata
Marius Strobl wrote: Author: marius Date: Sun Dec 13 18:26:19 2009 New Revision: 200481 URL: http://svn.freebsd.org/changeset/base/200481 Log: Specify the capability and media bits of the capabilities page in native, i.e. big-endian, format and convert as appropriate like we also do with the multibyte fields of the other pages. This fixes the output of acd_describe() to match reality on big-endian machines without breaking it on little-endian ones. While at it, also convert the remaining multibyte fields of the pages read although they are currently unused for consistency and in order to prevent possible similar bugs in the future. MFC after: 1 week Modified: head/sys/dev/ata/atapi-cd.c head/sys/dev/ata/atapi-cd.h Modified: head/sys/dev/ata/atapi-cd.c == --- head/sys/dev/ata/atapi-cd.c Sun Dec 13 17:49:22 2009(r200480) +++ head/sys/dev/ata/atapi-cd.c Sun Dec 13 18:26:19 2009(r200481) @@ -1206,6 +1206,7 @@ acd_read_track_info(device_t dev, int32_ if ((error = ata_atapicmd(dev, ccb, (caddr_t)info, sizeof(*info), ATA_R_READ, 30))) return error; +info-data_length = ntohs(info-data_length); info-track_start_addr = ntohl(info-track_start_addr); info-next_writeable_addr = ntohl(info-next_writeable_addr); info-free_blocks = ntohl(info-free_blocks); @@ -1644,12 +1645,17 @@ acd_get_cap(device_t dev) for (count = 0 ; count 5 ; count++) { if (!ata_atapicmd(dev, ccb, (caddr_t)cdp-cap, sizeof(cdp-cap), ATA_R_READ | ATA_R_QUIET, 5)) { + cdp-cap.data_length = ntohs(cdp-cap.data_length); + cdp-cap.blk_desc_len = ntohs(cdp-cap.blk_desc_len); + cdp-cap.media = ntohs(cdp-cap.media); + cdp-cap.capabilities = ntohs(cdp-cap.capabilities); cdp-cap.max_read_speed = ntohs(cdp-cap.max_read_speed); + cdp-cap.max_vol_levels = ntohs(cdp-cap.max_vol_levels); + cdp-cap.buf_size = ntohs(cdp-cap.buf_size); cdp-cap.cur_read_speed = ntohs(cdp-cap.cur_read_speed); cdp-cap.max_write_speed = ntohs(cdp-cap.max_write_speed); cdp-cap.cur_write_speed = max(ntohs(cdp-cap.cur_write_speed),177); - cdp-cap.max_vol_levels = ntohs(cdp-cap.max_vol_levels); - cdp-cap.buf_size = ntohs(cdp-cap.buf_size); + cdp-cap.copy_protect_rev = ntohs(cdp-cap.copy_protect_rev); } } } I don't think this should use ntoh* but instead use le*/be* macros. Separately the ata code was very broken in it's handling of big-endian byte order; e.g. for arm I had to supply wrong bus space methods as a workaround. Do these changes take this byte-order confusion into account? Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r199018 - head/sys/dev/wpi
Doug Barton wrote: Author: dougb Date: Sat Nov 7 18:42:53 2009 New Revision: 199018 URL: http://svn.freebsd.org/changeset/base/199018 Log: Turn off WPI_DEBUG by default as the driver seems sufficiently stable at this point. Reviewed by:benjsc, thompsa Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c == --- head/sys/dev/wpi/if_wpi.c Sat Nov 7 17:29:03 2009(r199017) +++ head/sys/dev/wpi/if_wpi.c Sat Nov 7 18:42:53 2009(r199018) @@ -103,8 +103,6 @@ __FBSDID($FreeBSD$); #include dev/wpi/if_wpireg.h #include dev/wpi/if_wpivar.h -#define WPI_DEBUG - #ifdef WPI_DEBUG #define DPRINTF(x) do { if (wpi_debug != 0) printf x; } while (0) #define DPRINTFN(n, x) do { if (wpi_debug n) printf x; } while (0) The right thing to do is to set wpi_debug to 0 and leave the messages compiled in. Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r199018 - head/sys/dev/wpi
Doug Barton wrote: Sam Leffler wrote: The right thing to do is to set wpi_debug to 0 and leave the messages compiled in. Well as you can see from the diff I did leave the messages in the source so that anyone who wants to enable debugging again can just define WPI_DEBUG at build time to get it. However defining WPI_DEBUG to 0 resulted in the debug messages being printed on the console again so if I'm understanding what you're suggesting correctly it seems that it would require a lot more changes in the code to accomplish. (I did see other examples of what I think you're suggesting in sys/ but this driver doesn't seem to have that support.) If I'm not understanding something or you have a better solution feel free to implement it. My goal was just to get a less noisy console at boot time. Try the attached Sam Index: if_wpi.c === --- if_wpi.c(revision 199033) +++ if_wpi.c(working copy) @@ -103,6 +103,8 @@ #include dev/wpi/if_wpireg.h #include dev/wpi/if_wpivar.h +#define WPI_DEBUG + #ifdef WPI_DEBUG #define DPRINTF(x) do { if (wpi_debug != 0) printf x; } while (0) #define DPRINTFN(n, x) do { if (wpi_debug n) printf x; } while (0) @@ -124,7 +126,7 @@ WPI_DEBUG_ANY = 0x }; -static int wpi_debug = 1; +static int wpi_debug = 0; SYSCTL_INT(_debug, OID_AUTO, wpi, CTLFLAG_RW, wpi_debug, 0, wpi debug level); TUNABLE_INT(debug.wpi, wpi_debug); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r197654 - head/sys/dev/if_ndis
Bruce Evans wrote: On Thu, 1 Oct 2009, [utf-8] Dag-Erling Smørgrav wrote: Coleman Kane cok...@freebsd.org writes: -if (sc-ndis_80211 vap) +if ((sc-ndis_80211 != NULL) (vap != NULL)) sc-ndis_80211 is an int. NULL is a pointer. Also, the number of style bugs was doubled on (almost?) every changed line by adding 2 sets of unnecessary parentheses. FWIW I simply asked he compare ptr's against NULL. The excessive paren's hurt my eyes too :-) Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r197348 - head/sys/vm
Konstantin Belousov wrote: Author: kib Date: Sun Sep 20 12:40:56 2009 New Revision: 197348 URL: http://svn.freebsd.org/changeset/base/197348 Log: Old (a.out) rtld attempts to mmap zero-length region, e.g. when bss of the linked object is zero-length. More old code assumes that mmap of zero length returns success. For a.out and pre-8 ELF binaries, allow the mmap of zero length. Reported by:tegge Reviewed by:tegge, alc, jhb MFC after: 3 days Modified: head/sys/vm/vm_mmap.c Modified: head/sys/vm/vm_mmap.c == --- head/sys/vm/vm_mmap.c Sun Sep 20 12:24:55 2009(r197347) +++ head/sys/vm/vm_mmap.c Sun Sep 20 12:40:56 2009(r197348) @@ -64,6 +64,7 @@ __FBSDID($FreeBSD$); #include sys/mount.h #include sys/conf.h #include sys/stat.h +#include sys/sysent.h #include sys/vmmeter.h #include sys/sysctl.h @@ -229,7 +230,8 @@ mmap(td, uap) fp = NULL; /* make sure mapping fits into numeric range etc */ - if (uap-len == 0 || + if ((uap-len == 0 !SV_CURPROC_FLAG(SV_AOUT) + curproc-p_osrel = 800104) || ((flags MAP_ANON) uap-fd != -1)) return (EINVAL); This hack needs a comment. Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r197218 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Pawel Jakub Dawidek wrote: Author: pjd Date: Tue Sep 15 11:34:53 2009 New Revision: 197218 URL: http://svn.freebsd.org/changeset/base/197218 Log: We believe ZFS is ready for production use. Remove a warning about it being experimental. :) This is great news! Is this amd64 only (or i386 too)? How about non-x86 architectures (have people tested on sparc64, ppc, etc)? Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r197218 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Pawel Jakub Dawidek wrote: On Tue, Sep 15, 2009 at 06:19:11AM -0700, Sam Leffler wrote: Pawel Jakub Dawidek wrote: Author: pjd Date: Tue Sep 15 11:34:53 2009 New Revision: 197218 URL: http://svn.freebsd.org/changeset/base/197218 Log: We believe ZFS is ready for production use. Remove a warning about it being experimental. :) This is great news! Is this amd64 only (or i386 too)? How about non-x86 architectures (have people tested on sparc64, ppc, etc)? I do most of my tests on i386 with 1GB of RAM. It isn't optimal hardware configuration for ZFS, but it seems to work fine in most cases. For the other archs I think I tried sparc64 in the past and Marcel committed some fixes so it can work on ia64. When it comes to powerpc, arm, mips, etc. I haven't done any testing and I wouldn't recommend ZFS for those archs anyway. We should probably also warn about that. Thank you for the explanation. ppc has support for Xserve if I recall (or perhaps in process); that should be suitable. I was mostly trying to understand which arch's zfs has been successfully deployed on. Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r197140 - head/etc/rc.d
Hiroki Sato wrote: Author: hrs Date: Sat Sep 12 22:14:21 2009 New Revision: 197140 URL: http://svn.freebsd.org/changeset/base/197140 Log: - Add AUTO keyword support in $rtadvd_interfaces. - Wrap a long line. MFC after: 3 days Modified: head/etc/rc.d/rtadvd Modified: head/etc/rc.d/rtadvd == --- head/etc/rc.d/rtadvdSat Sep 12 22:13:41 2009(r197139) +++ head/etc/rc.d/rtadvdSat Sep 12 22:14:21 2009(r197140) @@ -40,10 +40,25 @@ rtadvd_precmd() # get a list of interfaces and enable it on them # case ${rtadvd_interfaces} in - '') + [Aa][Uu][Tt][Oo]|'') for i in `ifconfig -l` ; do case $i in - lo0|gif[0-9]*|stf[0-9]*|faith[0-9]*|lp[0-9]*|sl[0-9]*|tun[0-9]*) + lo0|\ + stf[0-9]*|\ + faith[0-9]*|\ + lp[0-9]*|\ + sl[0-9]*|\ + pflog[0-9]*|\ + pfsync[0-9]*|\ + an[0-9]*|\ + ath[0-9]*|\ + ipw[0-9]*|\ + iwi[0-9]*|\ + iwn[0-9]*|\ + ral[0-9]*|\ + wi[0-9]*|\ + wl[0-9]*|\ + wpi[0-9]*) continue ;; *) You look to be enumerating wireless devices. If so you should use the media type instead of device names. Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r196933 - head/sys/dev/ath
Author: sam Date: Mon Sep 7 16:08:21 2009 New Revision: 196933 URL: http://svn.freebsd.org/changeset/base/196933 Log: correct typo that was a noop on 32-bit machines but a bug on 64-bit machines Submitted by: phk Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c == --- head/sys/dev/ath/if_ath.c Mon Sep 7 16:00:33 2009(r196932) +++ head/sys/dev/ath/if_ath.c Mon Sep 7 16:08:21 2009(r196933) @@ -1452,7 +1452,7 @@ ath_hal_gethangstate(struct ath_hal *ah, uint32_t rsize; void *sp; - if (!ath_hal_getdiagstate(ah, 32, mask, sizeof(mask), sp, rsize)) + if (!ath_hal_getdiagstate(ah, 32, mask, sizeof(mask), sp, rsize)) return 0; KASSERT(rsize == sizeof(uint32_t), (resultsize %u, rsize)); *hangs = *(uint32_t *)sp; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r196934 - head/sys/dev/ath/ath_hal
Author: sam Date: Mon Sep 7 16:12:07 2009 New Revision: 196934 URL: http://svn.freebsd.org/changeset/base/196934 Log: fix extraneous return that can cause a memory leak Submitted by: phk MFC after:1 week Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v3.c Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v3.c == --- head/sys/dev/ath/ath_hal/ah_eeprom_v3.c Mon Sep 7 16:08:21 2009 (r196933) +++ head/sys/dev/ath/ath_hal/ah_eeprom_v3.c Mon Sep 7 16:12:07 2009 (r196934) @@ -1759,7 +1759,7 @@ legacyEepromDetach(struct ath_hal *ah) HAL_EEPROM *ee = AH_PRIVATE(ah)-ah_eeprom; if (ee-ee_version = AR_EEPROM_VER4_0 ee-ee_eepMap == 1) - return freeEepromRawPowerCalInfo5112(ah, ee); + freeEepromRawPowerCalInfo5112(ah, ee); ath_hal_free(ee); AH_PRIVATE(ah)-ah_eeprom = AH_NULL; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r196935 - head/sys/dev/ath
Author: sam Date: Mon Sep 7 16:18:16 2009 New Revision: 196935 URL: http://svn.freebsd.org/changeset/base/196935 Log: remove extranous return Submitted by: phk MFC after:1 week Modified: head/sys/dev/ath/ah_osdep.c Modified: head/sys/dev/ath/ah_osdep.c == --- head/sys/dev/ath/ah_osdep.c Mon Sep 7 16:12:07 2009(r196934) +++ head/sys/dev/ath/ah_osdep.c Mon Sep 7 16:18:16 2009(r196935) @@ -110,7 +110,7 @@ ath_hal_malloc(size_t size) void ath_hal_free(void* p) { - return free(p, M_ATH_HAL); + free(p, M_ATH_HAL); } void ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r196939 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci net80211
Author: sam Date: Mon Sep 7 16:33:27 2009 New Revision: 196939 URL: http://svn.freebsd.org/changeset/base/196939 Log: MFC r196785: correct timeout for doing NOL processing; need a ticks-relative value Approved by: re (kensmith) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/net80211/ieee80211_dfs.c Modified: stable/8/sys/net80211/ieee80211_dfs.c == --- stable/8/sys/net80211/ieee80211_dfs.c Mon Sep 7 16:26:03 2009 (r196938) +++ stable/8/sys/net80211/ieee80211_dfs.c Mon Sep 7 16:33:27 2009 (r196939) @@ -235,7 +235,7 @@ dfs_timeout(void *arg) } if (oldest != now) { /* arrange to process next channel up for a status change */ - callout_schedule(dfs-nol_timer, oldest + NOL_TIMEOUT); + callout_schedule(dfs-nol_timer, oldest + NOL_TIMEOUT - now); } } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r196940 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ath dev/xen/xenpci
Author: sam Date: Mon Sep 7 16:41:18 2009 New Revision: 196940 URL: http://svn.freebsd.org/changeset/base/196940 Log: MFC r196717: fix beacon timers on resume in sta mode so raoming works Approved by: re (kensmith) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ath/if_ath.c stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ath/if_ath.c == --- stable/8/sys/dev/ath/if_ath.c Mon Sep 7 16:33:27 2009 (r196939) +++ stable/8/sys/dev/ath/if_ath.c Mon Sep 7 16:41:18 2009 (r196940) @@ -1236,7 +1236,16 @@ ath_resume(struct ath_softc *sc) if (sc-sc_resume_up) { if (ic-ic_opmode == IEEE80211_M_STA) { ath_init(sc); - ieee80211_beacon_miss(ic); + /* +* Program the beacon registers using the last rx'd +* beacon frame and enable sync on the next beacon +* we see. This should handle the case where we +* wakeup and find the same AP and also the case where +* we wakeup and need to roam. For the latter we +* should get bmiss events that trigger a roam. +*/ + ath_beacon_config(sc, NULL); + sc-sc_syncbeacon = 1; } else ieee80211_resume_all(ic); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r196842 - head/sys/dev/mwl
Author: sam Date: Fri Sep 4 22:34:57 2009 New Revision: 196842 URL: http://svn.freebsd.org/changeset/base/196842 Log: must also plumb static wep keys to the local sta db in sta mode; not sure when this became necessary and might be caused by some missing code to do auto-configuration of DWDS usage Noticed by: Felix Feng unixw...@gmail.com Modified: head/sys/dev/mwl/if_mwl.c Modified: head/sys/dev/mwl/if_mwl.c == --- head/sys/dev/mwl/if_mwl.c Fri Sep 4 21:49:37 2009(r196841) +++ head/sys/dev/mwl/if_mwl.c Fri Sep 4 22:34:57 2009(r196842) @@ -1738,6 +1738,10 @@ mwl_key_set(struct ieee80211vap *vap, co * WEP keys when the sta reaches AUTH state. */ macaddr = vap-iv_bss-ni_bssid; + if ((k-wk_flags IEEE80211_KEY_GROUP) == 0) { + /* XXX plumb to local sta db too for static key wep */ + mwl_hal_keyset(hvap, hk, vap-iv_myaddr); + } } else if (vap-iv_opmode == IEEE80211_M_WDS vap-iv_state != IEEE80211_S_RUN) { /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r196783 - head/sys/net80211
Author: sam Date: Thu Sep 3 16:24:21 2009 New Revision: 196783 URL: http://svn.freebsd.org/changeset/base/196783 Log: on transition to SLEEP state mark the station in power save, not awake MFC after:3 days Modified: head/sys/net80211/ieee80211_sta.c Modified: head/sys/net80211/ieee80211_sta.c == --- head/sys/net80211/ieee80211_sta.c Thu Sep 3 14:23:50 2009 (r196782) +++ head/sys/net80211/ieee80211_sta.c Thu Sep 3 16:24:21 2009 (r196783) @@ -431,7 +431,7 @@ sta_newstate(struct ieee80211vap *vap, e goto invalid; break; case IEEE80211_S_SLEEP: - ieee80211_sta_pwrsave(vap, 0); + ieee80211_sta_pwrsave(vap, 1); break; default: invalid: ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r196785 - head/sys/net80211
Author: sam Date: Thu Sep 3 16:29:02 2009 New Revision: 196785 URL: http://svn.freebsd.org/changeset/base/196785 Log: correct timeout for doing NOL processing; need a ticks-relative value Obtained from:Marvell MFC after:3 days Modified: head/sys/net80211/ieee80211_dfs.c Modified: head/sys/net80211/ieee80211_dfs.c == --- head/sys/net80211/ieee80211_dfs.c Thu Sep 3 16:25:25 2009 (r196784) +++ head/sys/net80211/ieee80211_dfs.c Thu Sep 3 16:29:02 2009 (r196785) @@ -235,7 +235,7 @@ dfs_timeout(void *arg) } if (oldest != now) { /* arrange to process next channel up for a status change */ - callout_schedule(dfs-nol_timer, oldest + NOL_TIMEOUT); + callout_schedule(dfs-nol_timer, oldest + NOL_TIMEOUT - now); } } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r196785 - head/sys/net80211
Sam Leffler wrote: Author: sam Date: Thu Sep 3 16:29:02 2009 New Revision: 196785 URL: http://svn.freebsd.org/changeset/base/196785 Log: correct timeout for doing NOL processing; need a ticks-relative value Reviewed by:rpaulo ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r196717 - head/sys/dev/ath
Author: sam Date: Mon Aug 31 21:25:49 2009 New Revision: 196717 URL: http://svn.freebsd.org/changeset/base/196717 Log: On resume in sta mode program the beacon timers so when roaming (and the previous ap is no longer in range) the device will deliver bmiss interrupts and trigger the state machine. Also arrange to sync the beacon timers on the next received beacon frame so that when we don't roam we re-synchronize with the ap. Tested by:trasz MFC after:1 week Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c == --- head/sys/dev/ath/if_ath.c Mon Aug 31 21:07:05 2009(r196716) +++ head/sys/dev/ath/if_ath.c Mon Aug 31 21:25:49 2009(r196717) @@ -1236,7 +1236,16 @@ ath_resume(struct ath_softc *sc) if (sc-sc_resume_up) { if (ic-ic_opmode == IEEE80211_M_STA) { ath_init(sc); - ieee80211_beacon_miss(ic); + /* +* Program the beacon registers using the last rx'd +* beacon frame and enable sync on the next beacon +* we see. This should handle the case where we +* wakeup and find the same AP and also the case where +* we wakeup and need to roam. For the latter we +* should get bmiss events that trigger a roam. +*/ + ath_beacon_config(sc, NULL); + sc-sc_syncbeacon = 1; } else ieee80211_resume_all(ic); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r196599 - head/tools/tools/ath/athpoke
Author: sam Date: Thu Aug 27 17:32:58 2009 New Revision: 196599 URL: http://svn.freebsd.org/changeset/base/196599 Log: recognie invalid register names Modified: head/tools/tools/ath/athpoke/athpoke.c Modified: head/tools/tools/ath/athpoke/athpoke.c == --- head/tools/tools/ath/athpoke/athpoke.c Thu Aug 27 17:26:09 2009 (r196598) +++ head/tools/tools/ath/athpoke/athpoke.c Thu Aug 27 17:32:58 2009 (r196599) @@ -39,6 +39,8 @@ #include stdlib.h #include string.h #include ctype.h +#include err.h +#include errno.h typedef struct { HAL_REVS revs; @@ -64,6 +66,7 @@ main(int argc, char *argv[]) { struct ath_diag atd; const char *ifname; + char *eptr; int c, s; s = socket(AF_INET, SOCK_DGRAM, 0); @@ -102,7 +105,13 @@ main(int argc, char *argv[]) if (cp != NULL) *cp++ = '\0'; dr = reglookup(argv[0]); - reg = (dr != NULL) ? dr-addr : (uint32_t) strtoul(argv[0], NULL, 0); + if (dr == NULL) { + errno = 0; + reg = (uint32_t) strtoul(argv[0], eptr, 0); + if (argv[0] == eptr || eptr[0] != '\0') + errx(1, invalid register \%s\, argv[0]); + } else + reg = dr-addr; if (cp != NULL) regwrite(s, atd, reg, (uint32_t) strtoul(cp, NULL, 0)); printf(%s = %08x\n, argv[0], regread(s, atd, reg)); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r196600 - head/sys/arm/conf
Author: sam Date: Thu Aug 27 17:33:44 2009 New Revision: 196600 URL: http://svn.freebsd.org/changeset/base/196600 Log: enable mesh by default Modified: head/sys/arm/conf/CAMBRIA Modified: head/sys/arm/conf/CAMBRIA == --- head/sys/arm/conf/CAMBRIA Thu Aug 27 17:32:58 2009(r196599) +++ head/sys/arm/conf/CAMBRIA Thu Aug 27 17:33:44 2009(r196600) @@ -107,6 +107,7 @@ device random # Entropy device # Wireless NIC cards device wlan# 802.11 support optionsIEEE80211_DEBUG +optionsIEEE80211_SUPPORT_MESH optionsIEEE80211_SUPPORT_TDMA optionsIEEE80211_SUPPORT_MESH device wlan_wep# 802.11 WEP support ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r196603 - head/sys/dev/ath/ath_hal
Author: sam Date: Thu Aug 27 17:42:37 2009 New Revision: 196603 URL: http://svn.freebsd.org/changeset/base/196603 Log: change default regdomain for thailand Obtained from:linux-wirel...@kernel.org Modified: head/sys/dev/ath/ath_hal/ah_regdomain.c Modified: head/sys/dev/ath/ath_hal/ah_regdomain.c == --- head/sys/dev/ath/ath_hal/ah_regdomain.c Thu Aug 27 17:36:59 2009 (r196602) +++ head/sys/dev/ath/ath_hal/ah_regdomain.c Thu Aug 27 17:42:37 2009 (r196603) @@ -573,7 +573,7 @@ static COUNTRY_CODE_TO_ENUM_RD allCountr { CTRY_SWITZERLAND, ETSI1_WORLD }, { CTRY_SYRIA, NULL1_WORLD }, { CTRY_TAIWAN, APL3_FCCA }, - { CTRY_THAILAND,NULL1_WORLD }, + { CTRY_THAILAND,FCC3_WORLD }, { CTRY_TRINIDAD_Y_TOBAGO,ETSI4_WORLD }, { CTRY_TUNISIA, ETSI3_WORLD }, { CTRY_TURKEY, ETSI3_WORLD }, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r196605 - head/sys/arm/conf
Author: sam Date: Thu Aug 27 17:55:44 2009 New Revision: 196605 URL: http://svn.freebsd.org/changeset/base/196605 Log: revert r196600; didn't notice it'd been done already Submitted by: jhay Modified: head/sys/arm/conf/CAMBRIA Modified: head/sys/arm/conf/CAMBRIA == --- head/sys/arm/conf/CAMBRIA Thu Aug 27 17:53:25 2009(r196604) +++ head/sys/arm/conf/CAMBRIA Thu Aug 27 17:55:44 2009(r196605) @@ -107,7 +107,6 @@ device random # Entropy device # Wireless NIC cards device wlan# 802.11 support optionsIEEE80211_DEBUG -optionsIEEE80211_SUPPORT_MESH optionsIEEE80211_SUPPORT_TDMA optionsIEEE80211_SUPPORT_MESH device wlan_wep# 802.11 WEP support ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r196472 - head/usr.sbin/wpa/wpa_cli
Author: sam Date: Sun Aug 23 16:04:10 2009 New Revision: 196472 URL: http://svn.freebsd.org/changeset/base/196472 Log: Enable _DIRENT_HAVE_D_TYPE so wpa_cli scans directories properly for it's unix domain socket. Before this change wpa_cli would take the first file in the directory that was not . or ... Submitted by: Brandon Gooch jamesbrandongo...@gmail.com MFC after:3 days Modified: head/usr.sbin/wpa/wpa_cli/Makefile Modified: head/usr.sbin/wpa/wpa_cli/Makefile == --- head/usr.sbin/wpa/wpa_cli/Makefile Sun Aug 23 15:02:58 2009 (r196471) +++ head/usr.sbin/wpa/wpa_cli/Makefile Sun Aug 23 16:04:10 2009 (r196472) @@ -11,6 +11,8 @@ MAN= wpa_cli.8 CFLAGS+= -DCONFIG_CTRL_IFACE CFLAGS+= -DCONFIG_CTRL_IFACE_UNIX +# enable use of d_type to identify unix domain sockets +CFLAGS+= -D_DIRENT_HAVE_D_TYPE #CFLAGS+= -DCONFIG_READLINE #LDADD+= -ledit -ltermcap ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r196380 - head/sys/dev/usb
Rafal Jaworowski wrote: Author: raj Date: Wed Aug 19 14:39:08 2009 New Revision: 196380 URL: http://svn.freebsd.org/changeset/base/196380 Log: Fix USB cache sync operations for platforms with non-coherent DMA. - usb_pc_cpu_invalidate() is called between [consecutive] reads from a device, so a sequence of BUS_DMASYNC_POSTREAD and _PREREAD should be used. Note we cannot use or'ed shorthand ( _POSTREAD | _PREREAD) for BUS_DMASYNC flags, as the low level bus dma sync operation is implementation dependent and we cannot assume the required order of operations to be guaranteed. - usb_pc_cpu_flush() is called before writing to a device, so BUS_DMASYNC_PREWRITE should be used. Submitted by: Grzegorz Bernacki Reviewed by: HPS, arm@, usb@ ML Tested by:HPS, Mike Tancsa Approved by: re (kib) Obtained from:Semihalf Is this different from the patch I tested on Gateworks 2358 boards which didn't completely resolve problems? Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r196380 - head/sys/dev/usb
Rafal Jaworowski wrote: On 2009-08-19, at 17:30, Sam Leffler wrote: Rafal Jaworowski wrote: Author: raj Date: Wed Aug 19 14:39:08 2009 New Revision: 196380 URL: http://svn.freebsd.org/changeset/base/196380 Log: Fix USB cache sync operations for platforms with non-coherent DMA. - usb_pc_cpu_invalidate() is called between [consecutive] reads from a device, so a sequence of BUS_DMASYNC_POSTREAD and _PREREAD should be used. Note we cannot use or'ed shorthand ( _POSTREAD | _PREREAD) for BUS_DMASYNC flags, as the low level bus dma sync operation is implementation dependent and we cannot assume the required order of operations to be guaranteed. - usb_pc_cpu_flush() is called before writing to a device, so BUS_DMASYNC_PREWRITE should be used. Submitted by:Grzegorz Bernacki Reviewed by:HPS, arm@, usb@ ML Tested by:HPS, Mike Tancsa Approved by:re (kib) Obtained from:Semihalf Is this different from the patch I tested on Gateworks 2358 boards which didn't completely resolve problems? Hm, not sure what patch you have tested with GW. There was an initial workaround for this problem from late June time frame, and this commit is a refined fix identical to the patch posted 05 Aug to a...@. There were other ARM patches in the meantime involving cache sync, but they were pmap-related. I'm pretty sure it's the same one and was combined with other changes you describe. Unfortunately reproducing the problem requires an out-of-tree driver so we can't be sure whether all issues are resolved on the platform. Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r196358 - in head: share/man/man9 sys/kern sys/sys
Pawel Jakub Dawidek wrote: Author: pjd Date: Tue Aug 18 13:55:48 2009 New Revision: 196358 URL: http://svn.freebsd.org/changeset/base/196358 Log: Remove unused taskqueue_find() function. Reviewed by: dfr Approved by: re (kib) I don't understand why this should be removed (let alone during a code freeze). I can think of several uses for this function including a ddb cmd that takes a taskq name and dumps it's contents. The overhead of maintaining the global list appears minimal. Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r196368 - in head/sys: net netinet
Kip Macy wrote: Author: kmacy Date: Tue Aug 18 20:28:58 2009 New Revision: 196368 URL: http://svn.freebsd.org/changeset/base/196368 Log: - change the interface to flowtable_lookup so that we don't rely on the mbuf for obtaining the fib index - check that a cached flow corresponds to the same fib index as the packet for which we are doing the lookup - at interface detach time flush any flows referencing stale rtentrys associated with the interface that is going away (fixes reported panics) - reduce the time between cleans in case the cleaner is running at the time the eventhandler is called and the wakeup is missed less time will elapse before the eventhandler returns - separate per-vnet initialization from global initialization (pointed out by jeli@) - add ddb show flowtables cmd ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r196293 - head/sys/kern
Pawel Jakub Dawidek wrote: Author: pjd Date: Mon Aug 17 08:42:34 2009 New Revision: 196293 URL: http://svn.freebsd.org/changeset/base/196293 Log: Because taskqueue_run() can drop tq_mutex, we need to check if the TQ_FLAGS_ACTIVE flag wasn't removed in the meantime, which means we missed a wakeup. So this would leave a task q thread running? Can you describe the scenario that demonstrated this problem? Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r196157 - stable/8/share/man/man9
ieee80211_crypto_encap.9 \ + ieee80211_crypto.9 ieee80211_crypto_demic.9 \ + ieee80211_crypto.9 ieee80211_crypto_enmic.9 \ + ieee80211_crypto.9 ieee80211_notify_michael_failure.9 \ + ieee80211_crypto.9 ieee80211_notify_replay_failure.9 \ + ieee80211_crypto.9 ieee80211_crypto_register.9 \ + ieee80211_crypto.9 ieee80211_crypto_unregister.9 \ + ieee80211_crypto.9 ieee80211_crypto_available.9 +MLINKS+=ieee80211_input.9 ieee80211_input_all.9 +MLINKS+=ieee80211_node.9 ieee80211_find_rxnode.9 \ + ieee80211_node.9 ieee80211_find_rxnode_withkey.9 \ + ieee80211_node.9 ieee80211_ref_node.9 \ + ieee80211_node.9 ieee80211_unref_node.9 \ ieee80211_node.9 ieee80211_free_node.9 \ ieee80211_node.9 ieee80211_iterate_nodes.9 \ - ieee80211_node.9 ieee80211_lookup_node.9 \ - ieee80211_node.9 ieee80211_next_scan.9 \ - ieee80211_node.9 ieee80211_node_attach.9 \ - ieee80211_node.9 ieee80211_node_detach.9 \ - ieee80211_node.9 ieee80211_node_lateattach.9 \ - ieee80211_node.9 ieee80211_timeout_nodes.9 -MLINKS+=ieee80211_output.9 ieee80211_add_rates.9 \ - ieee80211_output.9 ieee80211_add_xrates.9 \ - ieee80211_output.9 ieee80211_encap.9 \ - ieee80211_output.9 ieee80211_send_mgmt.9 -MLINKS+=ieee80211_proto.9 ieee80211_dump_pkt.9 \ - ieee80211_proto.9 ieee80211_fix_rate.9 \ - ieee80211_proto.9 ieee80211_print_essid.9 \ - ieee80211_proto.9 ieee80211_proto_attach.9 \ - ieee80211_proto.9 ieee80211_proto_detach.9 -MLINKS+=ieee80211_radiotap.9 radiotap.9 + ieee80211_node.9 ieee80211_dump_node.9 \ + ieee80211_node.9 ieee80211_dump_nodes.9 +MLINKS+=ieee80211_output.9 M_WME_GETAC.9 \ + ieee80211_output.9 M_SEQNO_GET.9 \ + ieee80211_output.9 ieee80211_process_callback.9 +MLINKS+=ieee80211_proto.9 ieee80211_new_state.9 \ + ieee80211_proto.9 ieee80211_start_all.9 \ + ieee80211_proto.9 ieee80211_stop_all.9 \ + ieee80211_proto.9 ieee80211_suspend_all.9 \ + ieee80211_proto.9 ieee80211_resume_all.9 \ + ieee80211_proto.9 ieee80211_waitfor_parent.9 +MLINKS+=ieee80211_radiotap.9 radiotap.9 \ + ieee80211_radiotap.9 ieee80211_radiotap_attach.9 \ + ieee80211_radiotap.9 ieee80211_radiotap_active_vap.9 \ + ieee80211_radiotap.9 ieee80211_radiotap_active.9 \ + ieee80211_radiotap.9 ieee80211_radiotap_tx.9 +MLINKS+=ieee80211_regdomain.9 ieee80211_init_channels.9 \ + ieee80211_regdomain.9 ieee80211_sort_channels.9 \ + ieee80211_regdomain.9 ieee80211_alloc_countryie.9 +MLINKS+=ieee80211_vap.9 ieee80211_vap_setup.9 \ + ieee80211_vap.9 ieee80211_vap_attach.9 \ + ieee80211_vap.9 ieee80211_vap_detach.9 MLINKS+=ifnet.9 ifaddr.9 \ ifnet.9 if_data.9 \ ifnet.9 ifqueue.9 Modified: stable/8/share/man/man9/ieee80211.9 == --- stable/8/share/man/man9/ieee80211.9 Wed Aug 12 21:05:58 2009 (r196156) +++ stable/8/share/man/man9/ieee80211.9 Wed Aug 12 21:06:37 2009 (r196157) @@ -1,6 +1,5 @@ .\ -.\ Copyright (c) 2004 Bruce M. Simpson b...@spc.org -.\ Copyright (c) 2004 Darron Broad dar...@kewl.org +.\ Copyright (c) 2009 Sam Leffler, Errno Consulting .\ All rights reserved. .\ .\ Redistribution and use in source and binary forms, with or without @@ -25,236 +24,538 @@ .\ SUCH DAMAGE. .\ .\ $FreeBSD$ -.\ $Id: ieee80211.9,v 1.5 2004/03/04 12:33:27 bruce Exp $ .\ -.Dd March 2, 2004 -.Dt IEEE80211 9 +.Dd August 4, 2009 +.Dt NET80211 9 .Os .Sh NAME -.Nm ieee80211_ifattach , ieee80211_ifdetach , -.Nm ieee80211_mhz2ieee , ieee80211_chan2ieee , ieee80211_ieee2mhz , -.Nm ieee80211_media_init , ieee80211_media_change , ieee80211_media_status , -.Nm ieee80211_watchdog , -.Nm ieee80211_setmode , ieee80211_chan2mode , -.Nm ieee80211_rate2media , ieee80211_media2rate -.Nd core 802.11 network stack functions +.Nm net80211 +.Nd 802.11 network layer .Sh SYNOPSIS .In net80211/ieee80211_var.h -.In net80211/ieee80211_proto.h .Ft void -.Fn ieee80211_ifattach struct ifnet *ifp +.Fn ieee80211_ifattach struct ieee80211com *ic const uint8_t macaddr[IEEE80211_ADDR_LEN] .Ft void -.Fn ieee80211_ifdetach struct ifnet *ifp -.Ft u_int -.Fn ieee80211_mhz2ieee u_int freq u_int flags -.Ft u_int -.Fn ieee80211_chan2ieee struct ieee80211com *ic struct ieee80211_channel *c -.Ft u_int -.Fn ieee80211_ieee2mhz u_int chan u_int flags -.Ft void -.Fo ieee80211_media_init -.Fa struct ifnet *ifp ifm_change_cb_t media_change -.Fa ifm_stat_cb_t media_stat -.Fc -.Fa int -.Fn ieee80211_media_change struct ifnet *ifp -.Fa void -.Fn ieee80211_media_status struct ifnet *ifp struct ifmediareq *imr -.Ft void -.Fn ieee80211_watchdog struct ifnet *ifp -.Ft int -.Fn ieee80211_setmode struct ieee80211com *ic enum ieee80211_phymode mode -.Ft enum ieee80211_phymode -.Fo ieee80211_chan2mode -.Fa struct ieee80211com *ic struct ieee80211_channel *chan -.Fc -.Ft int -.Fo
svn commit: r196159 - head/sys/net80211
Author: sam Date: Wed Aug 12 21:19:19 2009 New Revision: 196159 URL: http://svn.freebsd.org/changeset/base/196159 Log: Drain link state event changes posted during vap destroy. This is a band-aid for the general problem that if_link_state_change can be called between if_detach and if_free leaving a task queued that has been free'd. Spotted by: thompsa Reviewed by: rwatson Approved by: re (rwatson) Modified: head/sys/net80211/ieee80211.c Modified: head/sys/net80211/ieee80211.c == --- head/sys/net80211/ieee80211.c Wed Aug 12 21:06:43 2009 (r196158) +++ head/sys/net80211/ieee80211.c Wed Aug 12 21:19:19 2009 (r196159) @@ -573,11 +573,13 @@ ieee80211_vap_detach(struct ieee80211vap /* * Flush any deferred vap tasks. -* NB: must be before ether_ifdetach() and removal from ic_vaps list */ ieee80211_draintask(ic, vap-iv_nstate_task); ieee80211_draintask(ic, vap-iv_swbmiss_task); + /* XXX band-aid until ifnet handles this for us */ + taskqueue_drain(taskqueue_swi, ifp-if_linktask); + IEEE80211_LOCK(ic); KASSERT(vap-iv_state == IEEE80211_S_INIT , (vap still running)); TAILQ_REMOVE(ic-ic_vaps, vap, iv_next); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r196161 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis...
Author: sam Date: Wed Aug 12 21:34:57 2009 New Revision: 196161 URL: http://svn.freebsd.org/changeset/base/196161 Log: MFC r196159: Drain link state event changes posted during vap destroy. This is a band-aid for the general problem that if_link_state_change can be called between if_detach and if_free leaving a task queued that has been free'd. Reviewed by: rwatson Approved by: re (rwatson) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props
Re: svn commit: r195960 - in head/sys/dev/usb: . controller input
Robert Watson wrote: On Mon, 3 Aug 2009, Hans Petter Selasky wrote: On Monday 03 August 2009 19:46:16 Bruce Evans wrote: On Mon, 3 Aug 2009, M. Warner Losh wrote: In message: 200908030827.21108.hsela...@c2i.net : I see two solutions: : : 1) Disable the timekeeping if no keys are pressed. : : 2) Second option is to use getmicrotime. Actually what I need is just a : millisecond time reference so I know when to repeat the last key. : : Any opinions? DELAY() or getmicrotime() ? DELAY(1) is somewhet usable. I think DELAY(1) is not accurate enough. I suggest that the DELAY(1000) is only active while a key is actually pressed. See attached patch. Please test and report back. This seems a reasonable middle ground -- avoids use of sensitive time counters in DDB, avoids expensive poll operation most of the time, and allows key repeat to work, which is especially nice for backspace in DDB. :-) I think we are losing sight of the goal here. We are in a release schedule and trying to find a minimal set of changes that resolves our immediate need. Keyboard repeat is not required and unless there is an obvious and immediate solution it should be considered AFTER the release. Remember we are already behind schedule for 8.0. Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r195907 - in head/sys: amd64/amd64 i386/i386
Ed Schouten wrote: * Rui Paulo rpa...@freebsd.org wrote: Refine the MacBook hack to only match early models that have Intel ICH. ... - if (strncmp(sysenv, MacBook, 7) == 0) { + if (strncmp(sysenv, MacBook1,1, 10) == 0 || + strncmp(sysenv, MacBookPro1,1, 13) == 0 || + strncmp(sysenv, MacBookPro1,2, 13) == 0 || + strncmp(sysenv, Macmini1,1, 10) == 0) { Yay -- this change broke FreeBSD on my MacBook3,1. Could we please add MacBook3,1 to this list before releasing 8.0? A hack like this deserves a loader tunable to set the list or, perhaps easier, an extra model ID to allow workaround w/o rebuilding (e.g. for doing an install). Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r196004 - head/sys/net80211
Author: sam Date: Fri Jul 31 19:12:19 2009 New Revision: 196004 URL: http://svn.freebsd.org/changeset/base/196004 Log: Filter setting IFF_PROMISC on tdma vaps; we don't want the underyling device to be in promiscuous mode as we have a h/w bssid. Approved by: re (kib) Modified: head/sys/net80211/ieee80211.c Modified: head/sys/net80211/ieee80211.c == --- head/sys/net80211/ieee80211.c Fri Jul 31 17:57:16 2009 (r196003) +++ head/sys/net80211/ieee80211.c Fri Jul 31 19:12:19 2009 (r196004) @@ -638,7 +638,8 @@ ieee80211_syncifflag_locked(struct ieee8 */ if (flag == IFF_PROMISC !(vap-iv_opmode == IEEE80211_M_MONITOR || - vap-iv_opmode == IEEE80211_M_AHDEMO)) + (vap-iv_opmode == IEEE80211_M_AHDEMO + (vap-iv_caps IEEE80211_C_TDMA) == 0))) continue; bit = 1; break; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r196005 - head/sys/net80211
Author: sam Date: Fri Jul 31 19:13:16 2009 New Revision: 196005 URL: http://svn.freebsd.org/changeset/base/196005 Log: fix misplaced #endif that caused tdma handling to be merged with ESS handling (causing tdma scanning to break) Approved by: re (kib) Modified: head/sys/net80211/ieee80211_scan_sta.c Modified: head/sys/net80211/ieee80211_scan_sta.c == --- head/sys/net80211/ieee80211_scan_sta.c Fri Jul 31 19:12:19 2009 (r196004) +++ head/sys/net80211/ieee80211_scan_sta.c Fri Jul 31 19:13:16 2009 (r196005) @@ -1018,8 +1018,8 @@ match_bss(struct ieee80211vap *vap, else if (ms-ms_idlen != 0 match_id(se-se_meshid, ms-ms_id, ms-ms_idlen)) fail |= MATCH_MESHID; - } else { #endif + } else { if ((se-se_capinfo IEEE80211_CAPINFO_ESS) == 0) fail |= MATCH_CAPINFO; /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r195944 - head/sys/kern
Jamie Gritton wrote: Author: jamie Date: Wed Jul 29 16:41:02 2009 New Revision: 195944 URL: http://svn.freebsd.org/changeset/base/195944 Log: Change the default value of the ip4 and ip6 jail parameters to disable, which only allows access to the parent/physical system's IP addresses when specifically directed. Change the default value of host to new, and don't copy the parent host values, to insulate jails from the parent hostname et al. This does not say why you're making these changes; please explain. Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r195845 - head/sys/net80211
Author: sam Date: Fri Jul 24 15:22:12 2009 New Revision: 195845 URL: http://svn.freebsd.org/changeset/base/195845 Log: o kill old code no longer needed after r193312 o count output packets+errors for frames sent through ieee80211_output Approved by: re (kensmith) Modified: head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_output.c == --- head/sys/net80211/ieee80211_output.cFri Jul 24 15:06:49 2009 (r195844) +++ head/sys/net80211/ieee80211_output.cFri Jul 24 15:22:12 2009 (r195845) @@ -382,23 +382,10 @@ ieee80211_output(struct ifnet *ifp, stru { #define senderr(e) do { error = (e); goto bad;} while (0) struct ieee80211_node *ni = NULL; - struct ieee80211vap *vap; + struct ieee80211vap *vap = ifp-if_softc; struct ieee80211_frame *wh; int error; - if (ifp-if_drv_flags IFF_DRV_OACTIVE) { - /* -* Short-circuit requests if the vap is marked OACTIVE -* as this is used when tearing down state to indicate -* the vap may be gone. This can also happen because a -* packet came down through ieee80211_start before the -* vap entered RUN state in which case it's also ok to -* just drop the frame. This should not be necessary -* but callers of if_output don't check OACTIVE. -*/ - senderr(ENETDOWN); - } - vap = ifp-if_softc; /* * Hand to the 802.3 code if not tagged as * a raw 802.11 frame. @@ -468,6 +455,7 @@ ieee80211_output(struct ifnet *ifp, stru if (ieee80211_classify(ni, m)) senderr(EIO); /* XXX */ + ifp-if_opackets++; IEEE80211_NODE_STAT(ni, tx_data); if (IEEE80211_IS_MULTICAST(wh-i_addr1)) { IEEE80211_NODE_STAT(ni, tx_mcast); @@ -491,6 +479,7 @@ bad: m_freem(m); if (ni != NULL) ieee80211_free_node(ni); + ifp-if_oerrors++; return error; #undef senderr } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r195846 - head/sys/net80211
Author: sam Date: Fri Jul 24 15:27:02 2009 New Revision: 195846 URL: http://svn.freebsd.org/changeset/base/195846 Log: monitor mode vaps are meant to be read-only so they can operate on any frequency w/o regulatory issues, do this by hooking if_transmit and if_output with routines that discard all transmits Reviewed by: thompsa, cbzimmer (intent) Approved by: re (kensmith) Modified: head/sys/net80211/ieee80211.c Modified: head/sys/net80211/ieee80211.c == --- head/sys/net80211/ieee80211.c Fri Jul 24 15:22:12 2009 (r195845) +++ head/sys/net80211/ieee80211.c Fri Jul 24 15:27:02 2009 (r195846) @@ -224,12 +224,19 @@ null_update_promisc(struct ifnet *ifp) } static int +null_transmit(struct ifnet *ifp, struct mbuf *m) +{ + m_freem(m); + ifp-if_oerrors++; + return EACCES; /* XXX EIO/EPERM? */ +} + +static int null_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, struct route *ro) { if_printf(ifp, discard raw packet\n); - m_freem(m); - return EIO; + return null_transmit(ifp, m); } static void @@ -515,9 +522,15 @@ ieee80211_vap_attach(struct ieee80211vap ifp-if_baudrate = IF_Mbps(maxrate); ether_ifattach(ifp, vap-iv_myaddr); - /* hook output method setup by ether_ifattach */ - vap-iv_output = ifp-if_output; - ifp-if_output = ieee80211_output; + if (vap-iv_opmode == IEEE80211_M_MONITOR) { + /* NB: disallow transmit */ + ifp-if_transmit = null_transmit; + ifp-if_output = null_output; + } else { + /* hook output method setup by ether_ifattach */ + vap-iv_output = ifp-if_output; + ifp-if_output = ieee80211_output; + } /* NB: if_mtu set by ether_ifattach to ETHERMTU */ IEEE80211_LOCK(ic); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r195847 - head/sys/net80211
Author: sam Date: Fri Jul 24 15:28:29 2009 New Revision: 195847 URL: http://svn.freebsd.org/changeset/base/195847 Log: correct handling of IFF_PROMISC; this should not be pushed to the parent device except for monitor and ahdemo mode vaps Reviewed by: rpaulo Approved by: re (kensmith) Modified: head/sys/net80211/ieee80211.c Modified: head/sys/net80211/ieee80211.c == --- head/sys/net80211/ieee80211.c Fri Jul 24 15:27:02 2009 (r195846) +++ head/sys/net80211/ieee80211.c Fri Jul 24 15:28:29 2009 (r195847) @@ -637,7 +637,8 @@ ieee80211_syncifflag_locked(struct ieee8 * drivers don't need to special-case it */ if (flag == IFF_PROMISC - vap-iv_opmode == IEEE80211_M_HOSTAP) + !(vap-iv_opmode == IEEE80211_M_MONITOR || + vap-iv_opmode == IEEE80211_M_AHDEMO)) continue; bit = 1; break; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r195848 - in head/tools/tools/net80211: stumbler w00t w00t/ap w00t/assoc w00t/expand w00t/prga w00t/redir wesside/wesside wlaninject
Author: sam Date: Fri Jul 24 15:31:22 2009 New Revision: 195848 URL: http://svn.freebsd.org/changeset/base/195848 Log: Update for vaps: o do not force monitor mode; the wlanX ifnet must be an ahdemo mode vap o move channel change work before marking ifnet up to avoid churning the state machine o change default ifnet name to wlan0 Approved by: re (kensmith) Modified: head/tools/tools/net80211/stumbler/stumbler.c head/tools/tools/net80211/w00t/README head/tools/tools/net80211/w00t/ap/ap.c head/tools/tools/net80211/w00t/assoc/assoc.c head/tools/tools/net80211/w00t/expand/expand.c head/tools/tools/net80211/w00t/prga/prga.c head/tools/tools/net80211/w00t/redir/redir.c head/tools/tools/net80211/wesside/wesside/wesside.c head/tools/tools/net80211/wlaninject/wlaninject.c Modified: head/tools/tools/net80211/stumbler/stumbler.c == --- head/tools/tools/net80211/stumbler/stumbler.c Fri Jul 24 15:28:29 2009(r195847) +++ head/tools/tools/net80211/stumbler/stumbler.c Fri Jul 24 15:31:22 2009(r195848) @@ -275,9 +275,14 @@ void set_chan(int c) { void setup_if(char *dev) { struct ifreq ifr; unsigned int flags; -struct ifmediareq ifmr; -int *mwords; - + +// set chan +memset(chaninfo.ireq, 0, sizeof(chaninfo.ireq)); +strcpy(chaninfo.ireq.i_name, dev); +chaninfo.ireq.i_type = IEEE80211_IOC_CHANNEL; + +set_chan(1); + // set iface up and promisc memset(ifr, 0, sizeof(ifr)); strcpy(ifr.ifr_name, dev); @@ -293,39 +298,6 @@ void setup_if(char *dev) { ifr.ifr_flagshigh = flags 16; if (ioctl(ioctl_s, SIOCSIFFLAGS, ifr) == -1) die(1, ioctl(SIOCSIFFLAGS)); - -// set monitor mode -memset(ifmr, 0, sizeof(ifmr)); -strcpy(ifmr.ifm_name, dev); -if (ioctl(ioctl_s, SIOCGIFMEDIA, ifmr) == -1) -die(1, ioctl(SIOCGIFMEDIA)); - -if (ifmr.ifm_count == 0) -die(0, 0 media thinggies...\n); - -mwords = (int *)malloc(ifmr.ifm_count * sizeof(int)); -if (!mwords) -die(1, malloc()); - -ifmr.ifm_ulist = mwords; - -if (ioctl(ioctl_s, SIOCGIFMEDIA, ifmr) == -1) -die(1, ioctl(SIOCGIFMEDIA)); - - free(mwords); - -memset(ifr, 0, sizeof(ifr)); -strcpy(ifr.ifr_name, dev); -ifr.ifr_media = ifmr.ifm_current | IFM_IEEE80211_MONITOR; -if (ioctl(ioctl_s, SIOCSIFMEDIA, ifr) == -1) -die(1, ioctl(SIOCSIFMEDIA)); - -// set chan -memset(chaninfo.ireq, 0, sizeof(chaninfo.ireq)); -strcpy(chaninfo.ireq.i_name, dev); -chaninfo.ireq.i_type = IEEE80211_IOC_CHANNEL; - -set_chan(1); } void open_bpf(char *dev, int dlt) { Modified: head/tools/tools/net80211/w00t/README == --- head/tools/tools/net80211/w00t/README Fri Jul 24 15:28:29 2009 (r195847) +++ head/tools/tools/net80211/w00t/README Fri Jul 24 15:31:22 2009 (r195848) @@ -4,7 +4,7 @@ This is a collection of tools that use r None of the tools configure the interface, so be sure to run something like: -ifconfig ath0 channel 7 mediaopt monitor promisc up +ifconfig wlan create wlandev ath0 wlanmode ahdemo channel 7 promisc up beforehand. The following tools are found here: Modified: head/tools/tools/net80211/w00t/ap/ap.c == --- head/tools/tools/net80211/w00t/ap/ap.c Fri Jul 24 15:28:29 2009 (r195847) +++ head/tools/tools/net80211/w00t/ap/ap.c Fri Jul 24 15:31:22 2009 (r195848) @@ -846,7 +846,7 @@ void next_event(struct params *p) int main(int argc, char *argv[]) { - char *iface = ath0; + char *iface = wlan0; char *tap = tap0; struct params p; int ch; Modified: head/tools/tools/net80211/w00t/assoc/assoc.c == --- head/tools/tools/net80211/w00t/assoc/assoc.cFri Jul 24 15:28:29 2009(r195847) +++ head/tools/tools/net80211/w00t/assoc/assoc.cFri Jul 24 15:31:22 2009(r195848) @@ -710,7 +710,7 @@ int main(int argc, char *argv[]) char mac[] = { 0x00, 0x00, 0xde, 0xfa, 0xce, 0xd }; int ch; struct params p; - char *iface = ath0; + char *iface = wlan0; char *tap = tap0; int timeout = 50*1000; struct timeval start; Modified: head/tools/tools/net80211/w00t/expand/expand.c == --- head/tools/tools/net80211/w00t/expand/expand.c Fri Jul 24 15:28:29 2009(r195847) +++ head/tools/tools/net80211/w00t/expand/expand.c
svn commit: r195849 - head/sys/net80211
Author: sam Date: Fri Jul 24 15:37:02 2009 New Revision: 195849 URL: http://svn.freebsd.org/changeset/base/195849 Log: revert OACTIVE part of r195845; instead fix the comment so it does not refer to the old hack removed in r193312 Approved by: re (implicit) Modified: head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_output.c == --- head/sys/net80211/ieee80211_output.cFri Jul 24 15:31:22 2009 (r195848) +++ head/sys/net80211/ieee80211_output.cFri Jul 24 15:37:02 2009 (r195849) @@ -382,10 +382,22 @@ ieee80211_output(struct ifnet *ifp, stru { #define senderr(e) do { error = (e); goto bad;} while (0) struct ieee80211_node *ni = NULL; - struct ieee80211vap *vap = ifp-if_softc; + struct ieee80211vap *vap; struct ieee80211_frame *wh; int error; + if (ifp-if_drv_flags IFF_DRV_OACTIVE) { + /* +* Short-circuit requests if the vap is marked OACTIVE +* as this can happen because a packet came down through +* ieee80211_start before the vap entered RUN state in +* which case it's ok to just drop the frame. This +* should not be necessary but callers of if_output don't +* check OACTIVE. +*/ + senderr(ENETDOWN); + } + vap = ifp-if_softc; /* * Hand to the 802.3 code if not tagged as * a raw 802.11 frame. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r195805 - head/sbin/dhclient
Author: sam Date: Tue Jul 21 15:06:10 2009 New Revision: 195805 URL: http://svn.freebsd.org/changeset/base/195805 Log: Fix the logic to count the number of live interfaces. With this change dhclient now terminates when the underlying ifnet is destroyed (e.g. on card eject). Reviewed by: brooks Approved by: re (kib) Modified: head/sbin/dhclient/dispatch.c Modified: head/sbin/dhclient/dispatch.c == --- head/sbin/dhclient/dispatch.c Tue Jul 21 14:23:05 2009 (r195804) +++ head/sbin/dhclient/dispatch.c Tue Jul 21 15:06:10 2009 (r195805) @@ -144,7 +144,7 @@ reinitialize_interfaces(void) void dispatch(void) { - int count, i, to_msec, nfds = 0; + int count, live_interfaces, i, to_msec, nfds = 0; struct protocol *l; struct pollfd *fds; time_t howlong; @@ -188,18 +188,20 @@ another: to_msec = -1; /* Set up the descriptors to be polled. */ + live_interfaces = 0; for (i = 0, l = protocols; l; l = l-next) { struct interface_info *ip = l-local; - if (ip (l-handler != got_one || !ip-dead)) { - fds[i].fd = l-fd; - fds[i].events = POLLIN; - fds[i].revents = 0; - i++; - } + if (ip == NULL || ip-dead) + continue; + fds[i].fd = l-fd; + fds[i].events = POLLIN; + fds[i].revents = 0; + i++; + if (l-handler == got_one) + live_interfaces++; } - - if (i == 0) + if (live_interfaces == 0) error(No live interfaces to poll on - exiting.); /* Wait for a packet or a timeout... XXX */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r195807 - head/sys/dev/ath
Author: sam Date: Tue Jul 21 19:01:04 2009 New Revision: 195807 URL: http://svn.freebsd.org/changeset/base/195807 Log: track whether any mesh vaps are present to correctly setup the rx filter when, for example, an ap vap is created first Reviewed by: rpaulo Approved by: re (kib) Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath.c == --- head/sys/dev/ath/if_ath.c Tue Jul 21 16:54:11 2009(r195806) +++ head/sys/dev/ath/if_ath.c Tue Jul 21 19:01:04 2009(r195807) @@ -1023,6 +1023,8 @@ ath_vap_create(struct ieee80211com *ic, sc-sc_nvaps++; if (opmode == IEEE80211_M_STA) sc-sc_nstavaps++; + if (opmode == IEEE80211_M_MBSS) + sc-sc_nmeshvaps++; } switch (ic_opmode) { case IEEE80211_M_IBSS: @@ -1137,6 +1139,8 @@ ath_vap_delete(struct ieee80211vap *vap) vap-iv_opmode == IEEE80211_M_MBSS) { reclaim_address(sc, vap-iv_myaddr); ath_hal_setbssidmask(ah, sc-sc_hwbssidmask); + if (vap-iv_opmode == IEEE80211_M_MBSS) + sc-sc_nmeshvaps--; } if (vap-iv_opmode != IEEE80211_M_WDS) sc-sc_nvaps--; @@ -2381,7 +2385,7 @@ ath_calcrxfilter(struct ath_softc *sc) if (ic-ic_opmode == IEEE80211_M_HOSTAP IEEE80211_IS_CHAN_ANYG(ic-ic_curchan)) rfilt |= HAL_RX_FILTER_BEACON; - if (ic-ic_opmode == IEEE80211_M_MBSS) { + if (sc-sc_nmeshvaps) { rfilt |= HAL_RX_FILTER_BEACON; if (sc-sc_hasbmatch) rfilt |= HAL_RX_FILTER_BSSID; Modified: head/sys/dev/ath/if_athvar.h == --- head/sys/dev/ath/if_athvar.hTue Jul 21 16:54:11 2009 (r195806) +++ head/sys/dev/ath/if_athvar.hTue Jul 21 19:01:04 2009 (r195807) @@ -203,6 +203,7 @@ struct ath_softc { int sc_debug; int sc_nvaps; /* # vaps */ int sc_nstavaps;/* # station vaps */ + int sc_nmeshvaps; /* # mbss vaps */ u_int8_tsc_hwbssidmask[IEEE80211_ADDR_LEN]; u_int8_tsc_nbssid0; /* # vap's using base mac */ uint32_tsc_bssidmask; /* bssid mask */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r195809 - head/sys/dev/ath/ath_hal/ar5212
Author: sam Date: Tue Jul 21 19:23:34 2009 New Revision: 195809 URL: http://svn.freebsd.org/changeset/base/195809 Log: Fix handling of AR_RX_FILTER_BSSID: write the shadow value for AR_MISC_MODE so other register writes preserve the setting of AR_MISC_MODE_BSSID_MATCH_FORCE. Reviewed by: rpaulo Approved by: re (kib) Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c == --- head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Tue Jul 21 19:06:39 2009(r195808) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Tue Jul 21 19:23:34 2009(r195809) @@ -164,7 +164,7 @@ ar5212GetRxFilter(struct ath_hal *ah) if (phybits (AR_PHY_ERR_OFDM_TIMING|AR_PHY_ERR_CCK_TIMING)) bits |= HAL_RX_FILTER_PHYERR; if (AH_PRIVATE(ah)-ah_caps.halBssidMatchSupport - (OS_REG_READ(ah, AR_MISC_MODE) AR_MISC_MODE_BSSID_MATCH_FORCE)) + (AH5212(ah)-ah_miscMode AR_MISC_MODE_BSSID_MATCH_FORCE)) bits |= HAL_RX_FILTER_BSSID; return bits; } @@ -175,6 +175,7 @@ ar5212GetRxFilter(struct ath_hal *ah) void ar5212SetRxFilter(struct ath_hal *ah, uint32_t bits) { + struct ath_hal_5212 *ahp = AH5212(ah); uint32_t phybits; OS_REG_WRITE(ah, AR_RX_FILTER, @@ -194,12 +195,11 @@ ar5212SetRxFilter(struct ath_hal *ah, ui OS_REG_READ(ah, AR_RXCFG) ~ AR_RXCFG_ZLFDMA); } if (AH_PRIVATE(ah)-ah_caps.halBssidMatchSupport) { - uint32_t miscbits = OS_REG_READ(ah, AR_MISC_MODE); if (bits HAL_RX_FILTER_BSSID) - miscbits |= AR_MISC_MODE_BSSID_MATCH_FORCE; + ahp-ah_miscMode |= AR_MISC_MODE_BSSID_MATCH_FORCE; else - miscbits = ~AR_MISC_MODE_BSSID_MATCH_FORCE; - OS_REG_WRITE(ah, AR_MISC_MODE, miscbits); + ahp-ah_miscMode = ~AR_MISC_MODE_BSSID_MATCH_FORCE; + OS_REG_WRITE(ah, AR_MISC_MODE, ahp-ah_miscMode); } } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r195810 - head/sys/modules/wlan
Author: sam Date: Tue Jul 21 19:24:53 2009 New Revision: 195810 URL: http://svn.freebsd.org/changeset/base/195810 Log: correct setup of opt_ddb.h Submitted by: jkim Approved by: re (kib) Modified: head/sys/modules/wlan/Makefile Modified: head/sys/modules/wlan/Makefile == --- head/sys/modules/wlan/Makefile Tue Jul 21 19:23:34 2009 (r195809) +++ head/sys/modules/wlan/Makefile Tue Jul 21 19:24:53 2009 (r195810) @@ -25,7 +25,7 @@ opt_ipx.h: echo #define IPX 1 ${.TARGET} # override to get ddb support? opt_ddb.h: - echo #define DDB 0 ${.TARGET} + : ${.TARGET} .endif .include bsd.kmod.mk ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r195811 - head/tools/tools/net80211/wlanstats
Author: sam Date: Tue Jul 21 19:25:25 2009 New Revision: 195811 URL: http://svn.freebsd.org/changeset/base/195811 Log: update for recent mesh additions Approved by: re (kib) Modified: head/tools/tools/net80211/wlanstats/wlanstats.c Modified: head/tools/tools/net80211/wlanstats/wlanstats.c == --- head/tools/tools/net80211/wlanstats/wlanstats.c Tue Jul 21 19:24:53 2009(r195810) +++ head/tools/tools/net80211/wlanstats/wlanstats.c Tue Jul 21 19:25:25 2009(r195811) @@ -342,7 +342,15 @@ static const struct fmt wlanstats[] = { { 4, hwmp_rootreqs, hwmp_rootreqs,root PREQ frames sent }, #defineS_HWMP_ROOTANN AFTER(S_HWMP_ROOTREQS) { 4, hwmp_rootann, hwmp_rootann, root RANN frames received }, -#defineS_INPUT AFTER(S_HWMP_ROOTANN) +#defineS_MESH_BADAEAFTER(S_HWMP_ROOTANN) + { 4, mesh_badae, mesh_badae, frame discarded for bad AddressExtension (AE) }, +#defineS_MESH_RTADDFAILED AFTER(S_MESH_BADAE) + { 4, mesh_rtadd, mesh_rtadd, mesh route add failed }, +#defineS_MESH_NOTPROXY AFTER(S_MESH_RTADDFAILED) + { 8, mesh_notproxy, mesh_notproxy,frame discarded because station not acting as a proxy }, +#defineS_RX_BADALIGN AFTER(S_MESH_NOTPROXY) + { 4, rx_badalign,rx_badalign,frame discarded because payload re-alignment failed }, +#defineS_INPUT AFTER(S_RX_BADALIGN) { 8,input,input,total data frames received }, #defineS_RX_UCAST AFTER(S_INPUT) { 8,rx_ucast, rx_ucast, unicast data frames received }, @@ -796,6 +804,10 @@ wlan_get_curstat(struct statfoo *sf, int case S_HWMP_WRONGSEQ: STAT(hwmp_wrongseq); case S_HWMP_ROOTREQS: STAT(hwmp_rootreqs); case S_HWMP_ROOTANN:STAT(hwmp_rootrann); + case S_MESH_BADAE: STAT(mesh_badae); + case S_MESH_RTADDFAILED:STAT(mesh_rtaddfailed); + case S_MESH_NOTPROXY: STAT(mesh_notproxy); + case S_RX_BADALIGN: STAT(rx_badalign); case S_INPUT: NSTAT(rx_data); case S_OUTPUT: NSTAT(tx_data); case S_RX_UCAST:NSTAT(rx_ucast); @@ -950,6 +962,10 @@ wlan_get_totstat(struct statfoo *sf, int case S_HWMP_WRONGSEQ: STAT(hwmp_wrongseq); case S_HWMP_ROOTREQS: STAT(hwmp_rootreqs); case S_HWMP_ROOTANN:STAT(hwmp_rootrann); + case S_MESH_BADAE: STAT(mesh_badae); + case S_MESH_RTADDFAILED:STAT(mesh_rtaddfailed); + case S_MESH_NOTPROXY: STAT(mesh_notproxy); + case S_RX_BADALIGN: STAT(rx_badalign); case S_INPUT: NSTAT(rx_data); case S_OUTPUT: NSTAT(tx_data); case S_RX_UCAST:NSTAT(rx_ucast); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r195812 - head/sys/net80211
Author: sam Date: Tue Jul 21 19:36:32 2009 New Revision: 195812 URL: http://svn.freebsd.org/changeset/base/195812 Log: Correct handling of keys that already have a hardware/device key index: this was broken in r183248 when the check of wk_keyix was replaced by a check of IEEE80211_KEY_DEVKEY (because the flag was clobbered). Define IEEE80211_KEY_DEVICE to specify flags that are owned by net80211/driver and use this to preserve IEEE80211_KEY_DEVKEY so we don't ask the driver for another key index when we already have one. Testing by: Daniel Thiele, Wes Morgan Reviewed by: rpaulo Approved by: re (kib) Modified: head/sys/net80211/ieee80211_crypto.c head/sys/net80211/ieee80211_crypto.h Modified: head/sys/net80211/ieee80211_crypto.c == --- head/sys/net80211/ieee80211_crypto.cTue Jul 21 19:25:25 2009 (r195811) +++ head/sys/net80211/ieee80211_crypto.cTue Jul 21 19:36:32 2009 (r195812) @@ -244,11 +244,13 @@ static const char *cipher_modnames[IEEE8 [IEEE80211_CIPHER_NONE]= wlan_none, }; +/* NB: there must be no overlap between user-supplied and device-owned flags */ +CTASSERT((IEEE80211_KEY_COMMON IEEE80211_KEY_DEVICE) == 0); + /* * Establish a relationship between the specified key and cipher * and, if necessary, allocate a hardware index from the driver. - * Note that when a fixed key index is required it must be specified - * and we blindly assign it w/o consulting the driver (XXX). + * Note that when a fixed key index is required it must be specified. * * This must be the first call applied to a key; all the other key * routines assume wk_cipher is setup. @@ -309,6 +311,8 @@ ieee80211_crypto_newkey(struct ieee80211 oflags = key-wk_flags; flags = IEEE80211_KEY_COMMON; + /* NB: preserve device attributes */ + flags |= (oflags IEEE80211_KEY_DEVICE); /* * If the hardware does not support the cipher then * fallback to a host-based implementation. @@ -359,10 +363,6 @@ ieee80211_crypto_newkey(struct ieee80211 key-wk_cipher = cip; /* XXX refcnt? */ key-wk_private = keyctx; } - /* -* Commit to requested usage so driver can see the flags. -*/ - key-wk_flags = flags; /* * Ask the driver for a key index if we don't have one. Modified: head/sys/net80211/ieee80211_crypto.h == --- head/sys/net80211/ieee80211_crypto.hTue Jul 21 19:25:25 2009 (r195811) +++ head/sys/net80211/ieee80211_crypto.hTue Jul 21 19:36:32 2009 (r195812) @@ -99,6 +99,8 @@ struct ieee80211_key { }; #defineIEEE80211_KEY_COMMON/* common flags passed in by apps */\ (IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV | IEEE80211_KEY_GROUP) +#defineIEEE80211_KEY_DEVICE/* flags owned by device driver */\ + (IEEE80211_KEY_DEVKEY|IEEE80211_KEY_CIPHER0|IEEE80211_KEY_CIPHER1) #defineIEEE80211_KEY_SWCRYPT \ (IEEE80211_KEY_SWENCRYPT | IEEE80211_KEY_SWDECRYPT) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r195784 - in head: sbin/ifconfig sys/net80211
Rui Paulo wrote: Author: rpaulo Date: Mon Jul 20 19:12:08 2009 New Revision: 195784 URL: http://svn.freebsd.org/changeset/base/195784 Log: More mesh bits, namely: * bridge support (sam) * handling of errors (sam) * deletion of inactive routing entries * more debug msgs (sam) * fixed some inconsistencies with the spec. * decap is now specific to mesh (sam) * print mesh seq. no. on ifconfig list mesh * small perf. improvements Note you can now build a MeshAP by doing something like: ifconfig wlan create wlandev ath0 wlanmode mesh ifconfig wlan create wlandev ath0 wlanmode ap ifconfig bridge create ifconfig bridge0 addm wlan0 addm wlan1 (+more config stuff...). Or you can use two devices if the driver doesn't support multi-bss. Similarly you can bridge mesh+wired to build a MeshPortal (modulo the mesh protocol bits). Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r195765 - head/sys/conf
Author: sam Date: Sun Jul 19 16:54:24 2009 New Revision: 195765 URL: http://svn.freebsd.org/changeset/base/195765 Log: add urtw Approved by: re (kib) Modified: head/sys/conf/files Modified: head/sys/conf/files == --- head/sys/conf/files Sun Jul 19 16:50:48 2009(r195764) +++ head/sys/conf/files Sun Jul 19 16:54:24 2009(r195765) @@ -1627,6 +1627,7 @@ dev/usb/net/usb_ethernet.c \ dev/usb/wlan/if_rum.c optional rum dev/usb/wlan/if_uath.c optional uath dev/usb/wlan/if_ural.c optional ural +dev/usb/wlan/if_urtw.c optional urtw dev/usb/wlan/if_zyd.c optional zyd # # USB serial and parallel port drivers ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r195757 - head/sys/net80211
Author: sam Date: Sat Jul 18 20:19:53 2009 New Revision: 195757 URL: http://svn.freebsd.org/changeset/base/195757 Log: Move code that does payload realigment to a new routine, ieee80211_realign, so it can be reused. While here rewrite the logic to always use a single mbuf. Reviewed by: rpaulo Approved by: re (kib) Modified: head/sys/net80211/ieee80211_freebsd.c head/sys/net80211/ieee80211_input.c head/sys/net80211/ieee80211_input.h head/sys/net80211/ieee80211_ioctl.h Modified: head/sys/net80211/ieee80211_freebsd.c == --- head/sys/net80211/ieee80211_freebsd.c Sat Jul 18 20:19:25 2009 (r195756) +++ head/sys/net80211/ieee80211_freebsd.c Sat Jul 18 20:19:53 2009 (r195757) @@ -53,6 +53,7 @@ __FBSDID($FreeBSD$); #include net/route.h #include net80211/ieee80211_var.h +#include net80211/ieee80211_input.h SYSCTL_NODE(_net, OID_AUTO, wlan, CTLFLAG_RD, 0, IEEE 80211 parameters); @@ -408,6 +409,43 @@ ieee80211_getmgtframe(uint8_t **frm, int return m; } +/* + * Re-align the payload in the mbuf. This is mainly used (right now) + * to handle IP header alignment requirements on certain architectures. + */ +struct mbuf * +ieee80211_realign(struct ieee80211vap *vap, struct mbuf *m, size_t align) +{ + int pktlen, space; + struct mbuf *n; + + pktlen = m-m_pkthdr.len; + space = pktlen + align; + if (space MINCLSIZE) + n = m_gethdr(M_DONTWAIT, MT_DATA); + else { + n = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, + space = MCLBYTES ? MCLBYTES : +#if MJUMPAGESIZE != MCLBYTES + space = MJUMPAGESIZE ? MJUMPAGESIZE : +#endif + space = MJUM9BYTES ? MJUM9BYTES : MJUM16BYTES); + } + if (__predict_true(n != NULL)) { + m_move_pkthdr(n, m); + n-m_data = (caddr_t)(ALIGN(n-m_data + align) - align); + m_copydata(m, 0, pktlen, mtod(n, caddr_t)); + n-m_len = pktlen; + } else { + IEEE80211_DISCARD(vap, IEEE80211_MSG_ANY, + mtod(m, const struct ieee80211_frame *), NULL, + %s, no mbuf to realign); + vap-iv_stats.is_rx_badalign++; + } + m_freem(m); + return n; +} + int ieee80211_add_callback(struct mbuf *m, void (*func)(struct ieee80211_node *, void *, int), void *arg) Modified: head/sys/net80211/ieee80211_input.c == --- head/sys/net80211/ieee80211_input.c Sat Jul 18 20:19:25 2009 (r195756) +++ head/sys/net80211/ieee80211_input.c Sat Jul 18 20:19:53 2009 (r195757) @@ -285,53 +285,9 @@ ieee80211_decap(struct ieee80211vap *vap } #ifdef ALIGNED_POINTER if (!ALIGNED_POINTER(mtod(m, caddr_t) + sizeof(*eh), uint32_t)) { - struct mbuf *n, *n0, **np; - caddr_t newdata; - int off, pktlen; - - n0 = NULL; - np = n0; - off = 0; - pktlen = m-m_pkthdr.len; - while (pktlen off) { - if (n0 == NULL) { - MGETHDR(n, M_DONTWAIT, MT_DATA); - if (n == NULL) { - m_freem(m); - return NULL; - } - M_MOVE_PKTHDR(n, m); - n-m_len = MHLEN; - } else { - MGET(n, M_DONTWAIT, MT_DATA); - if (n == NULL) { - m_freem(m); - m_freem(n0); - return NULL; - } - n-m_len = MLEN; - } - if (pktlen - off = MINCLSIZE) { - MCLGET(n, M_DONTWAIT); - if (n-m_flags M_EXT) - n-m_len = n-m_ext.ext_size; - } - if (n0 == NULL) { - newdata = - (caddr_t)ALIGN(n-m_data + sizeof(*eh)) - - sizeof(*eh); - n-m_len -= newdata - n-m_data; - n-m_data = newdata; - } - if (n-m_len pktlen - off) - n-m_len = pktlen - off; - m_copydata(m, off, n-m_len, mtod(n, caddr_t)); - off += n-m_len; - *np = n; - np = n-m_next; - } - m_freem(m); -
svn commit: r195746 - head/usr.sbin/wlandebug
Author: sam Date: Fri Jul 17 21:11:08 2009 New Revision: 195746 URL: http://svn.freebsd.org/changeset/base/195746 Log: add mesh support Submitted by: rpaulo Approved by: re (kib) Modified: head/usr.sbin/wlandebug/wlandebug.8 head/usr.sbin/wlandebug/wlandebug.c Modified: head/usr.sbin/wlandebug/wlandebug.8 == --- head/usr.sbin/wlandebug/wlandebug.8 Fri Jul 17 19:45:42 2009 (r195745) +++ head/usr.sbin/wlandebug/wlandebug.8 Fri Jul 17 21:11:08 2009 (r195746) @@ -24,7 +24,7 @@ .\ .\ $FreeBSD$ .\ -.Dd May 19, 2008 +.Dd July 17, 2009 .Dt WLANDEBUG 8 .Os .Sh NAME @@ -97,11 +97,8 @@ state machine operation. 802.11 power save operation; in hostap mode this enables copious information about buffered frames for stations operating in power save mode. -.It Ar dot1x -802.1x operation; not presently meaningful as 802.1x protocol -support is implemented in user mode by the -.Xr hostapd 8 -program. +.It Ar hwmp +trace operation of Hybrid Wireless Mesh Protocol processing. .It Ar dot1xsm 802.1x state machine operation; not presently meaningful as 802.1x protocol support is implemented in user mode by the @@ -119,13 +116,8 @@ not presently meaningful as 802.1x proto support is implemented in user mode by the .Xr hostapd 8 program. -.It Ar radkeys -include key contents when dumping packets exchanged with the -radius backend for 802.1x operation; -not presently meaningful as 802.1x protocol -support is implemented in user mode by the -.Xr hostapd 8 -program. +.It Ar mesh +trace operation of 802.11s mesh protocol processing. .It Ar wpa trace operation of the WPA protocol; only partly meaningful as WPA protocol Modified: head/usr.sbin/wlandebug/wlandebug.c == --- head/usr.sbin/wlandebug/wlandebug.c Fri Jul 17 19:45:42 2009 (r195745) +++ head/usr.sbin/wlandebug/wlandebug.c Fri Jul 17 21:11:08 2009 (r195746) @@ -61,11 +61,11 @@ const char *progname; #defineIEEE80211_MSG_OUTPUT0x0010 /* output handling */ #defineIEEE80211_MSG_STATE 0x0008 /* state machine */ #defineIEEE80211_MSG_POWER 0x0004 /* power save handling */ -#defineIEEE80211_MSG_DOT1X 0x0002 /* 802.1x authenticator */ +#defineIEEE80211_MSG_HWMP 0x0002 /* hybrid mesh protocol */ #defineIEEE80211_MSG_DOT1XSM 0x0001 /* 802.1x state machine */ #defineIEEE80211_MSG_RADIUS0x8000 /* 802.1x radius client */ #defineIEEE80211_MSG_RADDUMP 0x4000 /* dump 802.1x radius packets */ -#defineIEEE80211_MSG_RADKEYS 0x2000 /* dump 802.1x keys */ +#defineIEEE80211_MSG_MESH 0x2000 /* mesh networking */ #defineIEEE80211_MSG_WPA 0x1000 /* WPA/RSN protocol */ #defineIEEE80211_MSG_ACL 0x0800 /* ACL handling */ #defineIEEE80211_MSG_WME 0x0400 /* WME protocol */ @@ -97,11 +97,11 @@ static struct { { output, IEEE80211_MSG_OUTPUT }, { state, IEEE80211_MSG_STATE }, { power, IEEE80211_MSG_POWER }, - { dot1x, IEEE80211_MSG_DOT1X }, + { hwmp, IEEE80211_MSG_HWMP }, { dot1xsm,IEEE80211_MSG_DOT1XSM }, { radius, IEEE80211_MSG_RADIUS }, { raddump,IEEE80211_MSG_RADDUMP }, - { radkeys,IEEE80211_MSG_RADKEYS }, + { mesh, IEEE80211_MSG_MESH }, { wpa,IEEE80211_MSG_WPA }, { acl,IEEE80211_MSG_ACL }, { wme,IEEE80211_MSG_WME }, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r195709 - head/contrib/tcpdump
Author: sam Date: Wed Jul 15 13:50:06 2009 New Revision: 195709 URL: http://svn.freebsd.org/changeset/base/195709 Log: correct IEEE80211_RADIOTAP_XCHANNEL to match system Submitted by: Guy Harris Approved by: re (kib) Modified: head/contrib/tcpdump/ieee802_11_radio.h Modified: head/contrib/tcpdump/ieee802_11_radio.h == --- head/contrib/tcpdump/ieee802_11_radio.h Wed Jul 15 10:08:19 2009 (r195708) +++ head/contrib/tcpdump/ieee802_11_radio.h Wed Jul 15 13:50:06 2009 (r195709) @@ -193,7 +193,7 @@ enum ieee80211_radiotap_type { IEEE80211_RADIOTAP_ANTENNA = 11, IEEE80211_RADIOTAP_DB_ANTSIGNAL = 12, IEEE80211_RADIOTAP_DB_ANTNOISE = 13, - IEEE80211_RADIOTAP_XCHANNEL = 14, + IEEE80211_RADIOTAP_XCHANNEL = 18, IEEE80211_RADIOTAP_EXT = 31 }; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r195684 - head/contrib/tcpdump
Author: sam Date: Tue Jul 14 17:11:06 2009 New Revision: 195684 URL: http://svn.freebsd.org/changeset/base/195684 Log: Updates, mostly to add 802.11s support: o add missing Status and Reason codes o parse/display Action frames o parse/display Mesh data frames o parse/display BA frames Reviewed by: rpaulo Approved by: re (kib) Modified: head/contrib/tcpdump/ieee802_11.h head/contrib/tcpdump/print-802_11.c Modified: head/contrib/tcpdump/ieee802_11.h == --- head/contrib/tcpdump/ieee802_11.h Tue Jul 14 15:42:13 2009 (r195683) +++ head/contrib/tcpdump/ieee802_11.h Tue Jul 14 17:11:06 2009 (r195684) @@ -69,12 +69,13 @@ #defineST_DISASSOC 0xA #defineST_AUTH 0xB #defineST_DEAUTH 0xC -/* RESERVED0xD */ +#defineST_ACTION 0xD /* RESERVED0xE */ /* RESERVED0xF */ #defineCTRL_BAR0x8 +#defineCTRL_BA 0x9 #defineCTRL_PS_POLL0xA #defineCTRL_RTS0xB #defineCTRL_CTS0xC @@ -315,6 +316,15 @@ struct ctrl_end_ack_t { #defineCTRL_END_ACK_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\ IEEE802_11_RA_LEN+IEEE802_11_BSSID_LEN) +struct ctrl_ba_t { + u_int16_t fc; + u_int16_t duration; + u_int8_tra[6]; + u_int8_tfcs[4]; +}; + +#defineCTRL_BA_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+IEEE802_11_RA_LEN) + struct ctrl_bar_t { u_int16_t fc; u_int16_t dur; @@ -329,6 +339,15 @@ struct ctrl_bar_t { IEEE802_11_RA_LEN+IEEE802_11_TA_LEN+\ IEEE802_11_CTL_LEN+IEEE802_11_SEQ_LEN) +struct meshcntl_t { + u_int8_tflags; + u_int8_tttl; + u_int8_tseq[4]; + u_int8_taddr4[6]; + u_int8_taddr5[6]; + u_int8_taddr6[6]; +}; + #defineIV_IV(iv) ((iv) 0xFF) #defineIV_PAD(iv) (((iv) 24) 0x3F) #defineIV_KEYID(iv)(((iv) 30) 0x03) Modified: head/contrib/tcpdump/print-802_11.c == --- head/contrib/tcpdump/print-802_11.c Tue Jul 14 15:42:13 2009 (r195683) +++ head/contrib/tcpdump/print-802_11.c Tue Jul 14 17:11:06 2009 (r195684) @@ -121,41 +121,154 @@ static const char *auth_alg_text[]={Ope #define NUM_AUTH_ALGS (sizeof auth_alg_text / sizeof auth_alg_text[0]) static const char *status_text[] = { - Succesful, /* 0 */ - Unspecified failure, /* 1 */ - Reserved, /* 2 */ - Reserved, /* 3 */ - Reserved, /* 4 */ - Reserved, /* 5 */ - Reserved, /* 6 */ - Reserved, /* 7 */ - Reserved, /* 8 */ - Reserved, /* 9 */ - Cannot Support all requested capabilities in the Capability Information field, /* 10 */ - Reassociation denied due to inability to confirm that association exists, /* 11 */ - Association denied due to reason outside the scope of the standard, /* 12 */ - Responding station does not support the specified authentication algorithm ,/* 13 */ - Received an Authentication frame with authentication transaction \ - sequence number out of expected sequence, /* 14 */ - Authentication rejected because of challenge failure, /* 15 */ - Authentication rejected due to timeout waiting for next frame in sequence, /* 16 */ - Association denied because AP is unable to handle additional associated stations, /* 17 */ - Association denied due to requesting station not supporting all of the \ - data rates in BSSBasicRateSet parameter,/* 18 */ + Succesful,/* 0 */ + Unspecified failure, /* 1 */ + Reserved, /* 2 */ + Reserved, /* 3 */ + Reserved, /* 4 */ + Reserved, /* 5 */ + Reserved, /* 6 */ + Reserved, /* 7 */ + Reserved, /* 8 */ + Reserved, /* 9 */ + Cannot Support all requested capabilities in the Capability + Information field, /* 10 */ + Reassociation denied due to inability to
svn commit: r195644 - in head/usr.sbin/wpa: hostapd hostapd_cli wpa_cli wpa_passphrase wpa_supplicant
Author: sam Date: Sun Jul 12 19:58:52 2009 New Revision: 195644 URL: http://svn.freebsd.org/changeset/base/195644 Log: fix Jouni's email address Approved by: re (blanket) Modified: head/usr.sbin/wpa/hostapd/hostapd.8 head/usr.sbin/wpa/hostapd/hostapd.conf.5 head/usr.sbin/wpa/hostapd_cli/hostapd_cli.8 head/usr.sbin/wpa/wpa_cli/wpa_cli.8 head/usr.sbin/wpa/wpa_passphrase/wpa_passphrase.8 head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8 head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 Modified: head/usr.sbin/wpa/hostapd/hostapd.8 == --- head/usr.sbin/wpa/hostapd/hostapd.8 Sun Jul 12 19:20:55 2009 (r195643) +++ head/usr.sbin/wpa/hostapd/hostapd.8 Sun Jul 12 19:58:52 2009 (r195644) @@ -126,7 +126,7 @@ utility first appeared in The .Nm utility was written by -.An Jouni Malinen Aq jkmal...@cc.hut.fi . +.An Jouni Malinen Aq j...@w1.fi . This manual page is derived from the .Pa README file included in the Modified: head/usr.sbin/wpa/hostapd/hostapd.conf.5 == --- head/usr.sbin/wpa/hostapd/hostapd.conf.5Sun Jul 12 19:20:55 2009 (r195643) +++ head/usr.sbin/wpa/hostapd/hostapd.conf.5Sun Jul 12 19:58:52 2009 (r195644) @@ -207,4 +207,4 @@ and files in the .Nm hostapd distribution provided by -.An Jouni Malinen Aq jkmal...@cc.hut.fi . +.An Jouni Malinen Aq j...@w1.fi . Modified: head/usr.sbin/wpa/hostapd_cli/hostapd_cli.8 == --- head/usr.sbin/wpa/hostapd_cli/hostapd_cli.8 Sun Jul 12 19:20:55 2009 (r195643) +++ head/usr.sbin/wpa/hostapd_cli/hostapd_cli.8 Sun Jul 12 19:58:52 2009 (r195644) @@ -104,7 +104,7 @@ utility first appeared in The .Nm utility was written by -.An Jouni Malinen Aq jkmal...@cc.hut.fi . +.An Jouni Malinen Aq j...@w1.fi . This manual page is derived from the .Pa README file included in the Modified: head/usr.sbin/wpa/wpa_cli/wpa_cli.8 == --- head/usr.sbin/wpa/wpa_cli/wpa_cli.8 Sun Jul 12 19:20:55 2009 (r195643) +++ head/usr.sbin/wpa/wpa_cli/wpa_cli.8 Sun Jul 12 19:58:52 2009 (r195644) @@ -214,7 +214,7 @@ utility first appeared in The .Nm utility was written by -.An Jouni Malinen Aq jkmal...@cc.hut.fi . +.An Jouni Malinen Aq j...@w1.fi . This manual page is derived from the .Pa README file included in the Modified: head/usr.sbin/wpa/wpa_passphrase/wpa_passphrase.8 == --- head/usr.sbin/wpa/wpa_passphrase/wpa_passphrase.8 Sun Jul 12 19:20:55 2009(r195643) +++ head/usr.sbin/wpa/wpa_passphrase/wpa_passphrase.8 Sun Jul 12 19:58:52 2009(r195644) @@ -59,7 +59,7 @@ The .Nm utility was written by .An Jouni Malinen -.Aq jkmal...@cc.hut.fi . +.Aq j...@w1.fi . .Pp This manual page was written by .An Henrik Brix Andersen Modified: head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8 == --- head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8 Sun Jul 12 19:20:55 2009(r195643) +++ head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8 Sun Jul 12 19:58:52 2009(r195644) @@ -147,7 +147,7 @@ utility first appeared in The .Nm utility was written by -.An Jouni Malinen Aq jkmal...@cc.hut.fi . +.An Jouni Malinen Aq j...@w1.fi . This manual page is derived from the .Pa README file included in the Modified: head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 == --- head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 Sun Jul 12 19:20:55 2009(r195643) +++ head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 Sun Jul 12 19:58:52 2009(r195644) @@ -542,4 +542,4 @@ and files in the .Nm wpa_supplicant distribution provided by -.An Jouni Malinen Aq jkmal...@cc.hut.fi . +.An Jouni Malinen Aq j...@w1.fi . ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r195645 - head/share/man/man4
Author: sam Date: Sun Jul 12 20:17:31 2009 New Revision: 195645 URL: http://svn.freebsd.org/changeset/base/195645 Log: add IEEE80211_SCAN_REQ Approved by: re (blanket) Modified: head/share/man/man4/net80211.4 Modified: head/share/man/man4/net80211.4 == --- head/share/man/man4/net80211.4 Sun Jul 12 19:58:52 2009 (r195644) +++ head/share/man/man4/net80211.4 Sun Jul 12 20:17:31 2009 (r195645) @@ -1156,6 +1156,22 @@ Set the age (in seconds) that results fr considered valid. When scan results are no longer valid and they are needed (e.g. to roam) the system will initiate a scan operation to replenish the scan cache. +.It Dv IEEE80211_IOC_SCAN_REQ +Request a scan operation using the parameters pointed to by +.Va i_val . +The underlying device must be running or +.Er ENXIO +will be returned. +Values for +.Va sr_duration , +.Va sr_mindwell , +and +.Va sr_maxdwell +shorter than 1 clock tick are rounded up to a tick. +If more SSID's are supplied than the system is capable of handling +the extra ones are silently ignored. +If a scan operation is already in progress the request will be +(silently) ignored. .It Dv IEEE80211_IOC_SCAN_CANCEL Cancel any pending/active scan operation. .It Dv IEEE80211_IOC_SHORTGI ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r195630 - head/share/man/man4
Author: sam Date: Sun Jul 12 03:19:25 2009 New Revision: 195630 URL: http://svn.freebsd.org/changeset/base/195630 Log: first cut at documenting ioctl api's for net80211 (replaces mostly incorrect information) Approved by: re (blanket) Added: head/share/man/man4/net80211.4 (contents, props changed) Deleted: head/share/man/man4/ieee80211.4 Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileSun Jul 12 00:27:54 2009 (r195629) +++ head/share/man/man4/MakefileSun Jul 12 03:19:25 2009 (r195630) @@ -131,7 +131,6 @@ MAN=aac.4 \ icmp6.4 \ ida.4 \ idt.4 \ - ieee80211.4 \ ifmib.4 \ igb.4 \ igmp.4 \ @@ -216,6 +215,7 @@ MAN=aac.4 \ ncr.4 \ ncv.4 \ ${_ndis.4} \ + net80211.4 \ netgraph.4 \ netintro.4 \ ${_nfe.4} \ Added: head/share/man/man4/net80211.4 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/net80211.4 Sun Jul 12 03:19:25 2009 (r195630) @@ -0,0 +1,1302 @@ +.\- +.\ Copyright (c) 2009 Sam Leffler, Errno Consulting +.\ All rights reserved. +.\ +.\ Redistribution and use in source and binary forms, with or without +.\ modification, are permitted provided that the following conditions +.\ are met: +.\ 1. Redistributions of source code must retain the above copyright +.\notice, this list of conditions and the following disclaimer, +.\without modification. +.\ 2. Redistributions in binary form must reproduce at minimum a disclaimer +.\similar to the NO WARRANTY disclaimer below (Disclaimer) and any +.\redistribution must be conditioned upon including a substantially +.\similar Disclaimer requirement for further binary redistribution. +.\ +.\ NO WARRANTY +.\ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\ LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY +.\ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL +.\ THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, +.\ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +.\ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +.\ THE POSSIBILITY OF SUCH DAMAGES. +.\ +.\ $FreeBSD$ +.\ +.Dd July 10, 2009 +.Dt NET80211 4 +.Os +.Sh NAME +.Nm net80211 +.Nd standard interface to IEEE 802.11 devices +.Sh SYNOPSIS +.In sys/types.h +.In sys/socket.h +.In net/if.h +.In net/ethernet.h +.In net80211/ieee80211_ioctl.h +.Sh DESCRIPTION +This section describes the standard programming +interface to configure and retrieve status information +for IEEE 802.11 devices that depend on the +.Xr wlan 4 +module for operation. +The interface is via one +of the following +.Xr ioctl 2 +calls on a socket: +.Bl -tag -width .Dv SIOCG80211 +.It Dv SIOCG80211 +Get configuration or status information. +.It Dv SIOCS80211 +Set configuration information. +.El +.Pp +These requests are made via a modified +.Vt ifreq +structure. +This structure is defined as follows: +.Bd -literal +struct ieee80211req { + chari_name[IFNAMSIZ]; /* if_name, e.g. wi0 */ + u_int16_t i_type; /* req type */ + int16_t i_val; /* Index or simple value */ + int16_t i_len; /* Index or simple value */ + void*i_data;/* Extra data */ +}; +.Ed +.Pp +Requests that are not supported by the underlying device return +-1 and set the global variable errno to +.Er EOPNOTSUPP . +.Dv SIOCG80211 +requests that return data to an application place small values in +.Va i_val +or in a user-specified buffer pointed to by +.Va i_data . +When an indirect buffer is used +.Va i_len +specifies how large the indirect buffer is and on return it is set by the +system to the actual amount of data returned. +.Dv SIOCS80211 +requests use a similar scheme with data passed to the system taken either +from +.Va i_val +or an indirect buffer pointed to by +.Va i_data . +.Pp +For +.Dv SIOCG80211 +the following values of +.Va i_type +are valid: +.Bl -tag -width indent +.It Dv IEEE80211_IOC_AMPDU +Return whether or not AMPDU is enabled in +.Va i_val . +AMPDU is an aggregation scheme that is part of the 802.11n specification +and is used only when operating on an HT channel. +The value returned is one of: +0 (AMPDU disabled), +1 (AMPDU enabled
svn commit: r195561 - head/sys/net80211
Author: sam Date: Fri Jul 10 15:26:33 2009 New Revision: 195561 URL: http://svn.freebsd.org/changeset/base/195561 Log: mark struct ieee80211req_maclist packed so sizeof works as intended on arm; fixes list mac Approved by: re (kensmith) Modified: head/sys/net80211/ieee80211_ioctl.h Modified: head/sys/net80211/ieee80211_ioctl.h == --- head/sys/net80211/ieee80211_ioctl.h Fri Jul 10 14:15:53 2009 (r195560) +++ head/sys/net80211/ieee80211_ioctl.h Fri Jul 10 15:26:33 2009 (r195561) @@ -302,7 +302,7 @@ enum { struct ieee80211req_maclist { uint8_t ml_macaddr[IEEE80211_ADDR_LEN]; -}; +} __packed; /* * Set the active channel list by IEEE channel #: each channel ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r195527 - head/sys/net80211
Author: sam Date: Fri Jul 10 02:19:57 2009 New Revision: 195527 URL: http://svn.freebsd.org/changeset/base/195527 Log: correctly set the tailq ptr when removing the last item in the q Approved by: re (kensmith) Modified: head/sys/net80211/ieee80211_ageq.c Modified: head/sys/net80211/ieee80211_ageq.c == --- head/sys/net80211/ieee80211_ageq.c Fri Jul 10 02:15:59 2009 (r195526) +++ head/sys/net80211/ieee80211_ageq.c Fri Jul 10 02:19:57 2009 (r195527) @@ -211,7 +211,6 @@ ieee80211_ageq_remove(struct ieee80211_a /* * Remove from forward list; tail pointer is harder. */ - *prev = m-m_nextpkt; if (aq-aq_tail == m) { KASSERT(m-m_nextpkt == NULL, (not last)); if (aq-aq_head == m) { /* list empty */ @@ -223,6 +222,8 @@ ieee80211_ageq_remove(struct ieee80211_a offsetof(struct mbuf, m_nextpkt)); } } + *prev = m-m_nextpkt; + /* add to private list for return */ *phead = m; phead = m-m_nextpkt; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r195181 - in head/sys: nfsclient nfsserver
M. Warner Losh wrote: In message: 20090630051641.t22...@maildrop.int.zabbadoz.net bz0...@zabbadoz.net writes: : On Tue, 30 Jun 2009, John Baldwin wrote: : : Author: jhb : Date: Tue Jun 30 03:18:51 2009 : New Revision: 195181 : URL: http://svn.freebsd.org/changeset/base/195181 : : Log: : Fix build with NFS_LEGACYRPC enabled after the socket upcall locking : changes. : : is this really a good idea, considering that NFS_LEGACYRPC is on the : removal list for 8.0? : : Will it go or will it stay? I thought it was already (partly) gone? I thought it was still needed for a few embedded platforms... Misaligned access problems that hit arm and mips appear to be fixed. Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r195200 - in head/usr.sbin: . wake
Marc Balmer wrote: Am 30.06.2009 um 21:07 schrieb Sam Leffler: Martin Blapp wrote: Author: mbr Date: Tue Jun 30 18:51:22 2009 New Revision: 195200 URL: http://svn.freebsd.org/changeset/base/195200 Log: Add wake, a tool to send Wake on LAN frames to hosts on a local Ethernet network Submitted by: Marc Balmer m...@msys.ch Reviewed by:rwatson Approved by:re what's wrong with ports/net/wol? wake(8) is smaller and it is actually something needed in base. in modern, ecological green computing environments we put the client machines, like our POS terminals to sleep at night. In the morning, a cronjob from the central server wakes up all machines using this command. more and more systems support it, so havin a wake command in base is just about right. The typical way things happen in freebsd is we promote tools from ports when they are deemed needed in the base system. In fact it's probably more important to have the tool in base remain compatible with what users have had in their tree (via ports). I have yet to hear a compelling argument for why wake was chosen over an existing tool that's been successfully used for a while. OTOH this isn't something that'll keep me up at night; it just seems like an ill-advised rush job that completely violates the intent of the 8.0 code freeze.. Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r195200 - in head/usr.sbin: . wake
Marc Balmer wrote: Am 30.06.2009 um 21:36 schrieb M. Warner Losh: wake really is too generic a name for this. Why didn't the wol port get committed anyway, it seems to be better than this... wake is a short, mnemonic and imperative name that describes what the command does. It is exactly the same command as in NetBSD. And you're conveniently ignoring the discussion that took place after the netbsd drive-by. Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r195114 - in head/sys/dev/ath: . ath_hal ath_hal/ar5212 ath_hal/ar5416
Author: sam Date: Sat Jun 27 20:06:56 2009 New Revision: 195114 URL: http://svn.freebsd.org/changeset/base/195114 Log: Add HAL_RX_FILTER_BSSID support (to disable bssid match): o add HAL_CAP_BSSIDMATCH to identify parts that have the support for disabling bssid match o honor capability for set/get rx filter o use HAL_CAP_BSSIDMATCH in driver to decide whether to use the bssid match disable or fall back to promisc mode Reviewed by: rpaulo Approved by: re (rwatson) Modified: head/sys/dev/ath/ath_hal/ah.c head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/ath_hal/ah_internal.h head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/ath_hal/ah.c == --- head/sys/dev/ath/ath_hal/ah.c Sat Jun 27 19:57:55 2009 (r195113) +++ head/sys/dev/ath/ath_hal/ah.c Sat Jun 27 20:06:56 2009 (r195114) @@ -503,6 +503,8 @@ ath_hal_getcapability(struct ath_hal *ah case HAL_CAP_INTRMASK: /* mask of supported interrupts */ *result = pCap-halIntrMask; return HAL_OK; + case HAL_CAP_BSSIDMATCH:/* hardware has disable bssid match */ + return pCap-halBssidMatchSupport ? HAL_OK : HAL_ENOTSUPP; default: return HAL_EINVAL; } Modified: head/sys/dev/ath/ath_hal/ah.h == --- head/sys/dev/ath/ath_hal/ah.h Sat Jun 27 19:57:55 2009 (r195113) +++ head/sys/dev/ath/ath_hal/ah.h Sat Jun 27 20:06:56 2009 (r195114) @@ -110,6 +110,7 @@ typedef enum { HAL_CAP_BB_HANG = 35, /* can baseband hang */ HAL_CAP_MAC_HANG= 36, /* can MAC hang */ HAL_CAP_INTRMASK= 37, /* bitmask of supported interrupts */ + HAL_CAP_BSSIDMATCH = 38, /* hardware has disable bssid match */ } HAL_CAPABILITY_TYPE; /* @@ -296,6 +297,7 @@ typedef enum { HAL_RX_FILTER_PHYERR= 0x0100, /* Allow phy errors */ HAL_RX_FILTER_PHYRADAR = 0x0200, /* Allow phy radar errors */ HAL_RX_FILTER_COMPBAR = 0x0400, /* Allow compressed BAR */ + HAL_RX_FILTER_BSSID = 0x0800, /* Disable BSSID match */ } HAL_RX_FILTER; typedef enum { Modified: head/sys/dev/ath/ath_hal/ah_internal.h == --- head/sys/dev/ath/ath_hal/ah_internal.h Sat Jun 27 19:57:55 2009 (r195113) +++ head/sys/dev/ath/ath_hal/ah_internal.h Sat Jun 27 20:06:56 2009 (r195114) @@ -193,7 +193,8 @@ typedef struct { halExtChanDfsSupport: 1, halForcePpmSupport : 1, halEnhancedPmSupport: 1, - halMbssidAggrSupport: 1; + halMbssidAggrSupport: 1, + halBssidMatchSupport: 1; uint32_thalWirelessModes; uint16_thalTotalQueues; uint16_thalKeyCacheSize; Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c == --- head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Sat Jun 27 19:57:55 2009(r195113) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Sat Jun 27 20:06:56 2009(r195114) @@ -833,11 +833,15 @@ ar5212FillCapabilityInfo(struct ath_hal ahpriv-ah_rxornIsFatal = (AH_PRIVATE(ah)-ah_macVersion AR_SREV_VERSION_VENICE); - /* h/w phy counters first appeared in Hainan */ - pCap-halHwPhyCounterSupport = - (AH_PRIVATE(ah)-ah_macVersion == AR_SREV_VERSION_VENICE + /* enable features that first appeared in Hainan */ + if ((AH_PRIVATE(ah)-ah_macVersion == AR_SREV_VERSION_VENICE AH_PRIVATE(ah)-ah_macRev == AR_SREV_HAINAN) || - AH_PRIVATE(ah)-ah_macVersion AR_SREV_VERSION_VENICE; + AH_PRIVATE(ah)-ah_macVersion AR_SREV_VERSION_VENICE) { + /* h/w phy counters */ + pCap-halHwPhyCounterSupport = AH_TRUE; + /* bssid match disable */ + pCap-halBssidMatchSupport = AH_TRUE; + } pCap-halTstampPrecision = 15; pCap-halIntrMask = HAL_INT_COMMON Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c == --- head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Sat Jun 27 19:57:55 2009(r195113) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Sat Jun 27 20:06:56 2009(r195114) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR
svn commit: r194983 - head/sys/arm/conf
Author: sam Date: Thu Jun 25 18:07:19 2009 New Revision: 194983 URL: http://svn.freebsd.org/changeset/base/194983 Log: temporarily disable optional uarts; apparently we hang when probing them (and they are not present) Modified: head/sys/arm/conf/CAMBRIA.hints Modified: head/sys/arm/conf/CAMBRIA.hints == --- head/sys/arm/conf/CAMBRIA.hints Thu Jun 25 17:46:52 2009 (r194982) +++ head/sys/arm/conf/CAMBRIA.hints Thu Jun 25 18:07:19 2009 (r194983) @@ -14,16 +14,16 @@ hint.uart.0.ier_rxbits=0x5d # NB: need U # NB: no UART1 on ixp435 # optional GPS serial port -hint.uart.1.at=ixp0 -hint.uart.1.addr=0x53fc -hint.uart.1.irq=20 -hint.uart.1.ier_rxbits=0x1 -hint.uart.1.rclk=1843200 +#hint.uart.1.at=ixp0 +#hint.uart.1.addr=0x53fc +#hint.uart.1.irq=20 +#hint.uart.1.ier_rxbits=0x1 +#hint.uart.1.rclk=1843200 # optional RS485 serial port -hint.uart.2.at=ixp0 -hint.uart.2.addr=0x53f8 -hint.uart.2.irq=21 -hint.uart.2.rclk=1843200 +#hint.uart.2.at=ixp0 +#hint.uart.2.addr=0x53f8 +#hint.uart.2.irq=21 +#hint.uart.2.rclk=1843200 # NPE Hardware Queue Manager hint.ixpqmgr.0.at=ixp0 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r194872 - head/tools/tools/ath/athpoke
Author: sam Date: Wed Jun 24 18:24:20 2009 New Revision: 194872 URL: http://svn.freebsd.org/changeset/base/194872 Log: read back the written value and display Modified: head/tools/tools/ath/athpoke/athpoke.c Modified: head/tools/tools/ath/athpoke/athpoke.c == --- head/tools/tools/ath/athpoke/athpoke.c Wed Jun 24 18:21:37 2009 (r194871) +++ head/tools/tools/ath/athpoke/athpoke.c Wed Jun 24 18:24:20 2009 (r194872) @@ -105,8 +105,7 @@ main(int argc, char *argv[]) reg = (dr != NULL) ? dr-addr : (uint32_t) strtoul(argv[0], NULL, 0); if (cp != NULL) regwrite(s, atd, reg, (uint32_t) strtoul(cp, NULL, 0)); - else - printf(%s = %08x\n, argv[0], regread(s, atd, reg)); + printf(%s = %08x\n, argv[0], regread(s, atd, reg)); } return 0; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r194873 - head/tools/tools/ath/athpoke
Author: sam Date: Wed Jun 24 18:24:37 2009 New Revision: 194873 URL: http://svn.freebsd.org/changeset/base/194873 Log: add a link named athpeek since my fingers keep typing it Modified: head/tools/tools/ath/athpoke/Makefile Modified: head/tools/tools/ath/athpoke/Makefile == --- head/tools/tools/ath/athpoke/Makefile Wed Jun 24 18:24:20 2009 (r194872) +++ head/tools/tools/ath/athpoke/Makefile Wed Jun 24 18:24:37 2009 (r194873) @@ -1,6 +1,7 @@ # $FreeBSD$ PROG= athpoke +LINKS= ${BINDIR}/${PROG} ${BINDIR}/athpeek .PATH.c: ${.CURDIR}/../common ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r194909 - head/sys/dev/mxge
Andrew Gallatin wrote: Author: gallatin Date: Wed Jun 24 21:09:56 2009 New Revision: 194909 URL: http://svn.freebsd.org/changeset/base/194909 Log: Add a dying flag to prevent races at detach. I tried re-ordering ether_ifdetach(), but this created a new race where sometimes, when under heavy receive load (1Mpps) and running tcpdump, the machine would panic. At panic, the ithread was still in the original (not dead) if_input() path, and was accessing stale BPF data structs. By using a dying flag, I can close the interface prior to if_detach() to be certain the interface cannot send packets up in the middle of ether_ifdetach. There's something else wrong. This is just covering up the real bug. Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r194752 - head/sys/arm/xscale/ixp425
Author: sam Date: Tue Jun 23 19:05:02 2009 New Revision: 194752 URL: http://svn.freebsd.org/changeset/base/194752 Log: use consistent style Modified: head/sys/arm/xscale/ixp425/ixp425.c Modified: head/sys/arm/xscale/ixp425/ixp425.c == --- head/sys/arm/xscale/ixp425/ixp425.c Tue Jun 23 19:04:25 2009 (r194751) +++ head/sys/arm/xscale/ixp425/ixp425.c Tue Jun 23 19:05:02 2009 (r194752) @@ -247,7 +247,7 @@ arm_get_next_irq(int last) last += 1; /* always advance fwd, NB: handles -1 */ if (last 32) { mask = ixp425_irq_read() last; - for (; mask != 0; mask = 1, last += 1) { + for (; mask != 0; mask = 1, last++) { if (mask 1) return last; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r194753 - head/sys/arm/xscale/ixp425
Author: sam Date: Tue Jun 23 19:29:23 2009 New Revision: 194753 URL: http://svn.freebsd.org/changeset/base/194753 Log: Now that we have UARTs running with fast interrupt handlers the ata driver's i/o ops must be locked to avoid chaos. Extend the cambria bus tag to support ata and add a spin lock. The ata driver is hacked to use that instead of it's builtin hack for ixp425. Once the ata driver is fixed to not be confused about byte order we can generalize the cambria bus tag code and make it generally useful. While here take advantage of our being ixp435-specific to remove delays when switching between byte+word accesses and to eliminate the 2us delay for the uarts (the spin lock overhead looks to do this for us). Modified: head/sys/arm/xscale/ixp425/avila_ata.c head/sys/arm/xscale/ixp425/cambria_exp_space.c Modified: head/sys/arm/xscale/ixp425/avila_ata.c == --- head/sys/arm/xscale/ixp425/avila_ata.c Tue Jun 23 19:05:02 2009 (r194752) +++ head/sys/arm/xscale/ixp425/avila_ata.c Tue Jun 23 19:29:23 2009 (r194753) @@ -119,7 +119,7 @@ ata_getconfig(struct ixp425_softc *sa) /* XXX honor hint? (but then no multi-board support) */ /* XXX total hack */ - if ((cpu_id() CPU_ID_CPU_MASK) == CPU_ID_IXP435) + if (cpu_is_ixp43x()) return configs[1]; /* Cambria */ if (EXP_BUS_READ_4(sa, EXP_TIMING_CS2_OFFSET) != 0) return configs[0]; /* Avila */ @@ -191,31 +191,41 @@ ata_avila_attach(device_t dev) __func__, config-basealt, config-sizealt); sc-sc_16bit_off = config-off16; - /* -* Craft special resource for ATA bus space ops -* that go through the expansion bus and require -* special hackery to ena/dis 16-bit operations. -* -* XXX probably should just make this generic for -* accessing the expansion bus. -*/ - sc-sc_expbus_tag.bs_cookie = sc; /* NB: backpointer */ - /* read single */ - sc-sc_expbus_tag.bs_r_1= ata_bs_r_1, - sc-sc_expbus_tag.bs_r_2= ata_bs_r_2, - /* read multiple */ - sc-sc_expbus_tag.bs_rm_2 = ata_bs_rm_2, - sc-sc_expbus_tag.bs_rm_2_s = ata_bs_rm_2_s, - /* write (single) */ - sc-sc_expbus_tag.bs_w_1= ata_bs_w_1, - sc-sc_expbus_tag.bs_w_2= ata_bs_w_2, - /* write multiple */ - sc-sc_expbus_tag.bs_wm_2 = ata_bs_wm_2, - sc-sc_expbus_tag.bs_wm_2_s = ata_bs_wm_2_s, - - rman_set_bustag(sc-sc_ata, sc-sc_expbus_tag); + if (config-base16 != CAMBRIA_CFSEL0_HWBASE) { + /* +* Craft special resource for ATA bus space ops +* that go through the expansion bus and require +* special hackery to ena/dis 16-bit operations. +* +* XXX probably should just make this generic for +* accessing the expansion bus. +*/ + sc-sc_expbus_tag.bs_cookie = sc; /* NB: backpointer */ + /* read single */ + sc-sc_expbus_tag.bs_r_1= ata_bs_r_1, + sc-sc_expbus_tag.bs_r_2= ata_bs_r_2, + /* read multiple */ + sc-sc_expbus_tag.bs_rm_2 = ata_bs_rm_2, + sc-sc_expbus_tag.bs_rm_2_s = ata_bs_rm_2_s, + /* write (single) */ + sc-sc_expbus_tag.bs_w_1= ata_bs_w_1, + sc-sc_expbus_tag.bs_w_2= ata_bs_w_2, + /* write multiple */ + sc-sc_expbus_tag.bs_wm_2 = ata_bs_wm_2, + sc-sc_expbus_tag.bs_wm_2_s = ata_bs_wm_2_s, + + rman_set_bustag(sc-sc_ata, sc-sc_expbus_tag); + rman_set_bustag(sc-sc_alt_ata, sc-sc_expbus_tag); + } else { + /* +* On Cambria use the shared CS3 expansion bus tag +* that handles interlock for sharing access with the +* optional UART's. +*/ + rman_set_bustag(sc-sc_ata, cambria_exp_bs_tag); + rman_set_bustag(sc-sc_alt_ata, cambria_exp_bs_tag); + } rman_set_bushandle(sc-sc_ata, sc-sc_ioh); - rman_set_bustag(sc-sc_alt_ata, sc-sc_expbus_tag); rman_set_bushandle(sc-sc_alt_ata, sc-sc_alt_ioh); ixp425_set_gpio(sa, config-gpin, GPIO_TYPE_EDG_RISING); Modified: head/sys/arm/xscale/ixp425/cambria_exp_space.c == --- head/sys/arm/xscale/ixp425/cambria_exp_space.c Tue Jun 23 19:05:02 2009(r194752) +++ head/sys/arm/xscale/ixp425/cambria_exp_space.c Tue Jun 23 19:29:23 2009(r194753) @@ -23,8 +23,16 @@ */ /* - * Hack bus space tag for slow devices on the
svn commit: r194648 - head/sys/arm/xscale/ixp425
Author: sam Date: Mon Jun 22 20:30:02 2009 New Revision: 194648 URL: http://svn.freebsd.org/changeset/base/194648 Log: make type use consistent Modified: head/sys/arm/xscale/ixp425/ixp425.c Modified: head/sys/arm/xscale/ixp425/ixp425.c == --- head/sys/arm/xscale/ixp425/ixp425.c Mon Jun 22 20:24:03 2009 (r194647) +++ head/sys/arm/xscale/ixp425/ixp425.c Mon Jun 22 20:30:02 2009 (r194648) @@ -113,7 +113,7 @@ static const uint8_t int2gpio[32] __attr 0xff, 0xff /* INT#30 - INT#31 */ }; -static __inline u_int32_t +static __inline uint32_t ixp425_irq2gpio_bit(int irq) { return (1U int2gpio[irq]); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r194649 - head/sys/arm/xscale/ixp425
Author: sam Date: Mon Jun 22 20:31:06 2009 New Revision: 194649 URL: http://svn.freebsd.org/changeset/base/194649 Log: swap order in ddb show gpio printf Modified: head/sys/arm/xscale/ixp425/ixp425.c Modified: head/sys/arm/xscale/ixp425/ixp425.c == --- head/sys/arm/xscale/ixp425/ixp425.c Mon Jun 22 20:30:02 2009 (r194648) +++ head/sys/arm/xscale/ixp425/ixp425.c Mon Jun 22 20:31:06 2009 (r194649) @@ -139,8 +139,8 @@ DB_SHOW_COMMAND(gpio, db_show_gpio) uint32_t gpit2r = GPIO_CONF_READ_4(ixp425_softc, IXP425_GPIO_GPIT2R); int i, j; - db_printf(GPOUTR %08x GPOER %08x GPINR %08x GPISR %08x\n, - gpoutr, gpoer, gpinr, + db_printf(GPOUTR %08x GPINR %08x GPOER %08x GPISR %08x\n, + gpoutr, gpinr, gpoer, GPIO_CONF_READ_4(ixp425_softc, IXP425_GPIO_GPISR)); db_printf(GPIT1R %08x GPIT2R %08x GPCLKR %08x\n, gpit1r, gpit2r, GPIO_CONF_READ_4(ixp425_softc, IXP425_GPIO_GPCLKR)); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r194650 - head/sys/arm/xscale/ixp425
Author: sam Date: Mon Jun 22 20:33:59 2009 New Revision: 194650 URL: http://svn.freebsd.org/changeset/base/194650 Log: move logic to ACK a GPIO to a separate function Modified: head/sys/arm/xscale/ixp425/ixp425.c Modified: head/sys/arm/xscale/ixp425/ixp425.c == --- head/sys/arm/xscale/ixp425/ixp425.c Mon Jun 22 20:31:06 2009 (r194649) +++ head/sys/arm/xscale/ixp425/ixp425.c Mon Jun 22 20:33:59 2009 (r194650) @@ -159,6 +159,14 @@ DB_SHOW_COMMAND(gpio, db_show_gpio) } #endif +static __inline void +ixp425_gpio_ack(int irq) +{ + if (irq 32 ((1 irq) IXP425_INT_GPIOMASK)) + IXPREG(IXP425_GPIO_VBASE + IXP425_GPIO_GPISR) = + ixp425_irq2gpio_bit(irq); +} + void arm_mask_irq(uintptr_t nb) { @@ -174,9 +182,7 @@ arm_mask_irq(uintptr_t nb) } restore_interrupts(i); /*XXX; If it's a GPIO interrupt, ACK it know. Can it be a problem ?*/ - if (nb 32 ((1 nb) IXP425_INT_GPIOMASK)) - IXPREG(IXP425_GPIO_VBASE + IXP425_GPIO_GPISR) = - ixp425_irq2gpio_bit(nb); + ixp425_gpio_ack(nb); } void ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r194651 - head/sys/arm/xscale/ixp425
Author: sam Date: Mon Jun 22 20:34:50 2009 New Revision: 194651 URL: http://svn.freebsd.org/changeset/base/194651 Log: kill stray whitespace Modified: head/sys/arm/xscale/ixp425/ixp425.c Modified: head/sys/arm/xscale/ixp425/ixp425.c == --- head/sys/arm/xscale/ixp425/ixp425.c Mon Jun 22 20:33:59 2009 (r194650) +++ head/sys/arm/xscale/ixp425/ixp425.c Mon Jun 22 20:34:50 2009 (r194651) @@ -171,7 +171,7 @@ void arm_mask_irq(uintptr_t nb) { int i; - + i = disable_interrupts(I32_bit); if (nb 32) { intr_enabled = ~(1 nb); @@ -189,7 +189,7 @@ void arm_unmask_irq(uintptr_t nb) { int i; - + i = disable_interrupts(I32_bit); if (nb 32) { intr_enabled |= (1 nb); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r194652 - head/sys/arm/xscale/ixp425
Author: sam Date: Mon Jun 22 20:36:22 2009 New Revision: 194652 URL: http://svn.freebsd.org/changeset/base/194652 Log: rewrite arm_get_next_irq to always make forward progress (should be optimized) Modified: head/sys/arm/xscale/ixp425/ixp425.c Modified: head/sys/arm/xscale/ixp425/ixp425.c == --- head/sys/arm/xscale/ixp425/ixp425.c Mon Jun 22 20:34:50 2009 (r194651) +++ head/sys/arm/xscale/ixp425/ixp425.c Mon Jun 22 20:36:22 2009 (r194652) @@ -214,15 +214,27 @@ ixp435_irq_read(void) } int -arm_get_next_irq(int last __unused) +arm_get_next_irq(int last) { - uint32_t irq; + uint32_t mask; - if ((irq = ixp425_irq_read())) - return (ffs(irq) - 1); - if (cpu_is_ixp43x() (irq = ixp435_irq_read())) - return (32 + ffs(irq) - 1); - return (-1); + last += 1; /* always advance fwd, NB: handles -1 */ + if (last 32) { + mask = ixp425_irq_read() last; + for (; mask != 0; mask = 1, last += 1) { + if (mask 1) + return last; + } + last = 32; + } + if (cpu_is_ixp43x()) { + mask = ixp435_irq_read() (32-last); + for (; mask != 0; mask = 1, last++) { + if (mask 1) + return last; + } + } + return -1; } void ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r194653 - head/sys/arm/xscale/ixp425
Author: sam Date: Mon Jun 22 20:38:55 2009 New Revision: 194653 URL: http://svn.freebsd.org/changeset/base/194653 Log: add ixp425_set_gpio to program the gpio interrupt type Modified: head/sys/arm/xscale/ixp425/avila_ata.c head/sys/arm/xscale/ixp425/ixp425.c head/sys/arm/xscale/ixp425/ixp425var.h Modified: head/sys/arm/xscale/ixp425/avila_ata.c == --- head/sys/arm/xscale/ixp425/avila_ata.c Mon Jun 22 20:36:22 2009 (r194652) +++ head/sys/arm/xscale/ixp425/avila_ata.c Mon Jun 22 20:38:55 2009 (r194653) @@ -218,16 +218,7 @@ ata_avila_attach(device_t dev) rman_set_bustag(sc-sc_alt_ata, sc-sc_expbus_tag); rman_set_bushandle(sc-sc_alt_ata, sc-sc_alt_ioh); - GPIO_CONF_WRITE_4(sa, IXP425_GPIO_GPOER, - GPIO_CONF_READ_4(sa, IXP425_GPIO_GPOER) | (1config-gpin)); - /* set interrupt type */ - GPIO_CONF_WRITE_4(sa, GPIO_TYPE_REG(config-gpin), - (GPIO_CONF_READ_4(sa, GPIO_TYPE_REG(config-gpin)) ~ -GPIO_TYPE(config-gpin, GPIO_TYPE_MASK)) | -GPIO_TYPE(config-gpin, GPIO_TYPE_EDG_RISING)); - - /* clear ISR */ - GPIO_CONF_WRITE_4(sa, IXP425_GPIO_GPISR, (1config-gpin)); + ixp425_set_gpio(sa, config-gpin, GPIO_TYPE_EDG_RISING); /* configure CS1/3 window, leaving timing unchanged */ EXP_BUS_WRITE_4(sc, sc-sc_16bit_off, Modified: head/sys/arm/xscale/ixp425/ixp425.c == --- head/sys/arm/xscale/ixp425/ixp425.c Mon Jun 22 20:36:22 2009 (r194652) +++ head/sys/arm/xscale/ixp425/ixp425.c Mon Jun 22 20:38:55 2009 (r194653) @@ -159,6 +159,25 @@ DB_SHOW_COMMAND(gpio, db_show_gpio) } #endif +void +ixp425_set_gpio(struct ixp425_softc *sc, int pin, int type) +{ + uint32_t gpiotr = GPIO_CONF_READ_4(sc, GPIO_TYPE_REG(pin)); + + /* clear interrupt type */ + GPIO_CONF_WRITE_4(sc, GPIO_TYPE_REG(pin), + gpiotr ~ GPIO_TYPE(pin, GPIO_TYPE_MASK)); + /* clear any pending interrupt */ + GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPISR, (1pin)); + /* set new interrupt type */ + GPIO_CONF_WRITE_4(sc, GPIO_TYPE_REG(pin), + gpiotr | GPIO_TYPE(pin, type)); + + /* configure gpio line as an input */ + GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOER, + GPIO_CONF_READ_4(sc, IXP425_GPIO_GPOER) | (1pin)); +} + static __inline void ixp425_gpio_ack(int irq) { Modified: head/sys/arm/xscale/ixp425/ixp425var.h == --- head/sys/arm/xscale/ixp425/ixp425var.h Mon Jun 22 20:36:22 2009 (r194652) +++ head/sys/arm/xscale/ixp425/ixp425var.h Mon Jun 22 20:38:55 2009 (r194653) @@ -65,6 +65,8 @@ struct ixp425_softc { bus_dma_tag_t sc_dmat; }; +void ixp425_set_gpio(struct ixp425_softc *sc, int pin, int type); + struct ixppcib_softc { device_tsc_dev; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r194654 - head/sys/arm/xscale/ixp425
Author: sam Date: Mon Jun 22 20:41:02 2009 New Revision: 194654 URL: http://svn.freebsd.org/changeset/base/194654 Log: map the optional GPS and RS485 uart's on the Gateworks Cambria board (may want to make these conditional) Modified: head/sys/arm/xscale/ixp425/avila_machdep.c head/sys/arm/xscale/ixp425/ixp425reg.h Modified: head/sys/arm/xscale/ixp425/avila_machdep.c == --- head/sys/arm/xscale/ixp425/avila_machdep.c Mon Jun 22 20:38:55 2009 (r194653) +++ head/sys/arm/xscale/ixp425/avila_machdep.c Mon Jun 22 20:41:02 2009 (r194654) @@ -183,14 +183,9 @@ static const struct pmap_devmap ixp435_d { IXP425_IO_VBASE, IXP425_IO_HWBASE, IXP425_IO_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, - /* Expansion Bus */ { IXP425_EXP_VBASE, IXP425_EXP_HWBASE, IXP425_EXP_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, - /* CFI Flash on the Expansion Bus */ -{ IXP425_EXP_BUS_CS0_VBASE, IXP425_EXP_BUS_CS0_HWBASE, - IXP425_EXP_BUS_CS0_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, - /* IXP425 PCI Configuration */ { IXP425_PCI_VBASE, IXP425_PCI_HWBASE, IXP425_PCI_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, @@ -207,6 +202,10 @@ static const struct pmap_devmap ixp435_d { IXP425_QMGR_VBASE, IXP425_QMGR_HWBASE, IXP425_QMGR_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + /* CFI Flash on the Expansion Bus */ +{ IXP425_EXP_BUS_CS0_VBASE, IXP425_EXP_BUS_CS0_HWBASE, + IXP425_EXP_BUS_CS0_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + /* USB1 Memory Space */ { IXP435_USB1_VBASE, IXP435_USB1_HWBASE, IXP435_USB1_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, @@ -214,6 +213,14 @@ static const struct pmap_devmap ixp435_d { IXP435_USB2_VBASE, IXP435_USB2_HWBASE, IXP435_USB2_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + /* GPS Memory Space */ +{ CAMBRIA_GPS_VBASE, CAMBRIA_GPS_HWBASE, CAMBRIA_GPS_SIZE, + VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + + /* RS485 Memory Space */ +{ CAMBRIA_RS485_VBASE, CAMBRIA_RS485_HWBASE, CAMBRIA_RS485_SIZE, + VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + { 0 } }; @@ -456,8 +463,8 @@ initarm(void *arg, void *arg2) phys_avail[i++] = PHYSADDR; phys_avail[i++] = PHYSADDR + PAGE_SIZE; /* *XXX: Gross hack to get our -* pages in the vm_page_array -. */ +* pages in the vm_page_array. +*/ #endif phys_avail[i++] = round_page(virtual_avail - KERNBASE + PHYSADDR); phys_avail[i++] = trunc_page(PHYSADDR + memsize - 1); Modified: head/sys/arm/xscale/ixp425/ixp425reg.h == --- head/sys/arm/xscale/ixp425/ixp425reg.h Mon Jun 22 20:38:55 2009 (r194653) +++ head/sys/arm/xscale/ixp425/ixp425reg.h Mon Jun 22 20:41:02 2009 (r194654) @@ -88,10 +88,10 @@ * SDRAM/DDR Memory Controller * F020 --- IXP425_MCU_VBASE * - * EHCI USB 2 (IXP435) - * F001 D000 --- IXP435_USB2_VBASE - * EHCI USB 1 (IXP435) - * F001 C000 --- IXP435_USB1_VBASE + * F001 F000 RS485 (Cambria)CAMBRIA_RS485_VBASE + * F001 E000 GPS (Cambria) CAMBRIA_GPS_VBASE + * F001 D000 EHCI USB 2 (IXP435)IXP435_USB2_VBASE + * F001 C000 EHCI USB 1 (IXP435)IXP435_USB1_VBASE * Queue manager * F001 8000 --- IXP425_QMGR_VBASE * PCI Configuration and Status @@ -686,10 +686,22 @@ /* * IXP435/Gateworks Cambria */ +#define IXP435_USB1_HWBASE 0xCD00UL/* USB host controller 1 */ +#define IXP435_USB1_VBASE 0xF001C000UL +#define IXP435_USB1_SIZE 0x1000 /* NB: only uses 0x300 */ + +#define IXP435_USB2_HWBASE 0xCE00UL/* USB host controller 2 */ +#define IXP435_USB2_VBASE 0xF001D000UL +#define IXP435_USB2_SIZE 0x1000 /* NB: only uses 0x300 */ + #defineCAMBRIA_GPS_HWBASE 0x53FCUL/* optional GPS Serial Port */ -#defineCAMBRIA_GPS_SIZE0x4 +#defineCAMBRIA_GPS_VBASE 0xF001E000UL +#defineCAMBRIA_GPS_SIZE0x1000 #defineCAMBRIA_RS485_HWBASE0x53F8UL/* optional RS485 Serial Port */ -#defineCAMBRIA_RS485_SIZE 0x4 +#defineCAMBRIA_RS485_VBASE 0xF001F000UL +#defineCAMBRIA_RS485_SIZE 0x1000 + +/* NB: these are mapped on the fly, so no fixed virtual addresses */ #defineCAMBRIA_OCTAL_LED_HWBASE 0x53F4UL /* Octal Status LED Latch */ #define
svn commit: r194655 - head/sys/arm/xscale/ixp425
Author: sam Date: Mon Jun 22 20:42:28 2009 New Revision: 194655 URL: http://svn.freebsd.org/changeset/base/194655 Log: always define Cambria GPS+RS485 mappings as they are no longer conditional Modified: head/sys/arm/xscale/ixp425/ixp425.c Modified: head/sys/arm/xscale/ixp425/ixp425.c == --- head/sys/arm/xscale/ixp425/ixp425.c Mon Jun 22 20:41:02 2009 (r194654) +++ head/sys/arm/xscale/ixp425/ixp425.c Mon Jun 22 20:42:28 2009 (r194655) @@ -443,16 +443,12 @@ gethwvtrans(uint32_t hwbase, uint32_t si { .hwbase = IXP435_USB2_HWBASE, .size = IXP435_USB2_SIZE, .vbase= IXP435_USB2_VBASE }, -#ifdef CAMBRIA_GPS_VBASE { .hwbase = CAMBRIA_GPS_HWBASE, .size = CAMBRIA_GPS_SIZE, .vbase= CAMBRIA_GPS_VBASE }, -#endif -#ifdef CAMBRIA_RS485_VBASE { .hwbase = CAMBRIA_RS485_HWBASE, .size = CAMBRIA_RS485_SIZE, .vbase= CAMBRIA_RS485_VBASE }, -#endif }; int i; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r194656 - head/sys/arm/xscale/ixp425
Author: sam Date: Mon Jun 22 20:57:51 2009 New Revision: 194656 URL: http://svn.freebsd.org/changeset/base/194656 Log: hook arm_post_filter to ACK GPIO interrupts; this fixes the interrupt storm observed on the GPS+RS485 uarts on Gateworks Cambria boards Reviewed by: cognet Modified: head/sys/arm/xscale/ixp425/ixp425.c Modified: head/sys/arm/xscale/ixp425/ixp425.c == --- head/sys/arm/xscale/ixp425/ixp425.c Mon Jun 22 20:42:28 2009 (r194655) +++ head/sys/arm/xscale/ixp425/ixp425.c Mon Jun 22 20:57:51 2009 (r194656) @@ -186,6 +186,13 @@ ixp425_gpio_ack(int irq) ixp425_irq2gpio_bit(irq); } +static void +ixp425_post_filter(void *arg) +{ + uintptr_t irq = (uintptr_t) arg; + ixp425_gpio_ack(irq); +} + void arm_mask_irq(uintptr_t nb) { @@ -304,6 +311,7 @@ ixp425_attach(device_t dev) ixp435_set_intrmask(); ixp435_set_intrsteer(); } + arm_post_filter = ixp425_post_filter; if (bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, 0x, 0xff, 0x, 0, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r194668 - in head/sys/arm: conf xscale/ixp425
Author: sam Date: Mon Jun 22 22:46:37 2009 New Revision: 194668 URL: http://svn.freebsd.org/changeset/base/194668 Log: o remove hack to write UUE+RTOIE in the uart's IER; force them with hints o honor hints for the rclk Modified: head/sys/arm/conf/AVILA.hints head/sys/arm/conf/CAMBRIA.hints head/sys/arm/xscale/ixp425/uart_bus_ixp425.c Modified: head/sys/arm/conf/AVILA.hints == --- head/sys/arm/conf/AVILA.hints Mon Jun 22 22:20:38 2009 (r194667) +++ head/sys/arm/conf/AVILA.hints Mon Jun 22 22:46:37 2009 (r194668) @@ -9,10 +9,12 @@ hint.uart.0.at=ixp0 hint.uart.0.addr=0xc800 hint.uart.0.irq=15 hint.uart.0.flags=0x10 +hint.uart.0.ier_rxbits=0x5d# NB: need UUE+RTOIE # USART0 is unit 1 hint.uart.1.at=ixp0 hint.uart.1.addr=0xc8001000 hint.uart.1.irq=13 +hint.uart.1.ier_rxbits=0x5d# NB: need UUE+RTOIE # NPE Hardware Queue Manager hint.ixpqmgr.0.at=ixp0 Modified: head/sys/arm/conf/CAMBRIA.hints == --- head/sys/arm/conf/CAMBRIA.hints Mon Jun 22 22:20:38 2009 (r194667) +++ head/sys/arm/conf/CAMBRIA.hints Mon Jun 22 22:46:37 2009 (r194668) @@ -9,6 +9,7 @@ hint.uart.0.at=ixp0 hint.uart.0.addr=0xc800 hint.uart.0.irq=15 hint.uart.0.flags=0x10 +hint.uart.0.ier_rxbits=0x5d# NB: need UUE+RTOIE # NB: no UART1 on ixp436 Modified: head/sys/arm/xscale/ixp425/uart_bus_ixp425.c == --- head/sys/arm/xscale/ixp425/uart_bus_ixp425.cMon Jun 22 22:20:38 2009(r194667) +++ head/sys/arm/xscale/ixp425/uart_bus_ixp425.cMon Jun 22 22:46:37 2009(r194668) @@ -68,29 +68,15 @@ static int uart_ixp425_probe(device_t dev) { struct uart_softc *sc; + int unit = device_get_unit(dev); + u_int rclk; sc = device_get_softc(dev); sc-sc_class = uart_ns8250_class; - sc-sc_rrid = 0; - sc-sc_rtype = SYS_RES_MEMORY; - sc-sc_rres = bus_alloc_resource(dev, sc-sc_rtype, sc-sc_rrid, - 0, ~0, uart_getrange(sc-sc_class), RF_ACTIVE); - if (sc-sc_rres == NULL) { - return (ENXIO); - } - sc-sc_bas.bsh = rman_get_bushandle(sc-sc_rres); - sc-sc_bas.bst = rman_get_bustag(sc-sc_rres); - /* -* XXX set UART Unit Enable (0x40) AND -* receiver timeout int enable (0x10). -* The first turns on the UART. The second is necessary to get -* interrupts when the FIFO has data but is not full. Note that -* uart_ns8250 carefully avoids touching these bits so we can -* just set them here and proceed. But this is fragile... -*/ - bus_space_write_4(sc-sc_bas.bst, sc-sc_bas.bsh, IXP425_UART_IER, - IXP425_UART_IER_UUE | IXP425_UART_IER_RTOIE); - bus_release_resource(dev, sc-sc_rtype, sc-sc_rrid, sc-sc_rres); + if (resource_int_value(uart, unit, rclk, rclk)) + rclk = IXP425_UART_FREQ; + if (bootverbose) + device_printf(dev, rclk %u\n, rclk); - return uart_bus_probe(dev, 0, IXP425_UART_FREQ, 0, 0); + return uart_bus_probe(dev, 0, rclk, 0, 0); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r194669 - head/sys/arm/conf
Author: sam Date: Mon Jun 22 22:47:06 2009 New Revision: 194669 URL: http://svn.freebsd.org/changeset/base/194669 Log: fix typo Modified: head/sys/arm/conf/CAMBRIA.hints Modified: head/sys/arm/conf/CAMBRIA.hints == --- head/sys/arm/conf/CAMBRIA.hints Mon Jun 22 22:46:37 2009 (r194668) +++ head/sys/arm/conf/CAMBRIA.hints Mon Jun 22 22:47:06 2009 (r194669) @@ -11,7 +11,7 @@ hint.uart.0.irq=15 hint.uart.0.flags=0x10 hint.uart.0.ier_rxbits=0x5d# NB: need UUE+RTOIE -# NB: no UART1 on ixp436 +# NB: no UART1 on ixp435 # NPE Hardware Queue Manager hint.ixpqmgr.0.at=ixp0 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r194670 - head/sys/arm/xscale/ixp425
Author: sam Date: Mon Jun 22 22:54:13 2009 New Revision: 194670 URL: http://svn.freebsd.org/changeset/base/194670 Log: o add a bus space tag that forces a 2usec delay between r/w ops; this is used for the optional GPS+RS485 uarts on the Gateworks Cambria boards which otherwise are unreliable o setup the hack bus space tag for the GPS+RS485 uarts o program the gpio interrupts for the uarts to be edge-rising o force timing on the expansion bus for the uarts to be slow Thanks to Chris Lang of Gateworks for these tips. Added: head/sys/arm/xscale/ixp425/cambria_exp_space.c (contents, props changed) Modified: head/sys/arm/xscale/ixp425/files.avila head/sys/arm/xscale/ixp425/ixp425.c head/sys/arm/xscale/ixp425/ixp425var.h Added: head/sys/arm/xscale/ixp425/cambria_exp_space.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/xscale/ixp425/cambria_exp_space.c Mon Jun 22 22:54:13 2009(r194670) @@ -0,0 +1,95 @@ +/*- + * Copyright (c) 2009 Sam Leffler. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Hack bus space tag for slow devices on the Cambria expansion bus; + * we slow the timing and add a 2us delay between r/w ops. + */ + +#include sys/cdefs.h +__FBSDID($FreeBSD$); + +#include sys/param.h +#include sys/systm.h +#include sys/bus.h + +#include machine/bus.h +#include machine/cpu.h + +#include arm/xscale/ixp425/ixp425reg.h +#include arm/xscale/ixp425/ixp425var.h + +/* Prototypes for all the bus_space structure functions */ +bs_protos(exp); +bs_protos(generic); +bs_protos(generic_armv4); + +static uint8_t +cambria_bs_r_1(void *t, bus_space_handle_t h, bus_size_t o) +{ + DELAY(2); + return bus_space_read_1((struct bus_space *)t, h, o); +} + +static void +cambria_bs_w_1(void *t, bus_space_handle_t h, bus_size_t o, u_int8_t v) +{ + DELAY(2); + bus_space_write_1((struct bus_space *)t, h, o, v); +} + +/* NB: we only define what's needed by uart */ +struct bus_space cambria_exp_bs_tag = { + /* mapping/unmapping */ + .bs_map = generic_bs_map, + .bs_unmap = generic_bs_unmap, + + /* barrier */ + .bs_barrier = generic_bs_barrier, + + /* read (single) */ + .bs_r_1 = cambria_bs_r_1, + + /* write (single) */ + .bs_w_1 = cambria_bs_w_1, +}; + +void +cambria_exp_bus_init(struct ixp425_softc *sc) +{ + uint32_t cs3; + + KASSERT(cpu_is_ixp43x(), (wrong cpu type)); + + cambria_exp_bs_tag.bs_cookie = sc-sc_iot; + + cs3 = EXP_BUS_READ_4(sc, EXP_TIMING_CS3_OFFSET); + /* XXX force slowest possible timings and byte mode */ + EXP_BUS_WRITE_4(sc, EXP_TIMING_CS3_OFFSET, + cs3 | (EXP_T1|EXP_T2|EXP_T3|EXP_T4|EXP_T5) | EXP_BYTE_EN); + + /* XXX force GPIO 3+4 for GPS+RS485 uarts */ + ixp425_set_gpio(sc, 3, GPIO_TYPE_EDG_RISING); + ixp425_set_gpio(sc, 4, GPIO_TYPE_EDG_RISING); +} Modified: head/sys/arm/xscale/ixp425/files.avila == --- head/sys/arm/xscale/ixp425/files.avila Mon Jun 22 22:47:06 2009 (r194669) +++ head/sys/arm/xscale/ixp425/files.avila Mon Jun 22 22:54:13 2009 (r194670) @@ -2,6 +2,7 @@ arm/xscale/ixp425/avila_machdep.c standard arm/xscale/ixp425/avila_ata.c optional avila_ata arm/xscale/ixp425/avila_led.c optional avila_led -arm/xscale/ixp425/cambria_led.coptional cambria_led +arm/xscale/ixp425/cambria_exp_space.c standard arm/xscale/ixp425/cambria_fled.c optional cambria_fled +arm/xscale/ixp425/cambria_led.c
svn commit: r194671 - head/sys/arm/conf
Author: sam Date: Mon Jun 22 22:54:44 2009 New Revision: 194671 URL: http://svn.freebsd.org/changeset/base/194671 Log: enable optional GPS+RS485 uarts Modified: head/sys/arm/conf/CAMBRIA.hints Modified: head/sys/arm/conf/CAMBRIA.hints == --- head/sys/arm/conf/CAMBRIA.hints Mon Jun 22 22:54:13 2009 (r194670) +++ head/sys/arm/conf/CAMBRIA.hints Mon Jun 22 22:54:44 2009 (r194671) @@ -13,6 +13,20 @@ hint.uart.0.ier_rxbits=0x5d # NB: need U # NB: no UART1 on ixp435 +# optional GPS serial port +hint.uart.1.at=ixp0 +hint.uart.1.addr=0x53fc +hint.uart.1.irq=20 +hint.uart.1.ier_rxbits=0x1 +hint.uart.1.rclk=1843200 +hint.uart.1.rwdelay=20 +# optional RS485 serial port +hint.uart.2.at=ixp0 +hint.uart.2.addr=0x53f8 +hint.uart.2.irq=21 +hint.uart.2.rclk=1843200 +hint.uart.2.rwdelay=2 + # NPE Hardware Queue Manager hint.ixpqmgr.0.at=ixp0 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r194673 - head/sys/arm/conf
Author: sam Date: Mon Jun 22 23:22:38 2009 New Revision: 194673 URL: http://svn.freebsd.org/changeset/base/194673 Log: kill left over cruft Modified: head/sys/arm/conf/CAMBRIA.hints Modified: head/sys/arm/conf/CAMBRIA.hints == --- head/sys/arm/conf/CAMBRIA.hints Mon Jun 22 23:08:05 2009 (r194672) +++ head/sys/arm/conf/CAMBRIA.hints Mon Jun 22 23:22:38 2009 (r194673) @@ -19,13 +19,11 @@ hint.uart.1.addr=0x53fc hint.uart.1.irq=20 hint.uart.1.ier_rxbits=0x1 hint.uart.1.rclk=1843200 -hint.uart.1.rwdelay=20 # optional RS485 serial port hint.uart.2.at=ixp0 hint.uart.2.addr=0x53f8 hint.uart.2.irq=21 hint.uart.2.rclk=1843200 -hint.uart.2.rwdelay=2 # NPE Hardware Queue Manager hint.ixpqmgr.0.at=ixp0 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r194600 - head/sys/dev/ic
Author: sam Date: Sun Jun 21 19:17:22 2009 New Revision: 194600 URL: http://svn.freebsd.org/changeset/base/194600 Log: add %b formats for various registers Modified: head/sys/dev/ic/ns16550.h Modified: head/sys/dev/ic/ns16550.h == --- head/sys/dev/ic/ns16550.h Sun Jun 21 19:02:32 2009(r194599) +++ head/sys/dev/ic/ns16550.h Sun Jun 21 19:17:22 2009(r194600) @@ -46,6 +46,8 @@ #defineIER_ERLS0x4 #defineIER_EMSC0x8 +#defineIER_BITS\20\1ERXRDY\2ETXRDY\3ERLS\4EMSC + #definecom_iir 2 /* interrupt identification register (R) */ #defineREG_IIR com_iir #defineIIR_IMASK 0xf @@ -57,6 +59,8 @@ #defineIIR_MLSC0x0 #defineIIR_FIFO_MASK 0xc0/* set if FIFOs are enabled */ +#defineIIR_BITS\20\1NOPEND\2TXRDY\3RXRDY + #definecom_lcr 3 /* line control register (R/W) */ #definecom_cfcrcom_lcr /* character format control register (R/W) */ #defineREG_LCR com_lcr @@ -97,6 +101,8 @@ #defineMCR_RTS 0x02 #defineMCR_DTR 0x01 +#defineMCR_BITS\20\1DTR\2RTS\3DRS\4IE\5LOOPBACK\10PRESCALE + #definecom_lsr 5 /* line status register (R/W) */ #defineREG_LSR com_lsr #defineLSR_RCV_FIFO0x80 @@ -111,6 +117,8 @@ #defineLSR_RXRDY 0x01 #defineLSR_RCV_MASK0x1f +#defineLSR_BITS \20\1RXRDY\2OE\3PE\4FE\5BI\6THRE\7TEMT\10RCV_FIFO + #definecom_msr 6 /* modem status register (R/W) */ #defineREG_MSR com_msr #defineMSR_DCD 0x80 @@ -122,6 +130,8 @@ #defineMSR_DDSR0x02 #defineMSR_DCTS0x01 +#defineMSR_BITS \20\1DCTS\2DDSR\3TERI\4DDCD\5CTS\6DSR\7RI\10DCD + /* 8250 multiplexed registers #[0-1]. Access enabled by LCR[7]. */ #definecom_dll 0 /* divisor latch low (R/W) */ #definecom_dlblcom_dll @@ -154,6 +164,8 @@ #defineFCR_RX_HIGH 0xc0 #defineFIFO_RX_HIGHFCR_RX_HIGH +#defineFCR_BITS\20\1ENABLE\2RCV_RST\3XMT_RST\4DMA + /* 16650 registers #2,[4-7]. Access enabled by LCR_EFR_ENABLE. */ #definecom_efr 2 /* enhanced features register (R/W) */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r194378 - head/sys/arm/xscale/ixp425
Author: sam Date: Wed Jun 17 17:57:52 2009 New Revision: 194378 URL: http://svn.freebsd.org/changeset/base/194378 Log: Add workaround to get IXP435 NPE-A working: reseting NPE-A after NPE-C causes both to become inoperative; this apparently was done by the original IAL code as a workaround for IMEM parity errors which we've not seen so just disable the reset. Note this problem does not occur on IXP425 boards. The linux driver does fuse-resets on each NPE but in the order NPE-A NPE-B NPE-C (when probing for which NPE's are present/operational); we may want to switch to a similar scheme but for now disable the resets until we see an issue. Modified: head/sys/arm/xscale/ixp425/ixp425_npe.c Modified: head/sys/arm/xscale/ixp425/ixp425_npe.c == --- head/sys/arm/xscale/ixp425/ixp425_npe.c Wed Jun 17 17:31:45 2009 (r194377) +++ head/sys/arm/xscale/ixp425/ixp425_npe.c Wed Jun 17 17:57:52 2009 (r194378) @@ -804,20 +804,34 @@ static const uint32_t ixNpeDlCtxtRegRese IX_NPEDL_CTXT_REG_RESET_CINDEX, }; -#defineIX_NPEDL_RESET_NPE_PARITY 0x0800 #defineIX_NPEDL_PARITY_BIT_MASK0x3F00 #defineIX_NPEDL_CONFIG_CTRL_REG_MASK 0x3F3F +#if 0 +/* + * Reset the NPE and its coprocessor using the + * fuse bits in the feature control register. + */ +static void +npe_reset(int npeid) +{ + uint32_t mask = EXP_FCTRL_NPEA npeid; + uint32_t v; + + v = ixp4xx_read_feature_bits(); + ixp4xx_write_feature_bits(v ~ mask); + /* un-fuse and un-reset the NPE coprocessor */ + ixp4xx_write_feature_bits(v | mask); +} +#endif + static int npe_cpu_reset(struct ixpnpe_softc *sc) { #defineN(a)(sizeof(a) / sizeof(a[0])) - struct ixp425_softc *sa = - device_get_softc(device_get_parent(sc-sc_dev)); uint32_t ctxtReg; /* identifies Context Store reg (0-3) */ uint32_t regAddr; uint32_t regVal; - uint32_t resetNpeParity; uint32_t ixNpeConfigCtrlRegVal; int i, error = 0; @@ -935,33 +949,15 @@ npe_cpu_reset(struct ixpnpe_softc *sc) /* Reset the Watch-count register */ npe_reg_write(sc, IX_NPEDL_REG_OFFSET_WC, 0); - +#if 0 /* * WR IXA00055043 - Remove IMEM Parity Introduced by NPE Reset Operation +* XXX Removed because it breaks IXP435 operation; e.g. on Gateworks +* XXX 2358 boards reseting NPE-A after NPE-C is running causes both +* XXX npe's to stop working */ - - /* -* Reset the NPE and its coprocessor - to reset internal -* states and remove parity error. Note this makes no -* sense based on the documentation. The feature control -* register always reads back as 0 on the ixp425 and further -* the bit definition of NPEA/NPEB is off by 1 according to -* the Intel documention--so we're blindly following the -* Intel code w/o any real understanding. -*/ - regVal = EXP_BUS_READ_4(sa, EXP_FCTRL_OFFSET); - DPRINTFn(2, sc-sc_dev, %s: FCTRL 0x%x\n, __func__, regVal); - resetNpeParity = - IX_NPEDL_RESET_NPE_PARITY (1 + device_get_unit(sc-sc_dev)); - DPRINTFn(2, sc-sc_dev, %s: FCTRL fuse parity, write 0x%x\n, - __func__, regVal | resetNpeParity); - EXP_BUS_WRITE_4(sa, EXP_FCTRL_OFFSET, regVal | resetNpeParity); - - /* un-fuse and un-reset the NPE coprocessor */ - DPRINTFn(2, sc-sc_dev, %s: FCTRL unfuse parity, write 0x%x\n, - __func__, regVal resetNpeParity); - EXP_BUS_WRITE_4(sa, EXP_FCTRL_OFFSET, regVal ~ resetNpeParity); - + npe_reset(sc-sc_npeid); +#endif /* * Call NpeMgr function to stop the NPE again after the Feature Control * has unfused and Un-Reset the NPE and its associated Coprocessors. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r194379 - head/sys/arm/conf
Author: sam Date: Wed Jun 17 17:58:18 2009 New Revision: 194379 URL: http://svn.freebsd.org/changeset/base/194379 Log: enable npe-a now that it works Modified: head/sys/arm/conf/CAMBRIA.hints Modified: head/sys/arm/conf/CAMBRIA.hints == --- head/sys/arm/conf/CAMBRIA.hints Wed Jun 17 17:57:52 2009 (r194378) +++ head/sys/arm/conf/CAMBRIA.hints Wed Jun 17 17:58:18 2009 (r194379) @@ -21,11 +21,11 @@ hint.npe.0.npeid=C hint.npe.0.mac=C hint.npe.0.mii=C hint.npe.0.phy=1 -#hint.npe.1.at=ixp0 -#hint.npe.1.npeid=A -#hint.npe.1.mac=A -#hint.npe.1.mii=C -#hint.npe.1.phy=2 +hint.npe.1.at=ixp0 +hint.npe.1.npeid=A +hint.npe.1.mac=A +hint.npe.1.mii=C +hint.npe.1.phy=2 # FLASH hint.cfi.0.at=ixp0 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r194380 - head/tools/tools/nanobsd/gateworks
Author: sam Date: Wed Jun 17 17:59:36 2009 New Revision: 194380 URL: http://svn.freebsd.org/changeset/base/194380 Log: update usb config; the old stack is gone Modified: head/tools/tools/nanobsd/gateworks/G2358 Modified: head/tools/tools/nanobsd/gateworks/G2358 == --- head/tools/tools/nanobsd/gateworks/G2358Wed Jun 17 17:58:18 2009 (r194379) +++ head/tools/tools/nanobsd/gateworks/G2358Wed Jun 17 17:59:36 2009 (r194380) @@ -113,16 +113,17 @@ options AH_SUPPORT_AR5416 #devicecryptodev #devicehifn# NB: Soekris minipci card known to work -# NB: must use old usb stack; new one does not work -makeoptionsWITH_LEGACY # NB: required to get includes -device ousb -#options USB_DEBUG -device oohci -device oehci -device ougen +# NB: 2 USB 2.0 ports standard +device usb +optionsUSB_EHCI_BIG_ENDIAN_DESC# handle big-endian byte order +#options USB_DEBUG +device ehci +device umass +device scbus # SCSI bus (required for SCSI) +device da # Direct Access (disks) -device oaxe +#deviceural +#devicezyd +#devicewlan_amrr -device umass -device scbus # SCSI bus (required for SCSI) -device da # Direct Access (disks) +device axe ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r194319 - head/sys/arm/xscale/ixp425
Author: sam Date: Wed Jun 17 02:51:16 2009 New Revision: 194319 URL: http://svn.freebsd.org/changeset/base/194319 Log: add ixp4xx_write_feature_bits Modified: head/sys/arm/xscale/ixp425/ixp425.c head/sys/arm/xscale/ixp425/ixp425var.h Modified: head/sys/arm/xscale/ixp425/ixp425.c == --- head/sys/arm/xscale/ixp425/ixp425.c Wed Jun 17 02:20:26 2009 (r194318) +++ head/sys/arm/xscale/ixp425/ixp425.c Wed Jun 17 02:51:16 2009 (r194319) @@ -85,6 +85,12 @@ ixp4xx_read_feature_bits(void) return bits; } +void +ixp4xx_write_feature_bits(uint32_t v) +{ + IXPREG(IXP425_EXP_VBASE + EXP_FCTRL_OFFSET) = ~v; +} + struct arm32_dma_range * bus_dma_get_range(void) { Modified: head/sys/arm/xscale/ixp425/ixp425var.h == --- head/sys/arm/xscale/ixp425/ixp425var.h Wed Jun 17 02:20:26 2009 (r194318) +++ head/sys/arm/xscale/ixp425/ixp425var.h Wed Jun 17 02:51:16 2009 (r194319) @@ -101,6 +101,7 @@ voidixp425_mem_bs_init(bus_space_tag_t, uint32_t ixp425_sdram_size(void); uint32_t ixp435_ddram_size(void); uint32_t ixp4xx_read_feature_bits(void); +void ixp4xx_write_feature_bits(uint32_t); intixp425_md_route_interrupt(device_t, device_t, int); void ixp425_md_attach(device_t); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r194321 - head/sys/arm/xscale/ixp425
Author: sam Date: Wed Jun 17 02:53:05 2009 New Revision: 194321 URL: http://svn.freebsd.org/changeset/base/194321 Log: o correct default miibase for NPE-B and NPE-C; these values are normally taken from the hints file so this should have no effect o set the port address just in case o add NPE-A support to the tx done qmgr callback Modified: head/sys/arm/xscale/ixp425/if_npe.c Modified: head/sys/arm/xscale/ixp425/if_npe.c == --- head/sys/arm/xscale/ixp425/if_npe.c Wed Jun 17 02:52:35 2009 (r194320) +++ head/sys/arm/xscale/ixp425/if_npe.c Wed Jun 17 02:53:05 2009 (r194321) @@ -153,9 +153,9 @@ struct npe_softc { * multi-port processing. It may be better to handle * all traffic through one Q (as done by the Intel drivers). * - * Note that the PHY's are accessible only from MAC A - * on the IXP425. This and other platform-specific - * assumptions probably need to be handled through hints. + * Note that the PHY's are accessible only from MAC B on the + * IXP425 and from MAC C on other devices. This and other + * platform-specific assumptions are handled with hints. */ static const struct { uint32_tmacbase; @@ -177,7 +177,7 @@ static const struct { }, [NPE_B] = { .macbase = IXP425_MAC_B_HWBASE, - .miibase = IXP425_MAC_C_HWBASE, + .miibase = IXP425_MAC_B_HWBASE, .phy = 0, .rx_qid = 4, .rx_freeqid = 27, @@ -186,7 +186,7 @@ static const struct { }, [NPE_C] = { .macbase = IXP425_MAC_C_HWBASE, - .miibase = IXP425_MAC_C_HWBASE, + .miibase = IXP425_MAC_B_HWBASE, .phy = 1, .rx_qid = 12, .rx_freeqid = 28, @@ -239,6 +239,7 @@ static int npeioctl(struct ifnet * ifp, static int npe_setrxqosentry(struct npe_softc *, int classix, int trafclass, int qid); +static int npe_setportaddress(struct npe_softc *, const uint8_t mac[]); static int npe_setfirewallmode(struct npe_softc *, int onoff); static int npe_updatestats(struct npe_softc *); #if 0 @@ -666,7 +667,7 @@ npe_mac_reset(struct npe_softc *sc) static int npe_activate(device_t dev) { - struct npe_softc * sc = device_get_softc(dev); + struct npe_softc *sc = device_get_softc(dev); int error, i, macbase, miibase; /* @@ -1024,7 +1025,7 @@ npe_txdone(int qid, void *arg) struct txdone *td, q[NPE_MAX]; uint32_t entry; - /* XXX no NPE-A support */ + q[NPE_A].tail = q[NPE_A].head; q[NPE_A].count = 0; q[NPE_B].tail = q[NPE_B].head; q[NPE_B].count = 0; q[NPE_C].tail = q[NPE_C].head; q[NPE_C].count = 0; /* XXX max # at a time? */ @@ -1043,6 +1044,8 @@ npe_txdone(int qid, void *arg) td-count++; } + if (q[NPE_A].count) + npe_txdone_finish(npes[NPE_A], q[NPE_A]); if (q[NPE_B].count) npe_txdone_finish(npes[NPE_B], q[NPE_B]); if (q[NPE_C].count) @@ -1252,6 +1255,7 @@ if (ifp-if_drv_flags IFF_DRV_RUNNING) WR4(sc, NPE_MAC_RX_CNTRL2, 0); npe_setmac(sc, IF_LLADDR(ifp)); + npe_setportaddress(sc, IF_LLADDR(ifp)); npe_setmcast(sc); npe_startxmit(sc); @@ -1552,6 +1556,22 @@ npe_setrxqosentry(struct npe_softc *sc, } static int +npe_setportaddress(struct npe_softc *sc, const uint8_t mac[ETHER_ADDR_LEN]) +{ + uint32_t msg[2]; + + msg[0] = (NPE_SETPORTADDRESS 24) + | (sc-sc_npeid 20) + | (mac[0] 8) + | (mac[1] 0); + msg[1] = (mac[2] 24) + | (mac[3] 16) + | (mac[4] 8) + | (mac[5] 0); + return ixpnpe_sendandrecvmsg_sync(sc-sc_npe, msg, msg); +} + +static int npe_setfirewallmode(struct npe_softc *sc, int onoff) { uint32_t msg[2]; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r194322 - head/sys/arm/xscale/ixp425
Author: sam Date: Wed Jun 17 02:55:53 2009 New Revision: 194322 URL: http://svn.freebsd.org/changeset/base/194322 Log: remove IAL vestige for defining the max data/instruction memory size; instead of defining them according to ixp46x add new defines so we can do this at run time Modified: head/sys/arm/xscale/ixp425/ixp425_npereg.h Modified: head/sys/arm/xscale/ixp425/ixp425_npereg.h == --- head/sys/arm/xscale/ixp425/ixp425_npereg.h Wed Jun 17 02:53:05 2009 (r194321) +++ head/sys/arm/xscale/ixp425/ixp425_npereg.h Wed Jun 17 02:55:53 2009 (r194322) @@ -95,7 +95,6 @@ /* * Instruction and Data Memory Size (in words) for each NPE */ -#ifndef __ixp46X #define IX_NPEDL_INS_MEMSIZE_WORDS_NPEA 4096 #define IX_NPEDL_INS_MEMSIZE_WORDS_NPEB 2048 #define IX_NPEDL_INS_MEMSIZE_WORDS_NPEC 2048 @@ -103,15 +102,9 @@ #define IX_NPEDL_DATA_MEMSIZE_WORDS_NPEA2048 #define IX_NPEDL_DATA_MEMSIZE_WORDS_NPEB2048 #define IX_NPEDL_DATA_MEMSIZE_WORDS_NPEC2048 -#else -#define IX_NPEDL_INS_MEMSIZE_WORDS_NPEA 4096 -#define IX_NPEDL_INS_MEMSIZE_WORDS_NPEB 4096 -#define IX_NPEDL_INS_MEMSIZE_WORDS_NPEC 4096 -#define IX_NPEDL_DATA_MEMSIZE_WORDS_NPEA4096 -#define IX_NPEDL_DATA_MEMSIZE_WORDS_NPEB4096 -#define IX_NPEDL_DATA_MEMSIZE_WORDS_NPEC4096 -#endif +#define IXP46X_NPEDL_INS_MEMSIZE_WORDS 4096 +#define IXP46X_NPEDL_DATA_MEMSIZE_WORDS 4096 /* BAR offsets */ #define IX_NPEDL_REG_OFFSET_EXAD 0x/* Execution Address */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r194325 - head/sys/arm/xscale/ixp425
Author: sam Date: Wed Jun 17 03:09:13 2009 New Revision: 194325 URL: http://svn.freebsd.org/changeset/base/194325 Log: correct data/instruction memory sizes for non-ixp425 parts (these are only used to bounds-check writes when loading firmware) Modified: head/sys/arm/xscale/ixp425/ixp425_npe.c Modified: head/sys/arm/xscale/ixp425/ixp425_npe.c == --- head/sys/arm/xscale/ixp425/ixp425_npe.c Wed Jun 17 03:08:55 2009 (r194324) +++ head/sys/arm/xscale/ixp425/ixp425_npe.c Wed Jun 17 03:09:13 2009 (r194325) @@ -306,8 +306,14 @@ ixpnpe_attach(device_t dev, int npeid) sc-sc_nrefs = 1; sc-sc_size = config-size; - sc-insMemSize = config-ins_memsize; /* size of instruction memory */ - sc-dataMemSize = config-data_memsize; /* size of data memory */ + if (cpu_is_ixp42x()) { + /* NB: instruction/data memory sizes are NPE-dependent */ + sc-insMemSize = config-ins_memsize; + sc-dataMemSize = config-data_memsize; + } else { + sc-insMemSize = IXP46X_NPEDL_INS_MEMSIZE_WORDS; + sc-dataMemSize = IXP46X_NPEDL_DATA_MEMSIZE_WORDS; + } if (bus_space_map(sc-sc_iot, config-base, sc-sc_size, 0, sc-sc_ioh)) panic(%s: Cannot map registers, device_get_name(dev)); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r194210 - head/sys/sys
M. Warner Losh wrote: In message: 1245014030.12125.34.ca...@neo.cse.buffalo.edu Ken Smith kensm...@cse.buffalo.edu writes: : On Sun, 2009-06-14 at 19:53 +, Simon L. Nielsen wrote: : Author: simon : Date: Sun Jun 14 19:53:52 2009 : New Revision: 194210 : URL: http://svn.freebsd.org/changeset/base/194210 : : Log: :Bump __FreeBSD_version for OpenSSL 0.9.8k import. : : Modified: :head/sys/sys/param.h : : Modified: head/sys/sys/param.h : == : --- head/sys/sys/param.h Sun Jun 14 19:51:43 2009(r194209) : +++ head/sys/sys/param.h Sun Jun 14 19:53:52 2009(r194210) : @@ -57,7 +57,7 @@ :* is created, otherwise 1. :*/ : #undef __FreeBSD_version : -#define __FreeBSD_version 800097/* Master, propagated to newvers */ : +#define __FreeBSD_version 800098/* Master, propagated to newvers */ : : #ifndef LOCORE : #include sys/types.h : : It's been suggested we change the heuristic to be stable branches start : with 200. I think we're going to do that so don't panic about there : only being one number left for changes between now and the time we : branch. Why not 500? : At first it surprised me we ate through almost 100 version numbers in : head, which is a place traditionally abi changes are *expected* and the : attitude has more or less been head is a free-for-all with all bets off. : But some IRC chatter enlightened me to there actually being people who : do advanced testing of ports and whatnot in head under the encouragement : of portmgr@ despite its free-for-all nature to try and cut down on work : during later stages of the release. That seems reasonable so I think in : general starting to give more than 100 bumps to work with in head is : worthwhile. I think so too. If we're going to change, we might as well change big and infrequently. netbsd reserves 4 digits. I've never bought the idea that people can ignore ABI changes (even in HEAD). But not recording an incompatibility is just stupid. Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r194259 - in head/sys: dev/cxgb net
Author: sam Date: Mon Jun 15 19:50:03 2009 New Revision: 194259 URL: http://svn.freebsd.org/changeset/base/194259 Log: r193336 moved ifq_detach to if_free which broke if_alloc followed by if_free (w/o doing if_attach); move ifq_attach to if_alloc and rename ifq_attach/detach to ifq_init/ifq_delete to better identify their purpose Reviewed by: jhb, kmacy Modified: head/sys/dev/cxgb/cxgb_sge.c head/sys/net/if.c head/sys/net/if_var.h Modified: head/sys/dev/cxgb/cxgb_sge.c == --- head/sys/dev/cxgb/cxgb_sge.cMon Jun 15 19:26:34 2009 (r194258) +++ head/sys/dev/cxgb/cxgb_sge.cMon Jun 15 19:50:03 2009 (r194259) @@ -1719,7 +1719,7 @@ t3_free_qset(adapter_t *sc, struct sge_q if (q-txq[i].txq_mr != NULL) buf_ring_free(q-txq[i].txq_mr, M_DEVBUF); if (q-txq[i].txq_ifq != NULL) { - ifq_detach(q-txq[i].txq_ifq); + ifq_delete(q-txq[i].txq_ifq); free(q-txq[i].txq_ifq, M_DEVBUF); } } @@ -2289,7 +2289,7 @@ t3_sge_alloc_qset(adapter_t *sc, u_int i device_printf(sc-dev, failed to allocate ifq\n); goto err; } - ifq_attach(q-txq[i].txq_ifq, pi-ifp); + ifq_init(q-txq[i].txq_ifq, pi-ifp); } init_qset_cntxt(q, id); q-idx = id; Modified: head/sys/net/if.c == --- head/sys/net/if.c Mon Jun 15 19:26:34 2009(r194258) +++ head/sys/net/if.c Mon Jun 15 19:50:03 2009(r194259) @@ -554,6 +554,7 @@ if_alloc(u_char type) #ifdef MAC mac_ifnet_init(ifp); #endif + ifq_init(ifp-if_snd, ifp); refcount_init(ifp-if_refcount, 1);/* Index reference. */ IFNET_WLOCK(); @@ -596,7 +597,7 @@ if_free_internal(struct ifnet *ifp) knlist_destroy(ifp-if_klist); IF_AFDATA_DESTROY(ifp); IF_ADDR_LOCK_DESTROY(ifp); - ifq_detach(ifp-if_snd); + ifq_delete(ifp-if_snd); free(ifp, M_IFNET); } @@ -655,7 +656,7 @@ if_rele(struct ifnet *ifp) } void -ifq_attach(struct ifaltq *ifq, struct ifnet *ifp) +ifq_init(struct ifaltq *ifq, struct ifnet *ifp) { mtx_init(ifq-ifq_mtx, ifp-if_xname, if send queue, MTX_DEF); @@ -671,7 +672,7 @@ ifq_attach(struct ifaltq *ifq, struct if } void -ifq_detach(struct ifaltq *ifq) +ifq_delete(struct ifaltq *ifq) { mtx_destroy(ifq-ifq_mtx); } @@ -742,8 +743,6 @@ if_attach_internal(struct ifnet *ifp, in net_cdevsw.d_name, ifp-if_index); } - ifq_attach(ifp-if_snd, ifp); - /* * Create a Link Level name for this device. */ Modified: head/sys/net/if_var.h == --- head/sys/net/if_var.h Mon Jun 15 19:26:34 2009(r194258) +++ head/sys/net/if_var.h Mon Jun 15 19:50:03 2009(r194259) @@ -817,8 +817,8 @@ int ifpromisc(struct ifnet *, int); struct ifnet *ifunit(const char *); struct ifnet *ifunit_ref(const char *); -void ifq_attach(struct ifaltq *, struct ifnet *ifp); -void ifq_detach(struct ifaltq *); +void ifq_init(struct ifaltq *, struct ifnet *ifp); +void ifq_delete(struct ifaltq *); struct ifaddr *ifa_ifwithaddr(struct sockaddr *); struct ifaddr *ifa_ifwithbroadaddr(struct sockaddr *); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r194204 - in head/sys: amd64/conf i386/conf
Ed Schouten wrote: Author: ed Date: Sun Jun 14 18:01:35 2009 New Revision: 194204 URL: http://svn.freebsd.org/changeset/base/194204 Log: Enable PRINTF_BUFR_SIZE on i386 and amd64 by default. In the past there have been some reports of PRINTF_BUFR_SIZE not functioning correctly. Instead of having garbled console messages, we should just see whether the issues are still there and analyze them. When I suggested enabling this by default for SMP configurations I was reminded it wasn't enabled because of potential stack overflow. Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r194204 - in head/sys: amd64/conf i386/conf
Bruce Evans wrote: On Sun, 14 Jun 2009, Sam Leffler wrote: Log: Enable PRINTF_BUFR_SIZE on i386 and amd64 by default. In the past there have been some reports of PRINTF_BUFR_SIZE not functioning correctly. Instead of having garbled console messages, we should just see whether the issues are still there and analyze them. When I suggested enabling this by default for SMP configurations I was reminded it wasn't enabled because of potential stack overflow. Stack overflow shouldn't be a problem, since printf shouldn't be called recursively. You don't need recursion to overflow the stack. I'd love to see someone properly lock printf/console output instead of kludges like PRINTF_BUFR_SIZE. Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r194135 - in head/sys/dev/ath: . ath_hal ath_hal/ar5212 ath_hal/ar5416 ath_rate/sample
Author: sam Date: Sat Jun 13 23:36:54 2009 New Revision: 194135 URL: http://svn.freebsd.org/changeset/base/194135 Log: purge HAL_TXSTAT_ALTRATE; you can figure this out by checking ts_finaltsi and it cannot be used with MCS rate codes Modified: head/sys/dev/ath/ath_hal/ah_desc.h head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c head/sys/dev/ath/ath_rate/sample/sample.c head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/ath_hal/ah_desc.h == --- head/sys/dev/ath/ath_hal/ah_desc.h Sat Jun 13 23:27:04 2009 (r194134) +++ head/sys/dev/ath/ath_hal/ah_desc.h Sat Jun 13 23:36:54 2009 (r194135) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ah_desc.h,v 1.5 2008/11/10 04:08:00 sam Exp $ + * $FreeBSD$ */ #ifndef _DEV_ATH_DESC_H @@ -36,7 +36,6 @@ struct ath_tx_status { uint16_tts_tstamp; /* h/w assigned timestamp */ uint8_t ts_status; /* frame status, 0 = xmit ok */ uint8_t ts_rate;/* h/w transmit rate index */ -#defineHAL_TXSTAT_ALTRATE 0x80/* alternate xmit rate used */ int8_t ts_rssi;/* tx ack RSSI */ uint8_t ts_shortretry; /* # short retries */ uint8_t ts_longretry; /* # long retries */ Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c == --- head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c Sat Jun 13 23:27:04 2009(r194134) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c Sat Jun 13 23:36:54 2009(r194135) @@ -869,16 +869,13 @@ ar5212ProcTxDesc(struct ath_hal *ah, ts-ts_rate = MS(ads-ds_ctl3, AR_XmitRate0); break; case 1: - ts-ts_rate = MS(ads-ds_ctl3, AR_XmitRate1) | - HAL_TXSTAT_ALTRATE; + ts-ts_rate = MS(ads-ds_ctl3, AR_XmitRate1); break; case 2: - ts-ts_rate = MS(ads-ds_ctl3, AR_XmitRate2) | - HAL_TXSTAT_ALTRATE; + ts-ts_rate = MS(ads-ds_ctl3, AR_XmitRate2); break; case 3: - ts-ts_rate = MS(ads-ds_ctl3, AR_XmitRate3) | - HAL_TXSTAT_ALTRATE; + ts-ts_rate = MS(ads-ds_ctl3, AR_XmitRate3); break; } ts-ts_rssi = MS(ads-ds_txstatus1, AR_AckSigStrength); Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Sat Jun 13 23:27:04 2009(r194134) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Sat Jun 13 23:36:54 2009(r194135) @@ -519,16 +519,13 @@ ar5416ProcTxDesc(struct ath_hal *ah, ts-ts_rate = MS(ads-ds_ctl3, AR_XmitRate0); break; case 1: - ts-ts_rate = MS(ads-ds_ctl3, AR_XmitRate1) | - HAL_TXSTAT_ALTRATE; + ts-ts_rate = MS(ads-ds_ctl3, AR_XmitRate1); break; case 2: - ts-ts_rate = MS(ads-ds_ctl3, AR_XmitRate2) | - HAL_TXSTAT_ALTRATE; + ts-ts_rate = MS(ads-ds_ctl3, AR_XmitRate2); break; case 3: - ts-ts_rate = MS(ads-ds_ctl3, AR_XmitRate3) | - HAL_TXSTAT_ALTRATE; + ts-ts_rate = MS(ads-ds_ctl3, AR_XmitRate3); break; } Modified: head/sys/dev/ath/ath_rate/sample/sample.c == --- head/sys/dev/ath/ath_rate/sample/sample.c Sat Jun 13 23:27:04 2009 (r194134) +++ head/sys/dev/ath/ath_rate/sample/sample.c Sat Jun 13 23:36:54 2009 (r194135) @@ -561,7 +561,7 @@ ath_rate_tx_complete(struct ath_softc *s const HAL_RATE_TABLE *rt = sc-sc_currates; int mrr; - final_rix = rt-rateCodeToIndex[ts-ts_rate ~ HAL_TXSTAT_ALTRATE]; + final_rix = rt-rateCodeToIndex[ts-ts_rate]; short_tries = ts-ts_shortretry; long_tries = ts-ts_longretry + 1; frame_size = ds0-ds_ctl0 0x0fff; /* low-order 12 bits of ds_ctl0 */ @@ -579,7 +579,7 @@ ath_rate_tx_complete(struct ath_softc *s return; } mrr = sc-sc_mrretry !(ic-ic_flags IEEE80211_F_USEPROT); - if (!mrr || !(ts-ts_rate HAL_TXSTAT_ALTRATE)) { + if (!mrr || ts-ts_finaltsi == 0) { if (!IS_RATE_DEFINED(sn, final_rix)) { badrate(ifp, 0, ts-ts_rate, long_tries, ts-ts_status); return; Modified: head/sys/dev/ath/if_ath.c