From: Jim C. <jim...@gm...> - 2012-05-12 21:34:50
|
Use only the CONFIG_ACX_MAC80211_* symbols, the others add indirection and confusion. The critical fixes are those in acx_struct{hw,dev}.h, without these changes, the C files *MUST* define the non-CONFIG_* symbols to correctly control what symbols and fields are defined. And the C files are using the CONFIG_ACX_MAC80211_* symbols exclusively anyway. With the headers converted, we can remove the ACX_MAC80211_* defined in the C files without massive breakage. Signed-off-by: Jim Cromie <jim...@gm...> --- acx_struct_dev.h | 2 +- acx_struct_hw.h | 4 ++-- mem.c | 2 -- merge.c | 7 ------- pci.c | 1 - usb.c | 9 ++++----- 6 files changed, 7 insertions(+), 18 deletions(-) diff --git a/acx_struct_dev.h b/acx_struct_dev.h index f6ab6ba..4aa8058 100644 --- a/acx_struct_dev.h +++ b/acx_struct_dev.h @@ -520,7 +520,7 @@ struct acx_device { #endif /*** USB stuff ***/ -#ifdef ACX_MAC80211_USB +#ifdef CONFIG_ACX_MAC80211_USB struct usb_device *usbdev; rxbuffer_t rxtruncbuf; diff --git a/acx_struct_hw.h b/acx_struct_hw.h index 4096b35..3630145 100644 --- a/acx_struct_hw.h +++ b/acx_struct_hw.h @@ -892,7 +892,7 @@ struct rxdesc { } ACX_PACKED; /* size 52 = 0x34 */ -#if defined(ACX_MAC80211_PCI) || defined(ACX_MAC80211_MEM) +#if defined(CONFIG_ACX_MAC80211_PCI) || defined(CONFIG_ACX_MAC80211_MEM) /* Register I/O offsets */ #define ACX100_EEPROM_ID_OFFSET 0x380 @@ -999,7 +999,7 @@ struct rxhostdesc { /*********************************************************************** * BOM USB structures and constants */ -#ifdef ACX_MAC80211_USB +#ifdef CONFIG_ACX_MAC80211_USB /* Used for usb_txbuffer.desc field */ #define USB_TXBUF_TXDESC 0xA diff --git a/mem.c b/mem.c index a165986..dbabcfd 100644 --- a/mem.c +++ b/mem.c @@ -36,8 +36,6 @@ ** Eric McCorkle - Shadowsun */ -#define ACX_MAC80211_MEM 1 - #include "acx_debug.h" #define pr_acx pr_info diff --git a/merge.c b/merge.c index 3f16b1f..21fca06 100644 --- a/merge.c +++ b/merge.c @@ -30,13 +30,6 @@ #define pr_acx pr_info -/* this will be problematic when combined with the *_PCI macro. - acx_struct_dev.h defines iobase field 2x, with different types, for - MEM and PCI includes. Punt for now.. -*/ -#define ACX_MAC80211_MEM -/* #define ACX_MAC80211_PCI */ - #include "acx.h" #include "merge.h" diff --git a/pci.c b/pci.c index f5f3ddf..8d0cc49 100644 --- a/pci.c +++ b/pci.c @@ -15,7 +15,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#define ACX_MAC80211_PCI 1 #include "acx_debug.h" diff --git a/usb.c b/usb.c index 829d89d..9fc9bb4 100644 --- a/usb.c +++ b/usb.c @@ -15,18 +15,17 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * - * USB support for TI ACX100/TNETW1450 based devices. Many parts are taken from - * the PCI driver. + * USB support for TI ACX100/TNETW1450 based devices. Many parts are + * taken from the PCI driver. * * Authors: * Martin Wawro <martin.wawro AT uni-dortmund.de> * Andreas Mohr <andi AT lisas.de> * * LOCKING - * callback functions called by USB core are running in interrupt context - * and thus have names with _i_. + * callback functions called by USB core are running in interrupt + * context and thus have names with _i_. */ -#define ACX_MAC80211_USB 1 #define pr_fmt(fmt) "acxusb.%s: " fmt, __FUNCTION__ #include "acx_debug.h" -- 1.7.10.1.487.ga3935e6 |