Skip to content

Commit

Permalink
Merge madwifi-free branch into the trunk
Browse files Browse the repository at this point in the history
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3978 0192ed92-7a03-0410-a25b-9323aeb14dbd
  • Loading branch information
proski committed Apr 7, 2009
1 parent 25fbd8a commit 5702465
Show file tree
Hide file tree
Showing 227 changed files with 52,280 additions and 163,654 deletions.
2 changes: 1 addition & 1 deletion BuildCaps.inc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export ATH_CAP_SUPERG_COMP=0
endif

ifndef ATH_CAP_XR
export ATH_CAP_XR=1
export ATH_CAP_XR=0
endif

ifndef ATH_CAP_TPC
Expand Down
39 changes: 6 additions & 33 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -84,29 +84,6 @@ If the kernel was built outside the source directory, KERNELPATH should
point to the output directory where .config is located, not to the
sources.

This distribution includes support for a variety of target platforms.
Because of the binary nature of the HAL not all platforms are supported
(the list grows as time permits). The supported target platforms can be
found with:

$ ls hal/public/*.inc

A target specifies the CPU architecture, byte order (unless implied by
the CPU), and the ABI/file format. For most popular platforms, the
build system will find the appropriate files. When cross-compiling or
compiling for less common platforms, the target platform may need to be
specified using the TARGET variable, e.g:

$ make TARGET=armv4-le-elf

Consult the contents of the .inc file to find out what the target
platform is and what toolchain was used to build the HAL object module.
Beware of mixing toolchains; some target platforms require that the HAL
and driver be built with the same toolchain (i.e. compiler, assembler,
and linker) and the same compiler flags. If you get warnings about
incompatible compiler flags, chances are that you are compiling for a
wrong target or using an incompatible compiler.


Cross-compiling
---------------
Expand All @@ -115,17 +92,13 @@ The build system is designed to support cross-compiling without any
modification to the distribution files. It should be sufficient to
specify any parameters on the make command line.

In most cases, only KERNELPATH and CROSS_COMPILE need to be defined.
CROSS_COMPILE is the prefix for cross-compiling tools. For instance, if
the cross compiler is called arm-linux-gcc, set CROSS_COMPILE to
"arm-linux-":

$ make KERNELPATH=/usr/src/linux-arm CROSS_COMPILE=arm-linux-
In most cases, only KERNELPATH, ARCH and CROSS_COMPILE need to be
defined. ARCH is the architecture of the kernel. CROSS_COMPILE is the
prefix for cross-compiling tools. For instance, if compiling for ARM
and the cross compiler is called arm-linux-gcc, set ARCH to "arm" and
CROSS_COMPILE to "arm-linux-":

The build system determines ARCH and TARGET based on the .config file in
the Linux build tree. TARGET still may need to be provided on the
command line some uncommon systems. If ARCH is determined incorrectly,
please report it.
$ make KERNELPATH=/usr/src/linux-arm ARCH=arm CROSS_COMPILE=arm-linux-

If the compiler needs additional flags to compile userspace binaries,
you can redefine CC to include those flags.
Expand Down
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,11 @@ clean:
done
-$(MAKE) -C $(TOOLS) clean
rm -rf .tmp_versions
rm -f modules.order *.symvers svnversion.h
rm -f modules.order *.symvers Module.markers svnversion.h

.PHONY: info
info:
@echo "The following settings will be used for compilation:"
@echo "TARGET : $(TARGET)"
@echo "ARCH : $(ARCH)"
@echo "BUS : $(BUS)"
@echo "KERNELRELEASE: $(KERNELRELEASE)"
@echo "KERNELPATH : $(KERNELPATH)"
Expand Down
41 changes: 1 addition & 40 deletions Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,6 @@ $(error KERNELCONF: $(KERNELCONF) does not exist.)
endif
include $(KERNELCONF)

# Determine architecture of the kernel.
include $(TOP)/scripts/get_arch.mk
export ARCH

# Determine TARGET
include $(TOP)/ath_hal/ah_target.inc
export TARGET
COPTS += -DTARGET='"$(TARGET)"'

# KMODPATH nominates the directory where the modules will be
# installed to
KMODPATH := /lib/modules/$(KERNELRELEASE)/net
Expand All @@ -124,13 +115,9 @@ NM= nm
# Path to the HAL source code.
#
ifeq ($(HAL),)
HAL= $(TOP)/hal
HAL= $(TOP)/ath_hal
endif
#
# Path to HAL/OS interface code
#
ATH_HAL= $(TOP)/ath_hal
#
# Path to the 802.11 include files.
#
WLAN= $(TOP)/net80211
Expand All @@ -151,16 +138,6 @@ WARNINGS = -Werror -Wall
COPTS+= $(WARNINGS)
INCS= -include $(TOP)/include/compat.h -I$(TOP)/include

# TARGET defines the target platform architecture. It must match one of
# the target platforms supported by the HAL. The default target is the
# host machine architecture. You can override TARGET on the make command
# line or in the environment. See hal/linux/*.inc for the list of
# supported targets.
ifeq (,$(wildcard $(HAL)/public/$(TARGET).inc))
TARGETS=$(basename $(notdir $(wildcard $(HAL)/public/*.inc)))
$(error TARGET $(TARGET) is invalid, valid targets are: $(TARGETS))
endif

ifndef ATH_DEBUG_SPINLOCKS
export ATH_DEBUG_SPINLOCKS=0
endif
Expand Down Expand Up @@ -200,22 +177,6 @@ ifeq ($(strip $(HAL_DEBUG)),1)
COPTS+= -fno-inline -DAH_DEBUG=1
endif

# Don't let HAL mess with the toolchain - save toolchain variables
save_CC := $(CC)
save_LD := $(LD)
save_STRIP := $(STRIP)
save_OBJCOPY := $(OBJCOPY)
save_NM := $(NM)

include $(HAL)/public/$(TARGET).inc

# Restore toolchain variables
CC := $(save_CC)
LD := $(save_LD)
STRIP := $(save_STRIP)
OBJCOPY := $(save_OBJCOPY)
NM := $(save_NM)

include $(TOP)/BuildCaps.inc

ifeq ($(strip $(ATH_DEBUG)),1)
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ the PCI vendor ID with a tool like lspci, the Atheros vendor ID is
00:13.0 Ethernet controller: Unknown device 168c:0012 (rev 01)

but beware that some vendors use alternate vendor IDs (e.g 3Com, IBM).
The file hal/ah_devid.h has a list of known PCI IDs.
The file ath_hal/ah_devid.h has a list of known PCI IDs.


Building the driver
Expand Down
4 changes: 2 additions & 2 deletions ath/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ include $(TOP)/Makefile.inc
obj-m += ath_$(BUSNAME).o
ath_$(BUSNAME)-objs := if_ath.o if_ath_radar.o if_ath_hal_extensions.o if_ath_$(BUSNAME).o

INCS += -I$(TOP) -I$(ATH_HAL) -I$(HAL) -I$(WLAN)
INCS += -I$(TOP) -I$(HAL) -I$(WLAN)

EXTRA_CFLAGS+= $(INCS) $(COPTS) -DOPT_AH_H=\"public/$(TARGET).opt_ah.h\"
EXTRA_CFLAGS+= $(INCS) $(COPTS)

-include $(TOPDIR)/Rules.make

Expand Down
8 changes: 3 additions & 5 deletions ath/Makefile.kernel
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ srctree ?= .
TOP = $(srctree)/$(src)/..

include $(TOP)/BuildCaps.inc
include $(TOP)/ath_hal/ah_target.inc

ATH_HAL=$(TOP)/ath_hal
HAL= $(TOP)/hal
HAL= $(TOP)/ath_hal
WLAN= $(TOP)/net80211
COMPAT= $(TOP)/include

Expand All @@ -31,9 +29,9 @@ endif
COPTS += -DDFS_DOMAIN_ETSI -DDFS_DOMAIN_FCC

INCS = -include $(COMPAT)/compat.h -I$(COMPAT)
INCS += -I$(TOP) -I$(ATH_HAL) -I$(HAL) -I$(WLAN)
INCS += -I$(TOP) -I$(HAL) -I$(WLAN)

EXTRA_CFLAGS += $(INCS) $(COPTS) -DOPT_AH_H=\"public/$(TARGET).opt_ah.h\"
EXTRA_CFLAGS += $(INCS) $(COPTS)

ifneq ($(VERSION).$(PATCHLEVEL),2.4)
obj-$(CONFIG_ATHEROS) += ath_$(BUSNAME).o
Expand Down
14 changes: 5 additions & 9 deletions ath/if_ath.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,12 +583,14 @@ ath_attach(u_int16_t devid, struct net_device *dev, HAL_BUS_TAG tag)
"supported by the HAL/hardware.\n");
intmit = 0; /* Stop use in future ath_attach(). */
}
#if 0
else {
ath_hal_setintmit(ah, sc->sc_useintmit);
DPRINTF(sc, ATH_DEBUG_ANY, "Interference mitigation is "
"supported. Currently %s.\n",
(sc->sc_useintmit ? "enabled" : "disabled"));
}
#endif

sc->sc_dmasize_stomp = 0;

Expand Down Expand Up @@ -9766,8 +9768,8 @@ ath_getchannels(struct net_device *dev, u_int cc,

DPRINTF(sc, ATH_DEBUG_RATE,
"Channel %3d (%4d MHz) Max Tx Power %d dBm%s "
"[%d hw %d reg] Flags%s%s%s%s%s%s%s%s%s%s%s%s%"
"s%s%s%s%s%s%s%s%s%s%s%s\n",
"[%d hw %d reg] Flags%s%s%s%s%s%s%s%s%s%s%s%s"
"%s%s%s%s%s%s%s%s%s%s%s\n",
ichan->ic_ieee,
c->channel,
(c->maxRegTxPower > (c->maxTxPower / 2) ?
Expand Down Expand Up @@ -9811,9 +9813,6 @@ ath_getchannels(struct net_device *dev, u_int cc,
/* Dynamic CCK-OFDM channel */
(c->channelFlags & CHANNEL_DYN ?
" CF_DYNAMIC_TURBO" : ""),
/* GFSK channel (FHSS PHY) */
(c->channelFlags & CHANNEL_XR ?
" CF_FHSS" : ""),
/* Radar found on channel */
(c->channelFlags & IEEE80211_CHAN_RADAR ?
" CF_RADAR_SEEN" : ""),
Expand Down Expand Up @@ -10310,7 +10309,7 @@ ath_printtxbuf(const struct ath_buf *bf, int done)
u_int8_t status = done ? ts->ts_status : 0;

DPRINTF(sc, ATH_DEBUG_ANY,
"T (%p %08llx) %08x %08x %08x %08x %08x %08x %08x %08x%s%s%s%s%s%s%s%s%s\n",
"T (%p %08llx) %08x %08x %08x %08x %08x %08x %08x %08x%s%s%s%s%s%s\n",
ds, (u_int64_t)bf->bf_daddr,
ds->ds_link, ds->ds_data,
ds->ds_ctl0, ds->ds_ctl1,
Expand All @@ -10320,9 +10319,6 @@ ath_printtxbuf(const struct ath_buf *bf, int done)
status & HAL_TXERR_FILT ? " ERR_FILT" : "",
status & HAL_TXERR_FIFO ? " ERR_FIFO" : "",
status & HAL_TXERR_XTXOP ? " ERR_XTXOP" : "",
status & HAL_TXERR_DESC_CFG_ERR ? " ERR_DESC_CFG_ERR" : "",
status & HAL_TXERR_DATA_UNDERRUN ? " ERR_DATA_UNDERRUN" : "",
status & HAL_TXERR_DELIM_UNDERRUN ? " ERR_DELIM_UNDERRUN" : "",
status & 0x80 ? " (1<<7)" : "");
}
#endif /* AR_DEBUG */
Expand Down
Loading

0 comments on commit 5702465

Please sign in to comment.